Template:Convert to SVG

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Converted to SVG.svg
All images in this gallery could be recreated using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.
Documentation icon Documentationviewedithistorypurge

This documentation is transcluded from Template:Convert to SVG/doc.

Used to tag images which should be converted to SVG.

The template automatically sets the following categories: Within the main category Category:Images for cleanup either the subcategory Category:Images that should use vector graphics or (for files of the type "JPG") its subcategory Category:JPG images that should use vector graphics will be used; for JPG files also the tag {{BadJPEG}} will be set automatically.

The type of the image (such as "flag", see table below) should be given as a parameter, to add the image to an appropriate sub-category (e.g. Category:Flag images that should use vector graphics). If an invalid value is specified the image defaults to "Category:Other images that should use vector graphics".

Usage

{{Convert to SVG |1= }}

The following are possible values for parameter 1:

Value Used for... Category #
architecture architecture blueprints category 413
art simple images based on artwork, or otherwise related to culture and art category 351
astronomical map a subcategory of map category 81
battle map maps of battles and war events category 147
biology images related to biology, e.g. animal/plant diagrams, human anatomy, anything biological in nature category 1,273
biogeographical map distribution & range maps of species category 1,641
chemical only for chemical structural formulae, especially skeletal formulae; use chemistry for everything else category 1,359
chemistry images related to chemistry, e.g. molecular orbitals, crystal structure, lab equipment (use chemical for structural formulae) category 1,286
circuit electronic circuit diagrams, etc. category 795
city map a subcategory of map category 305
coat of arms coats of arms category 15,903
demographic map demographic maps category 104
diagram diagrams (e.g. mind maps, flow charts, tree data structures, schematics) that do not fit any other subcategory category 4,890
economic map a subcategory of map category 233
economy economic charts category 58
election map maps of elections and votes category 270
family tree a subcategory of tree diagram category 68
fictional map a subcategory of map category 77
flag flags category 6,419
flag map a subcategory of map category 628
game a subcategory of sport category 74
geology images related to geology category 303
graph visual plots of data, e.g. line charts, pie and bar charts, etc. (add graphs to a more specific category like economy, math, physics, chemistry or biology where appropriate) category 4,593
health map maps of diseases category 49
historical map a subcategory of map category 1,038
icon icons, which would be suitable as desktop icons for example (otherwise symbol may be better) category 761
incident map maps of incidents and accidents category 56
law-related map a subcategory of map category 85
license plate images of license plates category 19
linguistic map a subcategory of map category 460
locator map a subcategory of map category 9,749
logo logos, or images intended to be logos category 9,107
map geographical maps category 2,136
math mathematical content (see also should use TeX) category 2,646
military insignia military insignia category 1,800
military map a subcategory of map category 283
military related military related images category 29
musical music-related images category 70
musical notation sheet music, musical scales, images of notes, etc. category 743
old map a subcategory of map category 61
organization map maps of organizations memberships category 50
physics images related to physics category 1,201
proposed entity map a subcategory of map category 40
realistic images of realistic physical objects, people, etc. category 79
religion map a subcategory of map category 85
ribbon a subcategory of Military insignia category 939
road map a subcategory of map category 327
seal seal images category 45
sign images of road signs, information and prohibitive signs category 234
signature most images of signatures are best stored in vector format category 241
simple simple images, which are to be converted with little effort category 15
sport sport-related images (except for logos) category 324
sport logo a subcategory of logo category 262
sport map a subcategory of map category 207
sports clothing a subcategory of sport category 797
symbol simple arrangements of lines and shapes (e.g. warning and informational signs, road signs, arrow symbols, etc.); use icon if it looks like a desktop icon category 1,667
tartan images of (Scottish) tartans category 263
technology images related to technology and/or engineering, e.g. construction plans, blueprints, technical drawings of cars/planes/ships/weapons, illustrations of industrial processes, etc. (use circuit for electronic circuits and architecture for architecture blueprints, though). category 1,338
text images mainly consisting of text in any language (but use text logo for textlogos) category 1,635
text logo a subcategory of logo category 431
transport map a subcategory of Map images that should use vector graphics category 1,240
tree diagram a subcategory of diagram category 160
Other default (but see below) category 1,047

