Open main menu

For layout examples see the talk page.

Documentationviewedithistorypurge
This documentation is transcluded from Template:SimplSVG/doc.

This template is used for marking simple SVGs. A simple SVG must have its source code suitable for manual editing. Simple SVGs are created either by radical simplification of SVGs saved by graphics software[3] or directly (see {{Created with Text Editor}}).

The template automatically sets the following categories:

By template {{ValidSVG}} the file is categorized also into Valid SVG created with Text Editor, a hidden subcategory of hidden Valid SVG

W3CThe source code of this SVG is valid. U+21E6.svgThis link to the validator passes the option to show the SVG coding

Usage

{{SimplSVG}}

or {{ Image generationsb = size_beforesa = size_actualother parameters as described below }} 0(both parameters: sb and sa)
or {{ Image generation10 = Sother parameters as described below }} (see the documentation) to use the advantages of the template {{Image generation}},

e. g. creation of the Other fields / Information field, for a better and more uniform appearance in the {{Information}} box
Deutsch: Mit dem 4. Parameter kann die Kategorisierung gesteuert werden, siehe {{HandSVG}}.
English: Categorization can be controlled by parameter #4, see {{HandSVG}}.
Because just examples are useful and not crowding the categories with each file from a set of similar ones, any such categorization can be suppressed explicitly.

Another possibility is diffusion to a subcategory by providing parameter #4 with a control character (see explanation at docu of {{HandSVG}}).


The file is categorized as SVG Simplified when:

  • forced by categorization parameters,
    or
  • categorization is not suppressed and both file sizes are specified and the size afterwards is less than a twentieth of the size before.

In all other cases it is categorized as Valid SVG created with Text Editor. To prevent this category from becoming too crowded the (vector software)-assigned subcategory is selected instead, when the software name is specified by parameter #1.

Template parameters

ParameterDescriptionDefaultStatus
1created withThe name of the graphics tool: Inkscape, Sodipodi, Adobe, OpenOffice, CorelDRAW, …emptyoptional
2
sb
size beforeThe size the file had when saved by the graphics tool.
To see file sizes in bytes on description pages, you can use a user-script for help:
if(mw.config.get('wgNamespaceNumber')===6&&/SVG/i.test(mw.config.get('wgTitle').slice(-3)))
	importScript('User:Perhelion/simpleSVGcheck.js');
emptyoptional
3
sa
size actualThe size of the manually edited version
not specified if = 000; see Category:SVG files to be drawn by hand
emptyoptional
4controlEither uppercase S, M, N, X, or Y
  • S: categorization forced to SVG Simplified
  • M: categorization forced to category of editor as parameter #1
  • N: without explanatory text
  • X: any categorization is suppressed
  • Y: combines N and X
