Template:SimplSVG/doc
This template is used for marking SVG files which use "simplified" code. Such files must have their source code suitable for manual editing. SVG files are simplified by (generally radical) optimization of files created by SVG editors.[3]
The template automatically sets the following categories:
- SVG Simplified or (depending on parameter #1 and #4 to #7) one of its subcategories or
- Valid SVG created with Text Editor or (depending on parameter #1) one of its subcategories or
- Structured SVG controlled by parameter #5 to #7 = "H"[clarification needed] or
- none if suppressed (parameter #4 = "X" or "Y")
- SVG files to be drawn by hand if only tagging files or categories (see: parameter #3)[clarification needed]
By template {{ValidSVG}} the file is categorized also into Valid SVG created with Text Editor, a hidden subcategory of hidden Valid SVG[clarification needed]
Usage
{{SimplSVG}}
or {{ Image generation | sb = size_before | sa = size_actual | other parameters as described below }} (both parameters: sb and sa)
or {{ Image generation | 10 = S | other 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
or File generation description with parameter "Simplified SVG"[clarification needed]
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.[clarification needed]
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.
For layout examples see the talk page.Template parameters
Parameter | Description | Default | Status | |
---|---|---|---|---|
1 | created with | The name of the graphics tool: Inkscape, Sodipodi, Adobe Illustrator, OpenOffice, CorelDRAW, …[clarification needed] | empty | optional |
2 sb | size before | The size the file had when saved by the graphics tool. To see file sizes in bytes on description pages, you can use simpleSVGcheck.js. | empty | optional |
3 sa | size actual | The size of the manually edited version not specified if = 000 ; see Category:SVG files to be drawn by hand[clarification needed] | empty | optional |
4 | control | Either uppercase S , M , N , X , or Y
| empty | optional |
5 | structured? | character "H":[1] it is a high quality structured graphic[clarification needed] | empty | optional |
6 | talk page? | character T :[1] an additional explanation points to the file talk page[clarification needed] | empty | optional |
7 | categories (coded) | a one-character code[1] for more categories:
| empty | optional |
user | edited by | name 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 | empty | optional |
sub subcat subcategory | diffusion in "SVG Simplified" | category diffusion: a suffix to the category name depending on parameter #2, e. g. sub=-examples [clarification needed] | empty | optional |
sss | diffusion in "structured SVG" | more category diffusion: Structured SVG Subcategory, e. g. sss=-examples [clarification needed] | empty | optional |
vsub | diffusion 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=- [clarification needed] | empty | optional |
key | sort key | sort key within the category | empty | optional |
width | sets width for the box[clarification needed] | auto | optional | |
style | sets or overrides other style attributes for the box.[clarification needed] Setting a value (like "<nowiki/>") prevents the newline which this template adds after itself by default. | empty | optional | |
topic | to specify the short code (e.g. "f" for "flag, "i" for "icon") of a topic | empty | optional | |
vwidth | sets width for the box of {{Valid SVG}} / {{Invalid SVG}} | width | optional | |
vstyle vs | to set or overwrite other style attributes for the box of {{Valid SVG}} / {{Invalid SVG}} for smallest display use vs=n or vs=- (see examples) |
style | optional | |
vtext | optional additional text for ValidSVG/InvalidSVG | . | optional | |
pu | previous user name[clarification needed] | empty | optional |
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
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 Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information This template is used for marking SVG files which use "optimal" code. Such files must have their source code suitable for manual editing. Optimal SVGs are created either manually (see "Created with Text Editor" template) or by (generally radical) optimization/simplification of files created by SVG editors.
|
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
Other SVG created with ... templates, e. g.: {{HandSVG}}, {{Inkscape}}, {{Sodipodi}}, {{Adobe}}, {{LibreOffice}}, {{Gnuplot}}
- ↑ 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…
.[clarification needed] - ↑ 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…
. - ↑ 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 code generated by vector editors. Manual editing itself does not always make a file "optimal".