Any other parameter value xxxx not mentioned above will cause:

  1. if the subcategory "Category: Xxxx images that should use vector graphics" exists, the file is categorized therein
  2. if such a subcategory does not (yet) exist, the file will be default categorized to Other images that should use vector graphics

Pictogram voting info.svg Note This scheme might still need some work. Feel free to improve the definition of the respective category types to make them more precise and/or clearer.

You can use a user-script with the following code (the first highlighted line can be custom and additional). Simply paste it into your common.js (or other MediaWiki skin related) JavaScript page. You can also edit this (script page) per user-preferences:

var convertToSVGTypes = "meteorology, road sign";
importScript('User:Perhelion/fixconverttosvg.js');

If reasonable please notify the uploader(s) by placing the following code on their talk page:

{{subst:SVG/notify|Filename.ext}}

Template parameters

ParameterDescriptionDefaultStatus
1
topicClassify image by topic, as above (complete list)otherrequired
2classClassify image by simplicity
Specify with 2=simple very simple images, extremely easy to draw with a text editor for files of trivial SVG code
emptyoptional
vectordatavector dataSpecify (e.g. give a URL or Wikilink) where existing vector data can be found that may help to do the vectorization. This can be an image in a different vector format (e.g. PDF, PS or EPS) but also a similar SVG that already contains parts of the image that needs to be converted. If set, the file is automatically added to Category:Images that should use vector graphics (vector data available).emptyoptional
categorycategorySpecify another category (with brackets, otherwise it will become a comment). category= to avoid categorizingemptyoptional
nfutextany value to create the msg "no fair use"emptyoptional
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

Used to tag images which should be converted to SVG.

Template parameters

ParameterDescriptionTypeStatus
topic1

Classify image by topic, as above ([[Template:Convert to SVG#Usage|complete list]])

Default
other
Stringrequired
class2

Classify image by [[:Category:Simple images that should use vector graphics|simplicity]]<br>Specify with <tt>2=simple</tt> ''very simple'' images, extremely easy to draw with a [[:Category:Created with Text Editor|text editor]] for&nbsp;files&nbsp;of&nbsp;trivial&nbsp;SVG&nbsp;code

Stringoptional
categorycategory

Specify another category (with brackets, otherwise it will become a comment). <code>category=</code> to avoid categorizing

Stringoptional
textnfu

any value to create the msg "no fair use"

Stringoptional
vector datavectordata

Specify (e.g. give a URL or Wikilink) where existing vector data can be found that may help to do the vectorization. This can be an image in a different vector format (e.g. PDF, PS or EPS) but also a similar SVG that already contains parts of the image that needs to be converted. If set, the file is automatically added to “Images that should use vector graphics (vector data available)” category.

Stringoptional

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

Placement: At the bottom of the page

See also

Localization

العربية | беларуская (тарашкевіца)‎ | български | català | čeština | dansk | Deutsch | English | Esperanto | español | eesti | euskara | فارسی | suomi | français | galego | עברית | magyar | italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | lietuvių | македонски | മലയാളം | Plattdüütsch | Nederlands | norsk nynorsk | norsk | polski | português | português do Brasil | română | русский | sicilianu | slovenščina | shqip | српски / srpski | svenska | ไทย | Türkçe | українська | Tiếng Việt | 粵語 | 中文 | 中文(中国大陆)‎ | 中文(简体)‎ | 中文(繁體)‎ | 中文(新加坡)‎ | +/−

This template is localized through {{Autotranslate}}. The layout of the template can be found under Template:Convert to SVG/layout.

To add your language to the list of languages supported by this template, please copy the code of Template:Convert to SVG/en (or any other language version you prefer to translate) and replace the text strings in there (the form below can be used to create a translation, the English version is preloaded in the edit box). Please change the parameter lang from en (or whatever language you are translating) to the language code of your language.