or a Control letter (see {{HandSVG}}): diffusion into subcategories of SVG Simplified
emptyoptional
5structured?character "H":[1] it is a high quality structured graphicemptyoptional
6talk page?character T:[1] an additional explanation points to the file talk pageemptyoptional
7categories (coded)a one-character code[1] for more categories:
SVG simplification by
emptyoptional
useredited byname of editor (person) who simplified the image, either the user name or in wiki code
coded e. g. with {{U}}, {{Uc}}, {{Ut}}, {{Ult}}, {{Ud}} or otherwise
emptyoptional
sub
subcat
subcategory
diffusion in "SVG Simplified"category diffusion: a suffix to the category name depending on parameter #2, e. g. sub=-examplesemptyoptional
sssdiffusion in "structured SVG"more category diffusion: Structured SVG Subcategory, e. g. sss=-examplesemptyoptional
vsubdiffusion in "valid/invalid"diffusion for Valid SVG created with Text Editor / Invalid SVG created with Text Editor
To suppress this subcategorizing set it to minus: vsub=-
emptyoptional
keysort keysort key within the categoryemptyoptional
widthsets width for the boxautooptional
stylesets or overrides other style attributes for the box. Set "<nowiki/>" to avoid linefeedemptyoptional
topicto specify the short code (e.g. "f" for "flag, "i" for "icon") of a topicemptyoptional
vtextoptional additional text for ValidSVG/InvalidSVG.optional
vstyle
vs
to set or overwrite other style attributes for the box of ValidSVG/InvalidSVG

e. g. vstyle=float:left, or short vs=fl for also smaller icon


for smallest display use vs=n orvs=- (see examples)
styleoptional
vwidthsets width for the box of ValidSVG/InvalidSVGwidthoptional
Template data
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

This template is used for marking simple SVGs. A simple SVG must have its source code suitable for manual editing. Simple SVG are created either by radical simplification of editor-created SVG graphics or directly ("Created with Text Editor" template).

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
created with1

The name of the [[:Category:Anti vector graphics program logos|graphics tool]]: Inkscape, Sodipodi, Adobe, OpenOffice, CorelDRAW, …

Stringoptional
size before2 sb

The size the file had when saved by the graphics tool.<br> To see file sizes in bytes on description pages, you can use a [[COM:User scripts|user-script]] for help:<small></small>

Numberoptional
size actual3 sa

The size of the manually edited version; not specified if="000"; see Category:SVG files to be drawn by hand

Numberoptional
control4

Either uppercase S, M, N, X or Y; "X" and "Y": any categorization is suppressed; "M": categorization forced to category of editor as parameter #1; "S": categorization forced to Category:SVG Simplified; "N" or "Y": without explanatory text; or a Control letter (see Template:HandSVG): diffusion into subcategories of Category:SVG Simplified

Stringoptional
structured?5

character <tt>H</tt>: it is a "high quality structured graphic"

Stringoptional
talk page?6

character "T": an additional explanation points to the file talk page

Stringoptional
categories (coded)7

a one-character code for more categories:

SVG simplification by …
  • a → avoidance
  • b → viewBox
  • c → cloning
  • d → dasharray
  • e → elimination
  • f → fill pattern
  • g → grouping
  • k → clipping
  • p → gradienting
  • % → text embedding

Stringoptional
sort keykey

sort key within the category

Stringoptional
diffusion in "structured SVG"sss

more category diffusion: Structured SVG Subcategory, e. g. sss=-examples

Stringoptional
style

sets or overrides other style attributes for the box. Set "&lt;nowiki/&gt;" to avoid linefeed

Stringoptional
diffusion in "SVG Simplified"sub subcat subcategory

category diffusion: a suffix to the category name depending on parameter #2, e. g. sub=-examples

Stringoptional
topic

to specify the short code (e.g. "f" for "flag, "i" for "icon") of a [[:Template:Igen/top|topic]]

Unknownoptional
edited byuser

name of editor (person) who simplified the image, either user name or in wiki code

Useroptional
vstyle vs

to set or overwrite other style attributes for the box of ValidSVG/InvalidSVG<br>

e. g. <code>vstyle=float:left</code>, or short <code>vs=fl</code> for also smaller icon<br> ----

for ''smallest display'' use <tt>vs=n</tt> or<tt>vs=-</tt> (see [[Template talk:SimplSVG#Examples how the template can display|examples]])

Default
<code>style</code>
Unknownoptional
diffusion in "valid/invalid"vsub

diffusion for "Valid SVG created with Text Editor" / "Invalid SVG created with Text Editor"; To suppress this subcategorizing set it to minus: "vsub=-"

Stringoptional
vtext

optional additional text for ValidSVG/InvalidSVG

Default
<code>.</code>
Unknownoptional
vwidth

sets width for the box of ValidSVG/InvalidSVG

Default
<code>width</code>
Unknownoptional
width

sets width for the box

Default
<code>auto</code>
Numberoptional

Additional information

The template is intended to be used in the following namespaces: the File namespace

The template is intended to be used by the following user groups: all users

See also

  1. a b c ":Any of these parameter values can be passed in any sequence, each as an argument for one of the parameters #5 to #9, in lower or upper case: …|5=T|6=b|7=c… is equivalent to …|7=B|8=t|9=c….
  2. a b c Jeder dieser Parameterwerte kann beliebig als Argument eines der Parameter #5 bis #9 übergeben werden, in Klein- oder Großbuchstaben: …|5=H|6=b|7=f… ist gleichwertig mit …|5=F|7=h|9=B….
  3. Wikimedia Commons contains hundreds of SVG images that were drawn in vector editors and then edited manually, e. g. for compatibility reasons. Most of them still contain complicated (vector editor)-produced code. Manual editing itself does not qualify an SVG image as {{SimplSVG}}.