CINXE.COM
User:Glrx - Wikimedia Commons
<!DOCTYPE html> <html class="client-nojs" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>User:Glrx - Wikimedia Commons</title> <script>(function(){var className="client-js";var cookie=document.cookie.match(/(?:^|; )commonswikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"d3241072-e8f1-4157-ba1e-cc126d9de053","wgCanonicalNamespace":"User","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":2,"wgPageName":"User:Glrx","wgTitle":"Glrx","wgCurRevisionId":962100398,"wgRevisionId":962100398,"wgArticleId":113551363,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[ "Pages with syntax highlighting errors","Pages with coordinates","Pages with math errors","User en","User en-N","Pages with math render errors"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"User:Glrx","wgRelevantArticleId":113551363,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRelevantUserName":"Glrx","wgNoticeProject":"commons","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":false,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":400000,"wgCentralAuthMobileDomain":false,"upwizPropertyTitles":{"P180":"Main subjects visible in this work"},"upwizPropertyPlaceholders":{"P180":"e.g., Angolan giraffe"}, "upwizPropertyCopyLabels":{"P180":"Main subjects"},"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"personal","wgULSisCompactLinksEnabled":true,"wgVector2022LanguageInHeader":false,"wgULSisLanguageSelectorEmpty":false,"wbmiDefaultProperties":["P180"],"wbmiPropertyTitles":{"P180":"Items portrayed in this file"},"wbmiPropertyTypes":{"P180":"wikibase-item"},"wbmiRepoApiUrl":"/w/api.php","wbmiHelpUrls":{"P180":"https://commons.wikimedia.org/wiki/Special:MyLanguage/Commons:Depicts"},"wbmiExternalEntitySearchBaseUri":"https://www.wikidata.org/w/api.php","wbmiSupportedDataTypes":["wikibase-item","string","quantity","time","monolingualtext","external-id","globe-coordinate","url"],"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"]};RLSTATE={"ext.gadget.Long-Image-Names-in-Categories":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready", "user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","mediawiki.page.gallery.styles":"ready","ext.math.styles":"ready","ext.kartographer.style":"ready","skins.vector.styles.legacy":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","codex-search-styles":"ready","ext.uls.pt":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","ext.kartographer.link","mediawiki.page.media","site","mediawiki.page.ready","mediawiki.toc","skins.vector.legacy.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.Slideshow","ext.gadget.ZoomViewer","ext.gadget.CollapsibleTemplates","ext.gadget.fastcci","ext.gadget.Stockphoto","ext.gadget.WatchlistNotice","ext.gadget.AjaxQuickDelete","ext.gadget.WikiMiniAtlas","ext.gadget.LanguageSelect","ext.gadget.PictureOfTheYearEnhancements","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.wikimediaEvents.wikibase","ext.navigationTiming","ext.uls.compactlinks","ext.uls.interface","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=codex-search-styles%7Cext.cite.styles%7Cext.kartographer.style%7Cext.math.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.pt%7Cext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.page.gallery.styles%7Cskins.vector.styles.legacy&only=styles&skin=vector"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.gadget.Long-Image-Names-in-Categories&only=styles&skin=vector"> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="User:Glrx - Wikimedia Commons"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//commons.m.wikimedia.org/wiki/User:Glrx"> <link rel="alternate" type="application/x-wiki" title="Edit" href="/w/index.php?title=User:Glrx&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/commons.png"> <link rel="icon" href="/static/favicon/commons.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikimedia Commons"> <link rel="EditURI" type="application/rsd+xml" href="//commons.wikimedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://commons.wikimedia.org/wiki/User:Glrx"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/"> <link rel="alternate" type="application/atom+xml" title="Wikimedia Commons Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin-vector-legacy mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-2 ns-subject mw-editable page-User_Glrx rootpage-User_Glrx skin-vector action-view"><div id="mw-page-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div> <div id="content" class="mw-body" role="main"> <a id="top"></a> <div id="siteNotice"><!-- CentralNotice --></div> <div class="mw-indicators"> </div> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">User</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Glrx</span></h1> <div id="bodyContent" class="vector-body"> <div id="siteSub" class="noprint">From Wikimedia Commons, the free media repository</div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="contentSub2"></div> <div id="jump-to-nav"></div> <a class="mw-jump-link" href="#mw-head">Jump to navigation</a> <a class="mw-jump-link" href="#searchInput">Jump to search</a> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><table id="userboxes" style="margin-left: 1em; margin-bottom: 0.5em; width: 242px; text-align: start; float: right; border: var(--border-color-progressive--hover,#99B3FF) solid 1px; background-color: var(--background-color-base,#FFFFFF);"> <tbody><tr> <th><a href="/wiki/Commons:Userboxes" title="Commons:Userboxes">Userboxes</a> </th></tr> <tr> <td> <style data-mw-deduplicate="TemplateStyles:r905769005">.mw-parser-output .ubx-floatdefault[dir="ltr"],.mw-parser-output .ubx-floatopposite[dir="rtl"],.mw-parser-output .ubx-floatleft{float:left}.mw-parser-output .ubx-floatdefault[dir="rtl"],.mw-parser-output .ubx-floatopposite[dir="ltr"],.mw-parser-output .ubx-floatright{float:right}.mw-parser-output .ubx-floatnone{float:none}</style> <div class="ubx ubx-floatleft" dir="ltr" lang="en"><div class="commonsuserbox TemplateBUser" style="float:left;border:1px solid #6EF7A7;margin:1px;width:238px"><table role="presentation" style="border-collapse:collapse;width:238px;margin-bottom:0;margin-top:0;background:#C5FCDC;color:inherit"><tbody><tr><td class="TemplateBUserLeft" style="border:0;width:45px;height:45px;background:#6EF7A7;text-align:center;font-size:14pt;font-weight:bold;color:#000000;padding:0 1px 0 0;line-height:1.25em;vertical-align:middle"><div class="TemplateBUserImgText">en</div></td><td class="TemplateBUserInfo" style="border:0;text-align:left;font-size:8pt;padding:0 4px 0 4px;height:45px;line-height:1.25em;color:#000000;vertical-align:middle;padding:1px 4px;"><div class="plainlinks TemplateBUserText" dir="ltr">This user is a <b><a href="/wiki/Category:User_en-N" title="Category:User en-N">native</a></b> <b><a href="/wiki/Category:User_en" title="Category:User en">English</a></b> speaker.</div></td></tr></tbody></table></div></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r905769005"> <div class="ubx ubx-floatdefault" dir="ltr" lang="en"><div class="commonsuserbox" style="float:left;border:1px solid #333366;margin:1px;width:238px"><table role="presentation" style="border-collapse:collapse;width:238px;margin-bottom:0;margin-top:0;background:#DDDDDD;color:inherit"><tbody><tr><td style="border:0;width:45px;height:45px;background:#333333;text-align:center;font-size:12pt;font-weight:bold;color:#FFFFFF;padding:0 1px 0 0;line-height:1.25em;vertical-align:middle">1,000+</td><td style="border:0;text-align:left;font-size:8pt;padding:0 4px 0 4px;height:45px;line-height:1.25em;color:#000000;vertical-align:middle"><span class="plainlinks neverexpand">This user has made <a class="external text" href="https://commons.wikimedia.org/wiki/Special:CentralAuth/Glrx"><span style="color: #000000">over <b>1,000</b> contributions</span></a> to <a href="https://en.wikipedia.org/wiki/Wikimedia_Foundation#Projects" class="extiw" title="w:Wikimedia Foundation">Wikimedia projects</a>.</span></td></tr></tbody></table></div></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r905769005"> <div class="ubx ubx-floatdefault" dir="ltr" lang="en"><div class="commonsuserbox" style="float:left;border:1px solid #333366;margin:1px;width:238px"><table role="presentation" style="border-collapse:collapse;width:238px;margin-bottom:0;margin-top:0;background:#FF99CC;color:inherit"><tbody><tr><td style="border:0;width:45px;height:45px;background:#FF3399;text-align:center;font-size:10pt;font-weight:bold;color:#000000;padding:0 1px 0 0;line-height:1.25em;vertical-align:middle">1,000+</td><td style="border:0;text-align:left;font-size:8pt;padding:0 4px 0 4px;height:45px;line-height:1.25em;color:#000000;vertical-align:middle"><span class="plainlinks neverexpand">This user has made <a class="external text" href="//tools.wmflabs.org/xtools/pcount/index.php?name=Glrx&lang=commons&wiki=wikimedia"><span style="color: #000000">over <b>1,000</b> contributions to</span></a> Commons.</span></td></tr></tbody></table></div></div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r905769005"> <div class="ubx ubx-floatleft" dir="ltr" lang="en"><div class="commonsuserbox" style="float:left;border:1px solid #999;margin:1px;width:238px"><table role="presentation" style="border-collapse:collapse;width:238px;margin-bottom:0;margin-top:0;background:#eee;color:inherit"><tbody><tr><td style="border:0;width:45px;height:45px;background:#ddd;text-align:center;font-size:14pt;font-weight:bold;color:black;padding:0 1px 0 0;line-height:1.25em;vertical-align:middle"><span typeof="mw:File"><span><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Noia_64_apps_karm.svg/43px-Noia_64_apps_karm.svg.png" decoding="async" width="43" height="42" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Noia_64_apps_karm.svg/65px-Noia_64_apps_karm.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Noia_64_apps_karm.svg/86px-Noia_64_apps_karm.svg.png 2x" data-file-width="51" data-file-height="50" /></span></span></td><td style="border:0;text-align:left;font-size:8pt;padding:0 4px 0 4px;height:45px;line-height:1.25em;color:black;vertical-align:middle">This user has been on Wikimedia Commons for<br /><b>4 years, 10 months and 26 days</b></td></tr></tbody></table></div></div> </td></tr></tbody></table> <div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#MediaWiki_information"><span class="tocnumber">1</span> <span class="toctext">MediaWiki information</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Notes_about_images"><span class="tocnumber">2</span> <span class="toctext">Notes about images</span></a> <ul> <li class="toclevel-2 tocsection-3"><a href="#Information_for_downsampling"><span class="tocnumber">2.1</span> <span class="toctext">Information for downsampling</span></a></li> <li class="toclevel-2 tocsection-4"><a href="#Caching"><span class="tocnumber">2.2</span> <span class="toctext">Caching</span></a></li> <li class="toclevel-2 tocsection-5"><a href="#Caches_can_cause_trouble"><span class="tocnumber">2.3</span> <span class="toctext">Caches can cause trouble</span></a></li> <li class="toclevel-2 tocsection-6"><a href="#More_on_server_caching"><span class="tocnumber">2.4</span> <span class="toctext">More on server caching</span></a></li> <li class="toclevel-2 tocsection-7"><a href="#Domain_names"><span class="tocnumber">2.5</span> <span class="toctext">Domain names</span></a></li> <li class="toclevel-2 tocsection-8"><a href="#Alt_text"><span class="tocnumber">2.6</span> <span class="toctext">Alt text</span></a></li> <li class="toclevel-2 tocsection-9"><a href="#Page_regeneration"><span class="tocnumber">2.7</span> <span class="toctext">Page regeneration</span></a></li> <li class="toclevel-2 tocsection-10"><a href="#The_advantage_of_the_img_element"><span class="tocnumber">2.8</span> <span class="toctext">The advantage of the img element</span></a></li> <li class="toclevel-2 tocsection-11"><a href="#Media_for_cleanup"><span class="tocnumber">2.9</span> <span class="toctext">Media for cleanup</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-12"><a href="#SVG_images"><span class="tocnumber">3</span> <span class="toctext">SVG images</span></a> <ul> <li class="toclevel-2 tocsection-13"><a href="#Directly_serving_SVG"><span class="tocnumber">3.1</span> <span class="toctext">Directly serving SVG</span></a></li> <li class="toclevel-2 tocsection-14"><a href="#Many_SVG_files_on_Commons_do_not_have_a_namespace_declaration"><span class="tocnumber">3.2</span> <span class="toctext">Many SVG files on Commons do not have a namespace declaration</span></a></li> <li class="toclevel-2 tocsection-15"><a href="#SVG_is_XML_or_not"><span class="tocnumber">3.3</span> <span class="toctext">SVG is XML or not</span></a> <ul> <li class="toclevel-3 tocsection-16"><a href="#XML_details"><span class="tocnumber">3.3.1</span> <span class="toctext">XML details</span></a></li> <li class="toclevel-3 tocsection-17"><a href="#SVG_spelling"><span class="tocnumber">3.3.2</span> <span class="toctext">SVG spelling</span></a></li> <li class="toclevel-3 tocsection-18"><a href="#SVG_treading_where_it_should_not"><span class="tocnumber">3.3.3</span> <span class="toctext">SVG treading where it should not</span></a></li> <li class="toclevel-3 tocsection-19"><a href="#SVG_DOM"><span class="tocnumber">3.3.4</span> <span class="toctext">SVG DOM</span></a> <ul> <li class="toclevel-4 tocsection-20"><a href="#Style_information_in_the_DOM"><span class="tocnumber">3.3.4.1</span> <span class="toctext">Style information in the DOM</span></a></li> <li class="toclevel-4 tocsection-21"><a href="#Attributes_that_could_be_removed"><span class="tocnumber">3.3.4.2</span> <span class="toctext">Attributes that could be removed</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-2 tocsection-22"><a href="#Validation"><span class="tocnumber">3.4</span> <span class="toctext">Validation</span></a></li> <li class="toclevel-2 tocsection-23"><a href="#Malicious_SVG"><span class="tocnumber">3.5</span> <span class="toctext">Malicious SVG</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-24"><a href="#SVG_recommendations"><span class="tocnumber">4</span> <span class="toctext">SVG recommendations</span></a> <ul> <li class="toclevel-2 tocsection-25"><a href="#File_size"><span class="tocnumber">4.1</span> <span class="toctext">File size</span></a> <ul> <li class="toclevel-3 tocsection-26"><a href="#Files_that_are_unnecessarily_large"><span class="tocnumber">4.1.1</span> <span class="toctext">Files that are unnecessarily large</span></a></li> <li class="toclevel-3 tocsection-27"><a href="#Polar_patterns"><span class="tocnumber">4.1.2</span> <span class="toctext">Polar patterns</span></a></li> <li class="toclevel-3 tocsection-28"><a href="#Compression_using_pattern_elements"><span class="tocnumber">4.1.3</span> <span class="toctext">Compression using pattern elements</span></a></li> <li class="toclevel-3 tocsection-29"><a href="#Filters"><span class="tocnumber">4.1.4</span> <span class="toctext">Filters</span></a> <ul> <li class="toclevel-4 tocsection-30"><a href="#Issues_with_enable-background"><span class="tocnumber">4.1.4.1</span> <span class="toctext">Issues with enable-background</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-31"><a href="#Difficult_tasks"><span class="tocnumber">4.1.5</span> <span class="toctext">Difficult tasks</span></a></li> <li class="toclevel-3 tocsection-32"><a href="#Extraction_of_groups"><span class="tocnumber">4.1.6</span> <span class="toctext">Extraction of groups</span></a></li> <li class="toclevel-3 tocsection-33"><a href="#SVG_optimizers"><span class="tocnumber">4.1.7</span> <span class="toctext">SVG optimizers</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-34"><a href="#Title_and_description"><span class="tocnumber">4.2</span> <span class="toctext">Title and description</span></a></li> <li class="toclevel-2 tocsection-35"><a href="#Metadata"><span class="tocnumber">4.3</span> <span class="toctext">Metadata</span></a> <ul> <li class="toclevel-3 tocsection-36"><a href="#More_discussion_about_copyleft_trolling"><span class="tocnumber">4.3.1</span> <span class="toctext">More discussion about copyleft trolling</span></a></li> <li class="toclevel-3 tocsection-37"><a href="#Attribution"><span class="tocnumber">4.3.2</span> <span class="toctext">Attribution</span></a> <ul> <li class="toclevel-4 tocsection-38"><a href="#Long_chain_attribution"><span class="tocnumber">4.3.2.1</span> <span class="toctext">Long chain attribution</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-39"><a href="#Other_metadata"><span class="tocnumber">4.3.3</span> <span class="toctext">Other metadata</span></a></li> <li class="toclevel-3 tocsection-40"><a href="#The_mess_that_is_xml:lang"><span class="tocnumber">4.3.4</span> <span class="toctext">The mess that is xml:lang</span></a></li> <li class="toclevel-3 tocsection-41"><a href="#Creative_Commons_license_requirements"><span class="tocnumber">4.3.5</span> <span class="toctext">Creative Commons license requirements</span></a></li> <li class="toclevel-3 tocsection-42"><a href="#Dublin_Core_and_Creative_Commons"><span class="tocnumber">4.3.6</span> <span class="toctext">Dublin Core and Creative Commons</span></a></li> <li class="toclevel-3 tocsection-43"><a href="#Dublin_Core"><span class="tocnumber">4.3.7</span> <span class="toctext">Dublin Core</span></a></li> <li class="toclevel-3 tocsection-44"><a href="#Creative_Commons"><span class="tocnumber">4.3.8</span> <span class="toctext">Creative Commons</span></a></li> <li class="toclevel-3 tocsection-45"><a href="#Creative_Commons_and_closure"><span class="tocnumber">4.3.9</span> <span class="toctext">Creative Commons and closure</span></a></li> <li class="toclevel-3 tocsection-46"><a href="#Adobe_Systems_XMP"><span class="tocnumber">4.3.10</span> <span class="toctext">Adobe Systems XMP</span></a></li> <li class="toclevel-3 tocsection-47"><a href="#Inkscape_metadata"><span class="tocnumber">4.3.11</span> <span class="toctext">Inkscape metadata</span></a></li> <li class="toclevel-3 tocsection-48"><a href="#Well-known_licenses"><span class="tocnumber">4.3.12</span> <span class="toctext">Well-known licenses</span></a></li> <li class="toclevel-3 tocsection-49"><a href="#Complicated_licenses"><span class="tocnumber">4.3.13</span> <span class="toctext">Complicated licenses</span></a></li> <li class="toclevel-3 tocsection-50"><a href="#Metadata_checker"><span class="tocnumber">4.3.14</span> <span class="toctext">Metadata checker</span></a> <ul> <li class="toclevel-4 tocsection-51"><a href="#Related_topics"><span class="tocnumber">4.3.14.1</span> <span class="toctext">Related topics</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-52"><a href="#Removing_metadata"><span class="tocnumber">4.3.15</span> <span class="toctext">Removing metadata</span></a></li> <li class="toclevel-3 tocsection-53"><a href="#Other_uses_of_metadata"><span class="tocnumber">4.3.16</span> <span class="toctext">Other uses of metadata</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-54"><a href="#Transparent_backgrounds"><span class="tocnumber">4.4</span> <span class="toctext">Transparent backgrounds</span></a></li> <li class="toclevel-2 tocsection-55"><a href="#Removing_watermarks"><span class="tocnumber">4.5</span> <span class="toctext">Removing watermarks</span></a></li> <li class="toclevel-2 tocsection-56"><a href="#Detect_symbol_candidates"><span class="tocnumber">4.6</span> <span class="toctext">Detect symbol candidates</span></a></li> <li class="toclevel-2 tocsection-57"><a href="#Use_styles"><span class="tocnumber">4.7</span> <span class="toctext">Use styles</span></a> <ul> <li class="toclevel-3 tocsection-58"><a href="#CSS_selectors"><span class="tocnumber">4.7.1</span> <span class="toctext">CSS selectors</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-59"><a href="#Support_for_CSS_units"><span class="tocnumber">4.8</span> <span class="toctext">Support for CSS units</span></a></li> <li class="toclevel-2 tocsection-60"><a href="#Media_queries"><span class="tocnumber">4.9</span> <span class="toctext">Media queries</span></a></li> <li class="toclevel-2 tocsection-61"><a href="#Width,_height,_and_viewBox"><span class="tocnumber">4.10</span> <span class="toctext">Width, height, and viewBox</span></a></li> <li class="toclevel-2 tocsection-62"><a href="#Errors_and_validation"><span class="tocnumber">4.11</span> <span class="toctext">Errors and validation</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-63"><a href="#SVG_text"><span class="tocnumber">5</span> <span class="toctext">SVG text</span></a> <ul> <li class="toclevel-2 tocsection-64"><a href="#Syntax"><span class="tocnumber">5.1</span> <span class="toctext">Syntax</span></a> <ul> <li class="toclevel-3 tocsection-65"><a href="#The_mess_that_is_xml:space"><span class="tocnumber">5.1.1</span> <span class="toctext">The mess that is xml:space</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-66"><a href="#Fonts"><span class="tocnumber">5.2</span> <span class="toctext">Fonts</span></a> <ul> <li class="toclevel-3 tocsection-67"><a href="#Font_matching"><span class="tocnumber">5.2.1</span> <span class="toctext">Font matching</span></a></li> <li class="toclevel-3 tocsection-68"><a href="#PANOSE"><span class="tocnumber">5.2.2</span> <span class="toctext">PANOSE</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-69"><a href="#Fonts_and_scripts"><span class="tocnumber">5.3</span> <span class="toctext">Fonts and scripts</span></a></li> <li class="toclevel-2 tocsection-70"><a href="#Character_encoding"><span class="tocnumber">5.4</span> <span class="toctext">Character encoding</span></a></li> <li class="toclevel-2 tocsection-71"><a href="#Character_metrics"><span class="tocnumber">5.5</span> <span class="toctext">Character metrics</span></a> <ul> <li class="toclevel-3 tocsection-72"><a href="#Music_fonts"><span class="tocnumber">5.5.1</span> <span class="toctext">Music fonts</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-73"><a href="#Path_text"><span class="tocnumber">5.6</span> <span class="toctext">Path text</span></a> <ul> <li class="toclevel-3 tocsection-74"><a href="#ARIA_label"><span class="tocnumber">5.6.1</span> <span class="toctext">ARIA label</span></a></li> <li class="toclevel-3 tocsection-75"><a href="#SVG_with_hidden_text"><span class="tocnumber">5.6.2</span> <span class="toctext">SVG with hidden text</span></a> <ul> <li class="toclevel-4 tocsection-76"><a href="#Condensed_font_test"><span class="tocnumber">5.6.2.1</span> <span class="toctext">Condensed font test</span></a></li> <li class="toclevel-4 tocsection-77"><a href="#Classifier_algorithm?"><span class="tocnumber">5.6.2.2</span> <span class="toctext">Classifier algorithm?</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-78"><a href="#Files_to_leave_alone?"><span class="tocnumber">5.6.3</span> <span class="toctext">Files to leave alone?</span></a></li> <li class="toclevel-3 tocsection-79"><a href="#A_bizarre_file"><span class="tocnumber">5.6.4</span> <span class="toctext">A bizarre file</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-80"><a href="#tref_element"><span class="tocnumber">5.7</span> <span class="toctext">tref element</span></a></li> <li class="toclevel-2 tocsection-81"><a href="#Glyphs"><span class="tocnumber">5.8</span> <span class="toctext">Glyphs</span></a> <ul> <li class="toclevel-3 tocsection-82"><a href="#SVG_2.0_drops_glyph"><span class="tocnumber">5.8.1</span> <span class="toctext">SVG 2.0 drops glyph</span></a></li> <li class="toclevel-3 tocsection-83"><a href="#Glyphs_would_not_work_with_some_scripts"><span class="tocnumber">5.8.2</span> <span class="toctext">Glyphs would not work with some scripts</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-84"><a href="#WMF_prohibits_web_fonts"><span class="tocnumber">5.9</span> <span class="toctext">WMF prohibits web fonts</span></a></li> <li class="toclevel-2 tocsection-85"><a href="#Alberta_road_signs"><span class="tocnumber">5.10</span> <span class="toctext">Alberta road signs</span></a></li> <li class="toclevel-2 tocsection-86"><a href="#Polish_road_signs"><span class="tocnumber">5.11</span> <span class="toctext">Polish road signs</span></a></li> <li class="toclevel-2 tocsection-87"><a href="#Text_anchors"><span class="tocnumber">5.12</span> <span class="toctext">Text anchors</span></a></li> <li class="toclevel-2 tocsection-88"><a href="#Text_anchor_alignment"><span class="tocnumber">5.13</span> <span class="toctext">Text anchor alignment</span></a></li> <li class="toclevel-2 tocsection-89"><a href="#Text_anchors,_direction,_and_BIDI"><span class="tocnumber">5.14</span> <span class="toctext">Text anchors, direction, and BIDI</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-90"><a href="#SVG_warts"><span class="tocnumber">6</span> <span class="toctext">SVG warts</span></a> <ul> <li class="toclevel-2 tocsection-91"><a href="#Graphics_state_scope"><span class="tocnumber">6.1</span> <span class="toctext">Graphics state scope</span></a></li> <li class="toclevel-2 tocsection-92"><a href="#SVG_is_not_HTML"><span class="tocnumber">6.2</span> <span class="toctext">SVG is not HTML</span></a></li> <li class="toclevel-2 tocsection-93"><a href="#Zoom_and_pan"><span class="tocnumber">6.3</span> <span class="toctext">Zoom and pan</span></a></li> <li class="toclevel-2 tocsection-94"><a href="#Filters_and_the_bounding_box"><span class="tocnumber">6.4</span> <span class="toctext">Filters and the bounding box</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-95"><a href="#MediaWiki_problems"><span class="tocnumber">7</span> <span class="toctext">MediaWiki problems</span></a> <ul> <li class="toclevel-2 tocsection-96"><a href="#MediaWiki_langtag_processing"><span class="tocnumber">7.1</span> <span class="toctext">MediaWiki langtag processing</span></a></li> <li class="toclevel-2 tocsection-97"><a href="#librsvg_sRGB_color_issue"><span class="tocnumber">7.2</span> <span class="toctext">librsvg sRGB color issue</span></a></li> <li class="toclevel-2 tocsection-98"><a href="#MediaWiki_whitelisted_namespaces"><span class="tocnumber">7.3</span> <span class="toctext">MediaWiki whitelisted namespaces</span></a> <ul> <li class="toclevel-3 tocsection-99"><a href="#MathML_namespace"><span class="tocnumber">7.3.1</span> <span class="toctext">MathML namespace</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-100"><a href="#MediaWiki_SVG_regression_problems"><span class="tocnumber">7.4</span> <span class="toctext">MediaWiki SVG regression problems</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-101"><a href="#General_issues"><span class="tocnumber">8</span> <span class="toctext">General issues</span></a></li> <li class="toclevel-1 tocsection-102"><a href="#Converting_bitmaps_to_SVG"><span class="tocnumber">9</span> <span class="toctext">Converting bitmaps to SVG</span></a> <ul> <li class="toclevel-2 tocsection-103"><a href="#Value"><span class="tocnumber">9.1</span> <span class="toctext">Value</span></a></li> <li class="toclevel-2 tocsection-104"><a href="#Quick_examples"><span class="tocnumber">9.2</span> <span class="toctext">Quick examples</span></a></li> <li class="toclevel-2 tocsection-105"><a href="#Quality"><span class="tocnumber">9.3</span> <span class="toctext">Quality</span></a></li> <li class="toclevel-2 tocsection-106"><a href="#Conversions"><span class="tocnumber">9.4</span> <span class="toctext">Conversions</span></a></li> <li class="toclevel-2 tocsection-107"><a href="#Issues"><span class="tocnumber">9.5</span> <span class="toctext">Issues</span></a> <ul> <li class="toclevel-3 tocsection-108"><a href="#Alternatives_to_bitmap_conversions"><span class="tocnumber">9.5.1</span> <span class="toctext">Alternatives to bitmap conversions</span></a></li> <li class="toclevel-3 tocsection-109"><a href="#Straightforward_conversions"><span class="tocnumber">9.5.2</span> <span class="toctext">Straightforward conversions</span></a></li> <li class="toclevel-3 tocsection-110"><a href="#Partial_conversion"><span class="tocnumber">9.5.3</span> <span class="toctext">Partial conversion</span></a></li> <li class="toclevel-3 tocsection-111"><a href="#Less_simple_conversions"><span class="tocnumber">9.5.4</span> <span class="toctext">Less simple conversions</span></a></li> <li class="toclevel-3 tocsection-112"><a href="#Conversions_with_gradients"><span class="tocnumber">9.5.5</span> <span class="toctext">Conversions with gradients</span></a></li> <li class="toclevel-3 tocsection-113"><a href="#Conversions_can_be_sharper_than_the_original"><span class="tocnumber">9.5.6</span> <span class="toctext">Conversions can be sharper than the original</span></a></li> <li class="toclevel-3 tocsection-114"><a href="#Conversions_should_be_good"><span class="tocnumber">9.5.7</span> <span class="toctext">Conversions should be good</span></a></li> <li class="toclevel-3 tocsection-115"><a href="#Conversion_issues"><span class="tocnumber">9.5.8</span> <span class="toctext">Conversion issues</span></a></li> <li class="toclevel-3 tocsection-116"><a href="#Multiline_text_causes_trouble"><span class="tocnumber">9.5.9</span> <span class="toctext">Multiline text causes trouble</span></a></li> <li class="toclevel-3 tocsection-117"><a href="#Stepped_conversions"><span class="tocnumber">9.5.10</span> <span class="toctext">Stepped conversions</span></a></li> <li class="toclevel-3 tocsection-118"><a href="#A_stepped_conversion_with_complex_image"><span class="tocnumber">9.5.11</span> <span class="toctext">A stepped conversion with complex image</span></a></li> <li class="toclevel-3 tocsection-119"><a href="#Another_stepped_conversion"><span class="tocnumber">9.5.12</span> <span class="toctext">Another stepped conversion</span></a></li> <li class="toclevel-3 tocsection-120"><a href="#Significant_detail"><span class="tocnumber">9.5.13</span> <span class="toctext">Significant detail</span></a></li> <li class="toclevel-3 tocsection-121"><a href="#Trees_have_significant_detail"><span class="tocnumber">9.5.14</span> <span class="toctext">Trees have significant detail</span></a></li> <li class="toclevel-3 tocsection-122"><a href="#Even_synthetic_images_can_have_significant_detail"><span class="tocnumber">9.5.15</span> <span class="toctext">Even synthetic images can have significant detail</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-123"><a href="#Stamps"><span class="tocnumber">9.6</span> <span class="toctext">Stamps</span></a> <ul> <li class="toclevel-3 tocsection-124"><a href="#Rectangular_stamp"><span class="tocnumber">9.6.1</span> <span class="toctext">Rectangular stamp</span></a></li> <li class="toclevel-3 tocsection-125"><a href="#Round_stamp"><span class="tocnumber">9.6.2</span> <span class="toctext">Round stamp</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-126"><a href="#Vectorization"><span class="tocnumber">9.7</span> <span class="toctext">Vectorization</span></a> <ul> <li class="toclevel-3 tocsection-127"><a href="#Vectorization_using_posterization"><span class="tocnumber">9.7.1</span> <span class="toctext">Vectorization using posterization</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-128"><a href="#Recovering_text"><span class="tocnumber">9.8</span> <span class="toctext">Recovering text</span></a> <ul> <li class="toclevel-3 tocsection-129"><a href="#Alternate_URL"><span class="tocnumber">9.8.1</span> <span class="toctext">Alternate URL</span></a></li> <li class="toclevel-3 tocsection-130"><a href="#SVG_files_must_be_converted_to_PNG_first"><span class="tocnumber">9.8.2</span> <span class="toctext">SVG files must be converted to PNG first</span></a></li> <li class="toclevel-3 tocsection-131"><a href="#Identifying_font_families"><span class="tocnumber">9.8.3</span> <span class="toctext">Identifying font families</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-1 tocsection-132"><a href="#Translations:_internationalization_and_localization"><span class="tocnumber">10</span> <span class="toctext">Translations: internationalization and localization</span></a> <ul> <li class="toclevel-2 tocsection-133"><a href="#Some_successes"><span class="tocnumber">10.1</span> <span class="toctext">Some successes</span></a></li> <li class="toclevel-2 tocsection-134"><a href="#Translations_are_welcome,_but_they_have_costs"><span class="tocnumber">10.2</span> <span class="toctext">Translations are welcome, but they have costs</span></a></li> <li class="toclevel-2 tocsection-135"><a href="#The_translations_do_not_fit"><span class="tocnumber">10.3</span> <span class="toctext">The translations do not fit</span></a></li> <li class="toclevel-2 tocsection-136"><a href="#Multiline_translations"><span class="tocnumber">10.4</span> <span class="toctext">Multiline translations</span></a></li> <li class="toclevel-2 tocsection-137"><a href="#Keeping_diagrams_in_sync"><span class="tocnumber">10.5</span> <span class="toctext">Keeping diagrams in sync</span></a></li> <li class="toclevel-2 tocsection-138"><a href="#MediaWiki_language_processing_does_not_support_tooltips"><span class="tocnumber">10.6</span> <span class="toctext">MediaWiki language processing does not support tooltips</span></a></li> <li class="toclevel-2 tocsection-139"><a href="#MediaWiki_language_default_is_confused"><span class="tocnumber">10.7</span> <span class="toctext">MediaWiki language default is confused</span></a></li> <li class="toclevel-2 tocsection-140"><a href="#MediaWiki_problems_2"><span class="tocnumber">10.8</span> <span class="toctext">MediaWiki problems</span></a></li> <li class="toclevel-2 tocsection-141"><a href="#MediaWiki_language_fallbacks"><span class="tocnumber">10.9</span> <span class="toctext">MediaWiki language fallbacks</span></a></li> <li class="toclevel-2 tocsection-142"><a href="#MediaWiki_language_identifiers_may_not_be_the_same_as_IETF_langtags"><span class="tocnumber">10.10</span> <span class="toctext">MediaWiki language identifiers may not be the same as IETF langtags</span></a></li> <li class="toclevel-2 tocsection-143"><a href="#MediaWiki_language_matching"><span class="tocnumber">10.11</span> <span class="toctext">MediaWiki language matching</span></a></li> <li class="toclevel-2 tocsection-144"><a href="#MediaWiki_language_default"><span class="tocnumber">10.12</span> <span class="toctext">MediaWiki language default</span></a></li> <li class="toclevel-2 tocsection-145"><a href="#MediaWiki_language_advertisements"><span class="tocnumber">10.13</span> <span class="toctext">MediaWiki language advertisements</span></a></li> <li class="toclevel-2 tocsection-146"><a href="#MediaWiki_language_semantics_for_directly_served_SVG"><span class="tocnumber">10.14</span> <span class="toctext">MediaWiki language semantics for directly served SVG</span></a></li> <li class="toclevel-2 tocsection-147"><a href="#How_MediaWiki_handles_images"><span class="tocnumber">10.15</span> <span class="toctext">How MediaWiki handles images</span></a></li> <li class="toclevel-2 tocsection-148"><a href="#MediaWiki_source_code"><span class="tocnumber">10.16</span> <span class="toctext">MediaWiki source code</span></a></li> <li class="toclevel-2 tocsection-149"><a href="#Where_translate="no"_makes_sense"><span class="tocnumber">10.17</span> <span class="toctext">Where translate="no" makes sense</span></a></li> <li class="toclevel-2 tocsection-150"><a href="#Language_variants"><span class="tocnumber">10.18</span> <span class="toctext">Language variants</span></a></li> <li class="toclevel-2 tocsection-151"><a href="#Languages_and_fonts"><span class="tocnumber">10.19</span> <span class="toctext">Languages and fonts</span></a></li> <li class="toclevel-2 tocsection-152"><a href="#Languages_and_layout"><span class="tocnumber">10.20</span> <span class="toctext">Languages and layout</span></a></li> <li class="toclevel-2 tocsection-153"><a href="#Internationalization_(i18n)_and_localization_(l10n)"><span class="tocnumber">10.21</span> <span class="toctext">Internationalization (i18n) and localization (l10n)</span></a> <ul> <li class="toclevel-3 tocsection-154"><a href="#Graphics_editor_roundtripping"><span class="tocnumber">10.21.1</span> <span class="toctext">Graphics editor roundtripping</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-155"><a href="#Industrial_option"><span class="tocnumber">10.22</span> <span class="toctext">Industrial option</span></a> <ul> <li class="toclevel-3 tocsection-156"><a href="#Sanitize_SVG"><span class="tocnumber">10.22.1</span> <span class="toctext">Sanitize SVG</span></a></li> <li class="toclevel-3 tocsection-157"><a href="#Generate_monolingual_SVG"><span class="tocnumber">10.22.2</span> <span class="toctext">Generate monolingual SVG</span></a></li> <li class="toclevel-3 tocsection-158"><a href="#Extract_translations"><span class="tocnumber">10.22.3</span> <span class="toctext">Extract translations</span></a></li> <li class="toclevel-3 tocsection-159"><a href="#Reintegrate_translation"><span class="tocnumber">10.22.4</span> <span class="toctext">Reintegrate translation</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-160"><a href="#MediaWiki_language_handling"><span class="tocnumber">10.23</span> <span class="toctext">MediaWiki language handling</span></a></li> <li class="toclevel-2 tocsection-161"><a href="#List_of_languages"><span class="tocnumber">10.24</span> <span class="toctext">List of languages</span></a></li> <li class="toclevel-2 tocsection-162"><a href="#Templates"><span class="tocnumber">10.25</span> <span class="toctext">Templates</span></a> <ul> <li class="toclevel-3 tocsection-163"><a href="#Translation_units"><span class="tocnumber">10.25.1</span> <span class="toctext">Translation units</span></a> <ul> <li class="toclevel-4 tocsection-164"><a href="#Wikidata_labels_for_number_labels"><span class="tocnumber">10.25.1.1</span> <span class="toctext">Wikidata labels for number labels</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-165"><a href="#RDF_hack"><span class="tocnumber">10.25.2</span> <span class="toctext">RDF hack</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-166"><a href="#Problem_file"><span class="tocnumber">10.26</span> <span class="toctext">Problem file</span></a> <ul> <li class="toclevel-3 tocsection-167"><a href="#Planar_translations"><span class="tocnumber">10.26.1</span> <span class="toctext">Planar translations</span></a></li> <li class="toclevel-3 tocsection-168"><a href="#Inkscape"><span class="tocnumber">10.26.2</span> <span class="toctext">Inkscape</span></a></li> <li class="toclevel-3 tocsection-169"><a href="#Colors"><span class="tocnumber">10.26.3</span> <span class="toctext">Colors</span></a></li> <li class="toclevel-3 tocsection-170"><a href="#Place_names"><span class="tocnumber">10.26.4</span> <span class="toctext">Place names</span></a></li> <li class="toclevel-3 tocsection-171"><a href="#Finding_place_names"><span class="tocnumber">10.26.5</span> <span class="toctext">Finding place names</span></a></li> <li class="toclevel-3 tocsection-172"><a href="#Source_data"><span class="tocnumber">10.26.6</span> <span class="toctext">Source data</span></a> <ul> <li class="toclevel-4 tocsection-173"><a href="#Wikidata_API_queries"><span class="tocnumber">10.26.6.1</span> <span class="toctext">Wikidata API queries</span></a></li> <li class="toclevel-4 tocsection-174"><a href="#Position-based_SPARQL_query"><span class="tocnumber">10.26.6.2</span> <span class="toctext">Position-based SPARQL query</span></a></li> <li class="toclevel-4 tocsection-175"><a href="#Inverted_SPARQL_query"><span class="tocnumber">10.26.6.3</span> <span class="toctext">Inverted SPARQL query</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-176"><a href="#Fixes"><span class="tocnumber">10.26.7</span> <span class="toctext">Fixes</span></a> <ul> <li class="toclevel-4 tocsection-177"><a href="#Locations"><span class="tocnumber">10.26.7.1</span> <span class="toctext">Locations</span></a></li> <li class="toclevel-4 tocsection-178"><a href="#Styling_with_class"><span class="tocnumber">10.26.7.2</span> <span class="toctext">Styling with class</span></a></li> <li class="toclevel-4 tocsection-179"><a href="#Date_text"><span class="tocnumber">10.26.7.3</span> <span class="toctext">Date text</span></a></li> <li class="toclevel-4 tocsection-180"><a href="#Dates_and_background_rects"><span class="tocnumber">10.26.7.4</span> <span class="toctext">Dates and background rects</span></a></li> <li class="toclevel-4 tocsection-181"><a href="#Dates_and_groups"><span class="tocnumber">10.26.7.5</span> <span class="toctext">Dates and groups</span></a></li> <li class="toclevel-4 tocsection-182"><a href="#Dates_and_automatic_translations"><span class="tocnumber">10.26.7.6</span> <span class="toctext">Dates and automatic translations</span></a></li> <li class="toclevel-4 tocsection-183"><a href="#Copies_and_strange_transformations"><span class="tocnumber">10.26.7.7</span> <span class="toctext">Copies and strange transformations</span></a></li> <li class="toclevel-4 tocsection-184"><a href="#Symbols"><span class="tocnumber">10.26.7.8</span> <span class="toctext">Symbols</span></a></li> <li class="toclevel-4 tocsection-185"><a href="#SVG_Translate_bogus_langtags"><span class="tocnumber">10.26.7.9</span> <span class="toctext">SVG Translate bogus langtags</span></a></li> <li class="toclevel-4 tocsection-186"><a href="#Text_element_within_switches_with_coordinates"><span class="tocnumber">10.26.7.10</span> <span class="toctext">Text element within switches with coordinates</span></a></li> <li class="toclevel-4 tocsection-187"><a href="#Elements_with_redundant_style_information"><span class="tocnumber">10.26.7.11</span> <span class="toctext">Elements with redundant style information</span></a></li> <li class="toclevel-4 tocsection-188"><a href="#Overridden_attributes"><span class="tocnumber">10.26.7.12</span> <span class="toctext">Overridden attributes</span></a></li> <li class="toclevel-4 tocsection-189"><a href="#Transform_removal"><span class="tocnumber">10.26.7.13</span> <span class="toctext">Transform removal</span></a></li> <li class="toclevel-4 tocsection-190"><a href="#Null_translations"><span class="tocnumber">10.26.7.14</span> <span class="toctext">Null translations</span></a></li> <li class="toclevel-4 tocsection-191"><a href="#Mongolian_dates"><span class="tocnumber">10.26.7.15</span> <span class="toctext">Mongolian dates</span></a></li> <li class="toclevel-4 tocsection-192"><a href="#River_translations_are_duplicated"><span class="tocnumber">10.26.7.16</span> <span class="toctext">River translations are duplicated</span></a></li> </ul> </li> <li class="toclevel-3 tocsection-193"><a href="#A_better_understanding_of_casual_group_formatting"><span class="tocnumber">10.26.8</span> <span class="toctext">A better understanding of casual group formatting</span></a></li> <li class="toclevel-3 tocsection-194"><a href="#Languages:_LTR_and_RTL"><span class="tocnumber">10.26.9</span> <span class="toctext">Languages: LTR and RTL</span></a></li> <li class="toclevel-3 tocsection-195"><a href="#Metadata_for_the_file"><span class="tocnumber">10.26.10</span> <span class="toctext">Metadata for the file</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-1 tocsection-196"><a href="#SVG_Translate"><span class="tocnumber">11</span> <span class="toctext">SVG Translate</span></a> <ul> <li class="toclevel-2 tocsection-197"><a href="#History"><span class="tocnumber">11.1</span> <span class="toctext">History</span></a></li> <li class="toclevel-2 tocsection-198"><a href="#What_it_does"><span class="tocnumber">11.2</span> <span class="toctext">What it does</span></a></li> <li class="toclevel-2 tocsection-199"><a href="#What_it_does_not_do"><span class="tocnumber">11.3</span> <span class="toctext">What it does not do</span></a></li> <li class="toclevel-2 tocsection-200"><a href="#Success_stories?"><span class="tocnumber">11.4</span> <span class="toctext">Success stories?</span></a> <ul> <li class="toclevel-3 tocsection-201"><a href="#Invasion_of_Ukraine"><span class="tocnumber">11.4.1</span> <span class="toctext">Invasion of Ukraine</span></a></li> <li class="toclevel-3 tocsection-202"><a href="#Attempted_assassination_of_Donald_Trump"><span class="tocnumber">11.4.2</span> <span class="toctext">Attempted assassination of Donald Trump</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-203"><a href="#SVG_Translate_usage"><span class="tocnumber">11.5</span> <span class="toctext">SVG Translate usage</span></a></li> <li class="toclevel-2 tocsection-204"><a href="#Translate_me!"><span class="tocnumber">11.6</span> <span class="toctext">Translate me!</span></a> <ul> <li class="toclevel-3 tocsection-205"><a href="#Catalan_Translation_Challenge_2023"><span class="tocnumber">11.6.1</span> <span class="toctext">Catalan Translation Challenge 2023</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-206"><a href="#Good_translation_targets"><span class="tocnumber">11.7</span> <span class="toctext">Good translation targets</span></a></li> <li class="toclevel-2 tocsection-207"><a href="#SVG_Translate_simple_text_requirement"><span class="tocnumber">11.8</span> <span class="toctext">SVG Translate simple text requirement</span></a></li> <li class="toclevel-2 tocsection-208"><a href="#SVG_Translate_Issues"><span class="tocnumber">11.9</span> <span class="toctext">SVG Translate Issues</span></a> <ul> <li class="toclevel-3 tocsection-209"><a href="#Bloating_SVG_files"><span class="tocnumber">11.9.1</span> <span class="toctext">Bloating SVG files</span></a></li> <li class="toclevel-3 tocsection-210"><a href="#Suppressing_translation"><span class="tocnumber">11.9.2</span> <span class="toctext">Suppressing translation</span></a></li> <li class="toclevel-3 tocsection-211"><a href="#The_copied_text_problem"><span class="tocnumber">11.9.3</span> <span class="toctext">The copied text problem</span></a></li> <li class="toclevel-3 tocsection-212"><a href="#The_default_clause_problem"><span class="tocnumber">11.9.4</span> <span class="toctext">The default clause problem</span></a></li> <li class="toclevel-3 tocsection-213"><a href="#Autocomplete"><span class="tocnumber">11.9.5</span> <span class="toctext">Autocomplete</span></a></li> <li class="toclevel-3 tocsection-214"><a href="#SVG_Translate_should_handle_textPath"><span class="tocnumber">11.9.6</span> <span class="toctext">SVG Translate should handle textPath</span></a></li> <li class="toclevel-3 tocsection-215"><a href="#SVG_Translate_descends_too_deeply"><span class="tocnumber">11.9.7</span> <span class="toctext">SVG Translate descends too deeply</span></a></li> <li class="toclevel-3 tocsection-216"><a href="#Does_SVG_Translate_multiply_text?_No."><span class="tocnumber">11.9.8</span> <span class="toctext">Does SVG Translate multiply text? No.</span></a></li> <li class="toclevel-3 tocsection-217"><a href="#SVG_Translate_switch_processing"><span class="tocnumber">11.9.9</span> <span class="toctext">SVG Translate switch processing</span></a></li> <li class="toclevel-3 tocsection-218"><a href="#Check_switch_processing"><span class="tocnumber">11.9.10</span> <span class="toctext">Check switch processing</span></a></li> <li class="toclevel-3 tocsection-219"><a href="#Identifiers_take_up_a_lot_of_text"><span class="tocnumber">11.9.11</span> <span class="toctext">Identifiers take up a lot of text</span></a></li> <li class="toclevel-3 tocsection-220"><a href="#DOM:_tags_and_namespace"><span class="tocnumber">11.9.12</span> <span class="toctext">DOM: tags and namespace</span></a></li> <li class="toclevel-3 tocsection-221"><a href="#Is_the_svg_prefix_required?"><span class="tocnumber">11.9.13</span> <span class="toctext">Is the svg prefix required?</span></a></li> <li class="toclevel-3 tocsection-222"><a href="#Reorder_text_elements"><span class="tocnumber">11.9.14</span> <span class="toctext">Reorder text elements</span></a></li> <li class="toclevel-3 tocsection-223"><a href="#The_underscore_issue"><span class="tocnumber">11.9.15</span> <span class="toctext">The underscore issue</span></a></li> <li class="toclevel-3 tocsection-224"><a href="#The_number_of_tspan_elements_must_match"><span class="tocnumber">11.9.16</span> <span class="toctext">The number of tspan elements must match</span></a></li> <li class="toclevel-3 tocsection-225"><a href="#The_$_issue"><span class="tocnumber">11.9.17</span> <span class="toctext">The $ issue</span></a></li> <li class="toclevel-3 tocsection-226"><a href="#The_style_element_must_have_trailing_characters"><span class="tocnumber">11.9.18</span> <span class="toctext">The style element must have trailing characters</span></a></li> <li class="toclevel-3 tocsection-227"><a href="#Hoisting_style_attributes"><span class="tocnumber">11.9.19</span> <span class="toctext">Hoisting style attributes</span></a></li> <li class="toclevel-3 tocsection-228"><a href="#Splitting_langtags_duplicates_identifiers"><span class="tocnumber">11.9.20</span> <span class="toctext">Splitting langtags duplicates identifiers</span></a></li> <li class="toclevel-3 tocsection-229"><a href="#Is_the_lang_attribute_copied"><span class="tocnumber">11.9.21</span> <span class="toctext">Is the lang attribute copied</span></a></li> <li class="toclevel-3 tocsection-230"><a href="#PHP_static_analyzer"><span class="tocnumber">11.9.22</span> <span class="toctext">PHP static analyzer</span></a></li> <li class="toclevel-3 tocsection-231"><a href="#Mere_mortals_cannot_view_the_log"><span class="tocnumber">11.9.23</span> <span class="toctext">Mere mortals cannot view the log</span></a></li> <li class="toclevel-3 tocsection-232"><a href="#Generated_SVG_Translate_URLs_marked_as_dead"><span class="tocnumber">11.9.24</span> <span class="toctext">Generated SVG Translate URLs marked as dead</span></a></li> <li class="toclevel-3 tocsection-233"><a href="#Phabricator_tickets"><span class="tocnumber">11.9.25</span> <span class="toctext">Phabricator tickets</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-234"><a href="#Hoisting_attributes"><span class="tocnumber">11.10</span> <span class="toctext">Hoisting attributes</span></a> <ul> <li class="toclevel-3 tocsection-235"><a href="#Class_and_Style_confuse_the_issue"><span class="tocnumber">11.10.1</span> <span class="toctext">Class and Style confuse the issue</span></a></li> <li class="toclevel-3 tocsection-236"><a href="#Prefer_class"><span class="tocnumber">11.10.2</span> <span class="toctext">Prefer class</span></a></li> <li class="toclevel-3 tocsection-237"><a href="#Transformation_rewrites"><span class="tocnumber">11.10.3</span> <span class="toctext">Transformation rewrites</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-238"><a href="#Multiline_trick"><span class="tocnumber">11.11</span> <span class="toctext">Multiline trick</span></a></li> <li class="toclevel-2 tocsection-239"><a href="#WMF_warts"><span class="tocnumber">11.12</span> <span class="toctext">WMF warts</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-240"><a href="#MinT"><span class="tocnumber">12</span> <span class="toctext">MinT</span></a></li> <li class="toclevel-1 tocsection-241"><a href="#SVG_and_graphics_editors"><span class="tocnumber">13</span> <span class="toctext">SVG and graphics editors</span></a> <ul> <li class="toclevel-2 tocsection-242"><a href="#Adobe_Illustrator"><span class="tocnumber">13.1</span> <span class="toctext">Adobe Illustrator</span></a></li> <li class="toclevel-2 tocsection-243"><a href="#CorelDraw"><span class="tocnumber">13.2</span> <span class="toctext">CorelDraw</span></a></li> <li class="toclevel-2 tocsection-244"><a href="#Inkscape_2"><span class="tocnumber">13.3</span> <span class="toctext">Inkscape</span></a> <ul> <li class="toclevel-3 tocsection-245"><a href="#Inkscape_style_attributes"><span class="tocnumber">13.3.1</span> <span class="toctext">Inkscape style attributes</span></a></li> <li class="toclevel-3 tocsection-246"><a href="#Inkscape_clone_model"><span class="tocnumber">13.3.2</span> <span class="toctext">Inkscape clone model</span></a></li> <li class="toclevel-3 tocsection-247"><a href="#Inkscape_gradients"><span class="tocnumber">13.3.3</span> <span class="toctext">Inkscape gradients</span></a></li> <li class="toclevel-3 tocsection-248"><a href="#Inkscape_units"><span class="tocnumber">13.3.4</span> <span class="toctext">Inkscape units</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-1 tocsection-249"><a href="#Accuracy"><span class="tocnumber">14</span> <span class="toctext">Accuracy</span></a> <ul> <li class="toclevel-2 tocsection-250"><a href="#Refractometer"><span class="tocnumber">14.1</span> <span class="toctext">Refractometer</span></a></li> <li class="toclevel-2 tocsection-251"><a href="#Motors"><span class="tocnumber">14.2</span> <span class="toctext">Motors</span></a></li> <li class="toclevel-2 tocsection-252"><a href="#Microphones_and_flux_path"><span class="tocnumber">14.3</span> <span class="toctext">Microphones and flux path</span></a></li> <li class="toclevel-2 tocsection-253"><a href="#Solenoids_and_flux_path"><span class="tocnumber">14.4</span> <span class="toctext">Solenoids and flux path</span></a></li> <li class="toclevel-2 tocsection-254"><a href="#MOSFET"><span class="tocnumber">14.5</span> <span class="toctext">MOSFET</span></a></li> <li class="toclevel-2 tocsection-255"><a href="#Blast_furnace"><span class="tocnumber">14.6</span> <span class="toctext">Blast furnace</span></a></li> <li class="toclevel-2 tocsection-256"><a href="#Vacuum_pumps_and_details"><span class="tocnumber">14.7</span> <span class="toctext">Vacuum pumps and details</span></a></li> <li class="toclevel-2 tocsection-257"><a href="#Bourdon_tube"><span class="tocnumber">14.8</span> <span class="toctext">Bourdon tube</span></a></li> <li class="toclevel-2 tocsection-258"><a href="#Electrochemical_cell"><span class="tocnumber">14.9</span> <span class="toctext">Electrochemical cell</span></a></li> <li class="toclevel-2 tocsection-259"><a href="#Mechanical_seals"><span class="tocnumber">14.10</span> <span class="toctext">Mechanical seals</span></a></li> <li class="toclevel-2 tocsection-260"><a href="#Bicycle"><span class="tocnumber">14.11</span> <span class="toctext">Bicycle</span></a></li> <li class="toclevel-2 tocsection-261"><a href="#Biology"><span class="tocnumber">14.12</span> <span class="toctext">Biology</span></a></li> <li class="toclevel-2 tocsection-262"><a href="#Phases_of_the_moon"><span class="tocnumber">14.13</span> <span class="toctext">Phases of the moon</span></a></li> <li class="toclevel-2 tocsection-263"><a href="#Torque_wrenches_and_drivers"><span class="tocnumber">14.14</span> <span class="toctext">Torque wrenches and drivers</span></a></li> <li class="toclevel-2 tocsection-264"><a href="#Hepatitis_B"><span class="tocnumber">14.15</span> <span class="toctext">Hepatitis B</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-265"><a href="#Clean_up"><span class="tocnumber">15</span> <span class="toctext">Clean up</span></a></li> <li class="toclevel-1 tocsection-266"><a href="#Image_maps"><span class="tocnumber">16</span> <span class="toctext">Image maps</span></a></li> <li class="toclevel-1 tocsection-267"><a href="#Copyright"><span class="tocnumber">17</span> <span class="toctext">Copyright</span></a> <ul> <li class="toclevel-2 tocsection-268"><a href="#URAA"><span class="tocnumber">17.1</span> <span class="toctext">URAA</span></a></li> <li class="toclevel-2 tocsection-269"><a href="#Moonrise_and_Adams"><span class="tocnumber">17.2</span> <span class="toctext">Moonrise and Adams</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-270"><a href="#MediaWiki_upgrades"><span class="tocnumber">18</span> <span class="toctext">MediaWiki upgrades</span></a> <ul> <li class="toclevel-2 tocsection-271"><a href="#Command_line_arguments"><span class="tocnumber">18.1</span> <span class="toctext">Command line arguments</span></a></li> <li class="toclevel-2 tocsection-272"><a href="#Resvg_command_line_arguments"><span class="tocnumber">18.2</span> <span class="toctext">Resvg command line arguments</span></a></li> <li class="toclevel-2 tocsection-273"><a href="#MediaWiki_external_converter"><span class="tocnumber">18.3</span> <span class="toctext">MediaWiki external converter</span></a></li> <li class="toclevel-2 tocsection-274"><a href="#Thumbor"><span class="tocnumber">18.4</span> <span class="toctext">Thumbor</span></a> <ul> <li class="toclevel-3 tocsection-275"><a href="#Hyphenated_langtags"><span class="tocnumber">18.4.1</span> <span class="toctext">Hyphenated langtags</span></a></li> <li class="toclevel-3 tocsection-276"><a href="#Non-English_default_langtags"><span class="tocnumber">18.4.2</span> <span class="toctext">Non-English default langtags</span></a></li> <li class="toclevel-3 tocsection-277"><a href="#Unit_tests"><span class="tocnumber">18.4.3</span> <span class="toctext">Unit tests</span></a></li> </ul> </li> </ul> </li> <li class="toclevel-1 tocsection-278"><a href="#Interest"><span class="tocnumber">19</span> <span class="toctext">Interest</span></a></li> <li class="toclevel-1 tocsection-279"><a href="#HTML_5"><span class="tocnumber">20</span> <span class="toctext">HTML 5</span></a></li> <li class="toclevel-1 tocsection-280"><a href="#MediaWiki_hacks"><span class="tocnumber">21</span> <span class="toctext">MediaWiki hacks</span></a> <ul> <li class="toclevel-2 tocsection-281"><a href="#Basics"><span class="tocnumber">21.1</span> <span class="toctext">Basics</span></a></li> <li class="toclevel-2 tocsection-282"><a href="#Wikidata"><span class="tocnumber">21.2</span> <span class="toctext">Wikidata</span></a></li> <li class="toclevel-2 tocsection-283"><a href="#Magic_words"><span class="tocnumber">21.3</span> <span class="toctext">Magic words</span></a></li> <li class="toclevel-2 tocsection-284"><a href="#MediaWiki_Common.js"><span class="tocnumber">21.4</span> <span class="toctext">MediaWiki Common.js</span></a></li> <li class="toclevel-2 tocsection-285"><a href="#Sets_of_numbers"><span class="tocnumber">21.5</span> <span class="toctext">Sets of numbers</span></a></li> <li class="toclevel-2 tocsection-286"><a href="#KML_and_geoshape_files"><span class="tocnumber">21.6</span> <span class="toctext">KML and geoshape files</span></a></li> <li class="toclevel-2 tocsection-287"><a href="#Image_cropping"><span class="tocnumber">21.7</span> <span class="toctext">Image cropping</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-288"><a href="#Playing_cards"><span class="tocnumber">22</span> <span class="toctext">Playing cards</span></a></li> <li class="toclevel-1 tocsection-289"><a href="#Sewing_machines"><span class="tocnumber">23</span> <span class="toctext">Sewing machines</span></a></li> <li class="toclevel-1 tocsection-290"><a href="#Controversy"><span class="tocnumber">24</span> <span class="toctext">Controversy</span></a></li> <li class="toclevel-1 tocsection-291"><a href="#Music"><span class="tocnumber">25</span> <span class="toctext">Music</span></a></li> <li class="toclevel-1 tocsection-292"><a href="#Structured_Data_Query"><span class="tocnumber">26</span> <span class="toctext">Structured Data Query</span></a></li> <li class="toclevel-1 tocsection-293"><a href="#References"><span class="tocnumber">27</span> <span class="toctext">References</span></a></li> </ul> </div> <div class="mw-heading mw-heading2"><h2 id="MediaWiki_information">MediaWiki information</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=1" title="Edit section: MediaWiki information"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The current MediaWiki version is 1.44.0-wmf.5 (d64f667). </p> <ul><li>semver semantic versioning. <a rel="nofollow" class="external free" href="https://semver.org/">https://semver.org/</a></li></ul> <p>An improved <a class="external text" href="https://gerrit.wikimedia.org/r/962563">fix</a> for <a href="https://phabricator.wikimedia.org/T337139" class="extiw" title="phab:T337139">T337139: Hyphenated langtags in Thumbor/7.3.2 and librsvg 2.44.10 do not show any text</a> should happen after version 1.41.0-wmf.29 (ff3308b). Expect 1.41.0-wmf.30 on 2023-10-11. </p><p>An increase limit on SVG files for <a href="https://phabricator.wikimedia.org/T270889" class="extiw" title="phab:T270889">T270889: In SVG files larger than 256kB with <switch> elements, the translations are not recognized</a> should appear in 1.42.0-wmf.18; 2024-02-13. </p> <div class="mw-heading mw-heading2"><h2 id="Notes_about_images">Notes about images</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=2" title="Edit section: Notes about images"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/220px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg" decoding="async" width="220" height="328" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/330px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/440px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg 2x" data-file-width="7479" data-file-height="11146" /></a><figcaption>Mona Lisa JPEG image is 90 MB. The served JPEG is 21 kB.</figcaption></figure> <p>WMF does some interesting processing when it displays images. One might think that a JPEG image of the Mona Lisa is just transmitted to a browser, but that is not the case. The <a href="/wiki/File:Mona_Lisa,_by_Leonardo_da_Vinci,_from_C2RMF_retouched.jpg" title="File:Mona Lisa, by Leonardo da Vinci, from C2RMF retouched.jpg">File:Mona Lisa, by Leonardo da Vinci, from C2RMF retouched.jpg</a> is 90 MB, and that much data takes time to transmit (about 1 second at 1 Gbit/s or 10 seconds at 100 Mbit/s) and could put a big dent in a modest cellular telephone data plan. </p><p>Instead, WMF does something different. The 90 MB, 7,479 × 11,146 pixel, JPEG is downsampled to the display size. The result is a small image is transferred over the network. The transfer is faster, and the impact on data bandwidth and data plans is much smaller. For example, the downsampled JPEG is just 21143 bytes, a mere fraction of 90 MB. </p><p><small>CHECK: If a JPEG is below a certain size, it may not be downsampled.</small> </p> <div class="mw-heading mw-heading3"><h3 id="Information_for_downsampling">Information for downsampling</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=3" title="Edit section: Information for downsampling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The wiki markup will specify a particular image to display. The markup will specify a desired size (such as a width of 160 pixels). </p><p>Below is speculation. JPEG and PNG files may be reparsed at each inclusion. I need to check the sources. </p><p>I expect a database to hold critical properties. With quick access to some properties, it will not be necessary to parse the image file or the image description page. Such properties would be a base URL, file type, width, and height should be accessed quickly. From that information, one could quickly determine the HTML to include the image. The <code>img</code> element's width, height, and URL can be determined without reading the image file. </p><p>If a new image is uploaded, that upload should clear the server caches of that image, but the upload need not trigger rebuilds of all the pages that use the image. Those pages need to be rebuilt only when the aspect ratio changes. Such a change could impact the page layout. *** Check that the <code>img</code> element has both width and height attributes. </p><p>SVG files may be different. SVG URLs many need to specify the desired language. If a language is added, then that may trigger the rebuild of all pages that use the image. Any of those pages may specify the recently added language. The MW database holds (at least some of) the IETF language tags that the file supports. Well, the list of pages to rebuild can be much shorter. If <style data-mw-deduplicate="TemplateStyles:r588530194">.mw-parser-output .nowrap,.mw-parser-output .nowrap a:before,.mw-parser-output .nowrap .selflink:before{white-space:nowrap}</style><code class="nowrap">|lang=</code> is set, then the page does not need to be rebuilt. That means if the SVG file adds the <code>fr</code> langtag, then only pages on wikis that default to use the <code>fr</code> langtag need to be rebuilt (the fr.Wiki). Any other wiki will not be affected. If such a wiki had requested a French version of the SVG, its pages would already have URLs that specify the French version. (Before the addition, the thumbnailer would not find a French version, so it would render the SVG default language.) </p><p><small> </small></p><small><dl><dd><b>Note</b>: The MW database has an edited list of languages in its metadata. A MediaWiki API <code>imageinfo</code> query provides metadata and languages (MW type not IETF?): <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&format=jsonfm&prop=imageinfo&titles=File%3A2022_Russian_invasion_of_Ukraine.svg&iiprop=timestamp%7Cuser%7Cmetadata">https://commons.wikimedia.org/w/api.php?action=query&format=jsonfm&prop=imageinfo&titles=File%3A2022_Russian_invasion_of_Ukraine.svg&iiprop=timestamp%7Cuser%7Cmetadata</a></li></ul></dd> <dd>Languages are filtered: <code>zh_CN</code> does not appear. Non-existent langtags also appear: <code>zh</code>.</dd> <dd><a class="external free" href="https://www.mediawiki.org/wiki/Manual:File_metadata_handling">https://www.mediawiki.org/wiki/Manual:File_metadata_handling</a></dd></dl></small><small></small><p><small></small> </p> <div class="mw-heading mw-heading3"><h3 id="Caching">Caching</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=4" title="Edit section: Caching"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The WMF servers confront a computational burden because they must downsample the requested image, but local server computation may be less expensive than data bandwidth. </p><p>In addition, WMF servers also cache the images that it downsamples. If I ask for Mona Lisa at a particular width, then a WMF server will generate that size. That work is stored in a cache, so if I or somebody else asks for the same size image at another time, the cached version is supplied rather than re-downsampling the image. The cache saves computation and time. </p><p>The moment when the caching is done is also significant. Although I can ask for images at particular sizes, the usual scenario is the image (such as Mona Lisa) is used on a wiki article page. When a wiki page is updated, MediaWiki rebuilds the wiki page (creating a cached version of the wiki page) and also caching any new images that were added to the page. That can require a lot of computation, but the result is the wiki page and all of its images are now in the server caches. Preloading the cache reduces the latency that a user would experience when he views the page. He need only wait for the data to be transferred; he would not wait for the downsampling because it has already been done. </p><p>Furthermore, WMF tells my browser to cache local copies on my computer. If I view a wiki page with the Mona Lisa image on it, the wiki page and the Mona Lisa image are copied to my computer. I can leave that wiki page, but the local copies remain on my computer. If I reload the page later, my browser can display the page without re-downloading the page and image from the WMF server. (Some small network traffic may confirm that my cached copies are still valid.) </p><p>That local caching interaction can be involved. The mechanism is part of the Hyper Text Transfer Protocol (HTTP). When a server transfers web pages or images using HTTP, it will specify some caching information. That information tells my browser if it may cache the data and how long the cached data is accurate.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> </p><p>Consider <code>srcset</code> and displayed sizes. MW chooses fixed-size images. Changing the width of a browser window changes the layout on my screen, but it does not require downloading new thumbnails. </p> <div class="mw-heading mw-heading3"><h3 id="Caches_can_cause_trouble">Caches can cause trouble</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=5" title="Edit section: Caches can cause trouble"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Say wiki page ABC uses an image XYZ. </p><p>If page ABC is rebuilt every time it is accessed, then the page will always be up to date. If the page is cached, then the cache may have a stale version. </p><p>If somebody edits page ABC, then it is clear that page ABC should be purged from the cache. </p><p>If somebody edits image XYZ, then the cache should be cleared of XYZ. But the appearance of page ABC may also change even though none of the wikitext for page ABC has changed. How does page ABC get updated? </p><p>If the aspect ratio of XYZ does not change, then nothing much needs to happen. When page ABC is accessed, it comes out of the cache. The cached page has a reference to XYZ, but that image has been invalidated, so the new version of XYZ is fetched. </p><p>If the aspect ratio of XYZ changed, then the layout of ABC may have been altered. ABC needs to be rebuilt. MW maintains a database of where each image is used, so MW can invalidate all of the pages that use XYZ. There is a cascade: the invalidated pages may be transcluded, so more pages may need to be invalidated and rebuilt. </p> <div class="mw-heading mw-heading3"><h3 id="More_on_server_caching">More on server caching</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=6" title="Edit section: More on server caching"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The server cache can be a separate set of servers positioned between the users and the actual servers. WMF uses Varnish. </p> <ul><li><a rel="nofollow" class="external free" href="https://wp-rocket.me/blog/varnish-http-cache-server/">https://wp-rocket.me/blog/varnish-http-cache-server/</a> Varnish Cache: How It Works and How to Use It on Your WordPress Site, July 29, 2021, Alice Orru</li> <li><a rel="nofollow" class="external free" href="https://www.oreilly.com/library/view/getting-started-with/9781491972212/ch01.html">https://www.oreilly.com/library/view/getting-started-with/9781491972212/ch01.html</a> Getting Started with Varnish Cache, 15 September 2016, Thijs Feryn</li> <li><a href="https://en.wikipedia.org/wiki/Varnish_(software)" class="extiw" title="w:Varnish (software)">w:Varnish (software)</a></li> <li><a rel="nofollow" class="external free" href="https://queue.acm.org/detail.cfm?id=1814327">https://queue.acm.org/detail.cfm?id=1814327</a> You're Doing It Wrong, Queue vol. 8, no. 6, 11 June 2010, Poul-Henning Kamp</li></ul> <div class="mw-heading mw-heading3"><h3 id="Domain_names">Domain names</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=7" title="Edit section: Domain names"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Domain names such as <code>commons.wikimedia.org</code> or <code>upload.wikimedia.org</code> must be resolved to an IP address. That resolution need not be to a single IP address. Check namespace resolution and redirect messages as ways to shuffle the load. </p><p>A domain name resolves to one IP address. Many domain names may resolve to the same IP address.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> But I think a name may have many <code>A</code> records. I'm looking for information about random selection.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="Alt_text">Alt text</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=8" title="Edit section: Alt text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Proposal about <code>alt=</code> text being added to HTML. </p> <ul><li><a href="/wiki/Commons:Village_pump/Proposals#Adding_alt_texts_through_structured_data" title="Commons:Village pump/Proposals">Commons:Village_pump/Proposals#Adding_alt_texts_through_structured_data</a> circa July 2022</li></ul> <div class="mw-heading mw-heading3"><h3 id="Page_regeneration">Page regeneration</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=9" title="Edit section: Page regeneration"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Consider a typical Wikipedia page. It will use templates and images. </p><p>If one of the templates is edited, then the Wikipedia page probably needs to be rebuilt. The template may affect the page content or layout. MediaWiki keeps track of which pages use a template, so when a template is edited, then MediaWiki knows which pages need to be regenerated. There can also be as cascade because some templates use other templates. </p><p>That means that editing a template that is used on thousands of Wikipedia pages would trigger the regeneration of thousands of Wikipedia pages. Editing commonly used templates should not be done lightly. Commonly used templates may be protected. For example, <a href="/wiki/Template:Cite_book" title="Template:Cite book"><span style="font-family:monospace,monospace;">{{Cite book}}</span></a> on the English Wikipedia affects almost 1.5 million pages. </p><p>Editing an image does not require rebuilding the pages that use the image. The page still references the same image name, but now the image scalers will supply the new image rather than the old one. The cached HTML of the Wikipedia page is still good. </p><p>Well, not quite. When MediaWiki builds a page, it specifies the <code>width</code> and <code>height</code> attributes of the <code>img</code> element. That allows the browser to layout the page before it has downloaded all the images. That avoids continual layout adjustments as image sizes are learned. So rebuilding pages may be required. WikiMedia could just do it all the time, or it could update pages only if a significant change occurred. If the image aspect ratio changed, then <code>img</code> elements would need to be updated. If a multilingual SVG file added another language, then pages may need updating. </p> <div class="mw-heading mw-heading3"><h3 id="The_advantage_of_the_img_element">The advantage of the <code>img</code> element</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=10" title="Edit section: The advantage of the img element"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki inserts images with the <code>img</code> element. That element has security advantages. </p> <ul><li>scripts are not run</li> <li>animation is run</li> <li>...</li></ul> <div class="mw-heading mw-heading3"><h3 id="Media_for_cleanup">Media for cleanup</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=11" title="Edit section: Media for cleanup"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Commons:Media_for_cleanup" title="Commons:Media for cleanup">Commons:Media for cleanup</a></li> <li><a href="/wiki/Category:Media_for_cleanup" title="Category:Media for cleanup">Category:Media for cleanup</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="SVG_images">SVG images</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=12" title="Edit section: SVG images"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Gibraltar_map-en.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Gibraltar_map-en.svg/220px-Gibraltar_map-en.svg.png" decoding="async" width="220" height="342" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Gibraltar_map-en.svg/330px-Gibraltar_map-en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Gibraltar_map-en.svg/440px-Gibraltar_map-en.svg.png 2x" data-file-width="2020" data-file-height="3140" /></a><figcaption>SVG Map of Gibraltar is 290 kB. The served PNG is 48 kB.</figcaption></figure> <p>WMF processes SVG images in a similar manner as JPEG images. Instead of serving the actual SVG file on a wiki page, WMF builds a PNG file of the requested width and serves the PNG. There are a couple of advantages to serving a PNG. </p><p>First, serving the PNG file can be much smaller than the SVG file. For example, the SVG map of Gibraltar is 290 kB. The request above produced a 48 kB PNG file: </p> <pre>accept-ranges: bytes access-control-allow-origin: * access-control-expose-headers: Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache age: 74796 content-disposition: inline;filename*=UTF-8''Gibraltar_map-en.svg.png content-length: 47987 content-type: image/png date: Tue, 21 Dec 2021 02:25:44 GMT etag: 8391f68640a7f0cedd3971fef7b8b3d3 last-modified: Mon, 01 Feb 2021 12:23:52 GMT nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0} permissions-policy: interest-cohort=() report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] } server: ATS/8.0.8 server-timing: cache;desc="hit-front", host;desc="cp1078" strict-transport-security: max-age=106384710; includeSubDomains; preload timing-allow-origin: * x-cache: cp1078 hit, cp1078 hit/2 x-cache-status: hit-front x-timestamp: 1612182231.00644 </pre> <p>However, the SVG file is transferred with GZip compression; the transfer size is only 89 kB. The compression factor is 290/89 = 3.26. The transfer size is larger than the PNG, but it is less than twice the size of the PNG (89/48 = 1.85). </p><p>Second, when WMF started supporting the SVG file format, the browser support for SVG was nonexistent or uneven. Serving PNG files had strong support. Serving PNG renditions of SVG files also gives a uniform presentation. SVG images can vary depending upon the availability of particular fonts and the depth of SVG support. </p> <div class="mw-heading mw-heading3"><h3 id="Directly_serving_SVG">Directly serving SVG</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=13" title="Edit section: Directly serving SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="https://phabricator.wikimedia.org/T5593" class="extiw" title="phab:T5593">SVG client side rendering (Phabricator T5593)</a> </p><p>The <code>img</code> element allows animations but should block scripts. The <code>object</code> element allows scripts. </p><p>Scripts can be malicious. WMF blocks uploading SVG files that contain scripts. </p><p>There is also a concern with animated files triggering seizures. That has been cited as a reason to not serve SVG directly. Detecting animated SVG is also made difficult because there are both SMIL and CSS animations. Automatically detecting update rate may be difficult. Even with a fast update rate, an animation may not trigger a seizure. See <a href="/wiki/Commons:Deletion_requests/File:Color_Flash.gif" title="Commons:Deletion requests/File:Color Flash.gif">Commons:Deletion requests/File:Color Flash.gif</a>. </p><p>What happens to mouse clicks? Wrap an <code>a</code> element around a bitmap file. Wrap it around an SVG file. </p><p>SVG files can be malicious. An SVG file could be a computational nightmare that taxes the computer. PNG files will render in finite time. The SVG renderer on WMF servers put a time limit on the rendering. If it does not complete within a few seconds, then the process is terminated. There are some SVG files on Commons that can hit that time limit. </p><p>There are some language translation differences when an SVG file is directly served; see below. </p> <div class="mw-heading mw-heading3"><h3 id="Many_SVG_files_on_Commons_do_not_have_a_namespace_declaration">Many SVG files on Commons do not have a namespace declaration</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=14" title="Edit section: Many SVG files on Commons do not have a namespace declaration"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Apparently, <code>librsvg</code> assumes the namespace is SVG. Many SVG files on Commmons will show thumbnails, but when loaded into a browser will show the XML text rather than the desired image. </p> <div class="mw-heading mw-heading3"><h3 id="SVG_is_XML_or_not">SVG is XML or not</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=15" title="Edit section: SVG is XML or not"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Dislike XML. </p><p>SVG has namespaces, but HTML does not. HTML lossage creeps in. </p><p>If XML is so good, why is CSS not XML? </p> <div class="mw-heading mw-heading4"><h4 id="XML_details">XML details</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=16" title="Edit section: XML details"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some notes for later. </p><p>The XML Spec 1.0 (Fifth edition). <a rel="nofollow" class="external free" href="https://www.w3.org/TR/xml/">https://www.w3.org/TR/xml/</a> </p><p>The XML prolog is optional. </p> <ul><li>XML version</li> <li>encoding (ASCII / ISO issue) EBCDIC and UTF 16.</li> <li>standalone <dl><dd>From the XML specification § 2.9: <dl><dd>The standalone document declaration must have the value "no" if any external markup declarations contain declarations of: <ul><li>attributes with default values, if elements to which these attributes apply appear in the document without specifications of values for these attributes, or</li> <li>entities (other than <code>amp, lt, gt, apos, quot</code>), if references to those entities appear in the document, or</li> <li>attributes with tokenized types, where the attribute appears in the document with a value such that <i>normalization</i> will produce a different value from that which would be produced in the absence of the declaration, or</li> <li>element types with element content, if white space occurs directly within any instance of those types.</li></ul></dd></dl></dd></dl></li></ul> <p>The default attribute values raise issues with <code>#REQUIRED</code>, <code>#IMPLIED</code>, <code>#FIXED</code> and <code>default</code>. <a rel="nofollow" class="external free" href="https://www.w3.org/TR/xml/#dt-default">https://www.w3.org/TR/xml/#dt-default</a> </p><p>The SVG 1.1 <code>style</code> element has the <code>type</code> attribute, and that attribute is <code>#REQUIRED</code>. See <a rel="nofollow" class="external free" href="https://www.w3.org/Graphics/SVG/1.1/styling.html#StyleElement">https://www.w3.org/Graphics/SVG/1.1/styling.html#StyleElement</a> That means <a href="https://phabricator.wikimedia.org/T68672" class="extiw" title="phab:T68672">Phab:T68672</a> ("SVG style element ignored if no type attribute is specified") may have been invalid, and that <a href="/wiki/Commons:Commons_SVG_Checker" title="Commons:Commons SVG Checker">Commons:Commons SVG Checker</a> should require <code>type="text/css"</code>. </p><p>The <a rel="nofollow" class="external text" href="https://www.w3.org/TR/SVG11/svgdtd.html">SVG 1.1 DTD</a> has </p> <div class="mw-highlight mw-highlight-lang-dtd mw-content-ltr" dir="ltr"><pre><span></span><span class="k"><!ATTLIST</span> <span class="nt">%SVG.style.qname;</span> <span class="kr">xml:space</span> <span class="o">(</span> <span class="na">preserve</span> <span class="o">)</span> <span class="kc">#FIXED</span> <span class="s1">'preserve'</span> <span class="ni">%SVG.id.attrib;</span> <span class="ni">%SVG.base.attrib;</span> <span class="ni">%SVG.lang.attrib;</span> <span class="ni">%SVG.Core.extra.attrib;</span> <span class="na">type</span> <span class="ni">%ContentType.datatype;</span> <span class="kc">#REQUIRED</span> <span class="na">media</span> <span class="ni">%MediaDesc.datatype;</span> <span class="kc">#IMPLIED</span> <span class="na">title</span> <span class="ni">%Text.datatype;</span> <span class="kc">#IMPLIED</span> <span class="k">></span> </pre></div> <p>For SVG 2.0, the <code>type</code> attribute has an initial value of <code>text/css</code>. <a rel="nofollow" class="external free" href="https://svgwg.org/svg2-draft/styling.html#StyleElement">https://svgwg.org/svg2-draft/styling.html#StyleElement</a> </p><p>There is also the <code>style</code> element content being a CDATA section. The SVG 1.1 conservative view was </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><defs></span> <span class="w"> </span><span class="nt"><style</span><span class="w"> </span><span class="na">type=</span><span class="s">"text/css"</span><span class="nt">></span><span class="cp"><![CDATA[</span> <span class="cp"> rect {</span> <span class="cp"> fill: red;</span> <span class="cp"> stroke: blue;</span> <span class="cp"> stroke-width: 3</span> <span class="cp"> }</span> <span class="cp"> ]]></span><span class="nt"></style></span> <span class="w"> </span><span class="nt"></defs></span> </pre></div> <p>The CDATA section was needed to avoid entity interpretation and <. I remember having trouble at some point, but I think that was resolved by using CSS character literals rather than XML character literals. It may also be that the modern <code>style</code> element is a CDATA section rather than PCDATA. Find the references. </p><p>That SVG snippet also shows the <code>style</code> element within a <code>defs</code> element. That used to be common practice, but it may have never been needed. The advantage of the <code>defs</code> element was its content would never be rendered. There is more to say about <code>defs</code>; many elements (such as <code>linearGradient</code>) do not need to be within a <code>defs</code> element. </p> <div class="mw-heading mw-heading4"><h4 id="SVG_spelling">SVG spelling</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=17" title="Edit section: SVG spelling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG is XML rather than HTML, so its elements use camel case (e.g., <code>linearGradient</code>). </p><p>SVG inherits attributes from case-insensitive HTML and CSS, so SVG uses some hyphenated attributes (e.g., <code>font-family</code>). </p><p>Other attributes use camel case (e.g., <code>markerWidth</code> and <code>refX</code>). </p><p>Then we get the <code>clipPath</code> element referenced by the <code>clip-path</code> attribute. </p> <div class="mw-heading mw-heading4"><h4 id="SVG_treading_where_it_should_not">SVG treading where it should not</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=18" title="Edit section: SVG treading where it should not"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG is about representing vector images, but it often steps into areas that do not affect the appearance of the image or where it has no authority. </p><p>Reinventing namespaces. </p><p>Effectively merging <code>xml:lang</code> and <code>lang</code> attributes. If both exist, they must be equal. Why not just keep one? It also complicates the CSS <code>lang()</code> psuedo-selector. The only bad thing about <code>xml:lang</code> is its impact on RDF metadata, but that can be fixed with <code>xml:lang=""</code>. (Check XML specification.) </p><p>Deprecating <code>xml:space</code> for CSS. XSLT knows how to handle <code>xml:space</code> but it does not know how to handle CSS. Compare the options. Also raise the issue about <code>text-anchor</code> and directions. </p><p>Significantly, <code>xml:space</code> is in the parent XML specification. SVG is a child of XML and not its master. </p><p>Why merge <code>xlink:href</code> and <code>href</code>? The XLink specification exists and was incorporated. Look at other parts of XLink. Yes, there are better ways to handle titles. List the XLink attributes. A more pointed complaint is that having adopted <code>xlink:href</code> in SVG 1.0, switching to <code>href</code> in SVG 2.0 is not downward compatible. Why make a breaking change? </p><p>The <code>translate</code> attribute is inherited from ITS and its <code>its:translate</code> attribute. The attribute tells language translators to not translate this text. It has no impact on the display of SVG. SVG is also missing features such as <code>its:term</code>. That tells language translators that the phrase is a technical term that should have a consistent translation. SVG should have just pointed to ITS and suggested its use. Yes, ITS should not be using multiple namespaces. </p><p>The <code>data-*</code> attributes reinvent what should be the <code>data</code> namespace. Inherited from HTML. Also inherited is the crazy case-insensitive mapping that is not needed in case-sensitive XML. Show some examples. These attributes have no impact on the display of SVG. They are there to simplify some handling in the DOM, but that should be a separable extension. </p><p>The <code>aria-*</code> attributes reinvent what should be the <code>aria</code> namespace. The SVG Working Group does not control the meaning of these screen reading attributes, so it should have just pointed to the ARIA specification. That specification should have used namespace syntax. </p> <div class="mw-heading mw-heading4"><h4 id="SVG_DOM">SVG DOM</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=19" title="Edit section: SVG DOM"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Significant advantage. </p><p>Looking for type hierarchy, but not seeing what I want. </p><p>Descriptive elements <code>desc</code> and <code>title</code>. </p><p>Metadata element <code>metadata</code>. </p><p>Container elements such as <code>g</code>. SVG 2.0 says, "An element which can have graphics elements and other container elements as child elements. Specifically: ‘a’, ‘clipPath’, ‘defs’, ‘g’, ‘marker’, ‘mask’, ‘pattern’, ‘svg’, ‘switch’ and ‘symbol’." </p><p>Graphics elements such as <code>line</code> and <code>text</code>. Inherits from <a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement">SVGGraphicsElement</a>, so it has some methods, but not a type? <a rel="nofollow" class="external text" href="https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement">Interface SVGGraphicsElement</a>. </p> <div class="mw-heading mw-heading5"><h5 id="Style_information_in_the_DOM">Style information in the DOM</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=20" title="Edit section: Style information in the DOM"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I do not believe the SVG DOM makes all the <code>style</code> information available. A couple years ago I went looking for aural stylesheet information, and it was not there. Consequently, I do not believe that style properties such as <code>-inkscape-font-specification</code> are broken out. Does that mean that they disappear completely when the DOM is written out? </p><p>It may be that none of such style properties make any difference, so removing them could be seen as beneficial. </p> <div class="mw-heading mw-heading5"><h5 id="Attributes_that_could_be_removed">Attributes that could be removed</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=21" title="Edit section: Attributes that could be removed"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Is there a list of Inkscape attributes that are always safe to remove? For example, Inkscape could always regenerate the node type list. If Inkscape can regenerate the information, then why keep it? </p> <ul><li><code>sodipodi:nodetypes</code> attribute can be regenerated</li> <li><code>sodipodi:role="line"</code></li> <li><code>-inkscape-font-specification</code> CSS can be removed</li> <li><code>line-height</code> CSS (has multiple defaults)</li> <li><code>font-style</code> if default</li> <li><code>font-weight</code> if default</li> <li><code>font-stretch</code> if default</li> <li><code>font-variant</code> if default (short cut?)</li> <li><code>font-variant-ligatures</code> if default</li> <li><code>font-variant-caps</code> if default</li> <li><code>font-variant-numeric</code> if default</li> <li><code>font-variant-east-asian</code> if default</li> <li><code>letter-spacing</code> property if default</li> <li><code>word-spacing</code> property if default</li></ul> <p>Some Inkscape and sodipodi attributes should be preserved. Some <code>g</code> elements are identified as layers. Information about drawing grids does not take up much space, so removing that information does not have much benefit. </p> <ul><li><code>g</code> element (perhaps toplevel) with <code>inkscape:groupmode="layer"</code> and <code>inkscape:label="<i>name</i>"</code> and <code>id="<i>identifier</i>"</code> <dl><dd>the <code>sodipodi:namedview</code> element will have <code>inkscape:current-layer="<i>identifier</i>"</code></dd></dl></li></ul> <p>The significant benefit is removing verbose style information. </p><p>Additional information to remove would be needless graphics state. For example, if <code>stroke="none"</code>, then we probably do not care about <code>stroke-width</code>, <code>stroke-dasharray</code>, <code>stroke-dashoffset</code>, line joins, and end caps. Some font information may be a little different. If text has been converted to curves, keeping that information around would help in reconstructing the text. </p> <div class="mw-heading mw-heading3"><h3 id="Validation">Validation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=22" title="Edit section: Validation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>One of the features of XML was supposed to be validation. Validation would enforce a well-formed requirement on all XML documents. </p><p>Part of that was each XML document would have a DTD that could be used to check the syntactical correctness of the document. If a document had a DTD, then the document should conform to that DTD. </p><p>Many years ago, I used some Java code to read an XML document. The program took a long time to start up. I traced that to the validator: when Java read the document, it also validated the document against the DTD. That was certainly an interesting thing to do, but it was a heavy performance hit. I had to set three switches to turn off validation. Pretty much everybody turned off validation. </p><p>Pretty much everyone also used extensions, so documents would not validate anyway. </p><p>When XML introduced namespaces, it also showed the limitations of DTDs. DTDs are not namespace aware. </p><p>That gave rise to schema validators, but there were several. RelaxNG. </p><p>Turning off validation is coming back to bite us now. Invalid documents would sometimes work in one application, but those documents might fail in a different application or when the original application is updated. </p> <ul><li>W3C validator <dl><dd>original DTD validator. <dl><dd>This now gives us some trouble. If the document does not have a DTD, then it will not validate it. User must select SVG 1.1 and revalidate.</dd></dl></dd> <dd>nu validator. Schema validator. <dl><dd>Does this handle files that have a DTD?</dd></dl></dd></dl></li> <li><a href="/wiki/Commons:Commons_SVG_Checker" title="Commons:Commons SVG Checker">Commons:Commons SVG Checker</a></li> <li><a class="external text" href="https://svgcheck.toolforge.org/">Jarry1250's SVG Check</a></li> <li>RDF validator <dl><dd><a rel="nofollow" class="external free" href="https://www.w3.org/RDF/Validator/">https://www.w3.org/RDF/Validator/</a> <dl><dd><a rel="nofollow" class="external text" href="https://www.w3.org/RDF/Validator/rdfval?URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg&PARSE=Parse+URI%3A+&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED">validate</a> <dl><dd>Constructed with <dl><dd><code>{{urlencode:{{filepath:First Ionization Energy.svg}}}}</code></dd> <dd><code>{{filepath:}}</code> → (no argument would work in file namespace)</dd> <dd><code>{{filepath:First Ionization Energy.svg}}</code> → <a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg">https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg</a></dd> <dd><code>{{filepath:File:First Ionization Energy.svg}}</code> → <a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg">https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg</a></dd> <dd><code>{{urlencode:...}}</code> → https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg</dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>The W3C validator has changed. See <a href="/wiki/Help_talk:SVG#429_error_in_W3C_validator" title="Help talk:SVG">Help talk:SVG#429 error in W3C validator</a>. In particular, the Nu validator is no longer the default; DOCTYPE declarations are expected: </p> <dl><dd><dl><dd><dl><dd>Apparently, the W3C checker now requires a DOCTYPE processing instruction. See <a rel="nofollow" class="external free" href="https://www.w3.org/wiki/Validating_your_HTML?TB_iframe=true">https://www.w3.org/wiki/Validating_your_HTML?TB_iframe=true</a></dd> <dd>In the past, the W3C checker would use the Nu validator when there was no DOCTYPE.</dd> <dd>It looks like we now must use the Nu validator explicitly in the templates or files without a DOCTYPE will not validate: <ul><li><a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F0%2F0a%2FExmouth_Gulf%252C_LT.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F0%2F0a%2FExmouth_Gulf%252C_LT.svg</a></li> <li><a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg</a></li> <li><a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg</a></li></ul></dd> <dd>That requires updating some templates.</dd> <dd><a class="mw-selflink selflink">Glrx</a> (<a href="/wiki/User_talk:Glrx" title="User talk:Glrx"><span class="signature-talk">talk</span></a>) 19:24, 13 March 2023 (UTC) <dl><dd><a href="/wiki/Template:Valid_SVG" title="Template:Valid SVG"><span style="font-family:monospace,monospace;">{{Valid SVG}}</span></a> and <a href="/wiki/Template:Invalid_SVG" title="Template:Invalid SVG"><span style="font-family:monospace,monospace;">{{Invalid SVG}}</span></a>. Editing requires rights I do not have.</dd> <dd><div class="mw-highlight mw-content-ltr" dir="ltr"><pre>|validateurl=//validator.w3.org/check<!-- -->{{#ifexist:File:{{PAGENAME}}|?uri=<!-- -->{{#if:{{{url|}}}|{{{url|}}}|{{urlencode:{{canonicalurl:Special:Filepath/{{PAGENAME}}}}}}}}&doctype=Inline{{#ifeq:{{{opt}}}|>||{{{opt|&ss=1}}}}}}}</pre></div></dd> <dd><a class="mw-selflink selflink">Glrx</a> (<a href="/wiki/User_talk:Glrx" title="User talk:Glrx"><span class="signature-talk">talk</span></a>) 19:47, 13 March 2023 (UTC)</dd></dl></dd></dl></dd></dl></dd></dl> <dl><dd>Why is Special:Filepath being used? Doesn't that trigger a redirect? <ul><li>{{canonicalurl:Special:Filepath/First Ionization Energy.svg}} → <a class="external free" href="https://commons.wikimedia.org/wiki/Special:Filepath/First_Ionization_Energy.svg">https://commons.wikimedia.org/wiki/Special:Filepath/First_Ionization_Energy.svg</a></li> <li>{{filepath:First Ionization Energy.svg}} → <a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg">https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg</a></li></ul></dd></dl> <p>Try some files: </p> <ul><li><a href="/wiki/File:First_Ionization_Energy.svg" title="File:First Ionization Energy.svg">File:First Ionization Energy.svg</a> has an XML processing instruction and a DTD <dl><dd><code><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "<a rel="nofollow" class="external free" href="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd</a>"></code></dd> <dd>it does not have any extensions (e.g., RDF)</dd></dl> <ul><li>old: <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2FFirst_Ionization_Energy.svg&doctype=Inline&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2FFirst_Ionization_Energy.svg&doctype=Inline&ss=1#source</a></li> <li>nu: <a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg</a></li></ul></li> <li><a href="/wiki/File:Conic_Sections.svg" title="File:Conic Sections.svg">File:Conic Sections.svg</a> does not have an XML processing instruction or a DTD. It does have RDF <ul><li>old: <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2FConic_Sections.svg&doctype=Inline&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2FConic_Sections.svg&doctype=Inline&ss=1#source</a> <dl><dd>states document cannot be checked. Select Doctype SVG 1.1 and revalidate.</dd> <dd>34 errors, 2 warnings <ol><li>no character encoding declared because no XML processing instruction</li> <li>no <code>type</code> attribute on <code>style</code> element.</li> <li>remaining errors were extensions</li></ol></dd></dl></li> <li>old prime: <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&doctype=Inline&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&doctype=Inline&ss=1#source</a> <dl><dd>same behavior as old. Notice modified URL that includes <code>doctype=SVG+1.1</code> <dl><dd><a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&charset=%28detect+automatically%29&doctype=SVG+1.1&ss=1&group=0&user-agent=W3C_Validator%2F1.3+">https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&charset=%28detect+automatically%29&doctype=SVG+1.1&ss=1&group=0&user-agent=W3C_Validator%2F1.3+</a></dd></dl></dd> <dd>try explict SVG 1.1: <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&doctype=SVG+1.1&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&doctype=SVG+1.1&ss=1#source</a></dd> <dd>try no doctype (fails): <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg&ss=1#source</a></dd></dl></li> <li>nu: <a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F11%2FConic_Sections.svg</a> <dl><dd>emits error for rdf:RDF child in metadata, but then says RDF subtrees are not checked (warning)</dd></dl></li></ul></li> <li><a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a> has an XML processing instruction but no DTD. It has RTF, sodipodi, and inkscape. <ul><li>old: <a rel="nofollow" class="external free" href="https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2F2022_Russian_invasion_of_Ukraine.svg&doctype=Inline&ss=1#source">https://validator.w3.org/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FSpecial%3AFilepath%2F2022_Russian_invasion_of_Ukraine.svg&doctype=Inline&ss=1#source</a> <dl><dd>cannot be checked. select Doctype SVG 1.1 and revalidate.</dd> <dd>53 errors, 1 warning. Typical extensions + <code>data-*</code> attributes.</dd></dl></li> <li>nu: <a rel="nofollow" class="external free" href="https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F4f%2F2022_Russian_invasion_of_Ukraine.svg">https://validator.nu/?doc=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F4%2F4f%2F2022_Russian_invasion_of_Ukraine.svg</a> <dl><dd>emits 4 errors for <code>data-*</code> attributes. Understandable</dd></dl></li></ul></li></ul> <p><br /> Why doesn't the nu Validator also process sodipodi, inkscape, and RDF? Are there schemas for those extensions? </p> <div class="mw-heading mw-heading3"><h3 id="Malicious_SVG">Malicious SVG</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=23" title="Edit section: Malicious SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MW does not allow scripts. </p> <ul><li><a href="https://phabricator.wikimedia.org/T334953" class="extiw" title="phab:T334953">Phab:T334953</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="SVG_recommendations">SVG recommendations</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=24" title="Edit section: SVG recommendations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Small size is a significant goal. </p><p>SVG is not arbitrarily scalable. Scalable is more about eliminating jaggies. </p><p>Fixed width lines. (CSS can adjust.) </p><p>SVG is not a good file format for bitmap images such as bar codes and QR codes. Those objects are not arbitrarily scalable; they must fit on a pixel grid. One could use barcode fonts within an SVG file; fonts will align to an underlying pixel grid. </p><p>Not for photographs (but can be used to label photographs). </p><p>Limited colors (can use color gradients). Color blocking suggestions rather than enormous detail. </p><p>Filters can produce complex objects such as chalk textures and clouds. </p> <div class="mw-heading mw-heading3"><h3 id="File_size">File size</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=25" title="Edit section: File size"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG files can be small, but they can also be surprisingly large. </p> <div class="mw-heading mw-heading4"><h4 id="Files_that_are_unnecessarily_large">Files that are unnecessarily large</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=26" title="Edit section: Files that are unnecessarily large"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some files are inordinately large. Extraneous clipping paths, gradients, and copied rather than instanced symbols. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Arms_of_the_House_of_Rohan-Chabot.svg" class="mw-file-description" title="simple figure is 348 kB"><img alt="simple figure is 348 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Arms_of_the_House_of_Rohan-Chabot.svg/103px-Arms_of_the_House_of_Rohan-Chabot.svg.png" decoding="async" width="103" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Arms_of_the_House_of_Rohan-Chabot.svg/155px-Arms_of_the_House_of_Rohan-Chabot.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Arms_of_the_House_of_Rohan-Chabot.svg/207px-Arms_of_the_House_of_Rohan-Chabot.svg.png 2x" data-file-width="410" data-file-height="476" /></a></span></div> <div class="gallerytext">simple figure is 348 kB</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Audi_logo_detail.svg" class="mw-file-description" title="Audi SVG is 9.96 MB. SVG is not accurate (x-ray vision). Compositing opportunity."><img alt="Audi SVG is 9.96 MB. SVG is not accurate (x-ray vision). Compositing opportunity." src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Audi_logo_detail.svg/120px-Audi_logo_detail.svg.png" decoding="async" width="120" height="63" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Audi_logo_detail.svg/180px-Audi_logo_detail.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Audi_logo_detail.svg/240px-Audi_logo_detail.svg.png 2x" data-file-width="1426" data-file-height="743" /></a></span></div> <div class="gallerytext">Audi SVG is 9.96 MB. SVG is not accurate (x-ray vision). Compositing opportunity.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:2808_audi_logo_nuevo_th_2.jpg" class="mw-file-description" title="Audi JPEG is only 22 kB"><img alt="Audi JPEG is only 22 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/2808_audi_logo_nuevo_th_2.jpg/120px-2808_audi_logo_nuevo_th_2.jpg" decoding="async" width="120" height="75" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/2808_audi_logo_nuevo_th_2.jpg/180px-2808_audi_logo_nuevo_th_2.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/2808_audi_logo_nuevo_th_2.jpg/240px-2808_audi_logo_nuevo_th_2.jpg 2x" data-file-width="600" data-file-height="375" /></a></span></div> <div class="gallerytext">Audi JPEG is only 22 kB</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:SMAW_weld_area.svg" class="mw-file-description" title="Welding SVG is 206 kB. Path text. Fills. Path text has been removed; file is now 100 kB."><img alt="Welding SVG is 206 kB. Path text. Fills. Path text has been removed; file is now 100 kB." src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/SMAW_weld_area.svg/120px-SMAW_weld_area.svg.png" decoding="async" width="120" height="85" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/SMAW_weld_area.svg/180px-SMAW_weld_area.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/90/SMAW_weld_area.svg/240px-SMAW_weld_area.svg.png 2x" data-file-width="512" data-file-height="363" /></a></span></div> <div class="gallerytext">Welding SVG is 206 kB. Path text. Fills. Path text has been removed; file is now 100 kB.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Peptidformationball.svg" class="mw-file-description" title="318 kB. Some path text has been removed. No symbols. Lots of gradients."><img alt="318 kB. Some path text has been removed. No symbols. Lots of gradients." src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Peptidformationball.svg/120px-Peptidformationball.svg.png" decoding="async" width="120" height="99" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Peptidformationball.svg/180px-Peptidformationball.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Peptidformationball.svg/240px-Peptidformationball.svg.png 2x" data-file-width="990" data-file-height="820" /></a></span></div> <div class="gallerytext">318 kB. Some path text has been removed. No symbols. Lots of gradients.</div> </li> </ul> <p>See also <a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=696886637#SVG_House_of_Estridsen">SVG House of Estridsen</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Polar_patterns">Polar patterns</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=27" title="Edit section: Polar patterns"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Consider some images from <a href="/wiki/Category:NAVAID_pictograms" title="Category:NAVAID pictograms">Category:NAVAID pictograms</a>:<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Pictogram_TACAN.svg" class="mw-file-description" title="TACAN navigation symbol is a reasonable 4 kB."><img alt="TACAN navigation symbol is a reasonable 4 kB." src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Pictogram_TACAN.svg/120px-Pictogram_TACAN.svg.png" decoding="async" width="120" height="105" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Pictogram_TACAN.svg/180px-Pictogram_TACAN.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Pictogram_TACAN.svg/240px-Pictogram_TACAN.svg.png 2x" data-file-width="97" data-file-height="85" /></a></span></div> <div class="gallerytext">TACAN navigation symbol is a reasonable 4 kB.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Pictogram_NDB.svg" class="mw-file-description" title="NDB navigation symbol is a huge 224 kB."><img alt="NDB navigation symbol is a huge 224 kB." src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pictogram_NDB.svg/120px-Pictogram_NDB.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pictogram_NDB.svg/180px-Pictogram_NDB.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/Pictogram_NDB.svg/240px-Pictogram_NDB.svg.png 2x" data-file-width="95" data-file-height="95" /></a></span></div> <div class="gallerytext">NDB navigation symbol is a huge 224 kB.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Pictogram_NDB-DME.svg" class="mw-file-description" title="NDB-DME navigation symbol is nearly as complex but uses only 11 kB."><img alt="NDB-DME navigation symbol is nearly as complex but uses only 11 kB." src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Pictogram_NDB-DME.svg/120px-Pictogram_NDB-DME.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Pictogram_NDB-DME.svg/180px-Pictogram_NDB-DME.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Pictogram_NDB-DME.svg/240px-Pictogram_NDB-DME.svg.png 2x" data-file-width="95" data-file-height="95" /></a></span></div> <div class="gallerytext">NDB-DME navigation symbol is nearly as complex but uses only 11 kB.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:SVG_test_dasharray.svg" class="mw-file-description" title="Test the display of zero-length dashes."><img alt="Test the display of zero-length dashes." src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/SVG_test_dasharray.svg/120px-SVG_test_dasharray.svg.png" decoding="async" width="120" height="60" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/SVG_test_dasharray.svg/180px-SVG_test_dasharray.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f9/SVG_test_dasharray.svg/240px-SVG_test_dasharray.svg.png 2x" data-file-width="512" data-file-height="256" /></a></span></div> <div class="gallerytext">Test the display of zero-length dashes.</div> </li> </ul> <p>The first image is a central dot and 12 line segments, and it has a simple representation. The second image is problematic. it is a central dot, a central solid ring, and 10 dotted radial rings. It has a lot of dots, but why does it need so many bytes? Each dot is not a circle element, but rather a path that looks like a circle. The third image is nearly as complex (only 7 dotted rings), but it is a more efficient representation. Instead of round dots, it uses <code>stroke-dasharray</code> for the dots. Notice that the dash array has some issues along the north axis. </p><p>We can get dots easily. Use a <code>circle</code> element (stroked but no fill), set the <code>stroke-dasharray="0 xxx"</code>, and set <code>stroke-linecap="round"</code>. The value <code>xxx</code> is chosen to be an integer fraction of the circumference. A close look at the NDB-DME symbol shows dashes instead of dots. </p><p>There is a problem with <code>librsvg</code>: the <code>stroke-dasharray</code> attribute must use commas rather than spaces. </p> <div class="mw-heading mw-heading4"><h4 id="Compression_using_pattern_elements">Compression using pattern elements</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=28" title="Edit section: Compression using pattern elements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here is a simple file that takes 307 kB: </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Blason_ville_fr_Dinard_(Ille-et-Vilaine).svg" class="mw-file-description" title="307 kB on 2022-09-20."><img alt="307 kB on 2022-09-20." src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg/109px-Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg.png" decoding="async" width="109" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg/164px-Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg/218px-Blason_ville_fr_Dinard_%28Ille-et-Vilaine%29.svg.png 2x" data-file-width="512" data-file-height="563" /></a></span></div> <div class="gallerytext">307 kB on 2022-09-20.</div> </li> </ul> <p>It has linear and radial gradients, and many groups are scaled. It should use a <code>pattern</code> or <code>feTile</code>. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Reduced file size to 9 kB. The interesting challenge here is the pattern fill. The shield outline is simple (and its path can be used for clipping). The shield can have a solid green fill that is overlaid with left and right red stripes. The white cross can be a path with a white fill (the path needs to be stroked within the shield, so overlaying two rectangles does not work). The pattern is difficult because it does not have a simple rectangular pitch. After filling the white cross, it is drawn two more times: first with a rectangular pattern of half the figures, and second with a similar pattern offset by half the pitch. The whole shield is then covered by a radial gradient. Finally, the outline of the shield is stroked at 3 pixels. </p><p>Three are many similar designs at <a href="https://en.wikipedia.org/wiki/List_of_Breton_flags" class="extiw" title="w:List of Breton flags">w:List of Breton flags</a>. </p><p>This file should have a trivial size: </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Blason_ville_Chauvign%C3%A9_35.svg" class="mw-file-description" title="164 kB on 2022-09-22."><img alt="164 kB on 2022-09-22." src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Blason_ville_Chauvign%C3%A9_35.svg/109px-Blason_ville_Chauvign%C3%A9_35.svg.png" decoding="async" width="109" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Blason_ville_Chauvign%C3%A9_35.svg/164px-Blason_ville_Chauvign%C3%A9_35.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/85/Blason_ville_Chauvign%C3%A9_35.svg/218px-Blason_ville_Chauvign%C3%A9_35.svg.png 2x" data-file-width="600" data-file-height="660" /></a></span></div> <div class="gallerytext">164 kB on 2022-09-22.</div> </li> </ul> <p>A file that has already been compressed using group elements. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hermine_(champ).svg" class="mw-file-description" title="369 kB → 1 kB using pattern"><img alt="369 kB → 1 kB using pattern" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Hermine_%28champ%29.svg/85px-Hermine_%28champ%29.svg.png" decoding="async" width="85" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Hermine_%28champ%29.svg/127px-Hermine_%28champ%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Hermine_%28champ%29.svg/170px-Hermine_%28champ%29.svg.png 2x" data-file-width="744" data-file-height="1052" /></a></span></div> <div class="gallerytext"> 369 kB → 1 kB using pattern</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Filters">Filters</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=29" title="Edit section: Filters"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/File:Award-star-gold-3d.svg" title="File:Award-star-gold-3d.svg">File:Award-star-gold-3d.svg</a> could use several SVG filters. Simple filter would be the shadow. Lighting would be more complicated. </p> <div class="mw-heading mw-heading5"><h5 id="Issues_with_enable-background">Issues with <code>enable-background</code></h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=30" title="Edit section: Issues with enable-background"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <code>enable-background</code> attribute controls the creation of a background bitmap. The background bitmap is referenced by either <code>BackgroundImage</code> or <code>BackgroundAlpha</code>. The background bitmap increases the resources needed to render an SVG image. Ideally, the attribute should not be specified when it is not needed. </p><p>Adobe Illustrator inserts <code>enable-background="new ..."</code>. The line is only needed if the SVG uses <code>filter</code> elements that reference a background image. Filters seldom reference a background image. </p><p>Anyway, <code>enable-background</code> does not fit the CSS rendering model, so is on its way out. SVG 1 but not SVG 2. RSVG is SVG 1.1 and supports the attribute. </p><p>The new way is to use CSS properties. <code>isolation: isolate</code>. (Alas, CSS becomes an integral part of SVG's rendering.) </p><p>Sort out the issue of when a <code>filter</code> is applied to a group. Is it immediate or is there a stack? Is it different between SVG 1 and SVG 2? </p><p>Interaction with blending operations. Filter applied before or after a <code>mix-blend-mode: <i>mode</i></code>? </p> <div class="mw-heading mw-heading4"><h4 id="Difficult_tasks">Difficult tasks</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=31" title="Edit section: Difficult tasks"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Illustrating metal badges such as <a href="/wiki/File:Police_Badge,P.R.China.svg" title="File:Police Badge,P.R.China.svg">File:Police Badge,P.R.China.svg</a> at 274 kB. </p> <ul><li><a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=697082089#Chinese_Police_&_Army_Badges">Chinese Police & Army Badges</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="Extraction_of_groups">Extraction of groups</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=32" title="Edit section: Extraction of groups"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The magazine files. </p><p>Chemistry diagrams such as <a href="/wiki/File:Calvin-cycle4.svg" title="File:Calvin-cycle4.svg">File:Calvin-cycle4.svg</a>. </p><p><a href="/wiki/File:Fault_types.svg" title="File:Fault types.svg">File:Fault types.svg</a> (154 kB). </p><p><a href="/wiki/File:Peptidformationball.svg" title="File:Peptidformationball.svg">File:Peptidformationball.svg</a> (318 kB) No <code>use</code>, Inkscape bloat, Inkscape gradient replication. </p><p><a href="/wiki/File:Scheme_sodium-potassium_pump-en.svg" title="File:Scheme sodium-potassium pump-en.svg">File:Scheme sodium-potassium pump-en.svg</a> went from 187 kB to 26 kB. </p><p><a href="/wiki/File:CNO_Cycle.svg" title="File:CNO Cycle.svg">File:CNO Cycle.svg</a> went from 141 kB to 10 kB and became multilingual. </p><p><a href="/wiki/File:FinchArms.svg" title="File:FinchArms.svg">File:FinchArms.svg</a> should reference rather than copy repeated subimage (83 kB → 32 kB). </p> <div class="mw-heading mw-heading4"><h4 id="SVG_optimizers">SVG optimizers</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=33" title="Edit section: SVG optimizers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I am in favor of optimized SVG files. Some editors include a lot of pointless information. For example, an unstroked <code>path</code> may have attributes specifying the stroke color and the stroke dash properties. A <code>rect</code> may have a <code>font-family</code> attribute. </p><p>I'm also OK with bona fide structural groups sharing style information. If a group has several common elements, then it makes sense that they be styled similarly. </p><p>There are command-line SVG optimizers, such as </p> <ul><li><a rel="nofollow" class="external text" href="https://github.com/svg/svgo">svgo</a> (=<a rel="nofollow" class="external text" href="https://jakearchibald.github.io/svgomg/">SVGOmg</a>)</li> <li><a rel="nofollow" class="external text" href="https://github.com/scour-project/scour">scour</a></li> <li><a rel="nofollow" class="external text" href="https://github.com/RazrFalcon/svgcleaner">svgcleaner</a>.</li></ul> <p>In general, I'm skeptical of using such optimizers. The notion of optimization is often based on deleting as many bytes as possible. Consequently, path data attributes become difficult to read, and metadata may get tossed completely. While specifying coordinates to the micron is often pointless, truncating coordinates to a fixed number of digits is a pretty big hammer. I do not know for sure, but I believe some tools may group neighboring elements to share formatting information; that is a poor way of imposing styles. </p><p>Although some files have pointless hierarchy, I've been frustrated with optimizers deleting <code>g</code> elements that do not have any attributes. The result is the ungrouping/flattening of the SVG file. The groups may hold semantic value. </p><p>See also </p> <ul><li><a href="/wiki/Help:SVG_guidelines#SVG_sourcecode_edits_without_visual_change" title="Help:SVG guidelines">Help:SVG_guidelines#SVG_sourcecode_edits_without_visual_change</a></li></ul> <p>Optimizers, if they do their job, do not change the appearance of the image. </p> <div class="mw-heading mw-heading3"><h3 id="Title_and_description">Title and description</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=34" title="Edit section: Title and description"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>It is reasonable to include <code>title</code> and <code>desc</code> elements. The <code>title</code> element produces a tooltip display in many browsers. The <code>desc</code> element is less useful. </p><p><s>SVG 2.0 will allow language versions (using the <code>lang</code> or <code>xml:lang</code> attribute — not the <code>systemLanguage</code> attribute).<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> The acceptance of the language versions is not clear, and it has an at-risk warning in the SVG 2.0 specification.</s> (Feature was removed in later version of SVG 2.0.) </p><p>The <code>title</code> and <code>desc</code> elements are not display elements. For that reason, they cannot be selected within a <code>switch</code> element. In that context, the elements would be giving a title and a description to the parent <code>switch</code> element. </p><p>There should be support for the Dublin Core <code>dc:title</code> and <code>dc:description</code> elements with <code>xml:lang</code> attributes. </p> <div class="mw-heading mw-heading3"><h3 id="Metadata">Metadata</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=35" title="Edit section: Metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This section needs reorganization and clarity about types. It is about machine readable metadata. </p><p>Machine readable often turns to RDF. RDF is sophisticated, so the use is often a limited subset. </p><p>There are vocabularies such as Dublin Core. There are also schemas that describe how the vocabulary is used. </p><p>Then there is how the metadata is actually used. </p><p>Metadata and copyright are intertwined. Metadata should include information about the origin of an image, and several copyright licenses require that some information be provided. </p><p>The Creative Commons licenses require some specific information. For example, there should be a link to the CC license. Derivative works need to say what was changed. In many cases, these requirements may not be met. </p><p>I believe all SVG files should include metadata. It is not hard to add, and it can be useful. Including license data in the image metadata may fulfill licensing requirements or at least provide a colorable defense. Failure to follow all licensing requirements may lead to trouble.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> </p> <dl><dd><small>see <a href="/wiki/Commons:Copyleft_trolling" title="Commons:Copyleft trolling">Commons:Copyleft trolling</a>.</small></dd></dl> <p><a href="https://en.wikipedia.org/wiki/Moral_rights" class="extiw" title="w:Moral rights">Moral rights</a>. Even if I do not need to credit an author, there may be a moral obligation to give them credit. Sometimes that moral right can become a legal right. Some contributors allow free use of some or all of their work. <a href="/wiki/User:LadyofHats" title="User:LadyofHats">LadyofHats</a> is a notable example. That means I can use the work for any purpose, and I do not need to give anyone credit. That does not seem reasonable or even right. I could take Herman Melville's Moby Dick and publish it under my own name. It seems far better to say it is Melville's work. </p><p>Providing metadata also makes it easier for someone else to check the licensing rights. Commons encourages everybody (not just its wikipedia projects) to use the available art. Say Alice uses some CC0 SVG images from Commons on her website. The images are CC0, so Alice does not mention any licensing details. Bob sees Alice's website and likes the images, but how can Bob determine the licensing of the images? </p><p>The license check would be simple if the SVG file included the licensing information. Just given an image, it may be hard to find out who made it. If the image has metadata, then that information may be easy to find. The information may not be accurate (somebody may be license washing), but it is a starting point and could serve as a good defense. </p><p><a rel="nofollow" class="external free" href="https://www.dublincore.org/specifications/dublin-core/dcq-rdf-xml/">https://www.dublincore.org/specifications/dublin-core/dcq-rdf-xml/</a> </p> <div class="mw-heading mw-heading5"><h5 id="More_discussion_about_copyleft_trolling">More discussion about copyleft trolling</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=36" title="Edit section: More discussion about copyleft trolling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Recent (March/April 2024) discussions. </p> <ul><li><a href="/wiki/Commons:Village_pump/Proposals#Prohibit_copyleft_trolling" title="Commons:Village pump/Proposals">Commons:Village pump/Proposals#Prohibit copyleft trolling</a> → <dl><dd><a href="/wiki/Commons:Village_pump/Proposals/Archive/2024/06#Prohibit_copyleft_trolling" title="Commons:Village pump/Proposals/Archive/2024/06">Commons:Village_pump/Proposals/Archive/2024/06#Prohibit_copyleft_trolling</a></dd></dl></li> <li><a href="/wiki/Commons:Village_pump#Guidance_re_possible_copyleft_trolling" title="Commons:Village pump">Commons:Village pump#Guidance re possible copyleft trolling</a> (March 28) → <dl><dd><a href="/wiki/Commons:Village_pump/Archive/2024/03#Guidance_re_possible_copyleft_trolling" title="Commons:Village pump/Archive/2024/03">Commons:Village_pump/Archive/2024/03#Guidance_re_possible_copyleft_trolling</a></dd></dl></li> <li><a href="/wiki/Commons:Copyleft_trolling" title="Commons:Copyleft trolling">Commons:Copyleft trolling</a></li></ul> <p>Use metadata to automatically satisfy the license requirement. When an application inserts an image, it notices the CC license requirements and fulfills it. </p><p>Much like WMF projects use a link to the file page, a web page could include a similar link or add hover information. There could also be information that is printed when the file is printed. For example, use a class that becomes visible on print media. Or the information could be put in a footnote that appears at the bottom of the page or the end of the document. </p><p>The CC licenses also require a link to the license. Must one use the full URL or is it adequate to use "CC-BY-SA 4.0" because a web search will turn up that license? It does not make a difference on a web page, but a URL is rather long. </p><p>Although we have stories about users being caught by Pixie, the details are missing. </p><p>The JPEG images that I've looked have sparse metadata. </p> <ol><li><a href="/wiki/File:Lukas_Nelson.jpg" title="File:Lukas Nelson.jpg">File:Lukas Nelson.jpg</a>. The current metadata has "Photo credit: Larry Philpot, www.soundstagephotography.com. This work is licensed under the Creative Commons BY-SA 3.0 License: <a rel="nofollow" class="external free" href="http://creativecommons.org/licenses/by-sa/3.0/">http://creativecommons.org/licenses/by-sa/3.0/</a>". The original upload metadata was just "Copyright Larry Philpot".</li> <li><a href="/wiki/File:Hereford_Cathedral_Nave_West,_Herefordshire,_UK_-_Diliff.jpg" title="File:Hereford Cathedral Nave West, Herefordshire, UK - Diliff.jpg">File:Hereford Cathedral Nave West, Herefordshire, UK - Diliff.jpg</a>. The metadata identifies David Iliff as the copyright holder but does not identify any license. Does have contact information (diliff@yahoo.com).</li> <li><a href="/wiki/File:London_Thames_Sunset_panorama_-_Feb_2008.jpg" title="File:London Thames Sunset panorama - Feb 2008.jpg">File:London Thames Sunset panorama - Feb 2008.jpg</a>. The metadata has no copyright information (XLIFF copyright status not set). This file would need to have a text representation of the license. The file page implies that "Photo by DAVID ILIFF. License: CC BY-SA 3.0" would be sufficient credit.</li> <li><a href="/wiki/File:Tower_Bridge_London_Dusk_Feb_2006.jpg" title="File:Tower Bridge London Dusk Feb 2006.jpg">File:Tower Bridge London Dusk Feb 2006.jpg</a>. No reasonable metadata.</li> <li><a href="/wiki/File:Hammersmith_Bridge_1,_London,_UK_-_April_2012.jpg" title="File:Hammersmith Bridge 1, London, UK - April 2012.jpg">File:Hammersmith_Bridge_1,_London,_UK_-_April_2012.jpg</a>. No reasonable metadata. There is <code>xmp.did:B665958B6F86E11180F9ADFF0498D75C</code></li> <li><a href="/wiki/File:Sydney_skyline_at_dusk_-_Dec_2008.jpg" title="File:Sydney skyline at dusk - Dec 2008.jpg">File:Sydney skyline at dusk - Dec 2008.jpg</a>. No reasonable metadata. There is <code>xmp.did:4AF3D02EFAD9DD118041CCCF6AAF5198</code></li> <li><a href="/wiki/File:Peterborough_Cathedral_Nave,_Cambridgeshire,_UK_-_Diliff.jpg" title="File:Peterborough Cathedral Nave, Cambridgeshire, UK - Diliff.jpg">File:Peterborough Cathedral Nave, Cambridgeshire, UK - Diliff.jpg</a>. The metadata identifies David Iliff as the copyright holder but does not identify any license. Does have contact information (diliff@yahoo.com).</li></ol> <p>In any event, it seems difficult to access the EXIF data. If I download and view a file on my Win 11 machine, the viewer does not provide the copyright metadata. In a court, that would probably be a death knell: too hard to find the credit line. Maybe strike that. Use file explorer, right click, properties, details. The problem is I must download the file to get that information. Want a right click in the HTML browser to give me that information. </p><p>People get demand letters, but suits are rare? Venue issue. Cost of litigation. </p> <div class="mw-heading mw-heading4"><h4 id="Attribution">Attribution</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=37" title="Edit section: Attribution"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Last night I watched another video that used content from Commons. When the credits rolled at the end, the only attribution was the generic "Wikimedia Commons." Commons needs to do a better job of teaching reusers how to make attributions. </p><p>The video format also kills any metadata. Perhaps video editors need to collect that information. </p><p>What is needed to meet the Creative Commons licenses? </p><p>Creative Commons advice at <a rel="nofollow" class="external free" href="https://wiki.creativecommons.org/wiki/Recommended_practices_for_attribution#Basic_components_of_attribution">https://wiki.creativecommons.org/wiki/Recommended_practices_for_attribution#Basic_components_of_attribution</a> </p> <ul><li>Title (a requirement of version 3 and earlier! E.g., CC-BY-SA 3.0 4(c)(ii).) (RDF dc:title)</li> <li>Author (RDF dc:creator, cc:attributionName)</li> <li>Source (a link to the where the material was found) (RDF cc:attributionURL)</li> <li>License (CC-BY-SA 3.0 and URL to the license) (RDF cc:license)</li> <li>(disclaimer of warranties)</li></ul> <p>The text of the license or a link to the license is required, but check the license text. URI is not necessarily a URL. <i>Drauglis v Kappa Map Group</i> 128 F.Supp.3d 46 (District of Columbia 2015) found that "CC-BY-SA-2.0" was sufficient to qualify as a URN, so a URL was not needed. Also "derivative work" versus "collective work". Just using a photo without modifying it is a collective work. </p> <ul><li><a rel="nofollow" class="external free" href="https://wiki.creativecommons.org/wiki/Drauglis_v._Kappa_Map_Group,_LLC">https://wiki.creativecommons.org/wiki/Drauglis_v._Kappa_Map_Group,_LLC</a></li> <li><a rel="nofollow" class="external free" href="https://law.justia.com/cases/federal/district-courts/district-of-columbia/dcdce/1:2014cv01043/166825/39/">https://law.justia.com/cases/federal/district-courts/district-of-columbia/dcdce/1:2014cv01043/166825/39/</a></li> <li><a href="https://en.wikipedia.org/wiki/Creative_Commons_license" class="extiw" title="en:Creative Commons license">en:Creative_Commons_license</a> (has advice about attribution)</li></ul> <p>CC uses the term "canonical url" for "<a rel="nofollow" class="external free" href="https://creativecommons.org/licenses/by-sa/3.0/">https://creativecommons.org/licenses/by-sa/3.0/</a>". That license uses the term "unported". What does that imply? Not translated? </p><p>Technically, "CC-BY-SA 2.0" may <em>not</em> qualify as a URI. A URL will. A URN probably does. So the safe solution is to provide a URL to the license. </p><p>For SVG files, I have been including a URL with the <code>dc:license</code> statement. I have also included <code>cc:attributionURL</code> or <code>cc:attributionName</code>. That may work for web pages, but it will not work for printed pages. </p><p>It is probably sufficient to list the CC licenses and their links in one place, and then just refer to the license. That approach loses when individual pages may bet separated from the license definitions. </p><p>Is a copyright for each included work required? Or just copyright the entire work and give credit for included works. </p> <div class="mw-heading mw-heading5"><h5 id="Long_chain_attribution">Long chain attribution</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=38" title="Edit section: Long chain attribution"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I look at some files on Commons and get a bad feeling. Many Commons file are derivative works of another Commons file. That can create a long chain of derivatives. Some of those derivatives may not credit (or even mention) the earlier creators (<a href="/wiki/Commons:LL" class="mw-redirect" title="Commons:LL">COM:LL</a>)). </p><p>The attribution template. </p><p>There were recent examples, but I do not remember them. Some maps and a biological image. </p><p>ABC logo </p> <ol><li><a href="/wiki/File:New_logo_for_2020_following_ABC%27s_2021_rebranding.png" title="File:New logo for 2020 following ABC's 2021 rebranding.png">File:New logo for 2020 following ABC's 2021 rebranding.png</a></li> <li><a href="/wiki/File:New_logo_for_2020_following_ABC%27s_2021_rebranding.svg" title="File:New logo for 2020 following ABC's 2021 rebranding.svg">File:New logo for 2020 following ABC's 2021 rebranding.svg</a></li></ol> <p>See <a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=910934806#Vectorize_20/20_program_logo">https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=910934806#Vectorize_20/20_program_logo</a> PNG uploader copied logo from ABC site but then claimed CC-BY-SA 4.0. Image is clearly <a href="/w/index.php?title=Template:PD_textlogo&action=edit&redlink=1" class="new" title="Template:PD textlogo (page does not exist)"><span style="font-family:monospace,monospace;">{{PD textlogo}}</span></a>. In fact, logo can only be on Commons if not copyrightable or has a free license. Vectorization claimed CC-bY-SA 4.0. </p><p>Map of Togo </p> <ol><li><a href="/wiki/File:Togo,_administrative_divisions_-_de_-_colored.svg" title="File:Togo, administrative divisions - de - colored.svg">File:Togo, administrative divisions - de - colored.svg</a> CC-BY-SA 3.0 (+GFDL <i>sic</i>) <dl><dd>implication is attribution to TUBS, but the file is based on <a href="/wiki/File:Centrale_in_Togo.svg" title="File:Centrale in Togo.svg">File:Centrale in Togo.svg</a> by Profoss</dd></dl></li> <li><a href="/wiki/File:Centrale_in_Togo.svg" title="File:Centrale in Togo.svg">File:Centrale in Togo.svg</a> CC-BY-SA 3.0 (+GFDL <i>sic</i>) <dl><dd>file is based on <a href="/wiki/File:Togo_location_map.svg" title="File:Togo location map.svg">File:Togo location map.svg</a> by Daryona</dd></dl></li> <li><a href="/wiki/File:Togo_location_map.svg" title="File:Togo location map.svg">File:Togo location map.svg</a> CC-BY-SA 3.0 (and no other licenses) by Daryona <dl><dd>file is based on <a href="/wiki/File:Togo-karte-politisch.png" title="File:Togo-karte-politisch.png">File:Togo-karte-politisch.png</a></dd></dl></li> <li><a href="/wiki/File:Togo-karte-politisch.png" title="File:Togo-karte-politisch.png">File:Togo-karte-politisch.png</a> CC-BY-SA 3.0 (+GFDL) is own work by Domenico-de-ga, and uses an explicit attribution request <dl><dd>no explanation of from where the map data came</dd></dl></li></ol> <p>There should be a long attribution chain here (not just the last author). So long that people may be discouraged from using the image. </p><p>The license information should be cleaned up. GFDL is not available to subsequent derivatives. </p><p><a href="/wiki/Template:Own_based" title="Template:Own based"><span style="font-family:monospace,monospace;">{{Own based}}</span></a> may be too weak a statement for a derivative work. It is OK if the source is public domain, but a derivative should say more. </p><p>For Creative Commons, derivative works must also state what changed. For bitmap-to-vector conversions, that is accomplished with a template. For the files above, we are not told. </p> <div class="mw-heading mw-heading4"><h4 id="Other_metadata">Other metadata</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=39" title="Edit section: Other metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Metadata is not about just copyright information. Metadata can include other relevant information. </p><p>For photographs, there is latitude, longitude, altitude. More detail would be the aiming roll, pitch, and yaw. Even more would be the lens distortion coefficients. </p><p>For maps, the metadata may include information about the map projection. With that information, one could take the (<i>x</i>, <i>y</i>) location of a point on the map and convert it to the corresponding latitude and longitude. </p><p>For chemicals, the metadata may include structured descriptions of the chemical. </p><p>For illustrations, there might be metadata that says this file uses web colors or suitable for colorblind viewers. There might be a simple check for SVG files: use a finite number of colors, no gradients, no color-based filters, and the colors pass a color-difference test. Assessing a bitmap is tougher because colors mix at the boundaries and with anti-aliasing. A color histogram would be enough as long as there are large areas of color. Thin colored lines are a problem because their border can have as much area as their interior. </p><p>I'm leery of too much metadata. SVG should be more of an output format rather than a container for detailed information. Providing a small amount of information is reasonable, but including lots of information may be inappropriate. The intended use of SVG is to display an image. </p> <div class="mw-heading mw-heading4"><h4 id="The_mess_that_is_xml:lang">The mess that is <code>xml:lang</code></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=40" title="Edit section: The mess that is xml:lang"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The issues with <code>lang</code> and <code>xml:lang</code>. Watch out for accidental captures. </p> <div class="mw-heading mw-heading4"><h4 id="Creative_Commons_license_requirements">Creative Commons license requirements</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=41" title="Edit section: Creative Commons license requirements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Creative Commons licenses are used extensively on Commons and WMF servers. </p><p>State the common legal requirements of CC licenses. </p> <ol><li>CC- requires a link to the CC license. That means a it is easy to find the license terms. Check if a CC0 license also has this requirement.</li> <li>CC-BY must provide reasonable attribution. May distribute and alter. May impose more restrictive license.</li> <li>CC-SA (implies a derivative work) must not use a more restrictive license and must describe the changes.</li> <li>CC-ND allows use but not modification.</li> <li>CC-NC does not allow commercial use. (What is the constraint on commercial? May a nonprofit use the work in its fundraising? May the Girl Scouts use it to sell their cookies? In the US, agency settles some of these questions.)</li></ol> <p>State the failings. </p><p>The file description pages are often inadequate. Sometimes there are gross errors such as an improper license. Derivative works often omit the attribution information in the license. The description of a derivative work often fails to describe the changes made to the original work. </p><p>Most file uses on WMF servers satisfy the requirements because MW links the file to its description page: </p> <dl><dd><code>[[File:Yellow banana.svg|A picture of a yellow banana.]]</code></dd></dl> <p>Presumably, the file description page has a link to the CC license and meets the attribution and modification requirements. </p><p>However, the file use may alter that link (<a href="https://www.mediawiki.org/wiki/Help:Images" class="extiw" title="mw:Help:Images">MW:Help:Images</a>). </p> <dl><dd><code>[[File:Yellow banana.svg|link=https://www.nowhere.com/bitbucket|A picture of a yellow banana.]]</code></dd></dl> <p>or </p> <dl><dd><code>[[File:Yellow banana.svg|link=|A picture of a yellow banana.]]</code></dd></dl> <p>If the override link does not provide the needed licensing information, then the license is violated. There can be disastrous ramifications. MW should not allow such links for CC-licensed material. </p> <div class="mw-heading mw-heading4"><h4 id="Dublin_Core_and_Creative_Commons">Dublin Core and Creative Commons</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=42" title="Edit section: Dublin Core and Creative Commons"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Reasonable SVG metadata should use both Dublin Core and Creative Commons vocabularies. The metadata can be expressed using RDF. </p> <div class="mw-heading mw-heading4"><h4 id="Dublin_Core">Dublin Core</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=43" title="Edit section: Dublin Core"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A general reference: </p> <ul><li><a rel="nofollow" class="external free" href="https://guides.library.ucsc.edu/c.php?g=618773&p=4306386">https://guides.library.ucsc.edu/c.php?g=618773&p=4306386</a></li></ul> <p>It suggests some vocabularies. Looking for "Terman, Frederick" gives the MARC value </p> <ul><li><a rel="nofollow" class="external free" href="https://authorities.loc.gov/cgi-bin/Pwebrecon.cgi?AuthRecID=6104582&v1=1&HC=1&SEQ=20220810164445&PID=REbDGJ6P_nYjOw83gOGJlAHS490">https://authorities.loc.gov/cgi-bin/Pwebrecon.cgi?AuthRecID=6104582&v1=1&HC=1&SEQ=20220810164445&PID=REbDGJ6P_nYjOw83gOGJlAHS490</a></li> <li>permalink: <a rel="nofollow" class="external free" href="https://lccn.loc.gov/n2003015013">https://lccn.loc.gov/n2003015013</a></li></ul> <p>Dublin Core provides a vocabulary for references. There are two Dublin Core namespaces: </p> <ul><li><code>dc: <a rel="nofollow" class="external free" href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a></code> Original 15 element namespace defined in 2000.</li> <li><code>dcterms: <a rel="nofollow" class="external free" href="http://purl.org/dc/terms/">http://purl.org/dc/terms/</a></code> Extended namespace defined in 2001. Everything in elements was mirrored in 2008.</li></ul> <p>Sometimes, the <code>dcterms</code> namespace uses the <code>dc</code> prefix. The goal is to use the <code>dcterms</code> vocabulary rather than the 15-element <code>dc</code> namespace. It is possible to translate <code>dc</code> to <code>dcterms</code> (e.g., using XSLT), but that translation may confuse existing software. </p><p>Dublin Core <code>elements/1.1/</code> is a short (15 term), general, vocabulary for works: </p> <ul><li><code>dc:title</code> (there is also an SVG <code>title</code> element)</li> <li><code>dc:date</code></li> <li><code>dc:creator</code></li> <li><code>dc:contributor</code> (I would use for translators)</li> <li><code>dc:source</code></li> <li><code>dc:format</code> (less important) for SVG, use <code>image/svg+xml</code></li> <li><code>dc:type</code> (less important) often <code>rdf:resource="<a rel="nofollow" class="external free" href="http://purl.org/dc/dcmitype/StillImage">http://purl.org/dc/dcmitype/StillImage</a>"</code></li> <li><code>dc:publisher</code> (If empty, I would have this point to Wikimedia Commons)</li> <li><code>dc:subject</code> DC states, "Typically, the subject will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary." I do not see a widely adopted practice here. Most people would probably use a text string of comma-separated keyword phrases. That would match the HTML <code>meta</code> tag: e.g., <code><meta name="keywords" content="HTML, CSS, Javascript" ></code>. However, the obvious RDF approach would use an <code>rdf:Bag</code> that holds each keyword phrase: <code><cc:license><rdf:Bag><rdf:li>HTML</rdf:li><rdf:li>CSS</rdf:li><rdf:li>Javascript</rdf:li></rdf:Bag></cc:license></code>. <u>The <code>dcterms:</code> mirror is not a list of keywords.</u></li> <li><code>dc:coverage</code> Time or location. Not widely used? E.g., Port Royal earthquake.</li> <li><code>dc:description</code></li> <li><code>dc:identifier</code></li> <li><code>dc:language</code></li> <li><code>dc:relation</code></li> <li><code>dc:rights</code> The clearer practice here would be to use <code>cc:license</code></li></ul> <p>The Dublin Core vocabulary uses general rather than specific terms. For example, the <code>dc:creator</code> predicate covers several possibilities such as author, composer, lyricist, illustrator, and photographer. There are vocabularies that make finer distinctions,<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> but those distinctions may not be necessary for many works, and most applications probably do not support the terms. </p><p>Usage examples: </p> <ul><li><a rel="nofollow" class="external free" href="https://www.dublincore.org/specifications/dublin-core/usageguide/2001-04-12/generic/">https://www.dublincore.org/specifications/dublin-core/usageguide/2001-04-12/generic/</a></li> <li><a rel="nofollow" class="external free" href="https://www.dublincore.org/specifications/dublin-core/usageguide/2003-08-26/elements/">https://www.dublincore.org/specifications/dublin-core/usageguide/2003-08-26/elements/</a> <dl><dd>list creators separately...</dd></dl></li></ul> <p>Interesting metadata in </p> <ul><li><a href="/wiki/File:DCMI-logo.svg" title="File:DCMI-logo.svg">File:DCMI-logo.svg</a></li></ul> <p>Specifies data types. </p><p>Here is the metadata section: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><metadata></span> <span class="nt"><rdf:RDF</span> <span class="w"> </span><span class="na">xmlns:rdf=</span><span class="s">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</span> <span class="w"> </span><span class="na">xmlns:dc=</span><span class="s">"http://purl.org/dc/elements/1.1/"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><rdf:Description</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:title</span><span class="w"> </span><span class="na">xml:lang=</span><span class="s">"ja"</span><span class="nt">></span>DCMIのロゴ<span class="nt"></dc:title></span> <span class="w"> </span><span class="nt"><dc:creator</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://meta.wikimedia.org/?curid=10484470"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><dc:subject</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://ndl.go.jp/dcndl/terms/NIISubject"</span><span class="nt">></span>情報学<span class="nt"></dc:subject></span> <span class="w"> </span><span class="nt"><dc:description</span><span class="w"> </span><span class="na">xml:lang=</span><span class="s">"ja"</span><span class="w"> </span><span class="na">rdf:parseType=</span><span class="s">"Resource"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:format</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://purl.org/dc/terms/IMT"</span><span class="nt">></span>text/x-wiki<span class="nt"></dc:format></span> <span class="w"> </span><span class="nt"><rdf:value></span><span class="cp"><![CDATA[</span> <span class="cp">[https://www.dublincore.org/ '''ダブリンコアメタデータイニシアチブ''']({{en|1=Dublin Core Metadata Initiative; DCMI|inline=inline}})のロゴ画像。</span> <span class="cp">{{quote|lang=ja|text=</span> <span class="cp">中央の円はイニシアチブの中核を,それを取り囲む内側の円達は[[w:ja:Dublin_Core#基本記述要素一覧|DCMIメタデータ要素集合]]([https://webdesk.jsa.or.jp/books/W11M0090/index/?bunsyo_id=JIS+X+0836:2005 JIS X 0836:2005])で利用できる15の基本記述要素を,外側の円達は要素集合の解釈及び拡張を,それぞれ表す。</span> <span class="cp">|cite=ダブリンコアメタデータイニシアチブ</span> <span class="cp">|source=[https://www.dublincore.org/about/#web-site-policies-software-logo-banner About DCMI/Web site, policies, software, logo, banner]の[[User:cmplstofB]]による試訳</span> <span class="cp">}}</span> <span class="cp">]]></span><span class="cm"><!-- --></span><span class="nt"></rdf:value></span> <span class="w"> </span><span class="nt"></dc:description></span> <span class="w"> </span><span class="nt"><dc:contributor</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://www.dublincore.org/"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><dc:date</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://www.w3.org/2001/XMLSchemadate"</span><span class="nt">></span>2019-09-11<span class="nt"></dc:date></span> <span class="w"> </span><span class="nt"><dc:type</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://purl.org/dc/terms/DCMIType"</span><span class="nt">></span>StillImage<span class="nt"></dc:type></span> <span class="w"> </span><span class="nt"><dc:format</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://purl.org/dc/terms/IMT"</span><span class="nt">></span>image/svg+xml<span class="nt"></dc:format></span> <span class="w"> </span><span class="nt"><dc:source</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://www.dublincore.org/images/DCMI_logo_cropped.jpg"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><dc:language</span><span class="w"> </span><span class="na">rdf:datatype=</span><span class="s">"http://purl.org/dc/terms/ISO639-2"</span><span class="nt">></span>jpn<span class="nt"></dc:language></span> <span class="w"> </span><span class="nt"><dc:rights</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"http://www.wtfpl.net/about/"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></rdf:Description></span> <span class="nt"></rdf:RDF></span> <span class="nt"></metadata></span> </pre></div> <p>Many of the Dublin Core fields are text. They will use <code>rdf:datatype</code> attributes. Some of those use the <code>dcterms</code> vocabulary, but sometimes they use some another set of types. Consider <code>dc:date</code>: it uses <code><a rel="nofollow" class="external free" href="http://www.w3.org/2001/XMLSchemadate">http://www.w3.org/2001/XMLSchemadate</a></code>. Some other fields use <code>rdf:resource</code> rather than text. Is there a rewrite rule for <code>rdf:resource</code>? A URI string with a URI datatype? </p><p>Dublin Core schemas: </p> <ul><li><a rel="nofollow" class="external free" href="https://www.dublincore.org/schemas/xmls/">https://www.dublincore.org/schemas/xmls/</a></li></ul> <p>Looking at a schema for <code>elements</code> </p> <ul><li><a rel="nofollow" class="external free" href="https://www.dublincore.org/schemas/xmls/simpledc20021212.xsd">https://www.dublincore.org/schemas/xmls/simpledc20021212.xsd</a></li></ul> <p>Looks like an arbitrary sequence of the 15 elements. Looks like the element content is text only (<code>xml:lang</code> attributes are allowed). </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><xs:complexType</span><span class="w"> </span><span class="na">name=</span><span class="s">"elementType"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><xs:simpleContent></span> <span class="w"> </span><span class="nt"><xs:extension</span><span class="w"> </span><span class="na">base=</span><span class="s">"xs:string"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><xs:attribute</span><span class="w"> </span><span class="na">ref=</span><span class="s">"xml:lang"</span><span class="w"> </span><span class="na">use=</span><span class="s">"optional"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></xs:extension></span> <span class="w"> </span><span class="nt"></xs:simpleContent></span> <span class="w"> </span><span class="nt"></xs:complexType></span> </pre></div> <p>Significantly, this declaration does not show using <code>rdf:resource</code> attribute. </p><p>I expected the <code>dcterms</code> schema to be more restrictive. </p> <ul><li><a rel="nofollow" class="external free" href="https://www.dublincore.org/schemas/xmls/qdc/2008/02/11/dcterms.xsd">https://www.dublincore.org/schemas/xmls/qdc/2008/02/11/dcterms.xsd</a></li></ul> <p>However, the schema states </p> <blockquote> <p>Encoding schemes are defined as complexTypes which are restrictions of the dc:SimpleLiteral complexType. These complexTypes restrict values to an appropriates syntax or format using data typing, regular expressions, or enumerated lists. In order to specify one of these encodings an xsi:type attribute must be used in the instance document. Also, note that one shortcoming of this approach is that any type can be applied to any of the elements or refinements. There is no convenient way to restrict types to specific elements using this approach. </p> </blockquote> <p>Here's a <code>dcterms</code> to <code>dc</code> and what looks like a <i>W3C Date-Time Format</i>. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><xs:element</span><span class="w"> </span><span class="na">name=</span><span class="s">"date"</span><span class="w"> </span><span class="na">substitutionGroup=</span><span class="s">"dc:date"</span><span class="nt">/></span> <span class="nt"><xs:complexType</span><span class="w"> </span><span class="na">name=</span><span class="s">"W3CDTF"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><xs:simpleContent></span> <span class="w"> </span><span class="nt"><xs:restriction</span><span class="w"> </span><span class="na">base=</span><span class="s">"dc:SimpleLiteral"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><xs:simpleType></span> <span class="w"> </span><span class="nt"><xs:union</span><span class="w"> </span><span class="na">memberTypes=</span><span class="s">"xs:gYear xs:gYearMonth xs:date xs:dateTime"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></xs:simpleType></span> <span class="w"> </span><span class="nt"><xs:attribute</span><span class="w"> </span><span class="na">ref=</span><span class="s">"xml:lang"</span><span class="w"> </span><span class="na">use=</span><span class="s">"prohibited"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></xs:restriction></span> <span class="w"> </span><span class="nt"></xs:simpleContent></span> <span class="nt"></xs:complexType></span> </pre></div> <p>The details are both troubling and confusing. Dublin Core looks like simple text (<code>simpleType</code>). What impact does that have? For multiple authors, one either uses several <code>creator</code> elements or puts the list in simple text. The <code>dcterms</code> set does not provide access to <code>rdf:Seq</code>. </p><p>Does common usage of Dublin Core violate the schema? </p><p>The schemas, without more, do not do a sensible validation of, for example, date syntax. </p><p>A reification from <code>dcterms</code> to <code>elements</code> is clear. </p> <div class="mw-heading mw-heading4"><h4 id="Creative_Commons">Creative Commons</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=44" title="Edit section: Creative Commons"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Creative Commons adds some terms for specifying the license and attribution: </p> <ul><li><code>cc:license</code> (said to be the same as <code>xhtml:license</code>; Commons does not allow uploading SVG that uses the <code>xhtml</code> namespace)</li> <li><code>cc:attributionURL</code> (may be needed for CC-BY; I would have this point to the File: page on Commons)</li> <li><code>cc:attributionName</code> (may be needed for CC-BY)</li></ul> <p>For Commons files, making the <code>cc:attributionURL</code> point to the file page on Commons may satisfy the attribution requirements of CC-BY licenses. </p><p>Resource Description Framework (RDF) statements have a subject, a predicate, and an object. </p><p>Although vocabularies are specified, how those vocabularies should be used is not nailed down. If there are two creators, how should that be specified? Should there be an RDF <code>dc:creator</code> statement for each creator? Should there be one <code>dc:creator</code> statement whose object is a set of the creators? The situation for licenses is more obvious. If the user gets to choose which of several licenses, then there should be one <code>cc:license</code>, and the object should be an <code>rdf:Alt</code> that identifies the alternative licenses. However, most software probably expects exactly one license rather than a list of alternatives. The simple approach is to offer only one license. </p><p>The lack of consistency implies problems. If a graphics program does not understand the input RDF, then it may get corrupted on output. The appropriate goal is to have metadata that most graphics editors understand. That way, the metadata is preserved during import and export. </p><p>Consistency and accuracy are also missing in many Commons licenses. </p><p>Say Alice creates a CC-BY-SA image and uploads it to Commons. Bob then reuses Alice's image. Bob is required to use a CC-BY-SA license, and Bob's image must carry attribution to Alice. Many mistakes happen on Commons. Bob's image may not mention Alice's licensed image. Bob may claim his work is CC0 (license washing). Bob may use CC-BY-SA, but he may not point out that Alice must be acknowledged, too. Given license information on Commons may be missing or incomplete, it is no surprise that license metadata may be haphazard, too. </p><p>A CC-BY-SA license permits modification (i.e., derivative works). The licenses require the modifier to describe the changes, but Creative Commons does not have a vocabulary term for describing the modifications. </p> <div class="mw-heading mw-heading4"><h4 id="Creative_Commons_and_closure">Creative Commons and closure</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=45" title="Edit section: Creative Commons and closure"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Creative Commons does a good job for the original work. The license is declared, and there are constructs for attribution. If a work is used without modification, then the metadata has the information for proper attribution. </p><p>The metadata is insufficient when the original work is modified. The license requires that the changes be identified, but there are no XML elements for describing the changes. </p><p>List the licenses and the issues. </p> <ul><li>0</li> <li>-BY</li> <li>-SA</li> <li>-ND</li> <li>-NC</li></ul> <p>Another issue is how graphics editors can merge metadata. </p> <div class="mw-heading mw-heading4"><h4 id="Adobe_Systems_XMP">Adobe Systems XMP</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=46" title="Edit section: Adobe Systems XMP"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Adobe XMP uses the <code>elements</code> namespace: </p> <ul><li>"The [Dublin Core] namespace URI shall be <code><a rel="nofollow" class="external free" href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a></code>."</li></ul> <p>Sigh. </p><p>Adobe Systems includes metadata, and it has settled on a specific syntax with its eXtensible Metadata Platform (XMP). Adobe solves the multiple creator problem by always using a set of creators (even if there is only one creator). Adobe also restricts the use of complex RDF syntax. </p><p>In XMP, the <code>dc:creator</code> should be an ordered list of <code>ProperName</code>.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> A <code>ProperName</code> is a simple text value. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><rdf:Description</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:creator></span> <span class="w"> </span><span class="nt"><rdf:Seq></span> <span class="w"> </span><span class="nt"><rdf:li></span>John<span class="w"> </span>Smith<span class="nt"></rdf:li></span> <span class="w"> </span><span class="nt"><rdf:li></span>Richard<span class="w"> </span>Roe<span class="nt"></rdf:li></span> <span class="w"> </span><span class="nt"></rdf:Seq></span> <span class="w"> </span><span class="nt"></dc:creator></span> <span class="nt"></rdf:Description></span> </pre></div></dd></dl> <p>Should discuss the equivalent form. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><cc:Work</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:creator></span>Alice<span class="nt"></dc:creator></span> <span class="nt"></cc:Work></span> </pre></div></dd></dl> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><rdf:Description</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><rdf:type</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"http://creativecommons.org/ns#Work"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><dc:creator></span>Alice<span class="nt"></dc:creator></span> <span class="nt"></rdf:Description></span> </pre></div></dd></dl> <div class="mw-heading mw-heading4"><h4 id="Inkscape_metadata">Inkscape metadata</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=47" title="Edit section: Inkscape metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Which namespace does Inkscape use? <code>elements</code> or <code>dcterms</code>? If it uses <code>elements</code>, then it should upgrade. Or at least accept one or the other. I'm looking at a file I believe to be Inkscape, and it has <code>xmlns:dc="<a rel="nofollow" class="external free" href="http://purl.org/dc/elements/1.1/">http://purl.org/dc/elements/1.1/</a>"</code>. </p><p>Inkscape has a metadata form to fill in, but Inkscape uses an agent description. (Pull a copy of Inkscape metadata). </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><dc:creator></span> <span class="w"> </span><span class="nt"><cc:Agent></span> <span class="w"> </span><span class="nt"><dc:title></span>Andy<span class="w"> </span>Fitzsimon<span class="nt"></dc:title></span> <span class="w"> </span><span class="nt"></cc:Agent></span> <span class="nt"></dc:creator></span> </pre></div></dd></dl> <p>Please note that <code>cc:Agent</code> is not part of the <code><a rel="nofollow" class="external free" href="http://creativecommons.org/ns">http://creativecommons.org/ns</a></code> namespace. </p><p>Dublin Core has a <code>dc:Agent</code>, so it is possible that Inkscape meant <code>dc:Agent</code> rather than <code>cc:Agent</code>. </p><p>I'm not a happy camper... </p> <ul><li><a rel="nofollow" class="external free" href="https://gitlab.com/inkscape/inkscape/-/blob/master/src/rdf.cpp">https://gitlab.com/inkscape/inkscape/-/blob/master/src/rdf.cpp</a></li></ul> <p>The page does not include the <code>attributionName</code> or <code>attributionURL</code> elements. It has a set of licenses. It also points to some SIL licenses. </p><p>There is a significant but unresolved issue here.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> An original goal is to identify the license and the creator. Not a lot of information is needed to acknowledge those rights; a simple text reference to a name might be good enough. However, more details can be given about the rights holder, so should the representation give more details? At what point would there be too much information. More information could be added, but very few systems will be able to process that information. The simple approach is to keep the information simple enough to satisfy license requirements and avoid adding extraneous details. </p><p>A URL is a better method of identifying a person than some text. Many people have the name John Smith, but the URL <a rel="nofollow" class="external free" href="https://www.imdb.com/name/nm0808774/">https://www.imdb.com/name/nm0808774/</a> identifies a particular John Smith. Unfortunately, many applications probably expect a text string and cannot handle a URL. If an application expects this input </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><dc:creator></span>John<span class="w"> </span>Smith<span class="nt"></dc:creator></span> </pre></div></dd></dl> <p>then how will it handle this input (i.e., a URL that identifies a particular John Smith)? </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><dc:creator</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://www.imdb.com/name/nm0808774/"</span><span class="w"> </span><span class="nt">/></span> </pre></div></dd></dl> <p>Try this out in Inkscape.... Try this out in Adobe Illustrator.... </p> <div class="mw-heading mw-heading4"><h4 id="Well-known_licenses">Well-known licenses</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=48" title="Edit section: Well-known licenses"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Creative Commons wants a <code>cc:License</code> element that summarizes the license, but I do not like that practice for well-known licenses. What happens if the summary is inaccurate? Say the license URL is CC-BY-SA 4.0 but the license summary prohibits commercial use? Does the summary take precedence over the URL? </p><p>In theory, it should be easy to obtain the RDF description of a well-known license. For example, the license HTML at </p> <ul><li><a rel="nofollow" class="external free" href="https://creativecommons.org/licenses/by-sa/4.0/">https://creativecommons.org/licenses/by-sa/4.0/</a></li></ul> <p>has a link in the HTML </p> <ul><li><div class="mw-highlight mw-highlight-lang-html mw-content-ltr" dir="ltr"><pre><span></span><span class="p"><</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">"alternate"</span> <span class="na">type</span><span class="o">=</span><span class="s">"application/rdf+xml"</span> <span class="na">href</span><span class="o">=</span><span class="s">"rdf"</span> <span class="p">/></span> </pre></div></li></ul> <p>which refers to the license RDF at </p> <ul><li><a rel="nofollow" class="external free" href="https://creativecommons.org/licenses/by-sa/4.0/rdf">https://creativecommons.org/licenses/by-sa/4.0/rdf</a></li></ul> <p>Consequently, an RDF description of a well-known license is available. </p><p>It is possible to check whether the license summary is consistent with the published URL. </p><p>Creators also misuse CC-BY licenses on Commons by stating additional license terms. For example, the creator may state that the attribution must appear next to where the image is used. Creative Commons CC-BY licenses require attribution, but the license lets the licensee use any reasonable method of attribution. Here's the text about attribution from <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA 4.0</a>: </p> <dl><dd><b>Attribution</b> — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.</dd></dl> <p>If a creator states the license is CC-BY-SA 4.0, then the creator should not be able to state additional requirements. Additional requirements contradict the terms of CC-BY-SA 4.0. </p> <div class="mw-heading mw-heading4"><h4 id="Complicated_licenses">Complicated licenses</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=49" title="Edit section: Complicated licenses"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If there is only one author, then license information is simple. When a work builds on others, then the license is complicated. </p><p>Consider <a href="/wiki/File:Angriffe_Antibiotika.svg" title="File:Angriffe Antibiotika.svg">File:Angriffe Antibiotika.svg</a>. It is an improved copy of FEERERO's CC-SA 3.0 <a href="/wiki/File:Angriffe_Antibiotika.png" title="File:Angriffe Antibiotika.png">File:Angriffe Antibiotika.png</a>. In addition, it borrows from </p> <ul><li><a href="/wiki/File:Prokaryote_cell.svg" title="File:Prokaryote cell.svg">File:Prokaryote cell.svg</a> (CC-BY-SA 4.0 by Ali Zifan).</li> <li><a href="/wiki/File:Difference_DNA_RNA-DE.svg" title="File:Difference DNA RNA-DE.svg">File:Difference DNA RNA-DE.svg</a> (CC-BY-SA 3.0 by Sponk).</li> <li><a href="/wiki/File:Main_protein_structure_levels_en.svg" title="File:Main protein structure levels en.svg">File:Main protein structure levels en.svg</a> (PD-USER by LadyofHats).</li> <li><a href="/wiki/File:Green-Up-Arrow.svg" title="File:Green-Up-Arrow.svg">File:Green-Up-Arrow.svg</a> (PD-ineligible by Palffy).</li></ul> <p>Consequently, the metadata should contain a lot of information. </p><p>A trivial solution has the metadata element just point to the Commons File: page. </p> <div class="mw-heading mw-heading4"><h4 id="Metadata_checker">Metadata checker</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=50" title="Edit section: Metadata checker"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A few years ago, I did some tests on RDF XML validation. </p> <ul><li><a rel="nofollow" class="external free" href="https://www.w3.org/RDF/Validator/">https://www.w3.org/RDF/Validator/</a> <dl><dd><a rel="nofollow" class="external text" href="https://www.w3.org/RDF/Validator/rdfval?URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Farchive%2F1%2F1d%2F20151118210615%2521First_Ionization_Energy.svg&PARSE=Parse+URI%3A+&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED">RDF validate old version of </a><a href="/wiki/File:First_Ionization_Energy.svg" title="File:First Ionization Energy.svg">File:First Ionization Energy.svg</a>.</dd></dl></li></ul> <p>A sophisticated metadata checker could... </p> <ul><li>look for appropriate namespaces</li> <li>check value consistency (ISO dates, finite set ranges)</li> <li>calculate a list of ranges</li> <li>validate XML schemas (valid RDF, valid CC, ...)</li> <li>learn frequency of metadata (lots of image/xml+svg but little cc:creator)</li> <li>possibility of rewriting metadata</li> <li>possibility of adding metadata</li></ul> <p>My notes on RDF. GRIDDL. </p> <div class="mw-heading mw-heading5"><h5 id="Related_topics">Related topics</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=51" title="Edit section: Related topics"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A more general topic, SVG validation, is <a href="/wiki/Help:SVG" title="Help:SVG">Help:SVG</a>. There were more involved discussions about SVG validation. Validation is often too strict (complaining about extensions such as Inkscape or new SVG features). </p><p><a href="/wiki/Commons:Overwriting_existing_files" title="Commons:Overwriting existing files">Commons:Overwriting existing files</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Removing_metadata">Removing metadata</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=52" title="Edit section: Removing metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Removing metadata from an SVG file (or any other file) may be inappropriate. Removing metadata may trigger legal issues but leaving it in has minimal cost. </p><p>Consider a signed painting. Should someone come along and paint over the signature? </p><p>Removing metadata is similar to removing a watermark. See <a href="/wiki/Commons:Watermarks#Legal_issues_with_the_removal_of_watermarks" title="Commons:Watermarks">Legal issues with the removal of watermarks</a> and <a href="https://meta.wikimedia.org/wiki/Wikilegal/Removal_of_watermarks_from_Commons_images" class="extiw" title="meta:Wikilegal/Removal of watermarks from Commons images">Removal of watermarks from Commons images</a>. WMF legal staff opines that removing a watermark could violate the <a href="https://en.wikipedia.org/wiki/Digital_Millenium_Copyright_Act" class="extiw" title="w:Digital Millenium Copyright Act">DMCA</a> and even violate the terms of some Creative Commons licenses. </p><p>Compare to removing a watermark that was not part of the original image. Sometimes a person who hosts an image may add a watermark. </p><p>Sometimes metadata is inadvertently removed. When <code>librsvg</code> produces a PNG, I doubt that it copies metadata from the SVG to the PNG. </p><p>Perhaps a scan of files should look for comments that imply an optimizer was used. Optimizers often strip metadata. See <a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Commons:Administrators%27_noticeboard&oldid=696106883#Massive_edits">Massive edits</a>. For example, scanning history of <a href="/wiki/File:BSicon_hKRZWa_red.svg" title="File:BSicon hKRZWa red.svg">File:BSicon hKRZWa red.svg</a> would reveal the upload comment "Slimmed down with svgomg". </p> <div class="mw-heading mw-heading4"><h4 id="Other_uses_of_metadata">Other uses of metadata</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=53" title="Edit section: Other uses of metadata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Images on Commons should have free licenses, but many uploads violate the creator's license. Generally, Commons relies on its users to upload only free material. </p><p>Some of that checking can be done automatically. Consider an image that is published on some website, and the website states a non-free license for that image. Alice likes the image, so she uploads it to Commons claiming it is her own work. Commons does not know. </p><p>Now consider that the image has metadata that says the creator is Bob and the license is CC-BY-NC. Commons could read the metadata, realize it does not know that Alice is Bob, and recognize the CC-BY-NC license is not compatible with Commons. Thus Commons could refuse the upload automatically. </p><p>At upload, Commons could also notice that a work is CC-BY-SA with required attribution. Commons could fill in the attribution details. </p><p>Graphics applications might also warn users about editing files that carry CC-BY-ND licenses. </p> <div class="mw-heading mw-heading3"><h3 id="Transparent_backgrounds">Transparent backgrounds</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=54" title="Edit section: Transparent backgrounds"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many SVG files have transparent backgrounds. Such files can be overlaid on colored backgrounds without adding squares of white. </p><p>The transparency can be overdone. For example, the file </p> <ul><li><a href="/wiki/File:Agitated_vessel.svg" title="File:Agitated vessel.svg">File:Agitated vessel.svg</a></li></ul> <p>has a transparent background, but that background includes the interior of the mixing vessel. That interior is not part of he background. </p> <div class="mw-heading mw-heading3"><h3 id="Removing_watermarks">Removing watermarks</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=55" title="Edit section: Removing watermarks"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An unexpected issue. Instead of watermarks or timestamps, the information should be put in the file's metadata. </p> <ul><li><a href="/wiki/Category:SVG_images_with_invisible_watermarks" title="Category:SVG images with invisible watermarks">SVG images with invisible watermarks</a></li> <li><a href="/wiki/Category:SVG_images_with_timestamp_watermarks" title="Category:SVG images with timestamp watermarks">SVG images with timestamp watermarks</a></li></ul> <p>Detection of this information? Small fonts, strange fill colors, and outside of viewport. </p> <div class="mw-heading mw-heading3"><h3 id="Detect_symbol_candidates">Detect symbol candidates</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=56" title="Edit section: Detect symbol candidates"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Artists often copy-paste an image component rather than creating and using a symbol. </p><p>Also works for text-to-curve images. </p> <div class="mw-heading mw-heading3"><h3 id="Use_styles">Use styles</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=57" title="Edit section: Use styles"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There is a difference between content and style. The content is the information, and the style is how it is displayed. Content that is in a particular class may be displayed the same way by using CSS to select and style SVG elements in that class. </p><p>In general, it is better to use CSS to achieve a consistent display rather than individually formatting graphics elements. </p><p>In particular, elements should not be grouped merely to impose a consistent style. </p><p>Consider <a href="/wiki/File:Periodic_table.svg" title="File:Periodic table.svg">File:Periodic table.svg</a> which uses <code>g</code> elements to group noble gases, alkali metals, halogens, etc. It puts the style information in one place, but graphics editors may have to ungroup the elements in order to edit one of their members. Structural grouping also makes it difficult to have one element be a member of several groups (e.g., the rows and columns of the table). In addition, the file does not use <code>use</code> elements to draw the element boxes (the box drawing information is repeated), and it does not group the boxes, the chemical symbol, and the atomic number together. </p><p>Consider a map. We may want the rivers and the names of rivers displayed in blue. A <code>river</code> class can set the color for both the rivers and the font fill. Cities with a population under 100,000 may use a small dot and a small font, and cities over that size may use a larger dot and a larger font. CSS can set the font size and even the radius of a circle. Capital cities may use a star instead of a dot. </p><p>Using CSS and the <code>class</code> attribute can make the display both consistent and easy to change. Fill colors and font families are set in just the CSS rather than on each SVG element. Changing the CSS will apply the change to all elements in the class. </p><p>Graphics editors should have a way to manage styles, but they may not round-trip them. </p> <div class="mw-heading mw-heading4"><h4 id="CSS_selectors">CSS selectors</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=58" title="Edit section: CSS selectors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure typeof="mw:File/Thumb"><a href="/wiki/File:SVG_CSS_Test.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/SVG_CSS_Test.svg/320px-SVG_CSS_Test.svg.png" decoding="async" width="320" height="384" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/SVG_CSS_Test.svg/480px-SVG_CSS_Test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/SVG_CSS_Test.svg/640px-SVG_CSS_Test.svg.png 2x" data-file-width="512" data-file-height="614" /></a><figcaption>CSS selector tests</figcaption></figure> <p>WMF support has improved. </p><p>Need better understanding of merging styles (as Adobe Illustrator uses). </p><p>.see <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors">https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors</a> </p><p>Also precedence. </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">line</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* works */</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">cls</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* works */</span><span class="w"> </span><span class="p">}</span> <span class="nt">line</span><span class="p">.</span><span class="nc">cls</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* works */</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">cls1</span><span class="p">.</span><span class="nc">cls2</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* Jun 2024: now works. Would be good for class="city uk" or class="city ru" */</span><span class="w"> </span><span class="p">}</span> <span class="c">/* Jun 2024: there is support for attribute selectors. */</span> <span class="o">[</span><span class="nt">class</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* any element with a class attribute */</span><span class="w"> </span><span class="p">}</span> <span class="o">[</span><span class="nt">class</span><span class="o">~=</span><span class="s2">"cls"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* should be equivalent to class selector. */</span><span class="w"> </span><span class="p">}</span> <span class="c">/* these may not be legal */</span> <span class="p">.</span><span class="nc">cls</span><span class="o">[</span><span class="nt">fill</span><span class="o">=</span><span class="s2">"#000"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* want class filtered by attribute. fails? */</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">cls</span><span class="o">[</span><span class="nt">fill</span><span class="o">=</span><span class="s2">"#fff"</span><span class="w"> </span><span class="nt">i</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="c">/* case insensitive match. fails? */</span><span class="w"> </span><span class="p">}</span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Support_for_CSS_units">Support for CSS units</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=59" title="Edit section: Support for CSS units"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Test_CSS_Lengths.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/SVG_Test_CSS_Lengths.svg/440px-SVG_Test_CSS_Lengths.svg.png" decoding="async" width="440" height="308" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/SVG_Test_CSS_Lengths.svg/660px-SVG_Test_CSS_Lengths.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a4/SVG_Test_CSS_Lengths.svg/880px-SVG_Test_CSS_Lengths.svg.png 2x" data-file-width="512" data-file-height="358" /></a><figcaption><code>librsvg</code> is SVG 1.1 only; it supports <code>em</code> and <code>ex</code> but neither <code>ch</code> nor <code>lh</code></figcaption></figure> <p>The simple approach to always use pixels, but CSS has many other units that may allow more flexible layouts. </p> <ul><li><a rel="nofollow" class="external free" href="https://www.w3schools.com/cssref/css_units.php">https://www.w3schools.com/cssref/css_units.php</a></li> <li><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units">https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units</a></li> <li><a rel="nofollow" class="external free" href="https://www.w3.org/TR/css-values-4/#dimensions">https://www.w3.org/TR/css-values-4/#dimensions</a></li></ul> <p>absolute and relative lengths </p><p>Possible trick: <code>font-size</code> takes <code>smaller</code> and <code>larger</code>. Might use <code>0.7em</code> and <code>1.3em</code>. </p><p>The relative height px, em, ex are usually relative to the element, but they are relative to the parent for the <code>font-size</code> property. </p> <table class="wikitable"> <caption>CSS Units </caption> <tbody><tr> <th>Unit</th> <th>Version</th> <th>Description </th></tr> <tr> <td>px</td> <td>1.0</td> <td>pixel (1/96 inch) </td></tr> <tr> <td>cm</td> <td>2.0</td> <td>centimeter </td></tr> <tr> <td>mm</td> <td>2.0</td> <td>millimeter </td></tr> <tr> <td>in</td> <td>2.0</td> <td>inch </td></tr> <tr> <td>pt</td> <td>2.0</td> <td>Adobe point (1/72 inch) </td></tr> <tr> <td>pc</td> <td>2.0</td> <td>pica (1/6 inch) </td></tr> <tr> <td>Q</td> <td>3.0</td> <td>quarter millimeters (Why?) </td></tr> <tr> <td>lh</td> <td>4.0</td> <td>line height of the element </td></tr> <tr> <td>rlh</td> <td>4.0</td> <td>line height of the root element </td></tr> <tr> <td>em</td> <td>1.0</td> <td>font size </td></tr> <tr> <td>rem</td> <td>3.0</td> <td>root font size </td></tr> <tr> <td>ex</td> <td>1.0</td> <td>x-height </td></tr> <tr> <td>rex</td> <td>4.0</td> <td>root x-height </td></tr> <tr> <td>ch</td> <td>3.0</td> <td>character advance of narrow glyph ("0") </td></tr> <tr> <td>rch</td> <td>4.0</td> <td>character advance of narrow glyph ("0") </td></tr> <tr> <td>ic</td> <td>4.0</td> <td>character advance of full-width glyph ("水") </td></tr> <tr> <td>ric</td> <td>4.0</td> <td>root element character advance of full-width glyph ("水") </td></tr> <tr> <td>cap</td> <td>4.0</td> <td>capital height width </td></tr> <tr> <td>rcap</td> <td>4.0</td> <td>root element capital height width </td></tr> <tr> <td>vw</td> <td>3.0</td> <td>one percent of viewport width </td></tr> <tr> <td>vh</td> <td>3.0</td> <td>one percent of viewport height </td></tr> <tr> <td>vmin</td> <td>3.0</td> <td>one percent of viewport's smallest dim </td></tr> <tr> <td>vmax</td> <td>3.0</td> <td>one percent of viewport's max dim </td></tr> <tr> <td>vb</td> <td>4.0</td> <td> </td></tr> <tr> <td>vi</td> <td>4.0</td> <td>percent of parent element </td></tr> <tr> <td>svw, svh</td> <td>Example</td> <td>one percent of the small viewport </td></tr> <tr> <td>lvw, lvh</td> <td>Example</td> <td>one percent of the large viewport </td></tr> <tr> <td>dvw, dvh</td> <td>Example</td> <td>one percent of the dynamic viewport </td></tr> <tr> <td>%</td> <td>1.0</td> <td>percent of parent element </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Media_queries">Media queries</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=60" title="Edit section: Media queries"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG allows images to adapt. Printing a color image in black and white may not produce a satisfactory result. A red fill may look similar to a dark gray fill. SVG can use CSS media queries and adjust the presentation. </p><p>Consider the image on the right. If the media supports color, then the picture can have a blue background with white text and lines. If the media is black and white, then the background can be white, and the text and lines can be black. Mechanical drawings can be more complex. For color media, solid color fills may distinguish different components; for black and white media, crosshatches may distinguish the components. </p><p>An SVG <code>style</code> element has a <code>media</code> attribute. CSS syntax allows <code>@media</code> queries. </p><p>SVG 1.1 / CSS 2 media query support is very limited. SVG 2.0 is much richer. There is some support, but it may not work well. In tests tried around 2019, one browser could distinguish color and monochrome requests, but it would not follow changes in the printer properties. </p><p>Consider these images: </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:Ipv6_header.svg" class="mw-file-description" title="remove colored backgrounds"><img alt="remove colored backgrounds" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Ipv6_header.svg/205px-Ipv6_header.svg.png" decoding="async" width="205" height="160" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Ipv6_header.svg/307px-Ipv6_header.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Ipv6_header.svg/409px-Ipv6_header.svg.png 2x" data-file-width="803" data-file-height="628" /></a></span></div> <div class="gallerytext">remove colored backgrounds</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:TDR_SMA_APC7_prec_short.svg" class="mw-file-description" title="remove blue background and change to black traces."><img alt="remove blue background and change to black traces." src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/TDR_SMA_APC7_prec_short.svg/198px-TDR_SMA_APC7_prec_short.svg.png" decoding="async" width="198" height="160" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/TDR_SMA_APC7_prec_short.svg/297px-TDR_SMA_APC7_prec_short.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/TDR_SMA_APC7_prec_short.svg/396px-TDR_SMA_APC7_prec_short.svg.png 2x" data-file-width="1040" data-file-height="840" /></a></span></div> <div class="gallerytext">remove blue background and change to black traces.</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:TDR_SMA_open.svg" class="mw-file-description" title="Color picture that should be drawn differently in black and white."><img alt="Color picture that should be drawn differently in black and white." src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/TDR_SMA_open.svg/198px-TDR_SMA_open.svg.png" decoding="async" width="198" height="160" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/TDR_SMA_open.svg/297px-TDR_SMA_open.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/19/TDR_SMA_open.svg/396px-TDR_SMA_open.svg.png 2x" data-file-width="512" data-file-height="414" /></a></span></div> <div class="gallerytext">Color picture that should be drawn differently in black and white.</div> </li> </ul> <p>The color is nice, but when the image is printed on a black and white printer, the colors will be levels of gray. </p><p>Media queries can change the presentation on a black and white printer. </p> <div class="mw-heading mw-heading3"><h3 id="Width,_height,_and_viewBox"><span id="Width.2C_height.2C_and_viewBox"></span>Width, height, and viewBox</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=61" title="Edit section: Width, height, and viewBox"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>These <code>svg</code> element attributes can cause problems. Just using <code>viewBox</code> may prevent users from panning and zooming. </p><p>Specifying <code>width</code> and <code>height</code> gives a concrete size for the image and also implies clipping. If such an image is put in a small container, then that container can be scrolled and zoomed. For example, <a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a> is a detailed file where zooming and panning make sense. To see the fine detail in the image, it must be scrolled. </p><p>Specifying <code>viewBox</code> sets a view port on the SVG and does not imply clipping. Parts of the image that are outside of the view port are still visible. Putting such an image in a small container just sizes the image to fit; it does not imply scrolling. </p><p>I should do some tests and try them in different contexts. </p> <ul><li>set width, height, and viewBox</li> <li>set width, height, but not viewBox</li> <li>set viewBox only</li></ul> <p>Consider the effect of the big circle background trick: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><circle</span><span class="w"> </span><span class="na">r=</span><span class="s">"10000"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"white"</span><span class="nt">/></span> </pre></div></dd></dl> <p>Maybe a separate background topic. </p> <ul><li><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds">https://developer.mozilla.org/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Errors_and_validation">Errors and validation</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=62" title="Edit section: Errors and validation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Validation is often overly strict: issues cited as errors are often reasonable extensions. For example, HTML 5 allows <code>data-*</code> attributes, and those attributes have found their way into the SVG 2.0 drafts. An SVG 1.1 validator will list them as errors, but they are harmless. </p><p>I'm on the fence with some other errors. Some SVG tools emit invalid XML identifiers (e.g., an identifier beginning with a digit is invalid; for example, <a href="/wiki/File:Diagram_of_IGNORE.svg" title="File:Diagram of IGNORE.svg">File:Diagram_of_IGNORE.svg</a>). Most XML implementations will handle such identifiers, so they are not a big deal. However, it may also be reasonable to fix these legitimate errors. What if some future XML spec required implementation to throw an exception when encountering such identifiers? Similarly, duplicate identifiers (such as those emitted by SVG Translate) are errors that may be reasonable to fix. (Do the duplicate identifiers confuse SVG Translate?) </p> <div class="mw-heading mw-heading2"><h2 id="SVG_text">SVG text</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=63" title="Edit section: SVG text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In general, the text within an SVG file should be in SVG <code>text</code> elements. Avoid converting text to paths/curves. Such path text expands the size of the file, and it is often unnecessary. Artistic text (such as used in logos) may need to be converted to curves. </p><p>In general, if an SVG file contains text, then users should be able to copy and paste that text from the SVG file. A simple test is to load the SVG file into a browser and then try to select all the text (<kbd>control-A</kbd> in Windows). If no text is selected, then the diagram's text has been converted to curves. </p><p>The text that is selected should be readable, grouped appropriately, and spaced correctly. Independent phrases should be in their own <code>text</code> element; they should not be combined with other phrases. Independent phrases that need two lines should not use two <code>text</code> elements but rather code the lines in <code>tspan</code> elements. That keeps the phrase together. </p><p>In addition, the selected text should not be missing spaces or have extra spaces. If the text is displayed on two lines, then it should have a space between those two lines. For example, the better result is "Holy Roman Empire" rather than "Holy RomanEmpire". Unfortunately, SVG does not handle spaces well. Spaces at the beginning or end of a line may not align as expected (the SVG hanging space problem of <code>text-anchor</code>). </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><text><tspan></span>Holy<span class="w"> </span>Roman<span class="nt"></tspan><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">dy=</span><span class="s">"20"</span><span class="nt">></span>Empire<span class="nt"></tspan></text></span> <span class="nt"><text><tspan></span>Holy<span class="w"> </span>Roman<span class="w"> </span><span class="nt"></tspan><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">dy=</span><span class="s">"20"</span><span class="nt">></span>Empire<span class="nt"></tspan></text></span> </pre></div></dd></dl> <p>Sometimes, text is spaced for emphasis. For example, a map of the United States may have text that looks like <span style="letter-spacing:.3em">United States</span>. That text should copy and paste without the additional spaces. Instead of inserting actual spaces to achieve the effect, the graphic artist should set the <code>letter-spacing</code> of the string. Furthermore, do not space text by individually placing the characters. That makes the text difficult to translate, and it may render poorly when fonts are substituted. Use the mechanisms that SVG provides. </p><p>Similarly, a string that displays as all capital letters should use <code>text-transform: uppercase</code>. For example, <span style="text-transform:uppercase;">United States</span> uses a text transform and will copy-paste as "United States". There are other text transforms, but they are less useful. </p><p>Sadly, <code>text-transform</code> is not very smart. The result of <code>text-transform: capitalize</code> applied to "united states of america" is <span style="text-transform: capitalize">united states of america</span>. It also does not follow some language conventions such as capitalizing a Dutch "IJ": <span lang="nb" style="text-transform: capitalize;">ijland</span>; works with ij ligature character (U+133): <span lang="nb" style="text-transform: capitalize;">ijland</span>. </p><p>The perils of hidden text. It can confuse editors. Any hidden elements can cause confusion. </p> <div class="mw-heading mw-heading3"><h3 id="Syntax">Syntax</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=64" title="Edit section: Syntax"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Looking at the SVG 1.1 specification. </p><p>An <code>a</code> element may have <code>text</code> children but not <code>tspan</code> children. </p><p>A <code>text</code> element may have a <code>a</code> children. A <code>tspan</code> element may not have <code>a</code> children. So, according to the rules, this might be legal: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><text></span> <span class="w"> </span><span class="nt"><tspan></span>The<span class="w"> </span>devil<span class="nt"></tspan></span> <span class="w"> </span><span class="nt"><a</span><span class="w"> </span><span class="na">href=</span><span class="s">"foo"</span><span class="nt">><text></span>Hi<span class="nt"></text></a></span> <span class="w"> </span><span class="nt"><tspan></span>made<span class="w"> </span>me<span class="w"> </span>do<span class="w"> </span>it.<span class="nt"></tspan></span> <span class="nt"></text></span> </pre></div></dd></dl> <p>That does not seem reasonable; some other rule must prevent it. I would think only a <code>#text</code> node would be allowed. </p><p>A <code>tspan</code> element may also contain descriptive attributes such as <code>title</code>. </p><p>A <code>text</code> element may have a <code>transform</code> attribute, but a <code>tspan</code> element may not. That also suggests that <code>tspan</code> elements ignore CSS transform properties. </p><p>That makes rewrite rules for SVG text transforms simpler. Transforms are never added to <code>tspan</code> elements, but the <code>x</code> and <code>y</code> attributes need to be offset. (If an <code>x</code> or a <code>y</code> attribute is present, then it should not be removed! It must remain present to create a new text chunk.) The <code>dx</code> and <code>dy</code> attributes need to be scaled. The <code>rotate</code> attribute needs ...? </p><p>The usual case is modifying the <code>x</code> and <code>y</code> attributes in a group. Extract a common transform to use for the group and apply its inverse to all members of the group. </p><p>Style promotions are also involved. If all elements of the group have the same properties, then raising that property to enclosing container works. If some members inherit a different value, then they must have the property explicitly set (depressed). </p> <div class="mw-heading mw-heading4"><h4 id="The_mess_that_is_xml:space">The mess that is <code>xml:space</code></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=65" title="Edit section: The mess that is xml:space"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The XML specification defines what <code>xml:space</code> means. When its value is <code>preserve</code>, then the #text nodes should preserve (not collapse) spaces. In other words, all spaces are significant. In normal processing, leading and trailing spaces are deleted, and consecutive spaces are collapsed. </p><p>Inkscape likes using <code>xml:space</code>, but that has further implications. </p><p>If <code>xml:space</code> is placed at the top of the file, then it applies to all elements. Under XML rules, that is a signal that the whitespace for elements such as <code>switch</code> is important. It is not. For SVG, the only element that needs to mind <code>xml:space</code> is the <code>text</code> element and its children. </p> <div class="mw-heading mw-heading3"><h3 id="Fonts">Fonts</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=66" title="Edit section: Fonts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Point to section about fonts and what scaling them means. </p><p>A good example of the benefits of nonlinear scaling of fonts is a bar code font. The font symbols are scaled to integer pixel widths. The symbols use Manhattan geometry, so the edges are sharp; no anti-aliasing is needed. The strict symbol geometries are maintained. </p><p>Recommend the CSS generic fonts <code>serif</code> and <code>sans-serif</code>. If possible, do not use exotic fonts. </p><p>WMF also has problems because <code>librsvg</code>. There are times that we want a text string to be an exact length. SVG supports that with the <code>textLength</code> attribute, but <code>librsvg</code> does not support it. </p><p>In practice, there is not much support for particular font properties. </p> <dl><dd><dl><dt>font-family</dt> <dd>depends on system. Use CSS fallback.</dd> <dt>font-size</dt> <dd>specific size has excellent support; relative sizes may not be supported</dd> <dt>font-style</dt> <dd>normal, italic. Good support. Oblique....</dd> <dt>font-weight</dt> <dd>normal, bold. Other options have little support.</dd> <dt>font-stretch</dt> <dd>normal. Other options have little support.</dd> <dt>font-variant</dt> <dd>all purpose OTF support depends on font.</dd> <dt>font-size-adjust</dt> <dd>mumble.</dd> <dt>baseline....</dt> <dd><code>baseline-shift</code> will be deprecated. Use CSS vertical-align instead. See <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseline-shift</a></dd></dl></dd></dl> <p>It may be appropriate to fix some SVG files. For example, <a href="/wiki/File:Planets2013.svg" title="File:Planets2013.svg">File:Planets2013.svg</a> uses <code>font-family="Arial-BoldMT"</code> and does not have <code>font-weight="bold"</code>. Most font matchers will fail. There was a Phabricator request to have MediaWiki do that automatically, but it would be better as a robot task. </p><p>The WMF font list: </p> <ul><li><a class="external free" href="https://noc.wikimedia.org/conf/fc-list">https://noc.wikimedia.org/conf/fc-list</a></li> <li><a href="https://phabricator.wikimedia.org/T329576" class="extiw" title="phab:T329576">Phab:T329576</a>: SVG Checker doesn't have all fonts installed</li> <li><a href="https://phabricator.wikimedia.org/T280722" class="extiw" title="phab:T280722">Phab:T280722</a>: Commons SVG Checker has different fonts than Wikimedia rendering</li></ul> <div class="mw-heading mw-heading4"><h4 id="Font_matching">Font matching</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=67" title="Edit section: Font matching"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://www.fontsquirrel.com/matcherator">https://www.fontsquirrel.com/matcherator</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="PANOSE">PANOSE</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=68" title="Edit section: PANOSE"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Paganese_Calcio_1926_logo-lite.png" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/256px-Paganese_Calcio_1926_logo-lite.png" decoding="async" width="256" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/384px-Paganese_Calcio_1926_logo-lite.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/512px-Paganese_Calcio_1926_logo-lite.png 2x" data-file-width="1008" data-file-height="1181" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>The font for "PAGANESE" is a serif font, but has many uncommon characteristics. It seems heavier than bold. It is condensed; compare the "A" in PAGANESE and CALCIO. </p><p>Consider <a href="https://en.wikipedia.org/wiki/PANOSE" class="extiw" title="en:PANOSE">en:PANOSE</a>-1. </p> <table class="wikitable"> <caption>PANOSE-1 Table </caption> <tbody><tr> <th>Parameter</th> <th>Description</th> <th>Characters</th> <th>Value</th> <th>Times New Roman </th></tr> <tr> <td>1</td> <td>Family Kind</td> <td></td> <td>2 (Latin)</td> <td>2 (Latin) </td></tr> <tr> <td>2</td> <td>Serif Style</td> <td>AIE</td> <td>5 (obtuse square cove)</td> <td>2 (Cove) </td></tr> <tr> <td>3</td> <td>Weight</td> <td>HE</td> <td>7 (demi)</td> <td>6 (Medium) </td></tr> <tr> <td>4</td> <td>Proportion</td> <td>HJOMSE</td> <td></td> <td>3 (Modern) </td></tr> <tr> <td>5</td> <td>Contrast</td> <td>O</td> <td>4 (low)</td> <td>5 (Medium Low) </td></tr> <tr> <td>6</td> <td>Stroke Variation</td> <td>O</td> <td></td> <td>4 (Transitional) </td></tr> <tr> <td>7</td> <td>Arm Style and Termination of Open Curves</td> <td>AC</td> <td>5 (straight arms, single serif)</td> <td>5 (straight arms) </td></tr> <tr> <td>8</td> <td>Slant and Shape of the Letter</td> <td>OH</td> <td></td> <td>2 (Round) </td></tr> <tr> <td>9</td> <td>Midlines and Apexes</td> <td>EA</td> <td></td> <td>3 (Standard) </td></tr> <tr> <td>10</td> <td>X-height and Behavior of Uppercase Letters Relative to Accents</td> <td>HxÅ</td> <td></td> <td>4 (Large) </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="Fonts_and_scripts">Fonts and scripts</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=69" title="Edit section: Fonts and scripts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://learn.microsoft.com/en-us/globalization/input/font-support">https://learn.microsoft.com/en-us/globalization/input/font-support</a></li></ul> <p>Given a script (4-letter IETF script), which fonts support it? Which languages does a font support? </p> <ul><li><a rel="nofollow" class="external free" href="https://github.com/antoinecarme/UnicodeFontLists">https://github.com/antoinecarme/UnicodeFontLists</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Character_encoding">Character encoding</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=70" title="Edit section: Character encoding"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Symbol_Test.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Symbol_Test.svg/220px-Symbol_Test.svg.png" decoding="async" width="220" height="92" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Symbol_Test.svg/330px-Symbol_Test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Symbol_Test.svg/440px-Symbol_Test.svg.png 2x" data-file-width="240" data-file-height="100" /></a><figcaption>Unicode and Symbol encodings. The two lines should be similar if a Symbol encoding font is available.</figcaption></figure> <p>Unicode is common now, so most SVG files will use Unicode or a Unicode-compatible subset. In practice, that means UTF-8, but UTF-16 is also a possibility. UTF-16 wants a byte-order mark (BOM), and some UTF-8 files will also include a BOM. Software should handle those cases. </p><p>Even though a file may claim to be Unicode, that does not mean the file uses Unicode. There are many special fonts that put exotic glyphs in non-Unicode character positions. The Adobe Symbol font, for example, uses its own character encoding.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> Zapf Dingbats<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> and Adobe Sonata<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> also use their own encodings. </p> <dl><dd><dl><dt>Symbol</dt> <dd>ABCDEabcde → <span style="font-family: Symbol">ABCDEabcde</span></dd> <dt>Zapf Dingbats, Wingdings</dt> <dd>ABCDEabcde → <span style="font-family: Zapf Dingbats, Wingdings">ABCDEabcde</span></dd> <dt>Sonata</dt> <dd>ABCDEabcde → <span style="font-family: Sonata">ABCDEabcde</span></dd></dl></dd></dl> <p>Even common fonts may have non-Unicode character assignments.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> For example, many Adobe fonts use the Adobe Standard Encoding<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> which puts a dagger at 0xD1 (Ñ instead of U+2020: †) and the "fi" ligature at 0xAE (® instead of U+FB01: fi). </p><p>Files that claim to be Unicode but use non-Unicode fonts should be recoded with Unicode fonts. Font substitution may not work when fonts use non-Unicode character encodings. </p><p>See <a href="https://phabricator.wikimedia.org/T272133" class="extiw" title="phab:T272133">Phab:T272133</a> <cite>Make all Postscript core 35 fonts available to SVG by installing some packages</cite>. </p><p>Adobe Font list. <a rel="nofollow" class="external free" href="https://adobe-type-tools.github.io/font-tech-notes/pdfs/5090.FontNameList.pdf">https://adobe-type-tools.github.io/font-tech-notes/pdfs/5090.FontNameList.pdf</a> </p><p>Courier, Helvetica, Times, Symbol, Avant Garde Gothic, Bookman, New Century Schoolbook, Palatino, Zaph Chancery, Zaph Dingbats. </p><p>Files with non-Unicode characters: </p> <ul><li><a href="/wiki/File:Var_RTP.svg" title="File:Var RTP.svg">File:Var RTP.svg</a></li></ul> <p>Files that use less common character encodings (such as Shift-JIS) do not need to be recoded if they use Unicode fonts. XML files that use such encodings can convert the text to Unicode. </p><p>Detecting non-Unicode files would be involved. The first step is converting to Unicode. The XML <code>charset</code> attribute should be authoritative, and it offers a clear route to convert an XML file to Unicode. The XML DOM should automatically convert a known <code>charset</code> to a <code>DOMString</code>, which is essentially Unicode. (XML DOM now hides the character encoding.) </p><p>The second step is searching for fonts within an SVG file. If a font is Unicode, then the text content is OK. If the font uses a non-Unicode charset, then the text content should be searched for non-Unicode characters. If no non-Unicode assignments are used, then the text content is OK. If non-Unicode assignments are used, then select a Unicode font replacement, and edit the text content to change the non-Unicode characters to equivalent Unicode characters. </p><p>Those steps require a significant database. </p> <ol><li>font family</li> <li>character encoding (points to a (possibly standard) table)</li> <li>replacement font</li></ol> <p>Character sets </p> <ul><li><a rel="nofollow" class="external free" href="https://www.iana.org/assignments/character-sets/character-sets.xml">https://www.iana.org/assignments/character-sets/character-sets.xml</a></li></ul> <dl><dd><small>see <a href="https://en.wikipedia.org/wiki/Mojibake" class="extiw" title="w:Mojibake">w:Mojibake</a></small></dd></dl> <div class="mw-heading mw-heading3"><h3 id="Character_metrics">Character metrics</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=71" title="Edit section: Character metrics"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Differences in font metrics are expected. The character widths will vary. The cap-height and x-height will vary. </p><p>There are other technical placement issues that spell trouble. </p> <div class="mw-heading mw-heading4"><h4 id="Music_fonts">Music fonts</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=72" title="Edit section: Music fonts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Music fonts are problematic. Although the glyphs are identified, there is not a set standard for the position of those glyphs. Compare: Latin fonts have a baseline, but music fonts do not. </p> <ul><li><small>Find the Phabricator item about SVG music and fonts.</small></li></ul> <p>The first music font was Adobe Sonata. It uses its own 8-bit character encodings. The common staff height is 1 em. The notehead centers were set on the baseline. So we can get the simple </p> <ul><li>Sonata <dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><span style="font-family: Sonata, Courier New; font-size: 80px;">=qq=</span></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>Unicode defined a music block, but it did not specify the glyph sizes or positions. Google's Noto Music font has different note positioning but similar stem heights: </p> <ul><li>Noto Music <dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><span style="font-family: Noto Music, Courier New; font-size: 80px;">𝄚𝅘𝅥𝅘𝅥𝄚</span></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>The SMuFL Bravura font (for scoring) also uses the Unicode block character assignments, but it uses the Sonata note positions. </p> <ul><li>Bravura <dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><span style="font-family: Bravura, Courier New; font-size: 80px;">𝄚𝅘𝅥𝅘𝅥𝄚</span></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>The SMuFL Bravura Text font (for inclusion within text) also exists. </p> <ul><li>Bravura Text <dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><span style="font-family: Bravura Text, Courier New; font-size: 80px;">𝄚𝅘𝅥𝅘𝅥𝄚</span></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>Other Unicode music fonts are less structured. A notehead may not fit between staff lines. The staff height may not be 1 em. </p> <ul><li>default music font <dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><dl><dd><span style="font-size: 80px;">𝄚𝅘𝅥𝅘𝅥𝄚</span></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></dd></dl></li></ul> <p>The nonstandard position information poses a problem for typesetting music. SMuFL fonts should have a JSON file that specifies the metrics. Reading that file should make all SMuFL fonts compatible, but many tools do not read the JSON files. The tools just compile in that information for the fonts they use. </p> <ul><li><a href="https://en.wikipedia.org/wiki/SMuFL" class="extiw" title="en:SMuFL">en:SMuFL</a></li> <li><a rel="nofollow" class="external free" href="https://www.smufl.org/">https://www.smufl.org/</a></li> <li><a rel="nofollow" class="external free" href="https://w3c.github.io/smufl/latest/">https://w3c.github.io/smufl/latest/</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Path_text">Path text</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=73" title="Edit section: Path text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Talk about what path text looks like in some contexts. </p><p>There are files that should have path text removed. </p> <ul><li><a href="/wiki/File:Chromosome.svg" title="File:Chromosome.svg">File:Chromosome.svg</a> This file primarily has path text because flowRoot does not display. <span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b></li> <li><a href="/wiki/File:Animal_cell_structure_en.svg" title="File:Animal cell structure en.svg">File:Animal cell structure en.svg</a> (227 kB) clean this file up and then use SVG Translate.... Many separate translations exist. <dl><dd>file structure compromised with SVG optimizer</dd> <dd>reverted to old (251 kB) and then converted paths to text. Result is 149 kB. <span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b></dd></dl></li> <li><a href="/wiki/File:Tulejki_zaciskowe.svg" title="File:Tulejki zaciskowe.svg">File:Tulejki zaciskowe.svg</a> collet closing schemes</li> <li><a href="/wiki/File:Volcanic_Arc_System_SVG_en.svg" title="File:Volcanic Arc System SVG en.svg">File:Volcanic Arc System SVG en.svg</a></li></ul> <p>SVG files that have converted text to path are often marked with <a href="/wiki/Template:Path_text_SVG" title="Template:Path text SVG"><span style="font-family:monospace,monospace;">{{Path text SVG}}</span></a>. Another (earlier?) convention was to explicitly categorize files that should use text to <a href="/wiki/Category:Convert_to_TXT" title="Category:Convert to TXT">Category:Convert to TXT</a>. The category has JPEG, PNG, and SVG files in it. Ah! It's from <a href="/wiki/Template:ShouldBeText" title="Template:ShouldBeText"><span style="font-family:monospace,monospace;">{{ShouldBeText}}</span></a>. That template wants the figures to be converted to wikitext rather than using an illustration. It may be better to mark some files with <a href="/wiki/Template:Path_text_SVG" title="Template:Path text SVG"><span style="font-family:monospace,monospace;">{{Path text SVG}}</span></a> or <a href="/wiki/Template:Convert_to_SVG" title="Template:Convert to SVG"><span style="font-family:monospace,monospace;">{{Convert to SVG}}</span></a>. </p><p>Here is a file in the category: </p> <ul><li><a href="/wiki/File:Ipv6_header.svg" title="File:Ipv6 header.svg">File:Ipv6 header.svg</a> 30 kB <span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b></li></ul> <p>The file has not only converted the text to paths, each letter is a <code>symbol</code>, and the text is typeset by placing those symbols. This file is also interesting in that it describes a technical standard, and the text in the file are candidates for <code>translate="no"</code>. </p><p>Another file: </p> <ul><li><a href="/wiki/File:Thermostatic_expansion_valve.svg" title="File:Thermostatic expansion valve.svg">File:Thermostatic expansion valve.svg</a></li></ul> <p>Files with even more confusion (text as symbols and curves drawn as line segments): </p> <ul><li><a href="/wiki/File:6rd.svg" title="File:6rd.svg">File:6rd.svg</a> 312 kB</li> <li><a href="/wiki/File:Tunnel-ipv6.svg" title="File:Tunnel-ipv6.svg">File:Tunnel-ipv6.svg</a> 270 kB</li></ul> <p>Sadly, some tools emit path text rather than text. See, for example, <a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=836944731#List_of_Famines">List of Famines</a>. </p> <div class="mw-heading mw-heading4"><h4 id="ARIA_label">ARIA label</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=74" title="Edit section: ARIA label"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some Inkscape files have <code>aria-label</code> attributes. </p> <ul><li><a href="/wiki/File:Regions_of_Finland_labelled_FI.svg" title="File:Regions of Finland labelled FI.svg">File:Regions of Finland labelled FI.svg</a> (there are versions a few days later)</li></ul> <p>Here is some curve text from the SVG: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><g</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:0%;font-family:Arial;-inkscape-font-specification:Arial;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:#646464;fill-opacity:1;stroke:none;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"text3787"</span> <span class="w"> </span><span class="na">aria-label=</span><span class="s">"Uusimaa"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6751"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 381.84099,1384.7132 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6753"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 393.30611,1398.8256 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6755"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 396.88715,1395.774 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6757"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 407.44738,1386.7058 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6759"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 411.82742,1398.8256 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6761"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 434.94057,1397.5645 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path6763"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-size:19.715px;line-height:1.25;stroke-width:0.999998"</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 445.91473,1397.5645 ... z"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></g></span> </pre></div> <p>Observations: </p> <ul><li>The DOM can reconstruct some details.</li> <li>The <code>aria-label</code> gives most of the text (it may be multiline).</li> <li>Various font properties can be used to determine font, size, style, fill, and anchor.</li> <li>The SVGDOM can determine the bounding box of the <code>g</code> element.</li> <li>The SVGDOM can determine the bounding box of the synthesized <code>text</code> element.</li> <li>The SVG has some contradictions such as font size being both 12 and 19.715 pixels and line height of 0 or 1.25.</li> <li>The SVG has irrelevant stroke information.</li> <li>The CORS issue....</li> <li>Why did Inkscape do it this way? In the old days, glyphs would have been better. Now that glyphs are gone, why not create some definitions in the <code>defs</code> section and then <code>use</code> those definitions?</li></ul> <div class="mw-heading mw-heading4"><h4 id="SVG_with_hidden_text">SVG with hidden text</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=75" title="Edit section: SVG with hidden text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some graphics artists have hidden text and visible path text. </p><p>Generally, hidden text may indicate path text. Consider the cases </p> <ul><li>hidden text (<code>display="none"</code> or <code>visibility="hidden"</code>)</li> <li>text outside of the viewport <dl><dd>often used for notes or example graphics</dd> <dd>may be part of a clipped or zoomed=in image</dd></dl></li></ul> <p>The difference between <code>display</code> and <code>visibility</code> </p> <ul><li><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/display">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/display</a> (element and its children are not displayed)</li> <li><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/visibility">https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/visibility</a> (the layout of hidden text is still calculated)</li></ul> <p>Hidden text may be a standard practice in <a href="/wiki/Category:SVG_labeled_maps_of_administrative_divisions_(location_map_scheme)" title="Category:SVG labeled maps of administrative divisions (location map scheme)">Category:SVG labeled maps of administrative divisions (location map scheme)</a>, which has more than 2,500 files. Styles should be used instead of concrete formatting, but Inkscape makes that difficult. </p><p>An example file is <a href="/wiki/File:Togo,_administrative_divisions_-_de_-_colored.svg" title="File:Togo, administrative divisions - de - colored.svg">File:Togo,_administrative_divisions_-_de_-_colored.svg</a>. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"TT"</span><span class="w"> </span><span class="na">display=</span><span class="s">"none"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"TT_Countries"</span><span class="w"> </span><span class="na">display=</span><span class="s">"inline"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(1 0 0 1 8.2725 236.5)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSans-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"18"</span><span class="nt">></span>GHANA<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(1 0 0 1 41.6494 16.6387)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSans-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"18"</span><span class="nt">></span>BURKINA<span class="w"> </span>FASO<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(1 0 0 1 292.7539 119.7319)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSans-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"18"</span><span class="nt">></span>BENIN<span class="nt"></text></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"TT_Sea"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.75 0 0 1 239.7402 608.8057)"</span><span class="w"> </span><span class="na">display=</span><span class="s">"inline"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#0978AB"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSerif-BoldItalic'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"16"</span><span class="nt">></span>ATLANTISCHER<span class="w"> </span>OZEAN<span class="nt"></text></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"TT_Regions"</span><span class="w"> </span><span class="na">display=</span><span class="s">"inline"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 97.8931 73.6895)"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="nt">></span>Savanes<span class="nt"></tspan><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"93.168"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="w"> </span><span class="na">letter-spacing=</span><span class="s">"33.75"</span><span class="nt">></span><span class="w"> </span><span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 173.4487 197.23)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="nt">></span>Kara<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 172.1001 299.9858)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="nt">></span>Centrale<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 181.4487 442.9453)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="nt">></span>Plateaux<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 188.5601 537.9512)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"22"</span><span class="nt">></span>Maritime<span class="nt"></text></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"Nmbrs_Regions"</span><span class="w"> </span><span class="na">display=</span><span class="s">"inline"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 135.1401 110.792)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"50"</span><span class="nt">></span>1<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 173.4487 197.23)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"50"</span><span class="nt">></span>2<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 188.5601 311.9995)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"50"</span><span class="nt">></span>3<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 203.7798 450.9453)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"50"</span><span class="nt">></span>4<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">transform=</span><span class="s">"matrix(0.8 0 0 1 223.1953 549.5059)"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#646464"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"'DejaVuSansCondensed-Bold'"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"50"</span><span class="nt">></span>5<span class="nt"></text></span> <span class="w"> </span><span class="nt"></g></span> <span class="nt"></g></span> <span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"PIX"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">id=</span><span class="s">"TT_Countries_1_"</span><span class="nt">></span> <span class="w"> </span>... <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span>... <span class="nt"></g></span> </pre></div></dd></dl> <p>It has particular <code>id</code> elements. TT for TrueType? </p><p>Categorize SVG with hidden text elements? </p><p>Most of the text should be anchored to the middle rather than the start. File was made with Adobe Illustrator, which only emits SVG text with start coordinates (no middle or end alignment). </p><p>The map files burying the font characteristics in the font name. The font specification <code>DejaVuSansCondensed-Bold</code> should be <code>font-family="DejaVu Sans, sans-serif" font-weight="bold" font-stretch="condensed"</code>. File was made with Adobe Illustrator, which does not emit broken out font specifications. </p><p>TEST: does this code produce the same text: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 1000 300"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"100"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"pink"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"20"</span><span class="w"> </span><span class="na">y=</span><span class="s">"150"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"DejaVuSansCondensed-Bold"</span><span class="w"> </span><span class="nt">></span>The<span class="w"> </span>Atlantic<span class="w"> </span>Ocean<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"20"</span><span class="w"> </span><span class="na">y=</span><span class="s">"250"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"DejaVu Sans"</span><span class="w"> </span><span class="na">font-weight=</span><span class="s">"bold"</span><span class="w"> </span><span class="na">font-stretch=</span><span class="s">"condensed"</span><span class="nt">></span>The<span class="w"> </span>Atlantic<span class="w"> </span>Ocean<span class="nt"></text></span> <span class="nt"></svg></span> </pre></div></dd></dl> <p>Answer: They do not look the same. </p><p>Should SVG with such font names be edited? </p><p>Categorize SVG with encoded font name? </p><p>In addition, the transform x-scale should be 1 rather than 0.8; automatic detection may be difficult. That might be an afterthought fix to emulate a condensed font. That would simplify the text position. </p><p>Notice the SVG uses groups to impose consistent style information. Using structural hierarchy to impose style is an odd practice. The text is not grouped with the other graphics but rather with siblings. Separating one region would involve exploding several groups to remove irrelevant regions. </p><p>Another hidden-text example is <a href="/wiki/File:Cochlea-crosssection.svg" title="File:Cochlea-crosssection.svg">File:Cochlea-crosssection.svg</a>. It also has the unsupported <code>flowRoot</code> element, so the hidden text may not be such a bad thing. </p> <div class="mw-heading mw-heading5"><h5 id="Condensed_font_test">Condensed font test</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=76" title="Edit section: Condensed font test"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 635px"> <div class="thumb" style="width: 630px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:SVG_Test_Font_Condensed.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/SVG_Test_Font_Condensed.svg/600px-SVG_Test_Font_Condensed.svg.png" decoding="async" width="600" height="360" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/SVG_Test_Font_Condensed.svg/900px-SVG_Test_Font_Condensed.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/SVG_Test_Font_Condensed.svg/1200px-SVG_Test_Font_Condensed.svg.png 2x" data-file-width="512" data-file-height="307" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>This SVG file mostly works on Commons. The problem is that Liberation Sans with a condensed stretch should select Liberation Sans Narrow. <a href="https://phabricator.wikimedia.org/T357488" class="extiw" title="phab:T357488">Phab:T357488</a> </p><p>This SVG file does not work in Chromium or Firefox on Windows. Font stretch appears to be ignored. I do not know if it is a configuration issue or some deeper problem. </p> <div class="mw-heading mw-heading5"><h5 id="Classifier_algorithm?"><span id="Classifier_algorithm.3F"></span>Classifier algorithm?</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=77" title="Edit section: Classifier algorithm?"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Classifier to style? These files may be simple. Would like to do some normalization (such as pulling out a default fill for the text). </p><p>Is the algorithm simple? Say there is a group that imposes a characteristic such as fill. Generate a new style that specifies that fill. Then that group can be exploded. Generalize the explosion to a finite set of characteristics imposed by the group. Maybe that is the algorithm that Adobe Illustrator uses with its <code>st*</code> styles. </p><p>That leaves us with flat text with many styles. Then apply an equivalence algorithm to reduce the number of styles. </p> <div class="mw-heading mw-heading4"><h4 id="Files_to_leave_alone?"><span id="Files_to_leave_alone.3F"></span>Files to leave alone?</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=78" title="Edit section: Files to leave alone?"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg/220px-Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg.png" decoding="async" width="220" height="206" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg/330px-Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg/440px-Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg.png 2x" data-file-width="1821" data-file-height="1701" /></a><figcaption>Station map</figcaption></figure> <p>Although some files have substantial path text burdens, it may not make sense to convert them to text. </p><p><a href="/wiki/File:Liniennetz_Stadtbahn_Bielefeld_mit_Stationsnamen.svg" title="File:Liniennetz Stadtbahn Bielefeld mit Stationsnamen.svg">File:Liniennetz Stadtbahn Bielefeld mit Stationsnamen.svg</a> is 608 kB with path text. There is little reason to use path text here because the station names do not use a fancy font. It is not like a logo or a flag where the text metrics and font appearance are important. </p><p>The file seems to be a good candidate for converting to text. Or is it? </p><p>The effort of converting the file to text may not be worth it. The file is used in a small number of places. Perhaps the only advantage would be to reduce the file enough so that it would make sense to serve the SVG directly. </p><p>There is little need to translate the text in this file. Maybe the legend can be translated, but someone using the map probably wants the native names. So converting the file to text would not be a big translation benefit. </p> <div class="mw-heading mw-heading4"><h4 id="A_bizarre_file">A bizarre file</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=79" title="Edit section: A bizarre file"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/File:Mapa_del_Alto_Mijares.svg" title="File:Mapa del Alto Mijares.svg">File:Mapa del Alto Mijares.svg</a> has path text. Its scale uses text, but little else. Surprisingly, there are dozens of <code>text</code> elements that contain nothing. </p><p>I'd like to key on city dots, find the closest path text, and then convert to text. </p><p>SVG does not have a good sense of labels for symbols. AutoCAD allows symbols to have associated text. The closest that SVG can do is something such as </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(100 200)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"0"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"0"</span><span class="w"> </span><span class="na">r=</span><span class="s">"5"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"blue"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"-10"</span><span class="nt">></span>City<span class="w"> </span>of<span class="w"> </span>Angels<span class="nt"></text></span> <span class="nt"></g></span> </pre></div></dd></dl> <p>Compare to a file such as <a href="/wiki/File:Ribosome_mRNA_translation_en.svg" title="File:Ribosome mRNA translation en.svg">File:Ribosome mRNA translation en.svg</a>. It is used in many places and has been translated into other languages. </p> <div class="mw-heading mw-heading3"><h3 id="tref_element"><code>tref</code> element</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=80" title="Edit section: tref element"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG user agents did not implement the <code>tref</code> element, and the SVG 2.0 specification drops the element. As specified, the element does not appear useful. Duplicating rather than referencing text is simple enough. </p><p>Consider a map. Most place names (such as towns and cities) will be used once, so a reference would not be useful. A generic feature such as an airport may appear several times, but it can use a symbol to repeat the text. </p><p>Rivers, on the other hand, are long, so they may be labeled on a map a few times. For example, the Amazon may appear on a map several times. One could use symbol to do the repeat, but rivers are oven labeled using a path that follows the river. A <code>tref</code> might be convenient to label the river at several places along its twisting length. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><defs></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"amazontext"</span><span class="nt">></span>Amazon<span class="w"> </span>River<span class="nt"></text></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"amazonpath1"</span><span class="w"> </span><span class="na">d=</span><span class="s">"..."</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"amazonpath2"</span><span class="w"> </span><span class="na">d=</span><span class="s">"..."</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">id=</span><span class="s">"amazonpath3"</span><span class="w"> </span><span class="na">d=</span><span class="s">"..."</span><span class="nt">/></span> <span class="nt"></defs></span> <span class="nt"><text><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazonpath1"</span><span class="nt">><tref</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazontext"</span><span class="nt">/></textPath></text></span> <span class="nt"><text><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazonpath2"</span><span class="nt">><tref</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazontext"</span><span class="nt">/></textPath></text></span> <span class="nt"><text><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazonpath3"</span><span class="nt">><tref</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#amazontext"</span><span class="nt">/></textPath></text></span> </pre></div></dd></dl> <p>However, the approach is not suitable for <code>switch</code> translations. </p><p>A <code>textPath</code> element may have <code>tref</code> children. </p><p>The target of <code>tref</code> is not well specified. It sounds like it could point to any element with text content, but that does not mean that pointing to a <code>switch</code> element would provide just the rendered text. </p><p>A construct using convertional translation tools and <code>its:term</code> would work better. </p><p>There may be a route by using <code>startOffset</code>, but I doubt this inheritance works: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span><span class="w"> </span><span class="na">startOffset=</span><span class="s">"25%"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#pathRiverName"</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></textPath></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></text></span> <span class="nt"></g></span> <span class="nt"><g</span><span class="w"> </span><span class="na">startOffset=</span><span class="s">"50%"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#pathRiverName"</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></textPath></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></text></span> <span class="nt"></g></span> <span class="nt"><g</span><span class="w"> </span><span class="na">startOffset=</span><span class="s">"75%"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"><textPath</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#pathRiverName"</span><span class="w"> </span><span class="err">...</span><span class="nt">></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></textPath></span><span class="w"> </span>...<span class="w"> </span><span class="nt"></text></span> <span class="nt"></g></span> </pre></div></dd></dl> <p>If the inheritance works, then the <code>startOffset</code> should also work with a <code>use</code> element. A check shows that the attribute is not inherited. The SVG 1.1 specification says if the attribute is not specified, then it defaults to 0. </p><p>Later versions of CSS and <code>content</code>. </p><p>The overall goal is to keep one translation of a river name but use that translation in several <code>textPath</code> elements. Could CSS be used to set the path element? I do not think so. The <code>use</code> element would refer to a <code>text</code> element. The <code>use</code> would have to pick up some property that would be consumed not by the <code>text</code> element but by the <code>textPath</code> element embedded within the <code>text</code> element. Maybe a <code>startOffset</code> could be passed at the <code>use</code> element? No, <code>startOffset</code> is not a presentation attribute. </p> <div class="mw-heading mw-heading3"><h3 id="Glyphs">Glyphs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=81" title="Edit section: Glyphs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg/220px-Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg.png" decoding="async" width="220" height="329" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg/330px-Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg/440px-Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg.png 2x" data-file-width="188" data-file-height="281" /></a><figcaption>A (non) candidate for glyphs. 115 kB.</figcaption></figure> <p>SVG 1.0 and 1.1 have SVG elements that allow a user to embed a font. </p><p>For those cases where converting text to curves makes sense, using glyphs offers potential benefits. </p><p>Discussion at <a href="/wiki/Commons:Graphic_Lab/Illustration_workshop/Archive/2021#Vietnamese-style_seal_of_the_Government-General_of_French_Indo-China" title="Commons:Graphic Lab/Illustration workshop/Archive/2021">Commons:Graphic_Lab/Illustration_workshop/Archive/2021#Vietnamese-style_seal_of_the_Government-General_of_French_Indo-China</a> (and several sections immediately following) </p><p>Also <a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=753110204#The_seals_of_ministries_of_the_Nguy%E1%BB%85n_Dynasty">https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=753110204#The_seals_of_ministries_of_the_Nguy%E1%BB%85n_Dynasty</a> </p> <ul><li><a href="/wiki/File:Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg" title="File:Vietnamese-style seal of the Government-General of French Indochina.svg">File:Vietnamese-style_seal_of_the_Government-General_of_French_Indochina.svg</a></li></ul> <p>General information about <a href="https://en.wikipedia.org/wiki/en:Seal_script" class="extiw" title="w:en:Seal script">w:en:Seal script</a>. </p><p>The seal is 115 kB for 15 characters. That is about 7700 bytes per character, which is rather large. Using the <code>path</code> element, one should be able to describe a line segment in less than 100 bytes. Examining the image with magnification shows that the character strokes have a lot of noise. </p><p>Modern script (not seal script) using <code>writing-mode: vertical-rl</code>: </p> <p style="writing-mode: vertical-rl; text-indent: 0px; border-style:solid; border-width:5px; padding:5px;letter-spacing:5px;"> 大法國欽命<br />總統東法全<br />權大臣管理 </p> <p>Some SVG files embedded commercial fonts as glyphs. For example, an Adobe Illustration file might embed a portion of the Arial font in an SVG file. That practice should be discouraged. </p><p>For Unicode seal script, there is a list of Unicode documents at <a rel="nofollow" class="external free" href="https://www.unicode.org/L2/topical/seal/">https://www.unicode.org/L2/topical/seal/</a> </p> <dl><dd>sample files from that list <ul><li><a rel="nofollow" class="external free" href="https://www.unicode.org/L2/L2014/14242-n4634.pdf">https://www.unicode.org/L2/L2014/14242-n4634.pdf</a></li> <li><a rel="nofollow" class="external free" href="https://www.unicode.org/L2/L2022/22143-n5191-thx-properties.pdf">https://www.unicode.org/L2/L2022/22143-n5191-thx-properties.pdf</a></li></ul></dd></dl> <p>Finding the corresponding characters in that document or a similar document might be helpful. </p> <dl><dd>For example, the second document above maps 林 to Serial No.字序 04418</dd></dl> <div class="mw-heading mw-heading4"><h4 id="SVG_2.0_drops_glyph">SVG 2.0 drops <code>glyph</code></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=82" title="Edit section: SVG 2.0 drops glyph"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG was developed when web fonts were not available, so SVG included a rudimentary embedded font mechanism.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> With web fonts, such a facility is not as important, so the mechanism has been deprecrated. As of 2021, support may still be found in the Safari and Android browsers. </p> <div class="mw-heading mw-heading4"><h4 id="Glyphs_would_not_work_with_some_scripts">Glyphs would not work with some scripts</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=83" title="Edit section: Glyphs would not work with some scripts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The Unicode specification will not add any new composed characters. That simplifies the number of characters needed. For example, Siddham script has thousands of glyphs, but most of those glyphs are composed characters. In Unicode, Siddham has a small number of fundamental characters. Composed characters are still drawn, but they no longer have exposed codepoints. </p> <div class="mw-heading mw-heading3"><h3 id="WMF_prohibits_web_fonts">WMF prohibits web fonts</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=84" title="Edit section: WMF prohibits web fonts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG 2.0 may have dropped <code>glyph</code> support because web fonts are now available. In the past, web pages depended upon the fonts that a user already had on his local machine. If the local machine did not have the font, then it would substitute some other font. Those substitutions could lead to bizarre results. </p><p>It gets even more troublesome when the desired font is for uncommon Unicode scripts. Unicode supports many scripts, but most users will not have those scripts. Unicode has assignments for Egyptian hieroglyphics and ancient Sanskrit Siddham. </p><p>CSS now has a mechanism to load web font. </p><p>Google offers a lot of fonts, and it also has CSS files to use those fonts as web fonts. (Reference) </p><p>The downside is the webfonts allow some tracking. The web font files have a long caching time (was it a year?). A browser would download the font and use it without continually querying the Google servers. The CSS files have relatively short cache times, so the browser would be contacting Google servers often. (Reference) </p> <div class="mw-heading mw-heading3"><h3 id="Alberta_road_signs">Alberta road signs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=85" title="Edit section: Alberta road signs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Road signs can be thorny. They may contain artistic text, and they may contain ordinary text. </p><p>Even with artistic text, the file sizes are often not large because the signs are simple (they do not contain much text). </p><p>Old Alberta road signs could sensibly use a stylized font. </p> <ul><li><a href="/wiki/File:Alberta_Highway_1A_(1970s).svg" title="File:Alberta Highway 1A (1970s).svg">File:Alberta Highway 1A (1970s).svg</a></li></ul> <p>The modern road signs are too stylized. </p> <ul><li><a href="/wiki/File:Alberta_Highway_2.svg" title="File:Alberta Highway 2.svg">File:Alberta Highway 2.svg</a></li> <li><a href="/wiki/File:Alberta_Highway_584.svg" title="File:Alberta Highway 584.svg">File:Alberta Highway 584.svg</a> "This SVG sign uses the path text method."</li></ul> <p>See <a href="/wiki/Category:Alberta_Highway_shields" title="Category:Alberta Highway shields">Category:Alberta Highway shields</a> </p><p><a href="/wiki/User:Highway_Route_Marker_Bot" title="User:Highway Route Marker Bot">User:Highway Route Marker Bot</a> </p><p>Fonts are not that important to signs. See <a href="/wiki/File:AB69ewSigns-TwoFontsYMM_(28172571140).jpg" title="File:AB69ewSigns-TwoFontsYMM (28172571140).jpg">File:AB69ewSigns-TwoFontsYMM (28172571140).jpg</a> which shows two road signs using the old Alberta logo but the highway numbers are in different fonts. </p><p>Font height may remain fixed, but the font weight (e.g., bold) or font stretch (e.g., condensed) may vary. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Alberta_Highway_2.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Alberta_Highway_2.svg/90px-Alberta_Highway_2.svg.png" decoding="async" width="90" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Alberta_Highway_2.svg/135px-Alberta_Highway_2.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Alberta_Highway_2.svg/180px-Alberta_Highway_2.svg.png 2x" data-file-width="450" data-file-height="600" /></a></span></div> <div class="gallerytext"></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Alberta_Highway_2A.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Alberta_Highway_2A.svg/90px-Alberta_Highway_2A.svg.png" decoding="async" width="90" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Alberta_Highway_2A.svg/135px-Alberta_Highway_2A.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/01/Alberta_Highway_2A.svg/180px-Alberta_Highway_2A.svg.png 2x" data-file-width="450" data-file-height="600" /></a></span></div> <div class="gallerytext"></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Alberta_Highway_93.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Alberta_Highway_93.svg/90px-Alberta_Highway_93.svg.png" decoding="async" width="90" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Alberta_Highway_93.svg/135px-Alberta_Highway_93.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Alberta_Highway_93.svg/180px-Alberta_Highway_93.svg.png 2x" data-file-width="450" data-file-height="600" /></a></span></div> <div class="gallerytext"></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Alberta_Highway_93A.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Alberta_Highway_93A.svg/90px-Alberta_Highway_93A.svg.png" decoding="async" width="90" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Alberta_Highway_93A.svg/135px-Alberta_Highway_93A.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Alberta_Highway_93A.svg/180px-Alberta_Highway_93A.svg.png 2x" data-file-width="450" data-file-height="600" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p><span style="font-family:sans-serif; font-size:30px; font-weight:bold"><span style="font-weight:900; font-stretch:ultra-expanded;">2</span>, 2A, 93, <span style="font-stretch: condensed">93A</span></span> </p><p><a href="https://en.wikipedia.org/wiki/en:Symbols_of_Alberta" class="extiw" title="w:en:Symbols of Alberta">w:en:Symbols_of_Alberta</a> </p><p><a href="/wiki/File:Alberta_wordmark_2009.svg" title="File:Alberta wordmark 2009.svg">File:Alberta wordmark 2009.svg</a> </p><p><a href="/wiki/File:AB-provincial_highway.svg" title="File:AB-provincial highway.svg">File:AB-provincial highway.svg</a> </p> <div class="mw-heading mw-heading3"><h3 id="Polish_road_signs">Polish road signs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=86" title="Edit section: Polish road signs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&diff=prev&oldid=726272694#Polish_voivodeship_road_signs">https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&diff=prev&oldid=726272694#Polish_voivodeship_road_signs</a></li></ul> <p>About wide variation in <a href="/wiki/Category:Diagrams_of_Voivodeship_road_signs_of_Poland" title="Category:Diagrams of Voivodeship road signs of Poland">Category:Diagrams of Voivodeship road signs of Poland</a>. Height is 270, but widths are all over the map. </p><p>The font is Drogowskaz. See <a href="https://en.wikipedia.org/wiki/Polish_road_signs_typeface" class="extiw" title="en:Polish road signs typeface">en:Polish road signs typeface</a>. </p><p>Arial is a reasonable facsimile: <span style="font-family: Drogowskaz, Arial, sans-serif; font-weight: bold;">0123456789</span>. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8" ?></span> <span class="nt"><svg</span> <span class="w"> </span><span class="na">xmlns:dc=</span><span class="s">"http://purl.org/dc/elements/1.1/"</span> <span class="w"> </span><span class="na">xmlns:cc=</span><span class="s">"http://creativecommons.org/ns#"</span> <span class="w"> </span><span class="na">xmlns:rdf=</span><span class="s">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</span> <span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span> <span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span> <span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 540 270"</span> <span class="w"> </span><span class="na">font-family=</span><span class="s">"Drogowskaz, Arial, sans-serif"</span> <span class="w"> </span><span class="na">font-size=</span><span class="s">"230"</span> <span class="w"> </span><span class="na">font-weight=</span><span class="s">"bold"</span><span class="nt">></span> <span class="w"> </span> <span class="w"> </span><span class="nt"><metadata</span><span class="w"> </span><span class="na">id=</span><span class="s">"metadata15"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><rdf:RDF></span> <span class="w"> </span><span class="nt"><cc:Work</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:format></span>image/svg+xml<span class="nt"></dc:format></span> <span class="w"> </span><span class="nt"><dc:type</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"http://purl.org/dc/dcmitype/StillImage"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></cc:Work></span> <span class="w"> </span><span class="nt"></rdf:RDF></span> <span class="w"> </span><span class="nt"></metadata></span> <span class="w"> </span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">x=</span><span class="s">"6"</span><span class="w"> </span><span class="na">y=</span><span class="s">"6"</span><span class="w"> </span><span class="na">width=</span><span class="s">"528"</span><span class="w"> </span><span class="na">height=</span><span class="s">"258"</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"black"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">"12"</span><span class="w"> </span><span class="na">rx=</span><span class="s">"27"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#fafd4a"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"50%"</span><span class="w"> </span><span class="na">y=</span><span class="s">"220"</span><span class="w"> </span><span class="na">text-anchor=</span><span class="s">"middle"</span><span class="nt">></span>100<span class="nt"></text></span> <span class="nt"></svg></span> </pre></div> <div class="mw-heading mw-heading3"><h3 id="Text_anchors">Text anchors</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=87" title="Edit section: Text anchors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG files should use reasonable anchors. The usual choices are left aligned, center aligned, or right aligned. If I want text aligned on the right edge, I should not insert some left-aligned text and then move the position of the whole string so the right edge ends whene I want it to end. </p><p>Alignment is important because font metrics vary. Text that seems to align correctly with one font may look ragged with another font. </p><p>Choosing the correct text anchor is a simple defense against varying font metrics. </p><p>The leader lines should be placed with precision. The lines should be at the start, the middle, or end of the text. Consider a lengthy English label may translate to a single character. If the leader starts at the third character, it may be misaligned for Chinese. It's not a great example, but compare <a href="https://www.wikidata.org/wiki/Q9618" class="extiw" title="d:Q9618"><span title="glandular organ that plays a role in the digestive and endocrine systems of vertebrates">pancreas <small>(Q9618)</small></span></a> and <a href="https://www.wikidata.org/wiki/Q9618" class="extiw" title="d:Q9618"><span title="glandular organ that plays a role in the digestive and endocrine systems of vertebrates">胰脏<small>(Q9618)</small></span></a>. Also, a leader line should be careful about character clearance. Starting just below the baseline will not work will if the translation has a descending character there. Similarly, starting a leader just above some English text may intersect with the Chinese translation because Chinese uses taller characters. </p><p>Leader line conventions. Use dots to put a finger on a large object. Use arrowheads to point to a boundary. (Flow graphs use arrowheads, but they are not leader lines.) </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Abdomal_organs_body.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Abdomal_organs_body.svg/300px-Abdomal_organs_body.svg.png" decoding="async" width="300" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Abdomal_organs_body.svg/450px-Abdomal_organs_body.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Abdomal_organs_body.svg/600px-Abdomal_organs_body.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Abdomal_organs_body.svg" class="galleryfilename galleryfilename-truncate" title="File:Abdomal organs body.svg">Abdomal organs body.svg</a> </div> </li> </ul> <p>Perhaps show translation boxes? </p> <div class="mw-heading mw-heading3"><h3 id="Text_anchor_alignment">Text anchor alignment</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=88" title="Edit section: Text anchor alignment"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG is unusual. Normally, when text is justified, that justification ignores leading and trailing whitespace. That means the visible characters (the ones that make marks on the canvas) are centered. SVG treats spaces as visible characters. </p> <div style="width:200px; background-color:pink; text-align:left;">Left: Now is the time for all good men to come to the aid of their country.</div> <div style="width:200px; background-color:pink; text-align:center;">Center: Now is the time for all good men to come to the aid of their country.</div> <div style="width:200px; background-color:pink; text-align:right;">Right: Now is the time for all good men to come to the aid of their country.</div> <div style="width:200px; background-color:pink; text-align:justify;">Justify: Now is the time for all good men to come to the aid of their country.</div> <div class="mw-heading mw-heading3"><h3 id="Text_anchors,_direction,_and_BIDI"><span id="Text_anchors.2C_direction.2C_and_BIDI"></span>Text anchors, direction, and BIDI</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=89" title="Edit section: Text anchors, direction, and BIDI"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are subtle problems with SVG text anchors. The SVG semantics do not play well with text direction. If the anchor sets a starting point, then left-to-right text builds to the right, but right-to-left text builds to the left. That can give screwy results. </p><p>The issue is a bit more complex. There is an interaction between the specified text direction and the Unicode BIDI algorithm. They will give reasonable results in simple cases. </p><p>Consider start-aligned text: <code>text-anchor="start"</code>. </p><p>For English, we expect <code>direction="ltr"</code>, so we would expect </p> <pre> |English </pre> <p>For Arabic, we expect <code>direction="rtl"</code>, so we would expect </p> <pre> cibarA| </pre> <p>But if the Arabic is laid out with <code>direction="ltr"</code>, the layout sort of works due to BIDI: </p> <pre> |cibarA </pre> <p>Do nothing, and the layout sort of works. It fails when strings contain both LTR and RTL characters. Consider "English 17 kg". Where we want to keep the "kg" units. The result with <code>direction="ltr"</code> is </p> <pre> |English 17 kg |17 cibarA kg </pre> <p>BIDI starts out in LTR. It sees the Arabic, so it starts a RTL block for "Arabic". The space is neutral, so it is added RTL. The numbers are weak LTR, so they are added to the RTL block as a subblock. The "kg" is strong LTR, so they terminate the blocks and go back to toplevel. </p><p>Here are some <code>span</code> elements in HTML: </p> <ul><li><span>English 17 kg</span></li> <li><span>عربي 17 kg</span></li></ul> <p>To do it correctly, we need to set the direction for the entire phrase and swap the <code>text-anchor</code>. Here is the text setting the direction for the entire span </p> <ul><li><span dir="ltr">English 17 kg</span></li> <li><span dir="rtl">عربي 17 kg</span></li></ul> <p>Ideally, the <code>text</code> element should set the text direction that is appropriate for the script. English text should set the text direction as left-to-right. Arabic text should set the text direction as right-to-left. Unicode BIDI will then layout the strings correctly, but now the layout will head in opposite directions. For expected results, one must change both the text anchor and the text direction. That's a headache. </p><p>In theory, CSS can fix the problem, but SVG agents may have weak CSS implementations. </p><p><a href="https://phabricator.wikimedia.org/T271663" class="extiw" title="phab:T271663">Phab:T271663</a> <cite>Offer to invert text-anchor for RTL languages</cite> </p> <div class="mw-heading mw-heading2"><h2 id="SVG_warts">SVG warts</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=90" title="Edit section: SVG warts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Graphics_state_scope">Graphics state scope</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=91" title="Edit section: Graphics state scope"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG does not nest the graphics scope. The <i>e</i><sup><i>x</i><sup>2</sup></sup> problem. In HTML, this cascaded form works correctly: the exponent 2 is scoped to the <i>x</i> graphics state. In SVG, the exponent 2 is scoped to the <i>e</i> graphics state. </p><p>The superscript and subscript problem. When there is both a subscript and a superscript, we want them on top of each other. </p> <ul><li>HTML and SVG: <sup>12</sup><sub>6</sub>C<sup>+4</sup><sub>2</sub>. <dl><dd>.see <a rel="nofollow" class="external free" href="https://stackoverflow.com/questions/3742975/subscript-and-superscript-for-the-same-element">https://stackoverflow.com/questions/3742975/subscript-and-superscript-for-the-same-element</a> <dl><dd><span style="display:inline-block;"><sup style="position:relative; display:block;">12</sup><sub style="position:relative; display:block; top:0.3em;">6</sub></span>C<span style="display:inline-block;"><sup style="position:relative; display:block;">+4</sup><sub style="position:relative; display:block; top:0.3em;">2</sub></span></dd></dl></dd> <dd>.see <a rel="nofollow" class="external free" href="https://bytes.com/topic/html-css/answers/672245-both-sub-superscript-together">https://bytes.com/topic/html-css/answers/672245-both-sub-superscript-together</a></dd> <dd>try a variation <dl><dd><span style="display:inline-block; text-align: right;"><sup style="position:relative; display:block;">12</sup><sub style="position:relative; display:block; top:0.3em;">6</sub></span>C<span style="display:inline-block;"><sup style="position:relative; display:block;">+4</sup><sub style="position:relative; display:block; top:0.3em;">2</sub></span></dd></dl></dd></dl></li> <li>Using MediaWiki <code><math></code>: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle _{6}^{12}C_{2}^{+4}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msubsup> <mi></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>6</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mn>12</mn> </mrow> </msubsup> <msubsup> <mi>C</mi> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mo>+</mo> <mn>4</mn> </mrow> </msubsup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle _{6}^{12}C_{2}^{+4}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a079e3f6f370aa2514d4bc0132ba7a10303e9a92" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:6.007ex; height:3.343ex;" alt="{\displaystyle _{6}^{12}C_{2}^{+4}}"></span>; also <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {1 \over 2}{6 \choose 3}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>1</mn> <mn>2</mn> </mfrac> </mrow> <mrow class="MJX-TeXAtom-ORD"> <mrow> <mrow class="MJX-TeXAtom-OPEN"> <mo maxsize="2.047em" minsize="2.047em">(</mo> </mrow> <mfrac linethickness="0"> <mn>6</mn> <mn>3</mn> </mfrac> <mrow class="MJX-TeXAtom-CLOSE"> <mo maxsize="2.047em" minsize="2.047em">)</mo> </mrow> </mrow> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {1 \over 2}{6 \choose 3}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/84f92a08c2769f4aeaed2dab80bed8adb5d44aaa" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.505ex; width:6.582ex; height:6.176ex;" alt="{\displaystyle {1 \over 2}{6 \choose 3}}"></span></li> <li>Using MediaWiki <code><chem></code>: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\ce {^{12}_6C^{+4}_2}}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mmultiscripts> <mtext>C</mtext> <mn>2</mn> <mrow> <mo>+</mo> <mn>4</mn> </mrow> <mprescripts /> <mn>6</mn> <mn>12</mn> </mmultiscripts> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle {\ce {^{12}_6C^{+4}_2}}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d31d8ccfbe27987301f7e05c9090f0a9023c23cf" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.005ex; width:5.945ex; height:3.343ex;" alt="{\displaystyle {\ce {^{12}_6C^{+4}_2}}}"></span></li></ul> <div class="mw-heading mw-heading3"><h3 id="SVG_is_not_HTML">SVG is not HTML</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=92" title="Edit section: SVG is not HTML"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG 1.1 uses the <code>xlink:</code> namespace. HTML does not have namespaces, so HTML uses just <code>href</code> rather than <code>xlink:href</code>. For some reason (perhaps embedding SVG within HTML), SVG 2.0 has decided to use <code>href</code>. </p><p>The problem with <code>xml:lang</code> and <code>lang</code>. </p><p>SVG should be about making marks on a screen or a piece of paper. It should not be about myriad other topics. If the semantics are not about marks on paper, then the semantics do not belong in the SVG specification. </p><p>For example, there is a notion that some text might be translated to another language, while other text should not be. People who were interested in XML markup developed the Internationalization Tag Set for making such notations. Consequently, one could add rules and attributes to an XML file that translation utilities could use. The attribute <code>its:translate="no"</code> means do not translate the content, and <code>its:translate="yes"</code> means translate the content. The specification also included rules using XPATH patterns to identify what should or should not be translated. Everything in the <code>its</code> namespace is distinct from other namespaces (and the default namespace). </p><p>HTML does not have namespaces, so the use of ITS is a bit awkward. So HTML added the <code>translate</code> attribute. It is not as powerful as the ITS specification, but it is simple. SVG comes along and copies the HTML <code>translate</code> attribute. There is no reason. SVG can support the <code>its:</code> namespace; it is not crippled like HTML. </p><p>HTML does not have namespaces. Instead of following XML and adopting namespaces (as XHTML did), HTML invented a poor man's namespace. If attributes start with <code>data-</code> or <code>aria-</code>, then they are in a quasi-namespace. SVG is XML, so it need not stoop to such measures. SVG should have used <code>data:</code> and <code>aria:</code> namespaces. </p><p>HTML ignores capitalization. Consequently, <code><Head></code> is the same as <code><HEAD></code>. It is the same for attributes. However, the <code>data-</code> attributes wanted to have database keys that were cases sensitive. So HTML uses a hyphen algorithm. Everything after the <code>data-</code> prefix is in lowercase unless it is immediately preceded by a hyphen. The attribute <code>DATA-NAME="Smith"</code> sets <code>database["name"] = "Smith"</code>. If we wanted the database key to be all capitals, we must say <code>data--N-A-M-E="Smith"</code>. That's due to the case-insensitive nature of HTML. XML and SVG can be much simpler. They could say either <code>data:name="Smith"</code> or <code>data:NAME="Smith"</code>. No need for a pseudo namespace, and no need for a hyphen capitalization rule. </p> <div class="mw-heading mw-heading3"><h3 id="Zoom_and_pan">Zoom and pan</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=93" title="Edit section: Zoom and pan"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Can SVG images be inserted such that the image can be zoomed and panned without affecting the including page? </p><p>Does the use of <code>viewBox</code> frustrate that goal? </p> <div class="mw-heading mw-heading3"><h3 id="Filters_and_the_bounding_box">Filters and the bounding box</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=94" title="Edit section: Filters and the bounding box"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I've had filters work for slanted lines but fail for horizontal and vertical lines. </p><p>When SVG calculates a bounding box, it does so ignoring the stroking. For a horizontal line, that means the bounding box has a nonzero width, but the height is zero. When a <code>filter</code> digests that information, it will make a background bitmap whose height is zero. The filter will do nothing. </p><p>That even true when the <code>stroke-width</code> is enormous. </p><p>Also, markers are apparently considered stroking because they do not add to the bounding box. </p> <div class="mw-heading mw-heading2"><h2 id="MediaWiki_problems">MediaWiki problems</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=95" title="Edit section: MediaWiki problems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_langtag_processing">MediaWiki langtag processing</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=96" title="Edit section: MediaWiki langtag processing"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:SVG_MW_lang_test.svg" class="mw-file-description" title="no |lang="><img alt="no |lang=" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext">no <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=en" class="mw-file-description" title="|lang=en"><img alt="|lang=en" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=en</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=de" class="mw-file-description" title="|lang=de"><img alt="|lang=de" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=de</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=de-ch" class="mw-file-description" title="|lang=de-ch"><img alt="|lang=de-ch" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-ch-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-ch-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-ch-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=de-ch</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=de-de" class="mw-file-description" title="|lang=de-de"><img alt="|lang=de-de" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-de-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-de-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langde-de-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=de-de</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=fr" class="mw-file-description" title="|lang=fr"><img alt="|lang=fr" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=fr</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=fr-ch" class="mw-file-description" title="|lang=fr-ch FAIL: why?"><img alt="|lang=fr-ch FAIL: why?" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-ch-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-ch-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-ch-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=fr-ch</code><br />FAIL: why?</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=tlh" class="mw-file-description" title="|lang=tlh"><img alt="|lang=tlh" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langtlh-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langtlh-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langtlh-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=tlh</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=zh-hans" class="mw-file-description" title="|lang=zh-hans"><img alt="|lang=zh-hans" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hans-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hans-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hans-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=zh-hans</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=zh-hant" class="mw-file-description" title="|lang=zh-hant"><img alt="|lang=zh-hant" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hant-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hant-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-hant-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=zh-hant</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=zh-cn" class="mw-file-description" title="|lang=zh-cn"><img alt="|lang=zh-cn" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-cn-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-cn-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-cn-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=zh-cn</code></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_MW_lang_test.svg&lang=zh-tw" class="mw-file-description" title="|lang=zh-tw"><img alt="|lang=zh-tw" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-tw-120px-SVG_MW_lang_test.svg.png" decoding="async" width="120" height="30" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-tw-180px-SVG_MW_lang_test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langzh-tw-240px-SVG_MW_lang_test.svg.png 2x" data-file-width="512" data-file-height="128" /></a></span></div> <div class="gallerytext"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=zh-tw</code></div> </li> </ul> <p>MW has involved language processing. </p><p>Create an SVG file that has <code>en</code> (English), <code>de-CH</code> (German as spoken in Switzerland), and <code>fr</code> (French) langtags with a default clause. In particular, the SVG file does not support just <code>de</code>. </p><p>Look at MediaWiki's <code>translations</code> for the file (<code>de</code> is included as a prefix match): </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&titles=File:SVG_MW_lang_test.svg&format=json&formatversion=2&prop=imageinfo&iiprop=metadata">https://commons.wikimedia.org/w/api.php?action=query&titles=File:SVG_MW_lang_test.svg&format=json&formatversion=2&prop=imageinfo&iiprop=metadata</a></li></ul> <p>Ask for the SVG to be displayed in <code>de</code>. </p> <ul><li>Under SVG rules, the user preference <code>de</code> is a prefix match of <code>de-CH</code>, so the clause may display.</li></ul> <p>If the user asks for <code>fr-ch</code>, it should not match <code>fr</code> because it is not a prefix match. </p><p>For <code>fr-ch</code>, MediaWiki generates the correct <code>src</code> URL: </p> <ul><li><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-ch-120px-SVG_MW_lang_test.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/5/5a/SVG_MW_lang_test.svg/langfr-ch-120px-SVG_MW_lang_test.svg.png</a></li></ul> <p>The bug is in Thumbor. </p><p>I should run some tests. On zh.Wiki, does changing the script change the requested <code>lang</code>? Also on the sr.Wiki, ...? </p> <div class="mw-heading mw-heading3"><h3 id="librsvg_sRGB_color_issue"><code>librsvg</code> sRGB color issue</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=97" title="Edit section: librsvg sRGB color issue"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Where was this? </p><p>The <code>librsvg</code> renderer produces PNG bitmaps, but those bitmaps may not set the colorspace to sRGB. </p><p>An editor was complaining about sRGB color values not matching, but the methodology was not clear. </p><p>Display devices use a device RGB color space. That color space is often nonlinear. CRT monitors used a gamma of around 2. </p><p>PNG (and other bitmap formats) do not have a defined color space. They are probably just using the device color space, which will vary from device to device. PNG does have a method of saying it is using sRGB values, so it can create consistent colors across all devices. </p><p>SVG uses the sRGB color space. Those colors map to specific CIE colors. So when color matching is important, the operating system will convert sRGB values to the device RGB values that produce the specified color. Those RGB values will be different from the sRGB values. </p><p>RSVG converts SVG to PNG. A solid sRGB SVG color should map to the same sRGB color in the PNG. IIRC, however, RSVG does not set the sRGB flag. </p><p>I can import the converted PNG into an application such as Microsoft Paint. I would expect to see the sRGB values when I use the color picker in the application. </p><p>If I do a screen capture (aka Print Screen) in Windows, then I get a bitmap (BMP) on the clipboard. That bitmap might have the device RGB values rather that sRGB values. A simple implementation would just access the hardware's memory, and those would contain device RGB values. Of course, those values could be back transformed into sRGB. </p><p>Print screen could be clever. It could acquire the window displaying an SVG or a PNG, then send that window a WM_PRINTCLIENT. That may get sRGB values or it may get device RGB. I just do not know. It may depend on whether the application tries to set color matching before painting into the device context. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_whitelisted_namespaces">MediaWiki whitelisted namespaces</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=98" title="Edit section: MediaWiki whitelisted namespaces"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki has a select set of namespaces for SVG. </p><p>The intention of the whitelist is to avoid script injection. For example, the SVG might include an XHTML namespace subtree, and that subtree might allow scripting that is not detected by the ordinary SVG filter. </p><p>It looks like the test requires elements to be in whitelisted namespaces but does not require attribute values to be in whitelisted namespaces. I should check that distinction. Might try </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><svg</span><span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span> <span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span> <span class="w"> </span><span class="na">xmlns:xlink=</span><span class="s">"http://www.w3.org/1999/xlink"</span> <span class="w"> </span><span class="na">xmlns:xsi=</span><span class="s">"http://www.w3.org/2001/XMLSchema-instance"</span> <span class="w"> </span><span class="na">xsi:schemaLocation=</span><span class="s">"http://namespace... http://schemalocation/schema.xsd"</span><span class="nt">></span> </pre></div> <p>See also <a href="/wiki/Help:SVG" title="Help:SVG">Help:SVG</a>. </p> <ul><li><a href="https://phabricator.wikimedia.org/T153285" class="extiw" title="phab:T153285">T153285: Unexpected error "This SVG file contains an illegal namespace" for xmlns:rdfs attribute value</a> (closed).</li> <li><a href="https://phabricator.wikimedia.org/T278044" class="extiw" title="phab:T278044">T278044: This SVG file contains an illegal namespace "http://www.w3.org/2000/02/svg/testsuite/description/".</a> <dl><dd>code: <a class="external free" href="https://phabricator.wikimedia.org/rMW7d923a6b53f7fbcb0cbc3a19797d741bf6f440eb">https://phabricator.wikimedia.org/rMW7d923a6b53f7fbcb0cbc3a19797d741bf6f440eb</a></dd> <dd>code: <a class="external free" href="https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/upload/UploadBase.php">https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/upload/UploadBase.php</a> line 1581</dd></dl></li> <li><a href="https://phabricator.wikimedia.org/T283316" class="extiw" title="phab:T283316">T283316: More whitelisted namespaces for SVG files</a></li></ul> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="1571"></span> <span class="k">static</span> <span class="nv">$validNamespaces</span> <span class="o">=</span> <span class="p">[</span> <span class="linenos" data-line="1572"></span> <span class="s1">''</span><span class="p">,</span> <span class="linenos" data-line="1573"></span> <span class="s1">'adobe:ns:meta/'</span><span class="p">,</span> <span class="linenos" data-line="1574"></span> <span class="s1">'http://creativecommons.org/ns#'</span><span class="p">,</span> <span class="linenos" data-line="1575"></span> <span class="s1">'http://inkscape.sourceforge.net/dtd/sodipodi-0.dtd'</span><span class="p">,</span> <span class="linenos" data-line="1576"></span> <span class="s1">'http://ns.adobe.com/adobeillustrator/10.0/'</span><span class="p">,</span> <span class="linenos" data-line="1577"></span> <span class="s1">'http://ns.adobe.com/adobesvgviewerextensions/3.0/'</span><span class="p">,</span> <span class="linenos" data-line="1578"></span> <span class="s1">'http://ns.adobe.com/extensibility/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1579"></span> <span class="s1">'http://ns.adobe.com/flows/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1580"></span> <span class="s1">'http://ns.adobe.com/illustrator/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1581"></span> <span class="s1">'http://ns.adobe.com/imagereplacement/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1582"></span> <span class="s1">'http://ns.adobe.com/pdf/1.3/'</span><span class="p">,</span> <span class="linenos" data-line="1583"></span> <span class="s1">'http://ns.adobe.com/photoshop/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1584"></span> <span class="s1">'http://ns.adobe.com/saveforweb/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1585"></span> <span class="s1">'http://ns.adobe.com/variables/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1586"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/'</span><span class="p">,</span> <span class="linenos" data-line="1587"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/g/'</span><span class="p">,</span> <span class="linenos" data-line="1588"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/g/img/'</span><span class="p">,</span> <span class="linenos" data-line="1589"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/mm/'</span><span class="p">,</span> <span class="linenos" data-line="1590"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/rights/'</span><span class="p">,</span> <span class="linenos" data-line="1591"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/stype/dimensions#'</span><span class="p">,</span> <span class="linenos" data-line="1592"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/stype/font#'</span><span class="p">,</span> <span class="linenos" data-line="1593"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/stype/manifestitem#'</span><span class="p">,</span> <span class="linenos" data-line="1594"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/stype/resourceevent#'</span><span class="p">,</span> <span class="linenos" data-line="1595"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/stype/resourceref#'</span><span class="p">,</span> <span class="linenos" data-line="1596"></span> <span class="s1">'http://ns.adobe.com/xap/1.0/t/pg/'</span><span class="p">,</span> <span class="linenos" data-line="1597"></span> <span class="s1">'http://purl.org/dc/elements/1.1/'</span><span class="p">,</span> <span class="linenos" data-line="1598"></span> <span class="s1">'http://purl.org/dc/elements/1.1'</span><span class="p">,</span> <span class="linenos" data-line="1599"></span> <span class="s1">'http://schemas.microsoft.com/visio/2003/svgextensions/'</span><span class="p">,</span> <span class="linenos" data-line="1600"></span> <span class="s1">'http://sodipodi.sourceforge.net/dtd/sodipodi-0.dtd'</span><span class="p">,</span> <span class="linenos" data-line="1601"></span> <span class="s1">'http://taptrix.com/inkpad/svg_extensions'</span><span class="p">,</span> <span class="linenos" data-line="1602"></span> <span class="s1">'http://web.resource.org/cc/'</span><span class="p">,</span> <span class="linenos" data-line="1603"></span> <span class="s1">'http://www.freesoftware.fsf.org/bkchem/cdml'</span><span class="p">,</span> <span class="linenos" data-line="1604"></span> <span class="s1">'http://www.inkscape.org/namespaces/inkscape'</span><span class="p">,</span> <span class="linenos" data-line="1605"></span> <span class="s1">'http://www.opengis.net/gml'</span><span class="p">,</span> <span class="linenos" data-line="1606"></span> <span class="s1">'http://www.w3.org/1999/02/22-rdf-syntax-ns#'</span><span class="p">,</span> <span class="linenos" data-line="1607"></span> <span class="s1">'http://www.w3.org/2000/svg'</span><span class="p">,</span> <span class="linenos" data-line="1608"></span> <span class="s1">'http://www.w3.org/tr/rec-rdf-syntax/'</span><span class="p">,</span> <span class="linenos" data-line="1609"></span> <span class="s1">'http://www.w3.org/2000/01/rdf-schema#'</span><span class="p">,</span> <span class="linenos" data-line="1610"></span> <span class="p">];</span> </pre></div> <p>Line 1598 is not the legal namespace name; line 1597 is the legal name. </p><p>Namespaces to add: </p> <ul><li><code>'<a rel="nofollow" class="external free" href="http://www.w3.org/2000/02/svg/testsuite/description/'">http://www.w3.org/2000/02/svg/testsuite/description/'</a></code> for W3C test suites</li> <li><code>'<a rel="nofollow" class="external free" href="http://purl.org/dc/terms/'">http://purl.org/dc/terms/'</a></code> more recent Dublin Core</li> <li><code>'<a rel="nofollow" class="external free" href="http://www.w3.org/1998/Math/MathML'">http://www.w3.org/1998/Math/MathML'</a></code> MathML</li> <li><code>'<a rel="nofollow" class="external free" href="http://www.opengis.net/gml/3.2'">http://www.opengis.net/gml/3.2'</a></code> new version of GML</li> <li><code>'<a rel="nofollow" class="external free" href="http://www.w3.org/2005/11/its'">http://www.w3.org/2005/11/its'</a></code> <a href="https://en.wikipedia.org/wiki/Internationalization_Tag_Set" class="extiw" title="w:Internationalization Tag Set">w:Internationalization Tag Set</a></li> <li>Library of Congress vocabulary <ul><li><code>xmlns:marcrel="<a rel="nofollow" class="external free" href="http://www.loc.gov/loc.terms/relators/">http://www.loc.gov/loc.terms/relators/</a>"</code></li> <li><a rel="nofollow" class="external free" href="https://www.dublincore.org/specifications/dublin-core/relators/">https://www.dublincore.org/specifications/dublin-core/relators/</a></li></ul></li> <li>LOC MADS <ul><li><code>'<a rel="nofollow" class="external free" href="http://www.loc.gov/mads/rdf/v1#'">http://www.loc.gov/mads/rdf/v1#'</a></code> MADS</li> <li><code>'<a rel="nofollow" class="external free" href="http://www.w3.org/2002/07/owl#'">http://www.w3.org/2002/07/owl#'</a></code> OWL</li> <li><code>'<a rel="nofollow" class="external free" href="http://www.w3.org/2004/02/skos/core#'">http://www.w3.org/2004/02/skos/core#'</a></code> SKOS</li> <li><code>'<a rel="nofollow" class="external free" href="http://xmlns.com/foaf/0.1/'">http://xmlns.com/foaf/0.1/'</a></code> FOAF</li></ul></li> <li>LOC MODS <ul><li><code><a rel="nofollow" class="external free" href="http://www.loc.gov/mods/rdf/v1#'">http://www.loc.gov/mods/rdf/v1#'</a></code> MODS</li></ul></li> <li><code>'<a rel="nofollow" class="external free" href="http://www.ogc.org/crs'">http://www.ogc.org/crs'</a></code> maybe...</li></ul> <p>One of the whitelisted namespaces is suspect: </p> <ul><li><code>'<a rel="nofollow" class="external free" href="http://purl.org/dc/elements/1.1'">http://purl.org/dc/elements/1.1'</a></code></li></ul> <p>Might check if there are any SVG files that use this namespace. </p><p>Some absent namespaces are significant. When <a href="https://en.wikipedia.org/wiki/Dublin_Core" class="extiw" title="w:Dublin Core">Dublin Core</a> came out in 2000, it provided a succinct set of terms in the <code>dc/elements/1.1/</code> namespace. The next year, it came out with an expanded <code>dc/terms/</code> namespace and vocabulary. In 2008, it encouraged dropping the first namespace in favor of the <code>dc/terms/</code> namespace. WMF accepts the former but not the latter namespace. </p> <div class="mw-heading mw-heading4"><h4 id="MathML_namespace">MathML namespace</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=99" title="Edit section: MathML namespace"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The MathML namespace is also not whitelisted. MathML allows sophisticated mathematical typesetting, but WMF blocks its upload. Users cannot upload this file: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="utf-8"?></span> <span class="nt"><svg</span><span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 300 200"</span> <span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span> <span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span> <span class="w"> </span><span class="na">xmlns:xlink=</span><span class="s">"http://www.w3.org/1999/xlink"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>SVG<span class="w"> </span>MathML<span class="w"> </span>test<span class="nt"></title></span> <span class="w"> </span><span class="nt"><desc></span>Test<span class="w"> </span>if<span class="w"> </span>MathML<span class="w"> </span>is<span class="w"> </span>available<span class="w"> </span>in<span class="w"> </span>SVG.<span class="w"> </span>Will<span class="w"> </span>not<span class="w"> </span>upload<span class="w"> </span>to<span class="w"> </span>Commons<span class="w"> </span>due<span class="w"> </span>to<span class="w"> </span>MathML<span class="w"> </span>namespace.<span class="nt"></desc></span> <span class="w"> </span><span class="nt"><metadata></span> <span class="w"> </span><span class="nt"><rdf:RDF</span><span class="w"> </span><span class="na">xmlns:rdf=</span><span class="s">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</span> <span class="w"> </span><span class="na">xmlns:dc=</span><span class="s">"http://purl.org/dc/terms/"</span> <span class="w"> </span><span class="na">xmlns:cc=</span><span class="s">"http://creativecommons.org/ns#"</span><span class="w"> </span><span class="nt">></span> <span class="w"> </span><span class="nt"><cc:Work</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:publisher></span>Wikimedia<span class="w"> </span>Commons<span class="nt"></dc:publisher></span> <span class="w"> </span><span class="nt"><cc:license</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://creativecommons.org/publicdomain/zero/1.0/"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><cc:attributionName</span><span class="w"> </span><span class="na">rdf:resouce=</span><span class="s">"http://commons.wikimedia.org/wiki/User:Glrx"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><cc:attributionURL</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"http://commons.wikimedia.org/wiki/File:SVG_MathML_test.svg"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></cc:Work></span> <span class="w"> </span><span class="nt"></rdf:RDF></span> <span class="w"> </span><span class="nt"></metadata></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"150"</span><span class="w"> </span><span class="na">y=</span><span class="s">"40"</span><span class="w"> </span><span class="na">text-anchor=</span><span class="s">"middle"</span><span class="nt">></span>SVG<span class="w"> </span>MathML<span class="w"> </span>test<span class="nt"></text></span> <span class="w"> </span><span class="nt"><switch</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(50,100)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><foreignObject</span><span class="w"> </span><span class="na">width=</span><span class="s">"200"</span><span class="w"> </span><span class="na">height=</span><span class="s">"50"</span> <span class="w"> </span><span class="na">requiredExtensions=</span><span class="s">"http://www.w3.org/1998/Math/MathML"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><math</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/1998/Math/MathML"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><msqrt></span> <span class="w"> </span><span class="nt"><msup><mi></span>x<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> <span class="w"> </span><span class="nt"><mo></span>+<span class="nt"></mo></span> <span class="w"> </span><span class="nt"><msup><mi></span>y<span class="nt"></mi><mn></span>2<span class="nt"></mn></msup></span> <span class="w"> </span><span class="nt"></msqrt></span> <span class="w"> </span><span class="nt"></math></span> <span class="w"> </span><span class="nt"></foreignObject></span> <span class="w"> </span><span class="nt"><text></span>\sqrt{x^2<span class="w"> </span>+<span class="w"> </span>y^2}<span class="nt"></text></span> <span class="w"> </span><span class="nt"></switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"10"</span><span class="w"> </span><span class="na">y=</span><span class="s">"175"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"8"</span><span class="nt">></span>should<span class="w"> </span>display<span class="w"> </span>a<span class="w"> </span>formula<span class="w"> </span>in<span class="w"> </span>either<span class="w"> </span>MathML<span class="w"> </span>or<span class="w"> </span>TeX<span class="nt"></text></span> <span class="nt"></svg></span> </pre></div></dd></dl> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_SVG_regression_problems">MediaWiki SVG regression problems</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=100" title="Edit section: MediaWiki SVG regression problems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In April 2024, WMF upgraded to the Rust version of <code>librsvg</code> but simultaneously downgraded the renderer because the C version had recent patches but the Rust version was several years old. That caused the re-emergence of problems that had previously been fixed. WMF should have upgraded to a recent Rust version. </p> <ol><li>Re-emergence of the text chunk problem: middle- and end-aligned text with multiple nodes did not work again.</li></ol> <p>More recently, additional issues are being discovered. The old versions of <code>librsvg</code> would display non-conforming SVG files. The new versions now balk. The problems we are seeing: </p> <ol><li>Some SVG files have <code>clipPath</code> elements with illegal content. Inkscape, a common tool, adds illegal <code>g</code> elements to <code>clipPath</code>, but that practice has always been non-conforming. <ul><li>Easily detected with validator.</li></ul></li> <li>Some SVG files do not provide <code>width</code> (defaults to 100%), <code>height</code> (defaults to 100%), or <code>viewBox</code>. These files no longer display. <ul><li>The absence of this information means the renderer has no <i>a priori</i> idea how big the image is (after processing, it will know the bounding box). Is this information required by the specification?</li></ul></li> <li>Undefined namespaces did not err in earlier versions. For example, several files on Commons used the <code>sodipodi</code> namespace without defining it. Those files displayed in the old <code>librsvg</code>, but they do not display in the new <code>librsvg</code> or modern browsers. The fix is to define the namespace or delete the elements/attributes. <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&diff=prev&oldid=895684697#SVG_rendering_issue_(C%C3%B4te_d'Ivoire_location_map.svg)">https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&diff=prev&oldid=895684697#SVG_rendering_issue_(C%C3%B4te_d'Ivoire_location_map.svg)</a></li> <li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&diff=prev&oldid=961785974#Flag_of_Ulyanovsk_Oblast_(2004).svg">https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Technical&diff=prev&oldid=961785974#Flag_of_Ulyanovsk_Oblast_(2004).svg</a></li> <li>XML spec</li> <li>Detection with JavaScript may require an explicit XML parse.</li></ul></li> <li>Some SVG files have broken namespace definitions. Adobe Illustrator uses XML DTD subset entities to indirectly define its namespaces. For example, <code>xmlns:ai="@ns_ai"</code>. If that file is then processed by another graphics editor that ignores subset entities, the result might be <code>xmlns:ai="&#40;ns_ai"</code>. For a time, WMF would accept uploads with such a namespace, but no longer. Consequently, if an editor downloads the file and makes a trivial edit, she cannot upload the file because the munged namespace is not on the whitelist. <ul><li>the syntax is OK, but the target namespace is wrong</li> <li>these would fail the whitelist check</li></ul></li> <li>The previous renderer would display files with <code>viewBox=""</code>, but the current one does not. The attribute should be 4 numbers. <ul><li>Validators would not check the syntax.</li></ul></li></ol> <div class="mw-heading mw-heading2"><h2 id="General_issues">General issues</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=101" title="Edit section: General issues"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_test_symbol.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/SVG_test_symbol.svg/220px-SVG_test_symbol.svg.png" decoding="async" width="220" height="88" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/SVG_test_symbol.svg/330px-SVG_test_symbol.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/23/SVG_test_symbol.svg/440px-SVG_test_symbol.svg.png 2x" data-file-width="512" data-file-height="205" /></a><figcaption>librsvg does not turn off its clip region.</figcaption></figure> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=User_talk%3ASarang&type=revision&diff=611702254&oldid=611488584">https://commons.wikimedia.org/w/index.php?title=User_talk%3ASarang&type=revision&diff=611702254&oldid=611488584</a> at § Calvin-cycle4.svg <dl><dd>about <a href="/wiki/File:Calvin-cycle4.svg" title="File:Calvin-cycle4.svg">File:Calvin-cycle4.svg</a> and other topics.</dd></dl></li> <li>WMF <code>librsvg</code> does not support <code>style="overflow:visible"</code>. Symbols always have a clipping region.</li></ul> <div style="clear:both;"></div> <div class="mw-heading mw-heading2"><h2 id="Converting_bitmaps_to_SVG">Converting bitmaps to SVG</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=102" title="Edit section: Converting bitmaps to SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Silversmith.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Silversmith.jpg/220px-Silversmith.jpg" decoding="async" width="220" height="295" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Silversmith.jpg/330px-Silversmith.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Silversmith.jpg/440px-Silversmith.jpg 2x" data-file-width="610" data-file-height="818" /></a><figcaption>Photographs are usually poor choices for vectorization. (25 kB)</figcaption></figure> <p>Many files on Commons are bitmaps, but some would be more useful as SVG files. Bitmap files are great with large, orthogonal, features, but they can struggle with thin features and curves. Zooming in on a feature will show more anti-aliasing fuzz or jagged edges. More details require more bits. Bitmap files can be difficult to edit. Changing lines or text involves not only adding the new content, but also erasing the old. Erasures can be difficult because the background must be reconstructed. It is difficult to copy text that is in a bitmap: the text is just a picture that must be converted to characters. It takes a lot of work to translate a bitmap to another language. Bitmap files that are good candidates for vectorization can be marked with <a href="/wiki/Template:Convert_to_SVG" title="Template:Convert to SVG"><span style="font-family:monospace,monospace;">{{Convert to SVG}}</span></a>. </p> <div class="mw-heading mw-heading3"><h3 id="Value">Value</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=103" title="Edit section: Value"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An issue in any undertaking is its cost-benefit. it will take time and effort to improve or convert a file. Is that cost worth it? If an image is widely used, then the cost can be amortized over many views. If the image is little used, then the benefit may be just an intellectual challenge. </p> <div class="mw-heading mw-heading3"><h3 id="Quick_examples">Quick examples</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=104" title="Edit section: Quick examples"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2.png" class="mw-file-description" title="PNG should be SVG (80 kB)"><img alt="PNG should be SVG (80 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Hepatitis_B_virus_v2.png/439px-Hepatitis_B_virus_v2.png" decoding="async" width="439" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Hepatitis_B_virus_v2.png/658px-Hepatitis_B_virus_v2.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/2/2c/Hepatitis_B_virus_v2.png 2x" data-file-width="843" data-file-height="577" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2.png" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2.png">Hepatitis B virus v2.png</a> PNG should be SVG (80 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2.svg" class="mw-file-description" title="SVG (11 kB but issue with DNA needs resolution)"><img alt="SVG (11 kB but issue with DNA needs resolution)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/439px-Hepatitis_B_virus_v2.svg.png" decoding="async" width="439" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/659px-Hepatitis_B_virus_v2.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/878px-Hepatitis_B_virus_v2.svg.png 2x" data-file-width="512" data-file-height="350" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2.svg" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2.svg">Hepatitis B virus v2.svg</a> SVG (11 kB but issue with DNA needs resolution)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Cross-section_of_a_subduction_zone_and_back-arc_basin.jpg" class="mw-file-description" title="JPEG should be SVG (107 kB)"><img alt="JPEG should be SVG (107 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Cross-section_of_a_subduction_zone_and_back-arc_basin.jpg/483px-Cross-section_of_a_subduction_zone_and_back-arc_basin.jpg" decoding="async" width="483" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/e/ea/Cross-section_of_a_subduction_zone_and_back-arc_basin.jpg 1.5x" data-file-width="499" data-file-height="310" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Cross-section_of_a_subduction_zone_and_back-arc_basin.jpg" class="galleryfilename galleryfilename-truncate" title="File:Cross-section of a subduction zone and back-arc basin.jpg">Cross-section of a subduction zone and back-arc basin.jpg</a> JPEG should be SVG (107 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:SlapperDiag.png" class="mw-file-description" title="PNG should be SVG (29 kB)"><img alt="PNG should be SVG (29 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/SlapperDiag.png/500px-SlapperDiag.png" decoding="async" width="500" height="143" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/SlapperDiag.png/750px-SlapperDiag.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/e/eb/SlapperDiag.png 2x" data-file-width="891" data-file-height="254" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:SlapperDiag.png" class="galleryfilename galleryfilename-truncate" title="File:SlapperDiag.png">SlapperDiag.png</a> PNG should be SVG (29 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:SlapperDetArea.png" class="mw-file-description" title="PNG should be SVG (56 kB)"><img alt="PNG should be SVG (56 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/SlapperDetArea.png/278px-SlapperDetArea.png" decoding="async" width="278" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/SlapperDetArea.png/416px-SlapperDetArea.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/SlapperDetArea.png/555px-SlapperDetArea.png 2x" data-file-width="1101" data-file-height="1190" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:SlapperDetArea.png" class="galleryfilename galleryfilename-truncate" title="File:SlapperDetArea.png">SlapperDetArea.png</a> PNG should be SVG (56 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Continental_shelf.png" class="mw-file-description" title="PNG should be SVG (7 kB + many translations)"><img alt="PNG should be SVG (7 kB + many translations)" src="https://upload.wikimedia.org/wikipedia/commons/3/32/Continental_shelf.png" decoding="async" width="500" height="197" class="mw-file-element" data-file-width="456" data-file-height="180" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Continental_shelf.png" class="galleryfilename galleryfilename-truncate" title="File:Continental shelf.png">Continental shelf.png</a> PNG should be SVG (7 kB + many translations)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Continental_shelf.svg" class="mw-file-description" title="SVG - multilingual (6 kB)"><img alt="SVG - multilingual (6 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Continental_shelf.svg/500px-Continental_shelf.svg.png" decoding="async" width="500" height="197" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Continental_shelf.svg/750px-Continental_shelf.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Continental_shelf.svg/1000px-Continental_shelf.svg.png 2x" data-file-width="512" data-file-height="202" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Continental_shelf.svg" class="galleryfilename galleryfilename-truncate" title="File:Continental shelf.svg">Continental shelf.svg</a> SVG - multilingual (6 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Horse_hoof_wild_bare_sagittal.jpg" class="mw-file-description" title="JPG should be SVG (43 kB)"><img alt="JPG should be SVG (43 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Horse_hoof_wild_bare_sagittal.jpg/367px-Horse_hoof_wild_bare_sagittal.jpg" decoding="async" width="367" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Horse_hoof_wild_bare_sagittal.jpg/551px-Horse_hoof_wild_bare_sagittal.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/3/3e/Horse_hoof_wild_bare_sagittal.jpg 2x" data-file-width="564" data-file-height="461" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Horse_hoof_wild_bare_sagittal.jpg" class="galleryfilename galleryfilename-truncate" title="File:Horse hoof wild bare sagittal.jpg">Horse hoof wild bare sagittal.jpg</a> JPG should be SVG (43 kB)</div> </li> </ul> <div class="mw-heading mw-heading3"><h3 id="Quality">Quality</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=105" title="Edit section: Quality"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 343px;"><span typeof="mw:File"><a href="/wiki/File:Spektr_module_drawing.png" class="mw-file-description" title="PNG 1,384 × 888 (55 kB)"><img alt="PNG 1,384 × 888 (55 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Spektr_module_drawing.png/488px-Spektr_module_drawing.png" decoding="async" width="488" height="313" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Spektr_module_drawing.png/733px-Spektr_module_drawing.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e2/Spektr_module_drawing.png/976px-Spektr_module_drawing.png 2x" data-file-width="1384" data-file-height="888" /></a></span></div> <div class="gallerytext">PNG 1,384 × 888 (55 kB)</div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 343px;"><span typeof="mw:File"><a href="/wiki/File:Spektr_module_drawing.svg" class="mw-file-description" title="SVG 1,001 × 627 (66 kB). A single path."><img alt="SVG 1,001 × 627 (66 kB). A single path." src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Spektr_module_drawing.svg/500px-Spektr_module_drawing.svg.png" decoding="async" width="500" height="313" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Spektr_module_drawing.svg/750px-Spektr_module_drawing.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Spektr_module_drawing.svg/1000px-Spektr_module_drawing.svg.png 2x" data-file-width="1001" data-file-height="627" /></a></span></div> <div class="gallerytext">SVG 1,001 × 627 (66 kB). A single path.</div> </li> </ul> <p>Competent vector conversion, but consider issues. Filleting at sharp corners. Loss of detail (e.g., tail cone, antennas). Finite solar panel thickness becomes fat edge. </p><p>Groups can be exploited here. The solar array panels. </p><p>The image is probably not what you expect. Automated tracing is typically done using contours within contours and a fill rule (a single path result). What we perceive as lines are really the space between inner and outer contours. </p><p>Should be a CAD drawing rather than SVG. </p><p>There was another bitmap conversion where the grid was drawn as line segments, but the line segments were not colinear. </p><p>Here is another bitmap conversion. Tracing with some graphic editing. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:LB_trough.jpg" class="mw-file-description" title="JPEG (20 kB)"><img alt="JPEG (20 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/LB_trough.jpg/120px-LB_trough.jpg" decoding="async" width="120" height="75" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/LB_trough.jpg/180px-LB_trough.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/LB_trough.jpg/240px-LB_trough.jpg 2x" data-file-width="555" data-file-height="345" /></a></span></div> <div class="gallerytext">JPEG (20 kB)</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:LB_trough.svg" class="mw-file-description" title="SVG (181 kB) traced"><img alt="SVG (181 kB) traced" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/LB_trough.svg/120px-LB_trough.svg.png" decoding="async" width="120" height="85" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/LB_trough.svg/180px-LB_trough.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/LB_trough.svg/240px-LB_trough.svg.png 2x" data-file-width="1052" data-file-height="744" /></a></span></div> <div class="gallerytext">SVG (181 kB) traced</div> </li> </ul> <p>What happened here? No path text. </p> <div class="mw-heading mw-heading3"><h3 id="Conversions">Conversions</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=106" title="Edit section: Conversions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Unfortunately, converting a bitmap file to a vector file may not be an easy task. It also may not be desired. </p><p>Technical bitmaps such as a QR code should remain bitmaps. (Do not convert QR code PNG files to JPEG bitmaps.) </p><p>Converting a photograph or other continuous-tone image to SVG is usually inappropriate. See <a href="https://en.wikipedia.org/wiki/Image_tracing" class="extiw" title="w:Image tracing">w:Image tracing</a>. Good candidates for conversion need to have significant structure. Some continuous-tone images have structured color gradients, so they can be vectorized. </p><p>Images with a lot of random details may be inappropriate. it does not take much information to describe a long straight line, but it does take a lot of information to describe 10,000 individual objects. There are times that randomness can be described by a pseudorandom process. (For example, MPEG replaces fricative sounds with a noise generator.) </p><p>Here is a progression of changes to a subject image. The details and appearance of an image can be improved and still be an efficient representation of the object. The last image has the detail of the gun powder grains without individually drawing each grain. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Bullet.svg" class="mw-file-description" title="(SVG) March 2006 179 × 437 (9 KB). Powder suggested with precisely placed dots."><img alt="(SVG) March 2006 179 × 437 (9 KB). Powder suggested with precisely placed dots." src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Bullet.svg/120px-Bullet.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Bullet.svg/180px-Bullet.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/Bullet.svg/240px-Bullet.svg.png 2x" data-file-width="456" data-file-height="456" /></a></span></div> <div class="gallerytext"> (SVG) March 2006<br />179 × 437 (9 KB).<br />Powder suggested with precisely placed dots.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Bulletfixed.PNG" class="mw-file-description" title="(PNG) July 2010 332 × 462 (13 KB). Primer pocket added."><img alt="(PNG) July 2010 332 × 462 (13 KB). Primer pocket added." src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Bulletfixed.PNG/86px-Bulletfixed.PNG" decoding="async" width="86" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Bulletfixed.PNG/129px-Bulletfixed.PNG 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Bulletfixed.PNG/172px-Bulletfixed.PNG 2x" data-file-width="332" data-file-height="462" /></a></span></div> <div class="gallerytext">(PNG) July 2010<br />332 × 462 (13 KB).<br />Primer pocket added.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Cartouche_Boxer.jpg" class="mw-file-description" title="(JPEG) July 2012 792 × 648 (64 KB). Bitmap file showing the case not completely filled, cross section errors fixed, and powder represented with image."><img alt="(JPEG) July 2012 792 × 648 (64 KB). Bitmap file showing the case not completely filled, cross section errors fixed, and powder represented with image." src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Cartouche_Boxer.jpg/120px-Cartouche_Boxer.jpg" decoding="async" width="120" height="98" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Cartouche_Boxer.jpg/180px-Cartouche_Boxer.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/Cartouche_Boxer.jpg/240px-Cartouche_Boxer.jpg 2x" data-file-width="792" data-file-height="648" /></a></span></div> <div class="gallerytext"> (JPEG) July 2012<br />792 × 648 (64 KB).<br />Bitmap file showing the case not completely filled, cross section errors fixed, and powder represented with image.</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Cartridge_cross_section.svg" class="mw-file-description" title="(SVG) May 2021 512 × 512 (9 KB). Coloring with gradients, case not completely filled, and powder represented with a random process."><img alt="(SVG) May 2021 512 × 512 (9 KB). Coloring with gradients, case not completely filled, and powder represented with a random process." src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Cartridge_cross_section.svg/120px-Cartridge_cross_section.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Cartridge_cross_section.svg/180px-Cartridge_cross_section.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Cartridge_cross_section.svg/240px-Cartridge_cross_section.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">(SVG) May 2021<br />512 × 512 (9 KB).<br />Coloring with gradients, case not completely filled, and powder represented with a random process.</div> </li> </ul> <p>Many technical images can be good candidates for conversion to SVG. See, for example, <a href="/wiki/Category:Cross_sections_of_valves" title="Category:Cross sections of valves">Category:Cross sections of valves</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Issues">Issues</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=107" title="Edit section: Issues"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This section is confused. It should start with straightforward conversions such as diagrams that are easy to redraw. </p><p>Next, it can address stepped conversions. A stepped conversion is where a bitmap is still present in the SVG, but parts of the bitmap are replaced with SVG elements. Eventually, the SVG elements may eliminate the bitmap. A "stepped conversion" may include SVG files that will always contain a bitmap image. For example, the bitmap may be a photograph, but SVG may use text elements to label the photograph. </p><p>From there, it can address the random process methods. The section should not lead with the most difficult conversions. It can also serve as a counterpoint to not converting the Mona Lisa to SVG. </p> <div class="mw-heading mw-heading4"><h4 id="Alternatives_to_bitmap_conversions">Alternatives to bitmap conversions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=108" title="Edit section: Alternatives to bitmap conversions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Instead of converting a bitmap, there may be a better way to achieve the end result. </p><p>Instead of converting, redraw the image from scratch using a tool. Chemical diagrams. See <a href="/wiki/Category:Crystal_structures_of_copper(II)_sulfate_pentahydrate" title="Category:Crystal structures of copper(II) sulfate pentahydrate">Category:Crystal structures of copper(II) sulfate pentahydrate</a>. Also, there may be a better format for some drawings. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Copper(II)-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png" class="mw-file-description" title="PNG (754 kB)"><img alt="PNG (754 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png/400px-Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png" decoding="async" width="400" height="221" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png/600px-Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png/800px-Copper%28II%29-sulfate-pentahydrate-xtal-1985-Cu-coord-3D-bs-17.png 2x" data-file-width="3000" data-file-height="1660" /></a></span></div> <div class="gallerytext">PNG (754 kB)</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:CuSO4_(5aq).jpg" class="mw-file-description" title="JPEG (24 kB) (poor angle on SO4)"><img alt="JPEG (24 kB) (poor angle on SO4)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/CuSO4_%285aq%29.jpg/316px-CuSO4_%285aq%29.jpg" decoding="async" width="316" height="400" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/b/b1/CuSO4_%285aq%29.jpg 1.5x" data-file-width="440" data-file-height="557" /></a></span></div> <div class="gallerytext">JPEG (24 kB) (poor angle on SO<sub>4</sub>)</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Straightforward_conversions">Straightforward conversions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=109" title="Edit section: Straightforward conversions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:FiringGeometry.png" class="mw-file-description" title="50 kB"><img alt="50 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/FiringGeometry.png/346px-FiringGeometry.png" decoding="async" width="346" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/FiringGeometry.png/519px-FiringGeometry.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/FiringGeometry.png/692px-FiringGeometry.png 2x" data-file-width="792" data-file-height="504" /></a></span></div> <div class="gallerytext">50 kB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Cn3nucleus.png" class="mw-file-description" title="12 kB"><img alt="12 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/Cn3nucleus.png/310px-Cn3nucleus.png" decoding="async" width="310" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/d/da/Cn3nucleus.png 1.5x" data-file-width="359" data-file-height="255" /></a></span></div> <div class="gallerytext">12 kB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Alveoli_diagram.png" class="mw-file-description" title="23 kB"><img alt="23 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Alveoli_diagram.png/263px-Alveoli_diagram.png" decoding="async" width="263" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Alveoli_diagram.png/394px-Alveoli_diagram.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Alveoli_diagram.png/525px-Alveoli_diagram.png 2x" data-file-width="569" data-file-height="477" /></a></span></div> <div class="gallerytext">23 kB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Wien_Bridge_Oscillator.png" class="mw-file-description" title="518 kB"><img alt="518 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Wien_Bridge_Oscillator.png/261px-Wien_Bridge_Oscillator.png" decoding="async" width="261" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Wien_Bridge_Oscillator.png/391px-Wien_Bridge_Oscillator.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Wien_Bridge_Oscillator.png/522px-Wien_Bridge_Oscillator.png 2x" data-file-width="4801" data-file-height="4051" /></a></span></div> <div class="gallerytext">518 kB</div> </li> </ul> <p>Here is an example of a PNG file that has been converted to SVG. </p><p>The files are not widely used, but the SVG format makes it easier to fix some minor issues with the original file. For example, the variable such as V<sub>Torpedo</sub> can be edited to use the more common italic-variable convention of <span style="font-style:italic;">V</span><sub>Torpedo</sub>. The arrows for the torpedo and target velocities look like velocity vectors, but they do not make sense as velocity vectors. The diagram suggests that by the time the torpedo reaches the target's track, the target has already gone by that point. </p><p>The SVG also brings up an issue with SVG <code>marker</code> elements. In the past, I have created a new marker for each fill. There is a technical issue about inheritance of attributes such as <code>stroke</code> and <code>fill</code>. A <code>use</code> instance will not inherit from its environment because it is not part of the DOM tree. In some cases, an instance will use attributes that are set on the <code>use</code> element because they are part of the (inaccessible) tree. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Intercept.png" class="mw-file-description" title="57 kB PNG 2006-07-20 en:User:Ziggle"><img alt="57 kB PNG 2006-07-20 en:User:Ziggle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Intercept.png/284px-Intercept.png" decoding="async" width="284" height="320" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Intercept.png/426px-Intercept.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Intercept.png/568px-Intercept.png 2x" data-file-width="600" data-file-height="676" /></a></span></div> <div class="gallerytext">57 kB PNG 2006-07-20 <a href="https://en.wikipedia.org/wiki/User:Ziggle" class="extiw" title="en:User:Ziggle">en:User:Ziggle</a></div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Intercept.svg" class="mw-file-description" title="29 kB SVG 2010-09-04 Snubcube"><img alt="29 kB SVG 2010-09-04 Snubcube" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Intercept.svg/283px-Intercept.svg.png" decoding="async" width="283" height="320" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Intercept.svg/425px-Intercept.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f8/Intercept.svg/566px-Intercept.svg.png 2x" data-file-width="599" data-file-height="677" /></a></span></div> <div class="gallerytext">29 kB SVG 2010-09-04 <a href="/w/index.php?title=User:Snubcube&action=edit&redlink=1" class="new" title="User:Snubcube (page does not exist)">Snubcube</a></div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Partial_conversion">Partial conversion</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=110" title="Edit section: Partial conversion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Illu_nose_nasal_cavities.jpg" class="mw-file-description" title="image with simple text"><img alt="image with simple text" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/34/Illu_nose_nasal_cavities.jpg/382px-Illu_nose_nasal_cavities.jpg" decoding="async" width="382" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/3/34/Illu_nose_nasal_cavities.jpg 1.5x" data-file-width="520" data-file-height="300" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Illu_nose_nasal_cavities.jpg" class="galleryfilename galleryfilename-truncate" title="File:Illu nose nasal cavities.jpg">Illu nose nasal cavities.jpg</a> image with simple text</div> </li> </ul> <p>This 520 × 300 pixel image is 49 kB and used on dozens of non-English wikis. Replacing the bitmap text with actual text is a relatively simple improvement. </p><p>The image is complicated enough that leaving it as a bitmap is reasonable. The text is against a white background. Erase the text, include the resulting image in an SVG file, and then add <code>text</code> elements. </p><p>Slightly more involved would be removing the leaders. That requires patching the affected parts of the image. If the leaders are removed, then their replacements should use dots rather than arrowheads (something that should be done with <code>marker</code> elements so they are easy to change). </p> <div class="mw-heading mw-heading4"><h4 id="Less_simple_conversions">Less simple conversions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=111" title="Edit section: Less simple conversions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Littoral_Zones.jpg" class="mw-file-description" title="35 kB JPEG. US Navy."><img alt="35 kB JPEG. US Navy." src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Littoral_Zones.jpg/440px-Littoral_Zones.jpg" decoding="async" width="440" height="193" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Littoral_Zones.jpg/660px-Littoral_Zones.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/2/28/Littoral_Zones.jpg 2x" data-file-width="666" data-file-height="292" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Littoral_Zones.jpg" class="galleryfilename galleryfilename-truncate" title="File:Littoral Zones.jpg">Littoral Zones.jpg</a> 35 kB JPEG. US Navy.</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Map_of_battle_St._Mihiel.JPG" class="mw-file-description" title="37 kB JPEG. en:User:Redmarkviolinist"><img alt="37 kB JPEG. en:User:Redmarkviolinist" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Map_of_battle_St._Mihiel.JPG/367px-Map_of_battle_St._Mihiel.JPG" decoding="async" width="367" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Map_of_battle_St._Mihiel.JPG/550px-Map_of_battle_St._Mihiel.JPG 1.5x, https://upload.wikimedia.org/wikipedia/commons/a/af/Map_of_battle_St._Mihiel.JPG 2x" data-file-width="586" data-file-height="352" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Map_of_battle_St._Mihiel.JPG" class="galleryfilename galleryfilename-truncate" title="File:Map of battle St. Mihiel.JPG">Map of battle St. Mihiel.JPG</a> 37 kB JPEG. <a href="https://en.wikipedia.org/wiki/User:Redmarkviolinist" class="extiw" title="en:User:Redmarkviolinist">en:User:Redmarkviolinist</a></div> </li> </ul> <p><a href="/wiki/File:Littoral_Zones.jpg" title="File:Littoral Zones.jpg">File:Littoral Zones.jpg</a> needs a lot of cleaning up. </p><p><a href="/wiki/File:Map_of_battle_St._Mihiel.JPG" title="File:Map of battle St. Mihiel.JPG">File:Map of battle St. Mihiel.JPG</a> needs cleaning up. Dashed lines are not good candidates for automatic vectorization. Adding color. </p><p>Map locations with given scale: St. Mihiel <a href="https://www.wikidata.org/wiki/Q194932" class="extiw" title="d:Q194932"><span title="commune in Meuse, France">Saint-Mihiel <small>(Q194932)</small></span></a>, Frenes <a href="https://www.wikidata.org/wiki/Q538768" class="extiw" title="d:Q538768"><span title="former commune in Orne, France">Frênes <small>(Q538768)</small></span></a>, Hattonchatel <a href="https://www.wikidata.org/wiki/Q30127896" class="extiw" title="d:Q30127896"><span title="town in France">Hattonchâtel <small>(Q30127896)</small></span></a>, Vigneulles , Thiacourt <a href="https://www.wikidata.org/wiki/Q497719" class="extiw" title="d:Q497719"><span title="commune in Meurthe-et-Moselle, France">Thiaucourt-Regniéville <small>(Q497719)</small></span></a>, Pont-a-Mousson <a href="https://www.wikidata.org/wiki/Q461413" class="extiw" title="d:Q461413"><span title="commune in Meurthe-et-Moselle, France">Pont-à-Mousson <small>(Q461413)</small></span></a>, Plain of the Woevre <a href="https://www.wikidata.org/wiki/Q1476825" class="extiw" title="d:Q1476825"><span title="natural region of Lorraine, France">Woëvre <small>(Q1476825)</small></span></a>, River Meuse <a href="https://www.wikidata.org/wiki/Q41986" class="extiw" title="d:Q41986"><span title="river in western Europe">Meuse <small>(Q41986)</small></span></a>. </p> <ul><li>Montsec <a href="https://www.wikidata.org/wiki/Q933900" class="extiw" title="d:Q933900"><span title="commune in Meuse, France">Montsec <small>(Q933900)</small></span></a> is a commune</li> <li>Butte de montsec <a href="https://www.wikidata.org/wiki/Q2225315" class="extiw" title="d:Q2225315">Monument commémoratif de Monsec <small>(Q2225315)</small></a> war monument</li></ul> <div class="mw-heading mw-heading4"><h4 id="Conversions_with_gradients">Conversions with gradients</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=112" title="Edit section: Conversions with gradients"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>An image may look complex, but it may just need the appropriate construct. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Anther-schematic.png" class="mw-file-description" title="82 kB PNG. CC-SA 2.5 by Ben Stefanowitsch"><img alt="82 kB PNG. CC-SA 2.5 by Ben Stefanowitsch" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Anther-schematic.png/244px-Anther-schematic.png" decoding="async" width="244" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Anther-schematic.png/367px-Anther-schematic.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Anther-schematic.png/489px-Anther-schematic.png 2x" data-file-width="941" data-file-height="847" /></a></span></div> <div class="gallerytext">82 kB PNG. CC-SA 2.5 by Ben Stefanowitsch</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Anther-schematic.svg" class="mw-file-description" title="3 kB SVG conversion by TilmannR"><img alt="3 kB SVG conversion by TilmannR" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Anther-schematic.svg/244px-Anther-schematic.svg.png" decoding="async" width="244" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Anther-schematic.svg/367px-Anther-schematic.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Anther-schematic.svg/489px-Anther-schematic.svg.png 2x" data-file-width="941" data-file-height="847" /></a></span></div> <div class="gallerytext">3 kB SVG conversion by <a href="/w/index.php?title=User:TilmannR&action=edit&redlink=1" class="new" title="User:TilmannR (page does not exist)">TilmannR</a></div> </li> </ul> <p><a href="/wiki/File:WikiProject_Barnstar_Hires.png" title="File:WikiProject Barnstar Hires.png">File:WikiProject Barnstar Hires.png</a> is 2.68 MB. Opportunities for symbols, gradients, and/or filters. </p> <div class="mw-heading mw-heading4"><h4 id="Conversions_can_be_sharper_than_the_original">Conversions can be sharper than the original</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=113" title="Edit section: Conversions can be sharper than the original"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 235px"> <div class="thumb" style="width: 230px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Manattan_Transfer-Passos-009.jpg" class="mw-file-description" title="JPEG (61 kB)"><img alt="JPEG (61 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Manattan_Transfer-Passos-009.jpg/200px-Manattan_Transfer-Passos-009.jpg" decoding="async" width="200" height="248" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/80/Manattan_Transfer-Passos-009.jpg/300px-Manattan_Transfer-Passos-009.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/8/80/Manattan_Transfer-Passos-009.jpg 2x" data-file-width="332" data-file-height="411" /></a></span></div> <div class="gallerytext">JPEG (61 kB)</div> </li> <li class="gallerybox" style="width: 235px"> <div class="thumb" style="width: 230px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Harper_%26_Brothers_logo_simplified.svg" class="mw-file-description" title="SVG (59 kB)"><img alt="SVG (59 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Harper_%26_Brothers_logo_simplified.svg/200px-Harper_%26_Brothers_logo_simplified.svg.png" decoding="async" width="200" height="250" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Harper_%26_Brothers_logo_simplified.svg/300px-Harper_%26_Brothers_logo_simplified.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/72/Harper_%26_Brothers_logo_simplified.svg/400px-Harper_%26_Brothers_logo_simplified.svg.png 2x" data-file-width="200" data-file-height="250" /></a></span></div> <div class="gallerytext">SVG (59 kB)</div> </li> </ul> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=920328401#Vectorize_Harper_&_Brothers_logo">https://commons.wikimedia.org/w/index.php?title=Commons:Graphic_Lab/Illustration_workshop&oldid=920328401#Vectorize_Harper_&_Brothers_logo</a> <dl><dd><span lang="grc">Λαμπάδια ἔχοντες διαδώσουσιν ἀλλήλοις</span> → <span lang="grc" style="text-transform:uppercase;">Λαμπάδια ἔχοντες διαδώσουσιν ἀλλήλοις</span></dd> <dd>accents in ancient Greek?</dd></dl></li></ul> <div class="mw-heading mw-heading4"><h4 id="Conversions_should_be_good">Conversions should be good</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=114" title="Edit section: Conversions should be good"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Suggested replacements should only be used if they are superior. Replacements may not be supperior. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Aufbau_Southern-Blot.jpg" class="mw-file-description" title="JPEG image (Southern blot)"><img alt="JPEG image (Southern blot)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Aufbau_Southern-Blot.jpg/440px-Aufbau_Southern-Blot.jpg" decoding="async" width="440" height="184" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Aufbau_Southern-Blot.jpg/660px-Aufbau_Southern-Blot.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Aufbau_Southern-Blot.jpg/880px-Aufbau_Southern-Blot.jpg 2x" data-file-width="994" data-file-height="416" /></a></span></div> <div class="gallerytext"> JPEG image (Southern blot)</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Kapillarblot.svg" class="mw-file-description" title="a replacement SVG vector (northern blot)"><img alt="a replacement SVG vector (northern blot)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Kapillarblot.svg/440px-Kapillarblot.svg.png" decoding="async" width="440" height="192" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Kapillarblot.svg/660px-Kapillarblot.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Kapillarblot.svg/880px-Kapillarblot.svg.png 2x" data-file-width="282" data-file-height="123" /></a></span></div> <div class="gallerytext"> a replacement SVG vector (northern blot)</div> </li> </ul> <p>The original JPEG is simple and clean. The vector replacement has problems. The JPEG uses a single font. The SVG uses several font sizes and uses colors. A yellow font can be lost in a white background, so the yellow font is stroked. The paper towels are flat in the JPEG, but they are wavy in SVG. One purpose of the paper towels is to evenly distribute the weight; wavy towels (especially when the waves line up) do not convey that purpose. The solution is divided in the JPEG but connected in the SVG. What is the distinction between Southern blot and northern blot? </p><p>Despite the image having simple vector shapes, the majority of the image is a bitmap. </p><p>The SVG vector was derived from <a href="/wiki/File:Capillary_blot_setup.svg" title="File:Capillary blot setup.svg">File:Capillary blot setup.svg</a>. </p><p>The file descriptions are slightly different: the first is about a Southern blot while the second is about a northern blot. The first is for DNA and the second is for RNA, but both procedures use <a href="https://en.wikipedia.org/wiki/Agarose_Gel_Electrophoresis" class="extiw" title="w:Agarose Gel Electrophoresis">agarose gel electrophoresis</a>.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> </p><p><a href="https://en.wikipedia.org/wiki/Electroblotting" class="extiw" title="w:Electroblotting">Electroblotting</a> makes more sense as a blot, but the electro-transfer is vertical. That has issues with applying voltage in the given images. </p><p><a href="https://en.wikipedia.org/wiki/File:Electroblot.gif" class="extiw" title="w:File:Electroblot.gif">w:File:Electroblot.gif</a> is public domain, but not yet transferred to Commons. It shows the vertical electrodes. <a href="https://en.wikipedia.org/wiki/Northern_blot" class="extiw" title="w:Northern blot">w:Northern blot</a> states, "Strictly speaking, the term 'northern blot' refers specifically to the capillary transfer of RNA from the electrophoresis gel to the blotting membrane." </p><p><span typeof="mw:File"><a href="/wiki/File:Northern_blot_diagram.png" class="mw-file-description" title="investigate ..."><img alt="investigate ..." src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Northern_blot_diagram.png/320px-Northern_blot_diagram.png" decoding="async" width="320" height="267" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Northern_blot_diagram.png/480px-Northern_blot_diagram.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Northern_blot_diagram.png/640px-Northern_blot_diagram.png 2x" data-file-width="1196" data-file-height="998" /></a></span> </p> <div class="mw-heading mw-heading4"><h4 id="Conversion_issues">Conversion issues</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=115" title="Edit section: Conversion issues"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Paganese_Calcio_1926_logo-lite.png" class="mw-file-description" title="PNG"><img alt="PNG" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/102px-Paganese_Calcio_1926_logo-lite.png" decoding="async" width="102" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/154px-Paganese_Calcio_1926_logo-lite.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Paganese_Calcio_1926_logo-lite.png/205px-Paganese_Calcio_1926_logo-lite.png 2x" data-file-width="1008" data-file-height="1181" /></a></span></div> <div class="gallerytext">PNG</div> </li> </ul> <p>Consider the shield shape. It could involve several similar paths, but how can those paths be accurately controled? </p><p>The narrow-width outer path can be stroked to keep its width constant. </p><p>If we shrink that path to get the internal solid, then the width of the internal white band varies. Consider shrinking a square several times; to make a 1-unit wide border, the path points need to move in by 1 unit. Then consider shrinking an equilateral triangle several times; the bottom y-axis moves up one unit; the bottom x-axis must move inward more. </p><p>The desired transform is moving a fixed distance perpendicular to the boundary. IIRC, such a transform on a cubic curve is not a cubic curve. An erosion filter can remove an approximate fixed distance, but will it look right? </p><p>For the star, it can be made by specifying 10 points or 5 points (with the appropriate fill rule). </p><p>Need to identify the font. It is serif, but the serifs have some interesting features. For example, some serifs are not vertical but rather slant (e.g., E and G). </p> <ul><li><span style="font-family: Times New Roman, Courier New; font-size: 30px; font-weight: bold;">PAGANESE CALCIO</span> (Times New Roman)</li> <li><span style="font-family: Rockwell, Courier New; font-size: 30px; font-weight: bold;">PAGANESE CALCIO</span> (Rockwell)</li></ul> <div class="mw-heading mw-heading4"><h4 id="Multiline_text_causes_trouble">Multiline text causes trouble</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=116" title="Edit section: Multiline text causes trouble"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For translations, try to keep the text on one line. Text that is broken into many lines is troublesome. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Electric_glow_discharge_schematic.png" class="mw-file-description" title="PNG of glow discharge (13 kB)"><img alt="PNG of glow discharge (13 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Electric_glow_discharge_schematic.png/289px-Electric_glow_discharge_schematic.png" decoding="async" width="289" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Electric_glow_discharge_schematic.png/434px-Electric_glow_discharge_schematic.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Electric_glow_discharge_schematic.png/578px-Electric_glow_discharge_schematic.png 2x" data-file-width="922" data-file-height="383" /></a></span></div> <div class="gallerytext">PNG of glow discharge (13 kB)</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Electric_glow_discharge_schematic.svg" class="mw-file-description" title="SVG of glow discharge (16 kB)"><img alt="SVG of glow discharge (16 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Electric_glow_discharge_schematic.svg/302px-Electric_glow_discharge_schematic.svg.png" decoding="async" width="302" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Electric_glow_discharge_schematic.svg/453px-Electric_glow_discharge_schematic.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Electric_glow_discharge_schematic.svg/604px-Electric_glow_discharge_schematic.svg.png 2x" data-file-width="1321" data-file-height="525" /></a></span></div> <div class="gallerytext">SVG of glow discharge (16 kB)</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hair_follicle-en.svg" class="mw-file-description" title="SVG (187 kB but Path text SVG problem now)"><img alt="SVG (187 kB but Path text SVG problem now)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Hair_follicle-en.svg/129px-Hair_follicle-en.svg.png" decoding="async" width="129" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Hair_follicle-en.svg/194px-Hair_follicle-en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Hair_follicle-en.svg/259px-Hair_follicle-en.svg.png 2x" data-file-width="404" data-file-height="375" /></a></span></div> <div class="gallerytext">SVG (187 kB but Path text SVG problem now)</div> </li> </ul> <ul><li>Cathode</li> <li>Aston Dark Space</li> <li>Cathode Glow</li> <li>Cathode Dark Space</li> <li>Negative Glow</li> <li>Faraday Space</li> <li>Positive Column</li> <li>Anode Glow</li> <li>Anode Dark Space</li> <li>Anode</li></ul> <p>The diagram has unconventional leader lines. The diagram has negative shading: the dark spaces are white; some glows are dark. </p> <div class="mw-heading mw-heading4"><h4 id="Stepped_conversions">Stepped conversions</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=117" title="Edit section: Stepped conversions"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Not the best stepped conversion.... (Where is the bare photograph?) </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:LuettePalatineUvula.jpg" class="mw-file-description" title="JPEG with numbers (107 kB)"><img alt="JPEG with numbers (107 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/LuettePalatineUvula.jpg/120px-LuettePalatineUvula.jpg" decoding="async" width="120" height="118" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/LuettePalatineUvula.jpg/180px-LuettePalatineUvula.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/ac/LuettePalatineUvula.jpg/240px-LuettePalatineUvula.jpg 2x" data-file-width="658" data-file-height="648" /></a></span></div> <div class="gallerytext">JPEG with numbers (107 kB)</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Palantine_uvula_annotated.jpg" class="mw-file-description" title="JPEG numbers replaced with labels (296 kB)"><img alt="JPEG numbers replaced with labels (296 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Palantine_uvula_annotated.jpg/120px-Palantine_uvula_annotated.jpg" decoding="async" width="120" height="118" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Palantine_uvula_annotated.jpg/180px-Palantine_uvula_annotated.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Palantine_uvula_annotated.jpg/240px-Palantine_uvula_annotated.jpg 2x" data-file-width="643" data-file-height="631" /></a></span></div> <div class="gallerytext">JPEG numbers replaced with labels (296 kB)</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:LuettePalatineUvula.svg" class="mw-file-description" title="SVG using bitmap with text labels (377 kB)"><img alt="SVG using bitmap with text labels (377 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/LuettePalatineUvula.svg/120px-LuettePalatineUvula.svg.png" decoding="async" width="120" height="118" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/LuettePalatineUvula.svg/180px-LuettePalatineUvula.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/LuettePalatineUvula.svg/240px-LuettePalatineUvula.svg.png 2x" data-file-width="512" data-file-height="502" /></a></span></div> <div class="gallerytext">SVG using bitmap with text labels (377 kB)</div> </li> </ul> <p>Consider the JPEG file <a href="/wiki/File:Illu01_head_neck.jpg" title="File:Illu01 head neck.jpg">File:Illu01 head neck.jpg</a>. The SVG file <a href="/wiki/File:Illu01_head_neck_sv.svg" title="File:Illu01 head neck sv.svg">File:Illu01 head neck sv.svg</a> uses the bitmap illustration but adds SVG text elements. Then <a href="/wiki/File:Illu01_head_neck_da.svg" title="File:Illu01 head neck da.svg">File:Illu01 head neck da.svg</a> builds on that conversion by altering the text to Danish. </p><p>There is a penalty for including bitmap files in SVG. The 8-bit byte bitmap is base-64 encoded. So 3 bytes of bitmap expand to 4 bytes of SVG, a 33% expansion. </p><p>Here are files that can be converted in steps. The first step would use an underlying bitmap file with overlaid SVG text elements. Later, the bitmap image could be converted to SVG. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Illu_epithelium.jpg" class="mw-file-description" title="57 kB"><img alt="57 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Illu_epithelium.jpg/440px-Illu_epithelium.jpg" decoding="async" width="440" height="176" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/8/8f/Illu_epithelium.jpg 1.5x" data-file-width="520" data-file-height="208" /></a></span></div> <div class="gallerytext">57 kB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 250px;"><span typeof="mw:File"><a href="/wiki/File:Stem_cells_diagram.png" class="mw-file-description" title="170 kB"><img alt="170 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Stem_cells_diagram.png/241px-Stem_cells_diagram.png" decoding="async" width="241" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Stem_cells_diagram.png/361px-Stem_cells_diagram.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Stem_cells_diagram.png/482px-Stem_cells_diagram.png 2x" data-file-width="1015" data-file-height="927" /></a></span></div> <div class="gallerytext">170 kB</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="A_stepped_conversion_with_complex_image">A stepped conversion with complex image</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=118" title="Edit section: A stepped conversion with complex image"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here are files that can be converted in steps. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Blausen_0316_DigestiveSystem.png" class="mw-file-description" title="PNG with text"><img alt="PNG with text" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Blausen_0316_DigestiveSystem.png/440px-Blausen_0316_DigestiveSystem.png" decoding="async" width="440" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Blausen_0316_DigestiveSystem.png/660px-Blausen_0316_DigestiveSystem.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/14/Blausen_0316_DigestiveSystem.png/880px-Blausen_0316_DigestiveSystem.png 2x" data-file-width="1600" data-file-height="1600" /></a></span></div> <div class="gallerytext">PNG with text</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Skin.png" class="mw-file-description" title="PNG with text"><img alt="PNG with text" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Skin.png/428px-Skin.png" decoding="async" width="428" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Skin.png/641px-Skin.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Skin.png/855px-Skin.png 2x" data-file-width="1000" data-file-height="1029" /></a></span></div> <div class="gallerytext">PNG with text</div> </li> </ul> <p>For the first step, the PNG can be edited to remove the text and leader lines. That PNG can be inserted into an SVG file, and the text and leader lines can be redrawn using SVG primitives. Removing the text is usually simple, but removing the leader lines can be tricky. In some cases, the leader lines can be retained. In either case, the leader lines pose a problem with text alignment. The current layout requires the text to fit the space between the margin and the start of the leader line. That strategy works for PNG files, but it has problems with SVG because font metrics may change slightly. A substituted font with slightly different metrics may not fit between the margins and the leader lines. One fix would be to add a background filter to the text; it would overwrite the leader line with white (see <code>filter</code> below). Alternatively (and probably better) would be to right align the lefthand text and left align the righthand text. Another text fitting problem is the title: it runs from the left margin to the right margin. A slightly wider font would go outside both margins. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><filter</span><span class="w"> </span><span class="na">id=</span><span class="s">"textflood"</span><span class="w"> </span><span class="na">filterUnits=</span><span class="s">"objectBoundingBox"</span><span class="w"> </span><span class="na">primitiveUnits=</span><span class="s">"objectBoundingBox"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><feFlood</span><span class="w"> </span><span class="na">flood-color=</span><span class="s">"white"</span><span class="w"> </span><span class="na">flood-opacity=</span><span class="s">"1.0"</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="w"> </span><span class="na">width=</span><span class="s">"1.0"</span><span class="w"> </span><span class="na">height=</span><span class="s">"1.0"</span><span class="w"> </span><span class="na">result=</span><span class="s">"back"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><feMerge></span> <span class="w"> </span><span class="nt"><feMergeNode</span><span class="w"> </span><span class="na">in=</span><span class="s">"back"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><feMergeNode</span><span class="w"> </span><span class="na">in=</span><span class="s">"SourceGraphic"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></feMerge></span> <span class="nt"></filter></span> </pre></div></dd></dl> <p>For the second step, the body image could be redone as SVG. Completely converting the image to SVG is hard because the image has gradient fills; a raster-to-vector conversion application will probably not have a good result. Rendering the intestines looks difficult, too. There are many twists and turns, so shading is difficult. Perhaps a good place for <code>filter</code> primitives. </p><p><br /> A simpler target is the following image. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Anatomy_Abdomen_Tiesworks.jpg" class="mw-file-description" title="simpler target"><img alt="simpler target" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Anatomy_Abdomen_Tiesworks.jpg/440px-Anatomy_Abdomen_Tiesworks.jpg" decoding="async" width="440" height="411" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Anatomy_Abdomen_Tiesworks.jpg/660px-Anatomy_Abdomen_Tiesworks.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/1/15/Anatomy_Abdomen_Tiesworks.jpg 2x" data-file-width="823" data-file-height="768" /></a></span></div> <div class="gallerytext"> simpler target</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Another_stepped_conversion">Another stepped conversion</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=119" title="Edit section: Another stepped conversion"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here is a large JPEG. The text labels are better done in SVG; translation would be possible. The white text on black background is difficult to read. The multiline text descriptions are a tossup. There are technical problems with the cross sectioning: the cutting tangents. The planet details could remain as bitmap images, but they could be done with symbols and gradients. Edges do not darken, but that also seems to be true with images of the Earth. More challenging would be using a random process for the planet's surface. Furthermore, CSS could be used for a printing. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg" class="mw-file-description" title="(576 kB)"><img alt="(576 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg/440px-Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg" decoding="async" width="440" height="248" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg/660px-Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg/880px-Possible_Interiors_of_the_TRAPPIST-1_Exoplanets.jpg 2x" data-file-width="3840" data-file-height="2160" /></a></span></div> <div class="gallerytext"> (576 kB)</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:The_Earth_seen_from_Apollo_17.jpg" class="mw-file-description" title="compare Blue Marble (6.21 MB)"><img alt="compare Blue Marble (6.21 MB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/300px-The_Earth_seen_from_Apollo_17.jpg" decoding="async" width="300" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/450px-The_Earth_seen_from_Apollo_17.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/The_Earth_seen_from_Apollo_17.jpg/600px-The_Earth_seen_from_Apollo_17.jpg 2x" data-file-width="3000" data-file-height="3002" /></a></span></div> <div class="gallerytext">compare Blue Marble (6.21 MB)</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Significant_detail">Significant detail</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=120" title="Edit section: Significant detail"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Wilson1900Fig2.jpg" class="mw-file-description" title="2.04 MB JPEG"><img alt="2.04 MB JPEG" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Wilson1900Fig2.jpg/440px-Wilson1900Fig2.jpg" decoding="async" width="440" height="307" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Wilson1900Fig2.jpg/660px-Wilson1900Fig2.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Wilson1900Fig2.jpg/880px-Wilson1900Fig2.jpg 2x" data-file-width="2211" data-file-height="1545" /></a></span></div> <div class="gallerytext">2.04 MB JPEG</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Trees_have_significant_detail">Trees have significant detail</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=121" title="Edit section: Trees have significant detail"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here, the JPEG image is much higher quality than the SVG. Both files are about the same size. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Arms_of_the_House_of_Fisichella_(2016).jpg" class="mw-file-description" title="JPEG 1,279 × 1,605; 489 KB"><img alt="JPEG 1,279 × 1,605; 489 KB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Arms_of_the_House_of_Fisichella_%282016%29.jpg/351px-Arms_of_the_House_of_Fisichella_%282016%29.jpg" decoding="async" width="351" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Arms_of_the_House_of_Fisichella_%282016%29.jpg/526px-Arms_of_the_House_of_Fisichella_%282016%29.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Arms_of_the_House_of_Fisichella_%282016%29.jpg/701px-Arms_of_the_House_of_Fisichella_%282016%29.jpg 2x" data-file-width="1279" data-file-height="1605" /></a></span></div> <div class="gallerytext"> JPEG 1,279 × 1,605; 489 KB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Arms_of_the_House_of_Fisichella.svg" class="mw-file-description" title="SVG 512 × 685; 552 KB"><img alt="SVG 512 × 685; 552 KB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Arms_of_the_House_of_Fisichella.svg/329px-Arms_of_the_House_of_Fisichella.svg.png" decoding="async" width="329" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Arms_of_the_House_of_Fisichella.svg/493px-Arms_of_the_House_of_Fisichella.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Arms_of_the_House_of_Fisichella.svg/658px-Arms_of_the_House_of_Fisichella.svg.png 2x" data-file-width="512" data-file-height="685" /></a></span></div> <div class="gallerytext"> SVG 512 × 685; 552 KB</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Even_synthetic_images_can_have_significant_detail">Even synthetic images can have significant detail</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=122" title="Edit section: Even synthetic images can have significant detail"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The JPEG image has more character than the SVG. The files have similar size. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Coral_polyp.jpg" class="mw-file-description" title="JPEG 123 kB"><img alt="JPEG 123 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Coral_polyp.jpg/303px-Coral_polyp.jpg" decoding="async" width="303" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/49/Coral_polyp.jpg/455px-Coral_polyp.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/4/49/Coral_polyp.jpg 2x" data-file-width="462" data-file-height="670" /></a></span></div> <div class="gallerytext">JPEG 123 kB</div> </li> <li class="gallerybox" style="width: 475px"> <div class="thumb" style="width: 470px; height: 470px;"><span typeof="mw:File"><a href="/wiki/File:Coral_polyp_en.svg" class="mw-file-description" title="SVG 95 kB"><img alt="SVG 95 kB" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Coral_polyp_en.svg/311px-Coral_polyp_en.svg.png" decoding="async" width="311" height="440" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Coral_polyp_en.svg/467px-Coral_polyp_en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Coral_polyp_en.svg/622px-Coral_polyp_en.svg.png 2x" data-file-width="2480" data-file-height="3507" /></a></span></div> <div class="gallerytext">SVG 95 kB</div> </li> </ul> <div class="mw-heading mw-heading3"><h3 id="Stamps">Stamps</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=123" title="Edit section: Stamps"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Originally, I thought some files were bitmaps, but now it looks like something much stranger happened. The original artist made an SVG with Inkscape and used an appropriate filter, but somehow the SVG file bloated out of control. Why? </p><p>See <a href="/wiki/Category:Powered_by_Wikidata" title="Category:Powered by Wikidata">Category:Powered by Wikidata</a>. </p> <div class="mw-heading mw-heading4"><h4 id="Rectangular_stamp">Rectangular stamp</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=124" title="Edit section: Rectangular stamp"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Font family is "Sans", but the SVG text was converted to curves. There are many instances of filters, and those instances include "Rubber Stamp" and "Chalk and Sponge". The <code>defs</code> section is huge, and it has several huge clipping paths. However, only one clipping path is used. The wiki barcode does not use a clipping path, so it is drawn without special effects. </p><p>The SVG files have neutered <code>flowRoot</code> elements. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_Stamp_Rec_Light.svg" class="mw-file-description" title="SVG 2 May 2016 (5.1 MB)"><img alt="SVG 2 May 2016 (5.1 MB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Wikidata_Stamp_Rec_Light.svg/320px-Wikidata_Stamp_Rec_Light.svg.png" decoding="async" width="320" height="87" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Wikidata_Stamp_Rec_Light.svg/480px-Wikidata_Stamp_Rec_Light.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Wikidata_Stamp_Rec_Light.svg/640px-Wikidata_Stamp_Rec_Light.svg.png 2x" data-file-width="842" data-file-height="230" /></a></span></div> <div class="gallerytext">SVG 2 May 2016 (5.1 MB)</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_stamp_rec_light.png" class="mw-file-description" title="PNG 2 May 2016 (25 kB)"><img alt="PNG 2 May 2016 (25 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Wikidata_stamp_rec_light.png/320px-Wikidata_stamp_rec_light.png" decoding="async" width="320" height="87" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Wikidata_stamp_rec_light.png/480px-Wikidata_stamp_rec_light.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Wikidata_stamp_rec_light.png/640px-Wikidata_stamp_rec_light.png 2x" data-file-width="842" data-file-height="230" /></a></span></div> <div class="gallerytext">PNG 2 May 2016 (25 kB)</div> </li> </ul> <p>This SVG file uses the "Gill Sans" font. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_Stamp_Rec_Dark.svg" class="mw-file-description" title="SVG 2 May 2016 (5.4 MB)"><img alt="SVG 2 May 2016 (5.4 MB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Wikidata_Stamp_Rec_Dark.svg/320px-Wikidata_Stamp_Rec_Dark.svg.png" decoding="async" width="320" height="87" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Wikidata_Stamp_Rec_Dark.svg/480px-Wikidata_Stamp_Rec_Dark.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Wikidata_Stamp_Rec_Dark.svg/640px-Wikidata_Stamp_Rec_Dark.svg.png 2x" data-file-width="842" data-file-height="230" /></a></span></div> <div class="gallerytext">SVG 2 May 2016 (5.4 MB)</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 190px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_stamp_rec.png" class="mw-file-description" title="PNG 2 May 2016 (46 kB)"><img alt="PNG 2 May 2016 (46 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Wikidata_stamp_rec.png/320px-Wikidata_stamp_rec.png" decoding="async" width="320" height="87" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Wikidata_stamp_rec.png/480px-Wikidata_stamp_rec.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Wikidata_stamp_rec.png/640px-Wikidata_stamp_rec.png 2x" data-file-width="842" data-file-height="230" /></a></span></div> <div class="gallerytext">PNG 2 May 2016 (46 kB)</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Round_stamp">Round stamp</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=125" title="Edit section: Round stamp"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_Stamp_Round_Light.svg" class="mw-file-description" title="Wikidata stamp SVG (2.2 MB)"><img alt="Wikidata stamp SVG (2.2 MB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Wikidata_Stamp_Round_Light.svg/320px-Wikidata_Stamp_Round_Light.svg.png" decoding="async" width="320" height="320" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Wikidata_Stamp_Round_Light.svg/480px-Wikidata_Stamp_Round_Light.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Wikidata_Stamp_Round_Light.svg/640px-Wikidata_Stamp_Round_Light.svg.png 2x" data-file-width="1445" data-file-height="1445" /></a></span></div> <div class="gallerytext">Wikidata stamp SVG (2.2 MB)</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_stamp.png" class="mw-file-description" title="Wikidata stamp PNG (78 kB)"><img alt="Wikidata stamp PNG (78 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Wikidata_stamp.png/320px-Wikidata_stamp.png" decoding="async" width="320" height="267" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Wikidata_stamp.png/480px-Wikidata_stamp.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/cd/Wikidata_stamp.png/640px-Wikidata_stamp.png 2x" data-file-width="1061" data-file-height="886" /></a></span></div> <div class="gallerytext">Wikidata stamp PNG (78 kB)</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Wikidata_stamp.svg" class="mw-file-description" title="Using random process, but has librsvg bugs. (3 kB)"><img alt="Using random process, but has librsvg bugs. (3 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Wikidata_stamp.svg/320px-Wikidata_stamp.svg.png" decoding="async" width="320" height="265" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Wikidata_stamp.svg/480px-Wikidata_stamp.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/50/Wikidata_stamp.svg/640px-Wikidata_stamp.svg.png 2x" data-file-width="512" data-file-height="424" /></a></span></div> <div class="gallerytext">Using random process, but has <code>librsvg</code> bugs. (3 kB)</div> </li> </ul> <p>The stamp runs into <code>librsvg</code> inability to do <code>textPath</code>. It is a lot of bytes for a simple image; individual debris has a lot of information. There is debris even in the unstamped areas. Some of the debris is black. Most of the debris is polygonal. The WIKIDATA rectangle is filled, so not all of the apparent background is transparent; clipping would be appropriate. </p><p>Redid as an SVG with a random process <code>filter</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Vectorization">Vectorization</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=126" title="Edit section: Vectorization"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Xilografia_canto_4.png" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Xilografia_canto_4.png/220px-Xilografia_canto_4.png" decoding="async" width="220" height="39" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Xilografia_canto_4.png/330px-Xilografia_canto_4.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Xilografia_canto_4.png/440px-Xilografia_canto_4.png 2x" data-file-width="2561" data-file-height="450" /></a><figcaption>Find mirrored or rotated components of an image</figcaption></figure> <p>How good can automatic vectorization be? </p> <div class="mw-heading mw-heading4"><h4 id="Vectorization_using_posterization">Vectorization using posterization</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=127" title="Edit section: Vectorization using posterization"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphics_village_pump&diff=prev&oldid=828872236#Vectorisation_of_Seedfeeder_PNGs">https://commons.wikimedia.org/w/index.php?title=Commons:Graphics_village_pump&diff=prev&oldid=828872236#Vectorisation_of_Seedfeeder_PNGs</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Recovering_text">Recovering text</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=128" title="Edit section: Recovering text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Files on Commons can be OCR'd (produces JSON with a <code>text</code> key with lines of OCR/d text): </p> <dl><dt>English</dt> <dd><a class="external text" href="https://tools.wmflabs.org/ws-google-ocr/api.php?image=https://upload.wikimedia.org/wikipedia/commons/3/3b/Arm_Bones.png&lang=en">Arm Bones.png</a></dd> <dt>Polish</dt> <dd><a class="external text" href="https://tools.wmflabs.org/ws-google-ocr/api.php?image=https://upload.wikimedia.org/wikipedia/commons/a/a5/Tulejki_zaciskowe.svg&lang=pl">Tulejki zaciskowe.svg</a> (Fails: SVG)</dd> <dt>Chinese</dt> <dd><a class="external text" href="https://tools.wmflabs.org/ws-google-ocr/api.php?image=https://upload.wikimedia.org/wikipedia/commons/8/87/%28zh%29Illu_epithelium.jpg&lang=zh">(zh)Illu epithelium.jpg</a></dd></dl> <div class="mw-heading mw-heading4"><h4 id="Alternate_URL">Alternate URL</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=129" title="Edit section: Alternate URL"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Can I use <a rel="nofollow" class="external free" href="https://ocr.wmcloud.org/api.php">https://ocr.wmcloud.org/api.php</a> directly? </p><p>It is CORS safe because the response returns </p> <ul><li><code>access-control-allow-origin: *</code></li></ul> <p>See <a rel="nofollow" class="external free" href="https://ocr.wmcloud.org/">https://ocr.wmcloud.org/</a> for direct interface and API documentation. </p> <div class="mw-heading mw-heading4"><h4 id="SVG_files_must_be_converted_to_PNG_first">SVG files must be converted to PNG first</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=130" title="Edit section: SVG files must be converted to PNG first"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG files do not work with the above pattern. Need to use PNG rather than SVG. That can be achieved by supplying a thumbnail_size argument </p> <ul><li><a href="/wiki/File:Tulejki_zaciskowe.svg" title="File:Tulejki zaciskowe.svg">File:Tulejki zaciskowe.svg</a></li> <li><code>{{filepath:Tulejki zaciskowe.svg}}</code> → <dl><dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/a/a5/Tulejki_zaciskowe.svg">https://upload.wikimedia.org/wikipedia/commons/a/a5/Tulejki_zaciskowe.svg</a></dd></dl></li> <li><code>{{filepath:Tulejki zaciskowe.svg|887}}</code> → <dl><dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Tulejki_zaciskowe.svg/887px-Tulejki_zaciskowe.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Tulejki_zaciskowe.svg/887px-Tulejki_zaciskowe.svg.png</a></dd></dl></li></ul> <dl><dt>Polish</dt> <dd><a class="external text" href="https://tools.wmflabs.org/ws-google-ocr/api.php?image=https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Tulejki_zaciskowe.svg/887px-Tulejki_zaciskowe.svg.png&lang=pl">Tulejki zaciskowe.svg</a> →</dd></dl> <ul><li><a rel="nofollow" class="external free" href="https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Tulejki_zaciskowe.svg/887px-Tulejki_zaciskowe.svg.png&lang=pl">https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Tulejki_zaciskowe.svg/887px-Tulejki_zaciskowe.svg.png&lang=pl</a> →</li></ul> <div class="mw-highlight mw-highlight-lang-json mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span><span class="nt">"engine"</span><span class="p">:</span><span class="s2">"google"</span><span class="p">,</span><span class="nt">"langs"</span><span class="p">:[</span><span class="s2">"pl"</span><span class="p">],</span><span class="nt">"psm"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="nt">"crop"</span><span class="p">:[],</span><span class="nt">"image_hosts"</span><span class="p">:[</span><span class="s2">"upload.wikimedia.org"</span><span class="p">,</span><span class="s2">"upload.wikimedia.beta.wmflabs.org"</span><span class="p">],</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Typ \u015bci\u0105gaj\u0105cy\nTyp naciskaj\u0105cy\nTyp obustronny"</span><span class="p">}</span> </pre></div> <p>So the Polish text is </p> <ul><li>Typ ściągający → pull-back type; pull-to-close</li> <li>Typ naciskający → push type; push-to-close</li> <li>Typ obustronny → dead-length type</li></ul> <div class="mw-heading mw-heading4"><h4 id="Identifying_font_families">Identifying font families</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=131" title="Edit section: Identifying font families"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are tools for identifying fonts. </p> <ul><li><a rel="nofollow" class="external text" href="https://www.motocms.com/blog/en/online-font-recognition/">Online Font Recognition Tools</a>. Allison Reed. 20 March 2021.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Translations:_internationalization_and_localization">Translations: internationalization and localization</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=132" title="Edit section: Translations: internationalization and localization"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Commons supports wikis in many different languages. Ideally, an image would be available in any language, but the reality is many images on Commons are just available in English. Images in a bitmap format such as PNG have painted in the text, so the text is not easy to change. </p><p>SVG can support translations. </p><p>Sadly, SVG has made some unusual choices. The <code>class</code> attribute is a space-separated list of tokens, but the <code>systemLanguage</code> attribute is a comma-separated list of tokens. The commas added confusion (some implementations used space-separated IETF language tags) and complicate pattern matching. Compare CSS <code>[systemLanguage~="en"]</code> (which wants a space-separated list) and <code>[systemLanguage|="en"]]</code> (which does not want a list). </p><p>Another feature of multilingual SVG files on Commons is that the file categories are consistent. If there are several monolingual files, then they may not be kept in sync with appropriate categories. (Does not apply to language-specific categories.) </p> <div class="mw-heading mw-heading3"><h3 id="Some_successes">Some successes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=133" title="Edit section: Some successes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/File:Conic_Sections.svg" title="File:Conic Sections.svg">File:Conic Sections.svg</a> Clean illustration used on many wikis. Has more than 50 translations. (SVG Translate no longer works.)</li> <li><a href="/wiki/File:Celltypes.svg" title="File:Celltypes.svg">File:Celltypes.svg</a> Nice illustration. Then seven translations were added.</li> <li><a href="/wiki/File:Copper_electroplating_principle_(multilingual).svg" title="File:Copper electroplating principle (multilingual).svg">File:Copper electroplating principle (multilingual).svg</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Translations_are_welcome,_but_they_have_costs"><span id="Translations_are_welcome.2C_but_they_have_costs"></span>Translations are welcome, but they have costs</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=134" title="Edit section: Translations are welcome, but they have costs"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are important diagrams that have many translations. </p> <ul><li><a href="/wiki/File:Bicycle_diagram-en.svg" title="File:Bicycle diagram-en.svg">File:Bicycle diagram-en.svg</a> This SVG file was a significant example of a file having multiple translated copies. In January 2022, <a href="/wiki/User:Mrmw" title="User:Mrmw">Mrmw</a> made this file multilingual. Two additional translations were added the next day.</li> <li><a href="/wiki/File:Diagram_of_the_human_heart_(cropped).svg" title="File:Diagram of the human heart (cropped).svg">File:Diagram of the human heart (cropped).svg</a></li> <li><a href="/wiki/File:Standard_Model_of_Elementary_Particles.svg" title="File:Standard Model of Elementary Particles.svg">File:Standard Model of Elementary Particles.svg</a></li> <li><a href="/wiki/File:Active_Margin.svg" title="File:Active Margin.svg">File:Active Margin.svg</a> One SVG file with several separate-file language versions. en.Wiki 2006 <dl><dd><a href="/wiki/File:Oceanic-continental_convergence_Fig21oceancont.gif" title="File:Oceanic-continental convergence Fig21oceancont.gif">File:Oceanic-continental convergence Fig21oceancont.gif</a> GIF from 2005. Source is USGS.</dd></dl></li></ul> <div class="mw-heading mw-heading3"><h3 id="The_translations_do_not_fit">The translations do not fit</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=135" title="Edit section: The translations do not fit"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>(Should follow multiline text.) </p> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Test_dim_filter_mask.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/SVG_Test_dim_filter_mask.svg/220px-SVG_Test_dim_filter_mask.svg.png" decoding="async" width="220" height="151" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/SVG_Test_dim_filter_mask.svg/330px-SVG_Test_dim_filter_mask.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/SVG_Test_dim_filter_mask.svg/440px-SVG_Test_dim_filter_mask.svg.png 2x" data-file-width="512" data-file-height="352" /></a><figcaption>Methods for variable-width dimension lines.</figcaption></figure> <p>Some languages do not need much space, but other languages do. As a guess, I would say Spanish needs 30% more space than English. Chinese is very dense, but the characters are more detailed and should be larger. Diagrams meant for translation need to leave a lot of space. </p><p>I've seen some users add translations to similar languages. Instead of adding Catalan to an English SVG, add the language to the Spanish SVG. </p> <ul><li><a href="/wiki/File:Oceanic_divisions_es.svg" title="File:Oceanic divisions es.svg">File:Oceanic divisions es.svg</a> Spanish + Catalan</li></ul> <p>Dimension lines cause problems. They set a particular width for the text. Putting the text above the dimension lines is a simple approach. Another way around the problem is to paint a text background that overlays the dimension line. In many cases the background merges with the background of the diagram, but sometimes it will cover nearby details in the diagram. Painting a background is difficult when the background has a color gradient; it requires a good match. Use a mask. Use a Gaussian blur filter on the background? </p><p>Methods ran into <a href="https://phabricator.wikimedia.org/T316962" class="extiw" title="phab:T316962">Phab:T316962</a>. Sadly, <code>FillPaint</code> does not work for gradient fills on Commons or Chromium. </p> <ul><li><a href="/wiki/File:Oceanic_divisions.svg" title="File:Oceanic divisions.svg">File:Oceanic divisions.svg</a> <dl><dd>fix dimension line issue.</dd> <dd>better align some labels. <span typeof="mw:File"><span><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Gold_check_mark.svg/15px-Gold_check_mark.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Gold_check_mark.svg/23px-Gold_check_mark.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Gold_check_mark.svg/30px-Gold_check_mark.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Half done</bdi></b></dd> <dd>also fix fonts and marker arrows. <span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b></dd> <dd>reposition some text for better translation. <span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b></dd></dl></li></ul> <div class="mw-heading mw-heading3"><h3 id="Multiline_translations">Multiline translations</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=136" title="Edit section: Multiline translations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>One to many lines of text... </p> <ul><li><a href="/wiki/File:No_image_available.svg" title="File:No image available.svg">File:No image available.svg</a></li> <li><a href="/wiki/File:Implosion_Nuclear_weapon.svg" title="File:Implosion Nuclear weapon.svg">File:Implosion Nuclear weapon.svg</a> (uses separate files for each translation; arrowheads should be dots)</li> <li>glow discharge example</li></ul> <div class="mw-heading mw-heading3"><h3 id="Keeping_diagrams_in_sync">Keeping diagrams in sync</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=137" title="Edit section: Keeping diagrams in sync"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>We want to make images available in several languages. That has often been done by loading an original image into an editor and changing the labels. During the translation, the artist may improve the image. The improved graphics do not make it back into the original. If there were several other translations of the image, those retain the old graphics. </p><p>Here are two diagrams of the same chemical process that have significant changes. In the translation, many vessels are larger and easier to read. The piping is also different. Which one is more accurate? </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 835px"> <div class="thumb" style="width: 830px; height: 230px;"><span typeof="mw:File"><a href="/wiki/File:Haber-Bosch.svg" class="mw-file-description" title="Original file (was 889 kB, now 12 kB)"><img alt="Original file (was 889 kB, now 12 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Haber-Bosch.svg/634px-Haber-Bosch.svg.png" decoding="async" width="634" height="200" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Haber-Bosch.svg/950px-Haber-Bosch.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Haber-Bosch.svg/1267px-Haber-Bosch.svg.png 2x" data-file-width="3800" data-file-height="1200" /></a></span></div> <div class="gallerytext">Original file (was 889 kB, now 12 kB)</div> </li> <li class="gallerybox" style="width: 835px"> <div class="thumb" style="width: 830px; height: 230px;"><span typeof="mw:File"><a href="/wiki/File:Haber-Bosch-es.svg" class="mw-file-description" title="Not only translated but also changed graphics (117 kB)"><img alt="Not only translated but also changed graphics (117 kB)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Haber-Bosch-es.svg/582px-Haber-Bosch-es.svg.png" decoding="async" width="582" height="200" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Haber-Bosch-es.svg/872px-Haber-Bosch-es.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Haber-Bosch-es.svg/1163px-Haber-Bosch-es.svg.png 2x" data-file-width="2517" data-file-height="866" /></a></span></div> <div class="gallerytext">Not only translated but also changed graphics (117 kB)</div> </li> </ul> <p>The German version uses Unicode subscript characters for text such as N₂ H₂. The Spanish version uses separately placed subscripts for text such as N<sub>2</sub>. </p><p>Here's an image where the English version was improved with new numbers (and changed graphics) but the other languages were not. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Greenhouse_Effect.svg" class="mw-file-description" title="English"><img alt="English" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Greenhouse_Effect.svg/390px-Greenhouse_Effect.svg.png" decoding="async" width="390" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Greenhouse_Effect.svg/585px-Greenhouse_Effect.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Greenhouse_Effect.svg/780px-Greenhouse_Effect.svg.png 2x" data-file-width="750" data-file-height="577" /></a></span></div> <div class="gallerytext">English</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Effet_de_serre.svg" class="mw-file-description" title="French"><img alt="French" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Effet_de_serre.svg/390px-Effet_de_serre.svg.png" decoding="async" width="390" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Effet_de_serre.svg/585px-Effet_de_serre.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/51/Effet_de_serre.svg/780px-Effet_de_serre.svg.png 2x" data-file-width="750" data-file-height="577" /></a></span></div> <div class="gallerytext">French</div> </li> </ul> <p>Here are images where the measurement values have diverged. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Standard_Model_of_Elementary_Particles.svg" class="mw-file-description" title="English"><img alt="English" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/400px-Standard_Model_of_Elementary_Particles.svg.png" decoding="async" width="400" height="383" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/600px-Standard_Model_of_Elementary_Particles.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/800px-Standard_Model_of_Elementary_Particles.svg.png 2x" data-file-width="1390" data-file-height="1330" /></a></span></div> <div class="gallerytext">English</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Standard_Model_of_Elementary_Particles-fr.svg" class="mw-file-description" title="French"><img alt="French" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles-fr.svg/400px-Standard_Model_of_Elementary_Particles-fr.svg.png" decoding="async" width="400" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles-fr.svg/600px-Standard_Model_of_Elementary_Particles-fr.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles-fr.svg/800px-Standard_Model_of_Elementary_Particles-fr.svg.png 2x" data-file-width="819" data-file-height="615" /></a></span></div> <div class="gallerytext">French</div> </li> </ul> <p>Here is an image where updating the numbers updates them for several languages (SVG Translate can only update one language at a time). </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Standard_Model_of_Elementary_Particles.svg" class="mw-file-description" title="English"><img alt="English" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/400px-Standard_Model_of_Elementary_Particles.svg.png" decoding="async" width="400" height="383" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/600px-Standard_Model_of_Elementary_Particles.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/800px-Standard_Model_of_Elementary_Particles.svg.png 2x" data-file-width="1390" data-file-height="1330" /></a></span></div> <div class="gallerytext">English</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 430px;"><span typeof="mw:File"><a href="/w/index.php?title=File:Standard_Model_of_Elementary_Particles.svg&lang=de" class="mw-file-description" title="German"><img alt="German" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/langde-400px-Standard_Model_of_Elementary_Particles.svg.png" decoding="async" width="400" height="383" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/langde-600px-Standard_Model_of_Elementary_Particles.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/00/Standard_Model_of_Elementary_Particles.svg/langde-800px-Standard_Model_of_Elementary_Particles.svg.png 2x" data-file-width="1390" data-file-height="1330" /></a></span></div> <div class="gallerytext">German</div> </li> </ul> <p>See also the bicycle image. </p><p>See also the tugboat diagram. <a href="/wiki/Template:Other_versions/Tugboat_diagram" title="Template:Other versions/Tugboat diagram">Template:Other versions/Tugboat diagram</a>. </p><p>There is no clear answer about what to do. There's an advantage to using just one graphic with multiple translations. If the graphic is changed, then every translation benefits. The problem is the graphic must have space for all the languages, and that is often hard to do. Even if one graphic is used, if a numeric value is changed, then it may need to be changed in each translation. Some automation can be used for values such as distances and dates, but SVG does not have a convention for such automation. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_processing_does_not_support_tooltips">MediaWiki language processing does not support tooltips</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=138" title="Edit section: MediaWiki language processing does not support tooltips"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Using <code>switch</code> elements is not a complete solution. </p><p>SVG 2.0 added but then removed language processing for <code>title</code> elements. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_default_is_confused">MediaWiki language default is confused</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=139" title="Edit section: MediaWiki language default is confused"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><style data-mw-deduplicate="TemplateStyles:r914379029">.mw-parser-output .tracked{float:right;clear:right;border:1px solid var(--border-color-base,#999);border-radius:2px;background-color:var(--background-color-interactive,#eee);font-size:85%;text-align:center;padding:0.5em;margin-left:1em;margin-bottom:1em;width:12em;color:var(--color-emphasized,black)}.mw-parser-output .tracked p{margin:0}.mw-parser-output .tracked-url{font-weight:bold}.mw-parser-output .tracked .status,.mw-parser-output .tracked-status{font-weight:bold;text-transform:uppercase}.mw-parser-output .tracked .status.resolved,.mw-parser-output .tracked-resolved{color:green}.mw-parser-output .tracked .status.critical,.mw-parser-output .tracked-critical{color:red;font-size:1.5em}</style>Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T335361" class="extiw" title="phabricator:T335361"><span class="tracked-url trakfab-T335361">Task T335361</span></a></b><br /><span class="status"></span></div> <p>MediaWiki believes English is the true default language. Relies on <code>librsvg</code> defaulting to <code>en</code>. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_problems_2">MediaWiki problems</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=140" title="Edit section: MediaWiki problems"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T309426" class="extiw" title="phabricator:T309426"><span class="tracked-url trakfab-T309426">Task T309426</span></a></b><br /><span class="status resolved">RESOLVED</span></div> <p>I'm seeing some multilingual files that MediaWiki does not offer to show in various languages ("Render this image in ..."). I've come across a couple in the last month, and they are not the 256 kB case. Possibly newer page builder? Also may be one explicit langtag and a default. </p> <ul><li><a href="/wiki/File:Celltypes.svg" title="File:Celltypes.svg">File:Celltypes.svg</a> (99 kB) this has many languages... (later note: no <code>systemLanguage="en"</code>)</li> <li><a href="/wiki/File:1263_Mediterranean_Sea-es.svg" title="File:1263 Mediterranean Sea-es.svg">File:1263 Mediterranean Sea-es.svg</a> should have <code>es</code> and <code>eu</code> translations. (later note: no <code>systemLanguage="en"</code>)</li> <li><a href="/wiki/File:Minsk_Protocol.svg" title="File:Minsk Protocol.svg">File:Minsk Protocol.svg</a> (later note: only has <code>systemLanguage="eu"</code>)</li> <li><a href="/wiki/File:Eukaryotic_DNA_replication.svg" title="File:Eukaryotic DNA replication.svg">File:Eukaryotic DNA replication.svg</a> (later note: only has <code>systemLanguage="fr"</code>)</li></ul> <p>Maybe this is a clue. Go to </p> <ul><li><a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a> or</li> <li><a class="external free" href="https://commons.wikimedia.org/w/index.php?lang=en&title=File%3A2022_Russian_invasion_of_Ukraine.svg">https://commons.wikimedia.org/w/index.php?lang=en&title=File%3A2022_Russian_invasion_of_Ukraine.svg</a></li></ul> <p>and it will display the language drop down box. Now click on the "(default language)" option and GO. The language dropdown box disappears. </p><p>That is the same as going to </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?lang=und&title=File%3A2022_Russian_invasion_of_Ukraine.svg">https://commons.wikimedia.org/w/index.php?lang=und&title=File%3A2022_Russian_invasion_of_Ukraine.svg</a></li></ul> <p>Alternatively, go to the Klingon version, which does not have a render this image in (language) selector: </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?lang=tlh&title=File%3A2022_Russian_invasion_of_Ukraine.svg">https://commons.wikimedia.org/w/index.php?lang=tlh&title=File%3A2022_Russian_invasion_of_Ukraine.svg</a></li></ul> <p>So somebody creates a diagram in English on Commons. Somebody then applies SVG Translate to add a language such as French. SVG translate does not do the triple clause thing; instead it just adds "fr" clauses and keeps the default. The Commons file page will not display the potential languages. SVG Translate should ask for the default language (or use the <code>lang=</code> or <code>xml:lang=</code> attributes if available. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_fallbacks">MediaWiki language fallbacks</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=141" title="Edit section: MediaWiki language fallbacks"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki sometimes tries to fallback to similar languages if the desired language is not available. See <a href="https://www.mediawiki.org/wiki/Manual:Language#Fallback_languages" class="extiw" title="mw:Manual:Language">mw:Manual:Language#Fallback languages</a>. Bulgarian does not have Russian as a fallback. Ukrainian has Russian as a fallback. </p><p>Consider <a href="/wiki/File:Galvanic_cell_with_no_cation_flow.svg" title="File:Galvanic cell with no cation flow.svg">File:Galvanic cell with no cation flow.svg</a>. Currently, it has a Russian (ru) translation but not a Bulgarian (bg) translation; both language use Cyrillic script. The image is used in the Bulgarian wiki for the <a href="https://bg.wikipedia.org/wiki/%D0%90%D0%BD%D0%BE%D0%B4" class="extiw" title="bg:Анод">bg:Анод</a> article. The page displays the SVG default English rather than Russian. Bulgarian does not have Russian as a fallback. </p><p><a href="/wiki/File:Galvanic_cell_with_no_cation_flow.svg" title="File:Galvanic cell with no cation flow.svg">File:Galvanic cell with no cation flow.svg</a> also does not have a Ukrainian translation. It is used in the Ukrainian wiki: <a href="https://uk.wikipedia.org/wiki/%D0%9D%D0%B0%D0%BF%D1%96%D0%B2%D1%80%D0%B5%D0%B0%D0%BA%D1%86%D1%96%D1%8F" class="extiw" title="uk:Напівреакція">uk:Напівреакція</a>, but that image also displays as English. </p><p>Is this an argument that MWF should serve multilingual SVGs? It would provide understandable SVGs to users in ways that are not possible with a static map. A Japanese user may not understand English but may understand German. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_identifiers_may_not_be_the_same_as_IETF_langtags">MediaWiki language identifiers may not be the same as IETF langtags</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=142" title="Edit section: MediaWiki language identifiers may not be the same as IETF langtags"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki language identifiers (which are all lowercase) are usually the same as IETF langtags (which are mixed case), but there are some differences. There is also an effort to conform some language tags. </p><p>sr-ec vs sr-Cryl, sr-el vs sr-Latn, als vs gsw. </p><p>In the als Wikipedia, SVG inclusions will now use the <code>gsw</code> IETF langtag if it is available. </p><p>See <a href="https://meta.wikimedia.org/wiki/Special_language_codes" class="extiw" title="meta:Special language codes">Meta:Special language codes</a>. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_matching">MediaWiki language matching</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=143" title="Edit section: MediaWiki language matching"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T311965" class="extiw" title="phabricator:T311965"><span class="tracked-url trakfab-T311965">Task T311965</span></a></b><br /><span class="status"></span></div> <p><a href="https://phabricator.wikimedia.org/T311965" class="extiw" title="phab:T311965">Phab:T311965</a> <cite>MediaWiki mishandles hyphenated language tags in SVG files.</cite> </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_default">MediaWiki language default</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=144" title="Edit section: MediaWiki language default"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>MediaWiki defaults the language to <code>en</code>. It should remove that English bias. If a German editor creates an image that is used on several wikis, then the default display should be the German text. </p><p>So default the display to <code>und</code>. </p><p>That is a breaking change. We should scan existing SVG to discover those that have <code>switch</code> elements without default clauses. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_advertisements">MediaWiki language advertisements</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=145" title="Edit section: MediaWiki language advertisements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Say a file is used on langtag.Wiki but does not have a langtag translation. In that case, the SVG file might have a link to SVG Translate. Alternatively, MW might notice that a file is <code>switch</code> translated but the file does not have the desired language. Then it could insert not only the <code>img</code> tag but also a link to translate the file. It could use the wiki symbol for translate: <a href="/wiki/File:Translate_(CoreUI_Icons_v1.0.0).svg" title="File:Translate (CoreUI Icons v1.0.0).svg">File:Translate (CoreUI Icons v1.0.0).svg</a> — except it has a CC-BY 4.0 requirement so putting it in the SVG file would be cumbersome. </p><p>Also see <a href="/wiki/File:Epicenter_Diagram.svg" title="File:Epicenter Diagram.svg">File:Epicenter Diagram.svg</a>. Many translations, but also used on many wikis. </p><p>The information section of a file page often lists other versions of a file. A file may, for example, have PNG and SVG versions. There may also be different language versions. </p><p>A template is often used to keep the other-versions information up-to-date on the different file pages. For example, <a href="/wiki/Template:Other_versions/War_in_Ukraine_(2022)" title="Template:Other versions/War in Ukraine (2022)"><span style="font-family:monospace,monospace;">{{Other versions/War in Ukraine (2022)}}</span></a> is transcluded on many file pages. The template usually consists of an image gallery that lists each file with a comment. </p><p>For translations, the comment often identifies the language. That raises the question of how to identify the language. </p> <ol><li>Using English words such as French, Russian, or Japanese. This approach only works for English readers and does little for other languages.</li> <li>Using langtag such as fr, ru, or ja. This approach is too cryptic for most users; they would not know what the strings mean.</li> <li>Using MW <code>{{#language: fr}}</code> to obtain the language in its representation. Anyone visiting the file page would see français, русский, 日本語. That makes it easy for native users to recognize their language, but the most users would have trouble recognizing all the languages. A user seeing lietuvių may not know that means Lithuanian.</li> <li>Using <code>{{language|fr}}</code> to obtain the language in the MW page's language. The English version of the file page would show French, Russian, Japanese. The German version of the file page would show Französisch, Russisch, Japanisch. The translations depend upon the file page's <code>uselang</code> URL parameter.</li></ol> <p>Methods 3 and 4 are the better approaches. I previously used method 3, but now I think method 4 is better. </p><p>The advent of multilingual SVG files raised an issue of how they should be represented in gallery. Should there be one file that lists all the languages that it supports, or should the file be repeated for each language? </p><p>I prefer the former. The gallery is usually so small that the translations do not show up. Painting essentially the same file 15 times on the file page seems wasteful. It is very repetitive for files such as <a href="/wiki/File:Map_of_USA_with_state_names.svg" title="File:Map of USA with state names.svg">File:Map of USA with state names.svg</a>, a multilingual map with 150 languages. </p><p>Clicking on the image or a link. Should it select the render this image in language? </p><p>The language gallery templates. More to say. <a href="/wiki/Template:Svg_lang" title="Template:Svg lang"><span style="font-family:monospace,monospace;">{{Svg lang}}</span></a>, <a href="/wiki/Template:Lang_gallery" title="Template:Lang gallery"><span style="font-family:monospace,monospace;">{{Lang gallery}}</span></a>, and <a href="/wiki/Template:Lgallery" title="Template:Lgallery"><span style="font-family:monospace,monospace;">{{Lgallery}}</span></a>. </p><p><a href="/wiki/Template:Lgallery" title="Template:Lgallery"><span style="font-family:monospace,monospace;">{{Lgallery}}</span></a> supports <a href="/wiki/Category:Switch-controlled_SVG" title="Category:Switch-controlled SVG">Category:Switch-controlled SVG</a> which exploits <code>systemLanguage</code> that browsers will not understand. </p><p>Switch translated files already have a general request to add translations. That could be improved. </p><p>I have added links to SVG Translate on particular pages: </p> <ul><li><a class="external free" href="https://svgtranslate.toolforge.org/File:2022_Russian_invasion_of_Ukraine.svg">https://svgtranslate.toolforge.org/File:2022_Russian_invasion_of_Ukraine.svg</a></li></ul> <p>That can be done with some magic words, but it would be better to have translated explanations of the link: </p> <ul><li><a class="external text" href="https://svgtranslate.toolforge.org/File:2022_Russian_invasion_of_Ukraine.svg">Translate this file using SVG Translate...</a></li></ul> <p>Such a link should be generated for some values of the <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|switch=</code> option. </p><p>How about attracting translators for a specific language? Say XYZ.svg is an image used on the abc.Wiki but does not have an abc translation. How can we seek translators for the image? </p> <ul><li>Embed a translation request in the SVG image. That would pollute the image.</li> <li>Add the image to a (possibly hidden) category of SVG images needing translation to language abc.</li></ul> <p>For the latter, make a <a href="/w/index.php?title=Template:Translation_request&action=edit&redlink=1" class="new" title="Template:Translation request (page does not exist)"><span style="font-family:monospace,monospace;">{{Translation request}}</span></a> template. Add the template to the File: page with the langtag <code>abc</code>. The template can link to <code>https:svgtranslate.toolforge.org/<i>BASEPAGE</i></code>. The template can also add the File: page to the <code>Category:Translation requests abc</code>. </p> <dl><dd><small>Does SVG Translate have URL parameters to specify the source and target languages?</small></dd> <dd><a rel="nofollow" class="external text" href="https://github.com/wikimedia/svgtranslate">github repo</a></dd></dl> <p>A wiki could encourage its users to go to the appropriate category page. Or there could be a translate a random page. </p><p><a href="/wiki/User:Incnis_Mrsi" title="User:Incnis Mrsi">Incnis Mrsi</a> wrote <a href="/wiki/Template:Translate_SVG" title="Template:Translate SVG"><span style="font-family:monospace,monospace;">{{Translate SVG}}</span></a> to mark an SVG file for translation to a particular language. It is not specific to <code>switch</code> translations. It adds files to Category:SVG images to be translated to XXX. </p> <dl><dd>includeonly Category: SVG images to be translated to language(langcode) /includeonly</dd></dl> <p><a href="/wiki/Template:Language" title="Template:Language"><span style="font-family:monospace,monospace;">{{Language}}</span></a> has a second argument of <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|2=en</code> to canonize the language in English. </p><p>Category:X does not display immediate text, so simply add the category to the template. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_semantics_for_directly_served_SVG">MediaWiki language semantics for directly served SVG</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=146" title="Edit section: MediaWiki language semantics for directly served SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The current MediaWiki language semantics differs from SVG language semantics. That creates an issue when SVG (rather than PNG) is served. </p><p>When MediaWiki builds a page, it builds it for one language. An article on the French Wikipedia should have its illustrations in French. An English-speaking user who visits that French Wikipedia article will see French illustrations. </p><p>An SVG multilingual file does not depend on the Wikipedia's language setting but rather the viewer's browser setting. If the French Wikipedia served a multilingual SVG with its article, then those SVG files would be seen in the browser's preferred language (English). </p><p>WMF needs to decide what semantics it wants when serving SVG files. If it wants to keep its current semantics while serving SVG files, then it needs to localize those SVG files. Localization is not a hard thing to do. If WMF is OK with using the preferred language, then it need do nothing. </p><p>Even if WMF wants to localize SVG files, it probably should not localize them completely. There's an advantage to be had for languages such as Serbian and Chinese that use more than one script. A Serbian user who prefers Cyrillic would see Cyrillic; a Serbian user who prefers Latin script would see Latin script. Similarly, a Chinese user could see either traditional or simplified Chinese scripts. </p> <div class="mw-heading mw-heading3"><h3 id="How_MediaWiki_handles_images">How MediaWiki handles images</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=147" title="Edit section: How MediaWiki handles images"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>When MediaWiki builds a page, it makes HTML <code>img</code> elements that will display image. </p><p>For a JPEG image: </p> <ul><li><code>src="<a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/220px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg">https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/220px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg</a>"</code></li></ul> <p>For an SVG image </p> <ul><li><code>src="<a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Gibraltar_map-en.svg/220px-Gibraltar_map-en.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Gibraltar_map-en.svg/220px-Gibraltar_map-en.svg.png</a>"</code></li></ul> <p>The image URL pattern is [URL prefix]/H/HH/[filename]/[size]px-[filename][suffix] </p><p>When my browser displays the page, it processes the <code>img</code> elements. The browser will use the <code>src</code> attribute to make an HTTP request for the image. First, the browser will look in the cache to see if it has a local copy. If that local copy exists and is current, then it will use the local copy. If the local copy exists but is stale, then it will make a network request asking the remote server whether the local copy is still current. If the local copy is still current, then the browser will use the local copy. If there is no local copy or that copy is no longer current, then the image will be transferred over the network. </p><p>When the server gets an HTTP image request, it will look in its cache to see if it has that image ready to go. If it does, then it can answer the request from its cache. Otherwise, the server will pick apart the URL, process the request, store the result in its cache, and transfer the result over the network. (Processing the request might say the image is still current, or processing may involve scaling the image.) </p><p>Real life is a bit more complicated. WMF's wikis are high-traffic websites, so just one server cannot do all the work. A connection to a wiki will go to one of many servers. That server may ask other WMF computers to do the work. The <code>/H/HH/</code> pattern in the image URL is from an MD5 hash code. It offers an easy method of load leveling work among up to 256 computers. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_source_code">MediaWiki source code</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=148" title="Edit section: MediaWiki source code"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://doc.wikimedia.org/">https://doc.wikimedia.org/</a> <ul><li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/group__Media.html">https://doc.wikimedia.org/mediawiki-core/master/php/group__Media.html</a> <ul><li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/SvgHandler_8php.html">https://doc.wikimedia.org/mediawiki-core/master/php/SvgHandler_8php.html</a></li> <li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/classSVGReader.html">https://doc.wikimedia.org/mediawiki-core/master/php/classSVGReader.html</a></li></ul></li></ul></li></ul> <p>SvgReader has many uglies including the exponential language list. SvgHandler trims the list. </p><p>SvgHander::normaliseParamsInternal() is where the lang param must be in the lang list. </p><p>MediaWiki file page. </p> <ul><li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/classImagePage.html">https://doc.wikimedia.org/mediawiki-core/master/php/classImagePage.html</a></li></ul> <p>MediaWiki compiling a page. </p> <ul><li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/classThumbnailImage.html">https://doc.wikimedia.org/mediawiki-core/master/php/classThumbnailImage.html</a></li></ul> <p>MediaWiki serving an image. MediaHandler/ImageHandler/SvgHandler </p> <ul><li>SvgHandler::rasterize()</li></ul> <p>Thumbor serving a page. </p> <ul><li><a href="https://phabricator.wikimedia.org/T40010" class="extiw" title="phab:T40010">Phab:T40010</a> RFC: Re-evaluate librsvg as SVG renderer on Wikimedia wikis</li> <li><a href="https://phabricator.wikimedia.org/T261192" class="extiw" title="phab:T261192">Phab:T261192</a> Rendering multilingual (systemLanguage) SVG files fails locally after upgrading librsvg from 2.40.21 to 2.44.10 <ul><li><a class="external free" href="https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/thumbor-plugins/+/refs/heads/master/wikimedia_thumbor/engine/svg/svg.py">https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/thumbor-plugins/+/refs/heads/master/wikimedia_thumbor/engine/svg/svg.py</a></li></ul></li></ul> <p>Thumbor 7 changed to Python 3, a breaking change:<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> </p> <blockquote><p>Release 7.0.0 introduces a major breaking change due to the migration to python 3 and the modernization of our codebase. Please read the release notes for details on how to upgrade.</p></blockquote> <p>Gilles retires from WMF... <a rel="nofollow" class="external free" href="https://mobile.twitter.com/monsieurperf/status/1409444342352187400">https://mobile.twitter.com/monsieurperf/status/1409444342352187400</a> </p> <div class="mw-heading mw-heading3"><h3 id="Where_translate="no"_makes_sense"><span id="Where_translate.3D.22no.22_makes_sense"></span>Where <code>translate="no"</code> makes sense</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=149" title="Edit section: Where translate="no" makes sense"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 230px;"><span typeof="mw:File"><a href="/wiki/File:Map_of_achaean_Crete-ru.svg" class="mw-file-description" title="Map with ancient text"><img alt="Map with ancient text" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Map_of_achaean_Crete-ru.svg/360px-Map_of_achaean_Crete-ru.svg.png" decoding="async" width="360" height="200" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Map_of_achaean_Crete-ru.svg/539px-Map_of_achaean_Crete-ru.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Map_of_achaean_Crete-ru.svg/719px-Map_of_achaean_Crete-ru.svg.png 2x" data-file-width="548" data-file-height="305" /></a></span></div> <div class="gallerytext">Map with ancient text</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 230px;"><span typeof="mw:File"><a href="/wiki/File:Linear_B_tablet_Ng332.svg" class="mw-file-description" title="Ng332"><img alt="Ng332" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Linear_B_tablet_Ng332.svg/303px-Linear_B_tablet_Ng332.svg.png" decoding="async" width="303" height="200" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Linear_B_tablet_Ng332.svg/454px-Linear_B_tablet_Ng332.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/d9/Linear_B_tablet_Ng332.svg/605px-Linear_B_tablet_Ng332.svg.png 2x" data-file-width="833" data-file-height="551" /></a></span></div> <div class="gallerytext">Ng332</div> </li> </ul> <p>The Linear-B text should never be translated; the phonetic spellings should be translated; the Greek should not be translated; the Russian should be translated. </p><p>More on ancient scripts. </p> <ul><li><a href="/wiki/File:Linear_B_tablet_Ng332.svg" title="File:Linear B tablet Ng332.svg">File:Linear B tablet Ng332.svg</a> has Linear B <dl><dd><a class="external free" href="https://ru.wikipedia.org/wiki/%D0%9C%D0%B8%D0%BA%D0%B5%D0%BD%D1%81%D0%BA%D0%B0%D1%8F_%D1%86%D0%B8%D0%B2%D0%B8%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F">https://ru.wikipedia.org/wiki/%D0%9C%D0%B8%D0%BA%D0%B5%D0%BD%D1%81%D0%BA%D0%B0%D1%8F_%D1%86%D0%B8%D0%B2%D0%B8%D0%BB%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F</a></dd> <dd>Transliteration <dl><dd>.1 pe-ra3-ko-ra-i-ja , SA 200[</dd> <dd>.2 to-sa-de , o-u-di-do-to ṢẠ [</dd></dl></dd> <dd>Transcription <dl><dd>.1 Peraigōllāhia , SA 200[</dd> <dd>.2 tossade , oudidontoi ṢẠ [</dd></dl></dd></dl></li></ul> <p>From <a href="https://en.wikipedia.org/wiki/Linear_B" class="extiw" title="en:Linear B">en:Linear B</a> </p> <dl><dd>.1 pe 𐀟, ra3 𐀨 𐁁, ko 𐀒, ra 𐀨, i 𐀂, ja 𐀊 SA 200 [</dd> <dd>.2 to 𐀵, sa 𐀭, de 𐀆, o 𐀃, u 𐀄, di 𐀇, do 𐀈, to 𐀵, SA [</dd></dl> <div class="mw-heading mw-heading3"><h3 id="Language_variants">Language variants</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=150" title="Edit section: Language variants"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/w/index.php?title=File:First_Ionization_Energy.svg&lang=tlh" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/langtlh-220px-First_Ionization_Energy.svg.png" decoding="async" width="220" height="88" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/langtlh-330px-First_Ionization_Energy.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/langtlh-440px-First_Ionization_Energy.svg.png 2x" data-file-width="512" data-file-height="205" /></a><figcaption>Asking Klingon (tlh) — URL has <code>.../langtlh-220px-</code></figcaption></figure> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/w/index.php?title=File:First_Ionization_Energy.svg&lang=en" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/220px-First_Ionization_Energy.svg.png" decoding="async" width="220" height="88" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/330px-First_Ionization_Energy.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/1d/First_Ionization_Energy.svg/440px-First_Ionization_Energy.svg.png 2x" data-file-width="512" data-file-height="205" /></a><figcaption>Asking English (en) — URL does not have <code>.../langen-220px-</code></figcaption></figure> <p>It's been a long time, and I need to check these claims. I want to point to the code. </p><p>Building a wiki page that contains an SVG file is a little more involved. There are circumstances where MediaWiki will include a language specifier in the image URL: </p> <ul><li>...[filename]/lang[language]-[size]px-[filename].png</li></ul> <p>The language specifier is included if the wiki text has an explicit <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=</code> parameter. That is the user making an explicit request, and that request is honored even if the SVG file does not have that language. </p><p>On the English wikipedia, if there is no <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=</code> parameter, then no language specifier is emitted. This practice is due to WMF servers defaulting the SVG language to generic English. That practice makes it difficult to ask for the SVG file's default language. To get the default clause, one must ask for a langtag that does not exist in the file (e.g., <code>tlh</code> Klingon). (Make a table showing the issue.) </p><p>On other wikipedias, if there is no <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r588530194"><code class="nowrap">|lang=</code> parameter, there is an attempt to use that wikipedia's default language. </p><p>MediaWiki checks the SVG file to see if it has any language dependencies. The check is simple, and the check can be fooled. Currently, it reads the first 256 kB of the file looking for <code>systemLanguage</code> attributes. As it finds those attributes, it builds a list of languages the SVG file supports. </p><p>If the wikipedia's default language is in that list, then MediaWiki emits a URL that requests that language. </p><p>There is logic behind these choices. Most SVG files are not multilingual, and even if they are multilingual, they often do not support many languages. The goal is to avoid building language-specific URLs that do not affect the image. If an SVG file does not support Russian, then it does not make sense to scale and cache a Russian version of the SVG that looks exactly the same as the English version. </p> <div class="mw-heading mw-heading3"><h3 id="Languages_and_fonts">Languages and fonts</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=151" title="Edit section: Languages and fonts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Much like HTML, itis recommended that an SVG file declare its language. It can do that with <code>xml:lang</code> or <code>lang</code> attributes. Setting <code>xml:lang</code> on the toplevel <code>svg</code> element will tell generic XML tools the language, but it can also add undesired language restrictions to RDF metadata. That can be worked around by adding <code>xml:lang=""</code> to the <code>metadata</code> element. Consequently, using <code>lang</code> is simpler. </p><p>Few SVG files declare their language. In many cases, such a declaration is usually extraneous because basic SVG does not depend upon the language. SVG does not have any constructs that format text according to the language. For example, language does not determine whether a number should display as "123.45" or "123,45" or whether a date should display as "3 May 1999" or "May 3, 1999". It would be good if SVG had that ability, but it is not present yet. At best, the language attribute is a hint to programs that read an SVG file, but it does not affect the basic display of SVG text. </p> <dl><dd>Compare HTML <code>datetime</code> attribute that uniformly describes time information, but it does not format such a string.</dd> <dd>Compare JavaScript formatting functions and the Intl package.</dd></dl> <p>CSS can be sensitive to the language attribute. </p><p>Unicode does not specify which character variants should be used. (Well, it does sometimes. Normal "r" and rounded "ꝛ". Normal "d" and insular "ꝺ".<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>) For example, the Latin small letter a has two major variants: double-story <span style="font-family:serif">a</span> or single-story <span style="font-family:TW Cen MT, GillSans, Futura">a</span>. Chinese ideographs have similar variations, and some languages use specific variants. Chinese, Japanese, and Korean may draw the same ideograph differently. Unicode does not distinguish the character, so the font selection must make the change. </p><p>CSS can select an appropriate font for a language. </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">zh</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">ja</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">ko</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">bn</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="n">Noto</span><span class="w"> </span><span class="n">Sans</span><span class="w"> </span><span class="n">Bengali</span><span class="p">,</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>On WMF servers, the problem is the <code>:lang</code> selector is not supported by <code>librsvg</code>. Also, we would want to distinguish between <code>zh-Hans</code> and <code>zh-Hant</code>. Unfortunately, old versions of <code>librsvg</code> only distinguish up to the first hyphen. </p><p>There is not a good solution for the <code>systemLanguage</code> attribute. CSS can do case-insensitive, partial, matches to an IETF langtag: </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">|=</span><span class="s2">"zh"</span><span class="w"> </span><span class="nt">i</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="o">[</span><span class="nt">systemLanguage</span><span class="o">|=</span><span class="s2">"ja"</span><span class="w"> </span><span class="nt">i</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="o">[</span><span class="nt">systemLanguage</span><span class="o">|=</span><span class="s2">"ko"</span><span class="w"> </span><span class="nt">i</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="o">[</span><span class="nt">systemLanguage</span><span class="o">|=</span><span class="s2">"bn"</span><span class="w"> </span><span class="nt">i</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="n">Noto</span><span class="w"> </span><span class="n">Sans</span><span class="w"> </span><span class="n">Bengali</span><span class="p">,</span><span class="w"> </span><span class="o">...</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>But CSS is not designed to parse comma-separated lists (SVG should have made the <code>systemLanguage</code> attribute a space separated list just like the <code>class</code> attribute). Even then, CSS does not have prefix matching (<code>=|</code>) on space-separated token lists (<code>~=</code> matching). One can use several selectors to cover the cases, but it is cumbersome. </p> <div class="mw-heading mw-heading3"><h3 id="Languages_and_layout">Languages and layout</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=152" title="Edit section: Languages and layout"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_test_vertical.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/16/SVG_test_vertical.svg/220px-SVG_test_vertical.svg.png" decoding="async" width="220" height="110" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/16/SVG_test_vertical.svg/330px-SVG_test_vertical.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/16/SVG_test_vertical.svg/440px-SVG_test_vertical.svg.png 2x" data-file-width="512" data-file-height="256" /></a><figcaption>Vertical layout tests for English and Chinese. The green text would work for a plot's y-axis, but the <code>librsvg</code> used by WMF does not handle the CSS.</figcaption></figure> <p>Consider an x-y plot. The x-axis label will be horizontal and handled normally. The y-axis label is often written rotated by 90° with a text anchor of start or middle. That works for Western European languages, but Chinese should not rotate the characters but rather write them top to bottom. </p><p>The normal method of producing the y-axis label for a Western European language would be to rotate the text by -90°. The rotation point would be logically on the font baseline. For Chinese, the normal method would not be a rotation but to set the <code>writing-mode</code> to top-to-bottom. The logical baseline is no longer the bottom of the text but rather the center of the text. If the Western text used a start anchor point, then the Chinese text would use an end anchor point. </p><p>CSS can do the transform or set the writing mode, but there are subtle issues. Using the CSS <code>transform</code> property will trump any <code>transform</code> attribute on the element (CSS priority). Similarly, CSS would not trump a <code>transform</code> in a <code>style</code> attribute. Also, such transforms are applied before a <code>text</code> element's <code>x</code> and <code>y</code> attributes. Coordinates on <code>tspan</code> elements may be problematic. </p><p>The green text in the "Vertical Layout tests" to the right uses CSS to adjust a possible y-axis label. It could use a better Western European language default. The CSS is </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">zh-Hans</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="n">NSimSun</span><span class="p">,</span><span class="w"> </span><span class="kc">sans-serif</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">zh-Hant</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="n">PMingLiU-ExtB</span><span class="p">,</span><span class="w"> </span><span class="n">MingLiU_HKSCS-ExtB</span><span class="p">,</span><span class="w"> </span><span class="n">Microsoft</span><span class="w"> </span><span class="n">JhengHei</span><span class="p">,</span><span class="w"> </span><span class="kc">sans-serif</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">vert</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">fill</span><span class="p">:</span><span class="w"> </span><span class="kc">green</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">vert</span><span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">en</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">transform</span><span class="p">:</span><span class="w"> </span><span class="nb">rotate</span><span class="p">(</span><span class="mi">-90</span><span class="kt">deg</span><span class="p">);</span><span class="w"> </span><span class="k">transform-origin</span><span class="p">:</span><span class="w"> </span><span class="mi">0</span><span class="kt">px</span><span class="w"> </span><span class="mi">0</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="p">.</span><span class="nc">vert</span><span class="p">:</span><span class="nd">lang</span><span class="o">(</span><span class="nt">zh</span><span class="o">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">writing-mode</span><span class="p">:</span><span class="w"> </span><span class="n">tb</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">end</span><span class="p">;</span><span class="w"> </span><span class="k">transform</span><span class="p">:</span><span class="w"> </span><span class="nb">translate</span><span class="p">(</span><span class="mf">-0.5</span><span class="kt">em</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="kt">em</span><span class="p">);</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>For English, the text is rotated. For Chinese, the <code>writing-mode</code> is changed; the text is offset to the left to compensate for the different baselines. </p><p>Currently, the WMF rasterizer does not handle the example. </p> <div class="mw-heading mw-heading3"><h3 id="Internationalization_(i18n)_and_localization_(l10n)"><span id="Internationalization_.28i18n.29_and_localization_.28l10n.29"></span>Internationalization (i18n) and localization (l10n)</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=153" title="Edit section: Internationalization (i18n) and localization (l10n)"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many SVG files are in just one language. Such files should set the <code>xml:lang</code> or <code>lang</code> attribute in the <code>svg</code> element to identify that language. (SVG Translate should look for this attribute to set the default language; otherwise it should ask for the existing lanuguage.) </p><p>SVG files that use the <code>switch</code> element and the <code>systemLanguage</code> attribute are internationalized. One SVG file supports many languages. Such SVG files are also known as multilingual. There are not separate SVG files for each language. It is not clear whether such SVG file should have an <code>xml:lang</code> or <code>lang</code> attribute in their <code>svg</code> element. </p><p>There are systems that support many languages but produce output files that are monolingual. The output of these systems localized (specialized to a specific locale). </p><p>MediaWiki uses internationalized/multilingual SVG files to produce localized PNG files. The PNG files that <code>librsvg</code> produces are not multilingual. </p><p>That leads to semantic differences. When MediaWiki displays a multilingual SVG file, it displays the language desired by the wiki, but when I display an SVG file in my browser, my browser displays it in my preferred language. </p> <div class="mw-heading mw-heading4"><h4 id="Graphics_editor_roundtripping">Graphics editor roundtripping</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=154" title="Edit section: Graphics editor roundtripping"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A significant problem with i18n files is subsequent graphic editing. Importing an SVG file may not handle <code>systemLanguage</code> or may cause other damage. </p> <ul><li>Inkscape can do it, but human editors may get confused. <a href="/wiki/File_talk:2022_Russian_invasion_of_Ukraine.svg" title="File talk:2022 Russian invasion of Ukraine.svg">File talk:2022 Russian invasion of Ukraine.svg</a>.</li> <li>Adobe illustrator will wreck text alignment: it outputs SVG files as left justified text. See <a href="/wiki/Help:Illustrator" title="Help:Illustrator">Help:Illustrator</a> and <a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Commons:Graphics_village_pump&oldid=741283600">Commons:Graphics village pump</a>.</li> <li>CorelDraw is unknown.</li> <li>... are there other significant SVG editors?</li></ul> <p>A significant limitation of <code>switch</code> translated SVG is many graphics editing applications do not handle multilingual files. Most graphics applications have their own file format. They may import and export the SVG file format, but information may be lost during those conversions. We might expect grouping to survive, but we do not expect all SVG <code>id</code> attributes to survive. If the native file format does not handle translations, then we expect translations to be thrown away. If the import code does not handle <code>switch</code>, then all translations may be discarded. </p><p>The issue may be described as the ability to round trip information. Consider an SVG file with some particular information. If that SVG file is imported into an editing application and then exported, is the information still there? </p><p>What do we expect to round trip? </p> <ul><li>actual text</li> <li>text anchor point</li> <li>text anchoring method (left, middle end)</li></ul> <p>What do we not expect to round trip? </p> <ul><li><code>id</code></li> <li><code>class</code></li> <li><code>data-*</code></li> <li><code>style</code></li></ul> <p>Unfortunately, expectations are not always met. For example, Adobe Illustrator losing the text anchor. </p><p>Generally, it is difficult to mark specific text. </p><p>Many tools us <code>$nnnn</code> text. </p><p>How about alternatives? </p><p>If some text is unique, then use it for the key. The problem is if the same text is added while editing, then the uniqueness is lost. </p><p>Use the text as a key, but prefix with a special character (e.g., "$") to mark it as a key. </p> <div class="mw-heading mw-heading3"><h3 id="Industrial_option">Industrial option</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=155" title="Edit section: Industrial option"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Goals </p> <ul><li>Want to keep translations</li> <li>Want to use any graphics editor</li></ul> <p>Look at open source SoniTranslate. </p> <div class="mw-heading mw-heading4"><h4 id="Sanitize_SVG">Sanitize SVG</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=156" title="Edit section: Sanitize SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Currently Commons just checks for safe SVG. For example, Commons rejects an upload if there are any <code>on-*</code> attributes. An alternative is to just strip unsafe SVG. </p><p>There is a Phabricator task for that. <a href="https://phabricator.wikimedia.org/T334953" class="extiw" title="phab:T334953">Phab:T334953</a> Introduce an SVG Sanitizer. </p> <div class="mw-heading mw-heading4"><h4 id="Generate_monolingual_SVG">Generate monolingual SVG</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=157" title="Edit section: Generate monolingual SVG"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>XSLT localizer. Transform multilingual SVG to monolingual. It can also strip unneeded namespaces such as <code>inkscape:</code> (that will not remove properties in <code>style</code> elements or attributes. </p><p>Special option: SVG to skeleton. </p><p>XSLT information </p> <ul><li><a rel="nofollow" class="external free" href="https://www.informit.com/articles/article.aspx?p=24032&seqNum=8">https://www.informit.com/articles/article.aspx?p=24032&seqNum=8</a></li> <li><a rel="nofollow" class="external free" href="http://xmlsoft.org/XSLT/xsltproc.html">http://xmlsoft.org/XSLT/xsltproc.html</a></li> <li><a rel="nofollow" class="external free" href="https://gitlab.gnome.org/GNOME/libxslt">https://gitlab.gnome.org/GNOME/libxslt</a></li> <li><a rel="nofollow" class="external free" href="https://packages.debian.org/stretch/xsltproc">https://packages.debian.org/stretch/xsltproc</a> <dl><dd><code>-stringparam <i>PARAMNAME</i> <i>PARAMVALUE</i></code><sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup></dd> <dd><code>--novalid</code> skip loading DTD</dd> <dd><code>--xinclude</code> do XInclude processing on input document (do not enable)</dd> <dd><code>--nonet</code> do not fetch DTDs or entities over the network</dd> <dd><code>--output <i>file</i></code></dd></dl></li></ul> <div class="mw-heading mw-heading4"><h4 id="Extract_translations">Extract translations</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=158" title="Edit section: Extract translations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Multilingual SVG to XLIFF. </p> <div class="mw-heading mw-heading4"><h4 id="Reintegrate_translation">Reintegrate translation</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=159" title="Edit section: Reintegrate translation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Two possibilities: </p><p>Skeleton + translations → monolingual SVG (preferred) </p><p>Skeleton + translations → multilingual SVG. </p> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_language_handling">MediaWiki language handling</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=160" title="Edit section: MediaWiki language handling"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Explain the <code>lang=</code> URL parameter on Commons. Does that demand the <code>/lang</code> in the URL? There are multiple levels here, too. If I'm on a wiki and click an SVG image, it takes me to a File: page on that wiki that displays the wiki's language version. From there, I can click on the Commons link. That takes me to Commons and will display the default language version. </p> <ul><li><a href="https://phabricator.wikimedia.org/T134408" class="extiw" title="phab:T134408">Phab:T134408</a> Thumbnail-like rendering of localized SVGs for client-side rendering, 4 May 2016. Early recognition of localizing SVG.</li> <li><a href="https://phabricator.wikimedia.org/T134455" class="extiw" title="phab:T134455">Phab:T134455</a> Add experimental option for direct SVG output via srcset, 4 May 2016. Needs a localizer.</li> <li><a href="https://phabricator.wikimedia.org/T134407" class="extiw" title="phab:T134407">Phab:T134407</a> Provide a way to reference fonts for client-side SVG rendering, 4 May 2016. CSS would win here.</li> <li><a href="https://phabricator.wikimedia.org/T134482" class="extiw" title="phab:T134482">Phab:T134482</a> Beta feature for opt-in client side SVG rendering, 5 May 2016. This seems problematic. Each wiki page would need either some JavaScript to select the SVG or PNG, or there would be an HTTP vary on the user's option that would double the cache requirements.</li></ul> <div class="mw-heading mw-heading3"><h3 id="List_of_languages">List of languages</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=161" title="Edit section: List of languages"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See <a href="https://phabricator.wikimedia.org/T259018" class="extiw" title="phab:T259018">Phab:T259018</a>. </p><p>MediaWiki API will report the available languages: </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&titles=File:First%20Ionization%20Energy.svg&prop=imageinfo&iiprop=metadata&formatversion=2&iimetadataversion=latest">https://commons.wikimedia.org/w/api.php?action=query&titles=File:First%20Ionization%20Energy.svg&prop=imageinfo&iiprop=metadata&formatversion=2&iimetadataversion=latest</a></li> <li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&titles=File:2022%20Russian%20invasion%20of%20Ukraine.svg&prop=imageinfo&iiprop=metadata&formatversion=2&iimetadataversion=latest">https://commons.wikimedia.org/w/api.php?action=query&titles=File:2022%20Russian%20invasion%20of%20Ukraine.svg&prop=imageinfo&iiprop=metadata&formatversion=2&iimetadataversion=latest</a></li></ul> <p>See the <code>metadata: [ {"name": "translations", "value": [] } ]</code>. It is clearly from the <code>switch</code> information. It will have entries such as <code>{ "name": "en", "value": 2 }</code>. IIRC, the 1 and 2 values are whether it is a substring match or an exact match. Find the code to be sure. </p><p>I'm presuming this metadata is stored in the database rather than triggering a reparsing of the file. Check that out. </p> <ul><li><a href="https://www.mediawiki.org/wiki/API:Imageinfo" class="extiw" title="mw:API:Imageinfo">MW:API:Imageinfo</a></li> <li><a href="https://www.mediawiki.org/wiki/API:Data_formats" class="extiw" title="mw:API:Data formats">MW:API:Data formats</a></li> <li><a href="https://www.mediawiki.org/wiki/API:JSON_version_2" class="extiw" title="mw:API:JSON version 2">MW:API:JSON version 2</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Templates">Templates</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=162" title="Edit section: Templates"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Translation_units">Translation units</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=163" title="Edit section: Translation units"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I need to document these templates. </p><p>The goal is to use Wikidata to supply translations. </p><p>The template might add a maintenance category so we know where they are used. Also, a 'bot could add translations to the category. </p> <ul><li><a href="/wiki/Template:Trans_units" title="Template:Trans units"><span style="font-family:monospace,monospace;">{{Trans units}}</span></a> <ul><li><a href="/wiki/Template:Tu" title="Template:Tu"><span style="font-family:monospace,monospace;">{{Tu}}</span></a></li></ul></li></ul> <p>Does not work for numbered items; see <a href="/wiki/File:Steam_locomotive_scheme_new.png" title="File:Steam locomotive scheme new.png">File:Steam locomotive scheme new.png</a> and <a href="/wiki/File:Steam_locomotive.svg" title="File:Steam locomotive.svg">File:Steam locomotive.svg</a>; <a href="https://www.wikidata.org/wiki/Q171043" class="extiw" title="d:Q171043"><span title="railway locomotive that produces its pulling power through a steam engine">steam locomotive <small>(Q171043)</small></span></a> (which has-parts) </p> <ol><li>Firebox <a href="https://www.wikidata.org/wiki/Q549635" class="extiw" title="d:Q549635"><span title="part of a steam engine">firebox <small>(Q549635)</small></span></a></li> <li>Ashpan <a href="https://www.wikidata.org/wiki/Q722734" class="extiw" title="d:Q722734">ash-pan <small>(Q722734)</small></a></li> <li>Water (inside the boiler) <a href="https://www.wikidata.org/wiki/Q283" class="extiw" title="d:Q283"><span title="chemical compound with raw molecular formula H₂O; main constituent of the fluids of most living organisms">water <small>(Q283)</small></span></a></li> <li>Smokebox <a href="https://www.wikidata.org/wiki/Q954573" class="extiw" title="d:Q954573"><span title="part of a steam locomotive">Smokebox <small>(Q954573)</small></span></a></li> <li>Cab (several options, none great. e.g., <a href="https://www.wikidata.org/wiki/Q224773" class="extiw" title="d:Q224773"><span title="enclosed space in a truck where the driver is seated">truck cabin <small>(Q224773)</small></span></a>)</li> <li>Tender <a href="https://www.wikidata.org/wiki/Q749311" class="extiw" title="d:Q749311"><span title="vehicle for carrying a steam locomotive's supply of fuel and water">tender <small>(Q749311)</small></span></a></li> <li>Steam Dome <a href="https://www.wikidata.org/wiki/Q1158778" class="extiw" title="d:Q1158778"><span title="water vapor separator in locomotives">steam dome <small>(Q1158778)</small></span></a></li> <li>Safety Valve <a href="https://www.wikidata.org/wiki/Q730458" class="extiw" title="d:Q730458"><span title="valve that acts as a fail-safe">safety valve <small>(Q730458)</small></span></a></li> <li>Regulator Valve <a href="https://www.wikidata.org/wiki/Q1260990" class="extiw" title="d:Q1260990"><span title="valve that automatically regulates the pressure of fluid traversing it">pressure regulator <small>(Q1260990)</small></span></a></li> <li>Superheater Header in smokebox</li> <li>Piston <a href="https://www.wikidata.org/wiki/Q45227" class="extiw" title="d:Q45227"><span title="moving component of reciprocating engines that is contained by a cylinder and is made gas-tight by piston rings">piston <small>(Q45227)</small></span></a></li> <li>Blastpipe</li> <li>Valve Gear</li> <li>Regulator Rod</li> <li>Drive Frame</li> <li>Rear Pony Truck</li> <li>Front Pony Truck</li> <li>Bearing <a href="https://www.wikidata.org/wiki/Q190100" class="extiw" title="d:Q190100"><span title="machine element which constrains relative movement to the desired motion and reduces friction between moving parts">bearing <small>(Q190100)</small></span></a> and Axlebox</li> <li>Leaf Spring <a href="https://www.wikidata.org/wiki/Q773544" class="extiw" title="d:Q773544"><span title="simple form of spring, mostly used for the suspension of cars">leaf spring <small>(Q773544)</small></span></a></li> <li>Brake shoe <a href="https://www.wikidata.org/wiki/Q124366" class="extiw" title="d:Q124366"><span title="vehicle part">brake shoe <small>(Q124366)</small></span></a></li> <li>Air brake pump <a href="https://www.wikidata.org/wiki/Q1196198" class="extiw" title="d:Q1196198"><span title="fail-safe power braking system with compressed air as the operating medium">railway air brake <small>(Q1196198)</small></span></a> and <a href="https://www.wikidata.org/wiki/Q134574" class="extiw" title="d:Q134574"><span title="device that moves fluids (liquids or gases) by mechanical action">pump <small>(Q134574)</small></span></a></li> <li>(Front) Centre Coupler <a href="https://www.wikidata.org/wiki/Q1501648" class="extiw" title="d:Q1501648"><span title="mechanism for connecting single vehicles (rolling stock) in a train">railway coupler <small>(Q1501648)</small></span></a></li> <li>Whistle <a href="https://www.wikidata.org/wiki/Q1765082" class="extiw" title="d:Q1765082"><span title="device used to produce sound with the aid of live steam, which acts as a vibrating system">steam whistle <small>(Q1765082)</small></span></a> subclass of <a href="https://www.wikidata.org/wiki/Q204917" class="extiw" title="d:Q204917"><span title="instrument which produces sound from a stream of forced air">whistle <small>(Q204917)</small></span></a></li> <li>Sand box</li></ol> <div class="mw-heading mw-heading5"><h5 id="Wikidata_labels_for_number_labels">Wikidata labels for number labels</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=164" title="Edit section: Wikidata labels for number labels"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here is another Wikidata hack. Consider files that use numbers to label parts of an image. The description will often have something like "1. Turboencabulator." Instead, do something such as </p> <dl><dd><dl><dd><code>1. {{Q|Q7853895|capitalization=ucfirst}}</code> → "1. <a href="https://www.wikidata.org/wiki/Q7853895" class="extiw" title="d:Q7853895"><span title="Fictional electromechanical machine">Turbo encabulator <small>(Q7853895)</small></span></a>" or</dd> <dd><code>1. {{Label|Q7853895}}</code> → "1. <a href="https://en.wikipedia.org/wiki/en:Turbo_encabulator" class="extiw" title="w:en:Turbo encabulator"><span title="Fictional electromechanical machine">turbo encabulator</span></a>."</dd></dl></dd></dl> <div class="mw-heading mw-heading4"><h4 id="RDF_hack">RDF hack</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=165" title="Edit section: RDF hack"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external text" href="https://www.w3.org/RDF/Validator/rdfval?PARSE&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED&URI=">Check RDF</a> <ul><li>No metadata <ul><li><a rel="nofollow" class="external free" href="https://www.w3.org/RDF/Validator/rdfval?PARSE&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED&URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg">https://www.w3.org/RDF/Validator/rdfval?PARSE&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED&URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F1%2F1d%2FFirst_Ionization_Energy.svg</a></li></ul></li> <li>try another <ul><li><a rel="nofollow" class="external free" href="https://www.w3.org/RDF/Validator/rdfval?PARSE&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED&URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F8%2F8a%2FSVG_Text_Chunk.svg">https://www.w3.org/RDF/Validator/rdfval?PARSE&TRIPLES_AND_GRAPH=PRINT_TRIPLES&FORMAT=PNG_EMBED&URI=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F8%2F8a%2FSVG_Text_Chunk.svg</a></li></ul></li></ul></li> <li><a rel="nofollow" class="external text" href="https://validator.w3.org/i18n-checker/check?uri=#validate-by-uri+">Check i18n (the W3C Internationalization Checker does not work for SVG.)</a></li> <li><a rel="nofollow" class="external text" href="https://validator.w3.org/i18n-checker/check?uri=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FUser%3AGlrx#validate-by-uri+">Check i18n (this page!)</a></li></ul> <table class="wikitable"> <tbody><tr> <th><a href="https://en.wikipedia.org/wiki/en:String_(computer_science)" class="extiw" title="w:en:String (computer science)"><span title="data type representing a finite sequence of encoded characters">string</span></a> <bdi>(en)</bdi></th> <th><a href="https://en.wikipedia.org/wiki/en:Wikidata_item" class="extiw" title="w:en:Wikidata item"><span title="main documentary unit of Wikidata">Wikidata item</span></a> <bdi>(en)</bdi></th> <th><a href="https://en.wikipedia.org/wiki/en:Wikidata_item" class="extiw" title="w:en:Wikidata item"><span title="main documentary unit of Wikidata">Wikidata item</span></a> <bdi>(en)</bdi> </th></tr> <tr> <td>Atomic number (Z)</td> <td><a href="https://www.wikidata.org/wiki/Q23809" class="extiw" title="d:Q23809">'atomic number' (Q23809)</a><br />wdprop: <span><span>atomic number</span></span> atomic number<br />units:<br /></td> <td><a href="https://www.wikidata.org/wiki/Q23809" class="extiw" title="d:Q23809">'atomic number' (Q23809)</a> </td></tr> <tr> <td>First ionization energy [eV]</td> <td><a href="https://www.wikidata.org/wiki/Q483769" class="extiw" title="d:Q483769">'ionization energy' (Q483769)</a><br />wdprop: <span><span>ionization energy</span></span> ionization energy<br />units: <br /> (Latn and Cyrl)</td> <td><a href="https://www.wikidata.org/wiki/Q483769" class="extiw" title="d:Q483769">'ionization energy' (Q483769)</a> </td></tr></tbody></table> <ul><li>problems with <ul><li>PAGELANGUAGE: en,</li> <li>PAGENAME: Glrx,</li> <li>FULLPAGENAME: User:Glrx,</li> <li>CURRENTCONTENTLANGUAGE: en,</li> <li><a href="/wiki/Template:Uselang" title="Template:Uselang"><span style="font-family:monospace,monospace;">{{Uselang}}</span></a>: (differs from Wikimedia), int:lang: en</li> <li>filepath:PAGENAME: <a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg">https://upload.wikimedia.org/wikipedia/commons/1/1d/First_Ionization_Energy.svg</a></li></ul></li></ul> <p>Wikidata (inconsistent templates, broken templates, and no Wikibase module) </p> <ul><li>Quick and dirty translation via Wikidata: <ul><li>String <a href="https://en.wikipedia.org/wiki/en:String_(computer_science)" class="extiw" title="w:en:String (computer science)"><span title="data type representing a finite sequence of encoded characters">string</span></a>, <a href="https://en.wikipedia.org/wiki/de:Zeichenkette" class="extiw" title="w:de:Zeichenkette"><span title="data type representing a finite sequence of encoded characters">Zeichenkette</span></a></li> <li>Q-item <a href="https://en.wikipedia.org/wiki/en:Wikidata_item" class="extiw" title="w:en:Wikidata item"><span title="main documentary unit of Wikidata">Wikidata item</span></a>, <a href="https://en.wikipedia.org/wiki/en:Wikidata_item" class="extiw" title="w:en:Wikidata item"><span title="main documentary unit of Wikidata">Wikidata-Objekt</span></a></li></ul></li></ul> <p>Wikidata item, en, ?uselang= </p> <ul><li>Q19557: <a href="https://www.wikidata.org/wiki/Q19557" class="extiw" title="d:Q19557">'alkali metal' (Q19557)</a>: <a href="https://www.wikidata.org/wiki/Q19557" class="extiw" title="d:Q19557">'alkali metal' (Q19557)</a>, <a href="/w/index.php?title=Template:Wikidata_description&action=edit&redlink=1" class="new" title="Template:Wikidata description (page does not exist)">Template:Wikidata description</a></li> <li>Q19563: <a href="https://en.wikipedia.org/wiki/en:Alkaline_earth_metal" class="extiw" title="w:en:Alkaline earth metal"><span title="group of chemical elements">alkaline earth metal</span></a>: [[:d:Q19563|<a href="https://en.wikipedia.org/wiki/en:Alkaline_earth_metal" class="extiw" title="w:en:Alkaline earth metal"><span title="group of chemical elements">alkaline earth metal</span></a> <small>(Q19563)</small>]], <a href="/w/index.php?title=Template:Wikidata_description&action=edit&redlink=1" class="new" title="Template:Wikidata description (page does not exist)">Template:Wikidata description</a></li> <li>Q19609: <a href="https://en.wikipedia.org/wiki/en:Noble_gas" class="extiw" title="w:en:Noble gas"><span title="group of chemical elements in column 18 of the periodic table, that tend to be chemically inert and thus form odorless, colorless, monatomic gases with low reactivity; consists of helium, neon, argon, krypton, xenon, radon, and possibly oganesson">noble gases</span></a>: <a href="https://www.wikidata.org/wiki/Q19609" class="extiw" title="d:Q19609"><span title="group of chemical elements in column 18 of the periodic table, that tend to be chemically inert and thus form odorless, colorless, monatomic gases with low reactivity; consists of helium, neon, argon, krypton, xenon, radon, and possibly oganesson">noble gases <small>(Q19609)</small></span></a>, <a href="/w/index.php?title=Template:Wikidata_description&action=edit&redlink=1" class="new" title="Template:Wikidata description (page does not exist)">Template:Wikidata description</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Problem_file">Problem file</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=166" title="Edit section: Problem file"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/2022_Russian_invasion_of_Ukraine.svg/220px-2022_Russian_invasion_of_Ukraine.svg.png" decoding="async" width="220" height="148" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/2022_Russian_invasion_of_Ukraine.svg/330px-2022_Russian_invasion_of_Ukraine.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4f/2022_Russian_invasion_of_Ukraine.svg/440px-2022_Russian_invasion_of_Ukraine.svg.png 2x" data-file-width="2199" data-file-height="1478" /></a><figcaption>2022 Russian invasion of Ukraine</figcaption></figure> <p><a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a> is an important map on Commons, but it is a mess. The map is needed in many languages, and how those translations are handled is a difficult issue. There are many localized versions of the map, but they may not get continuing updates to the original file. The conflict is active, so updates are desired. </p><p>The file can be improved in several ways, but some improvements may make the file difficult to edit. There are tradeoffs, and this file shows some of the problems. </p> <div class="mw-heading mw-heading4"><h4 id="Planar_translations">Planar translations</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=167" title="Edit section: Planar translations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The original map now has some multilingual additions, but they are essentially planar translations that SVG Translate and other translation tools cannot handle. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Unwinding planar translations is tough. One needs to match the text elements by their position, but the positions may have moved slightly. </p><p>Now that the file uses the translation units that SVG Translate wants, several languages have been added. Some additional translations have been so close in time that I feared they would overwrite each other, but it does not appear that happened. SVG Translate may have a significant update model that allows concurrent translations. </p> <div class="mw-heading mw-heading4"><h4 id="Inkscape">Inkscape</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=168" title="Edit section: Inkscape"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The author of this SVG file uses Inkscape, so SVG Translate and hand edits to the file should not prevent the author from making changes. If the author has trouble, then it is important to list those troubles. It is possible the author with have trouble with <code>class</code> attributes. </p><p>A significant problem is users do not know how to add new date labels and text. Copying some text and then editing often produces confused translations or untranslateable text. If an entire <code>switch</code> is copied, then the English text is changed but the default text and all the other languages stay the same. The translations are confused. If just the <code>text</code> element is copied, then it also carries the <code>systemLanguage</code> attribute. That attribute prevents SVG Translate from translating the text. The best approach is to just insert new text; do not copy it from elsewhere in the image. </p><p>There are also strange edits that appear. </p><p>A <code>switch</code> element may contain several unrelated (and ultimately undisplayable) <code>text</code> elements. This may come about from copying the text elements. The copy somehow ends up within the <code>switch</code>. It should not display on the screen, so it would confuse the user. </p><p>Geometry elements are being inserted into <code>switch</code> elements that should contain only <code>text</code> elements. What determines where Inkscape will insert a new element? It should be treating a <code>switch</code> atomically. I have deleted several spurious geometry elements already, and now there are more: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ffffff"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(1827.3,587.38)"</span><span class="w"> </span><span class="na">id=</span><span class="s">"switch4938"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">style=</span><span class="s">"display:inline;opacity:0.948718;fill:#dc0000;fill-opacity:1;stroke:#000000;stroke-width:0.245063;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:1.92453;stroke-opacity:1"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"rect352325-8-9-2-1-4-3-9-29-8-3"</span> <span class="w"> </span><span class="na">width=</span><span class="s">"25.413"</span><span class="w"> </span><span class="na">height=</span><span class="s">"5.2650332"</span><span class="w"> </span> <span class="w"> </span><span class="na">x=</span><span class="s">"-12.691059"</span><span class="w"> </span><span class="na">y=</span><span class="s">"-3.4384575"</span><span class="w"> </span><span class="na">ry=</span><span class="s">"1.2425818"</span><span class="w"> </span> <span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(0.33424498)"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg995"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg798"</span><span class="nt">></span>1er<span class="w"> </span>avril<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-tr"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-tr"</span><span class="nt">></span>1<span class="w"> </span>Nisan<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-it"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"it"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-it"</span><span class="nt">></span>1º<span class="w"> </span>aprile<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-ru"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ru"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-ru"</span><span class="nt">></span>1<span class="w"> </span>апреля<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-pt"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"pt"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-pt"</span><span class="nt">></span>1<span class="w"> </span>de<span class="w"> </span>Abril<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-el"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"el"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-el"</span><span class="nt">></span>1<span class="w"> </span>Απριλίου<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-ca"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ca"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-ca"</span><span class="nt">></span>1<span class="w"> </span>d'abril<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996-vi"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"vi"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799-vi"</span><span class="nt">></span>1<span class="w"> </span>tháng<span class="w"> </span>4<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg996"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg799"</span><span class="nt">></span>1<span class="w"> </span>April<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The <code>rect</code> element will prevent any display of text. Also notice that the <code>systemLanguage="en"</code> clause was removed; it was probably replaced with the <code>rect</code> element. There is also the sneaky rotate by less than 1 degree transform. Inkscape is also inserting copious style information. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Also, instead of editing a symbol definition, the <code>use</code> was exploded and the result edited in place. </p> <div class="mw-heading mw-heading4"><h4 id="Colors">Colors</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=169" title="Edit section: Colors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Many people want the map colors changed. One concern was using web safe/colorblind-friendly colors. Consistent (and easily changed) colors can be done with styles. </p> <div class="mw-heading mw-heading4"><h4 id="Place_names">Place names</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=170" title="Edit section: Place names"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The map is already large. There are hundreds of community names on the map. That presents the same translation bloat problem that a 100-language version of a US map presents. The map should use a skeleton file that is localized with a database of translations. WMF does not have that capability for SVG files. SVG also does not have an easy line-breaking method. </p><p>Need to work with what we have today. To keep the file size down, the <code>switch</code> elements are given or inherit styling from <code>class="place"</code>. That allows the fill color, font family, and text-anchor to specified in one place rather than repeated on each element. The font size is also given or inherited. The font size is a function of the city's population. The text position is also specified on the <code>switch</code> element so it need not be repeated for each translation. </p> <div class="mw-heading mw-heading4"><h4 id="Finding_place_names">Finding place names</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=171" title="Edit section: Finding place names"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Using WikiData to translate place names is complicated by difficult-to-resolve Ukrainian place names. For example, "Pershotravneve" maps to more than 30 WikiData items.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> </p><p>To automate the search, the name should be attached to a map point; that practice is not common on SVG maps. The projection parameters can be found by following sources back to <a href="/wiki/File:Ukraine_adm_location_map.svg" title="File:Ukraine adm location map.svg">File:Ukraine adm location map.svg</a>; the base map claims to be an equirectangular projection that includes administrative regions. </p><p><a rel="nofollow" class="external free" href="http://wiki.gis.com/wiki/index.php/Equidistant_Cylindrical_projection">http://wiki.gis.com/wiki/index.php/Equidistant_Cylindrical_projection</a> </p> <ul><li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>λ<!-- λ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lambda }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b43d0ea3c9c025af1be9128e62a18fa74bedda2a" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.355ex; height:2.176ex;" alt="{\displaystyle \lambda }"></span> is the <a href="/w/index.php?title=Longitude&action=edit&redlink=1" class="new" title="Longitude (page does not exist)">longitude</a> of the location to project;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>φ<!-- φ --></mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/33ee699558d09cf9d653f6351f9fda0b2f4aaa3e" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:1.52ex; height:2.176ex;" alt="{\displaystyle \varphi }"></span> is the <a href="/w/index.php?title=Latitude&action=edit&redlink=1" class="new" title="Latitude (page does not exist)">latitude</a> of the location to project;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi _{1}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>φ<!-- φ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>1</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi _{1}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/d7daf493c8f6ef669c04c7b9715532fc35d12d60" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.574ex; height:2.176ex;" alt="{\displaystyle \varphi _{1}}"></span> are the standard parallels (north and south of the equator) where the scale of the projection is true;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \varphi _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>φ<!-- φ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \varphi _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/6cf63e8f16cefbe25d3d028fbb464a8c4a53cc7b" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:2.574ex; height:2.176ex;" alt="{\displaystyle \varphi _{0}}"></span> is the central parallel of the map;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \lambda _{0}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msub> <mi>λ<!-- λ --></mi> <mrow class="MJX-TeXAtom-ORD"> <mn>0</mn> </mrow> </msub> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \lambda _{0}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/cfa5ad1eb6cdaf3d8dfd77991ee9ce7bdf169184" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:2.409ex; height:2.509ex;" alt="{\displaystyle \lambda _{0}}"></span> is the central meridian of the map;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.33ex; height:1.676ex;" alt="{\displaystyle x}"></span> is the horizontal coordinate of the projected location on the map;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle y}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>y</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle y}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/b8a6208ec717213d4317e666f1ae872e00620a0d" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.671ex; width:1.155ex; height:2.009ex;" alt="{\displaystyle y}"></span> is the vertical coordinate of the projected location on the map;</li> <li><span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle R}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>R</mi> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle R}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4b0bfb3769bf24d80e15374dc37b0441e2616e33" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.764ex; height:2.176ex;" alt="{\displaystyle R}"></span> is the radius of the globe.</li></ul> <p>The SVG size is 1,546 × 1,038. Then invert that point with the map projection to get a latitude and longitude of the community. Then do the WikiData query that coincides with that position. </p> <div style="background: lightblue;"> <table class="wikitable" style="text-align:center"><tbody><tr><th colspan="3"> <p><a href="https://en.wikipedia.org/wiki/Equirectangular_projection" class="extiw" title="en:Equirectangular projection">Equirectangular projection</a>, vertical stretching 150 %<br />Border coordinates </p> </th></tr><tr><td colspan="3">52.7</td></tr><tr><td style="width:7em;">21.5</td><td>←↕→</td><td style="width:7em;">40.7</td></tr> <tr><td colspan="3">44.1</td></tr></tbody></table> <p><bdi><span typeof="mw:File"><span><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Pictogram_voting_info.svg/15px-Pictogram_voting_info.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Pictogram_voting_info.svg/23px-Pictogram_voting_info.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Pictogram_voting_info.svg/30px-Pictogram_voting_info.svg.png 2x" data-file-width="250" data-file-height="250" /></span></span> <b>Info</b></bdi> This map is part of a series of location maps with unified standards: SVG as file format, standardised colours and name scheme. The boundaries on these maps always show the <a href="https://en.wikipedia.org/wiki/De_facto" class="extiw" title="en:De facto">de facto</a> situation and do not imply any endorsement or acceptance. In case of changes of the shown area the file is updated. The old version will be uploaded as a new file and thus is still available. </p> </div> <p>The file is 2,199 × 1,478 px. Radekhiv is at (350.01 px, 413.3 px) → 50.3° N, 24.56° E. Google Maps says 50.28° N, 24.60° E.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>. The WikiData item is <a href="https://www.wikidata.org/wiki/Q904046" class="extiw" title="d:Q904046"><span title="city in Ukraine">Radekhiv <small>(Q904046)</small></span></a>; location is <a href="https://www.wikidata.org/wiki/Property:P625" class="extiw" title="d:Property:P625"><span title="geocoordinates of the subject. For Earth, please note that only WGS84 coordinating system is supported at the moment">coordinate location <small>(P625)</small></span></a>: <span><span><a class="mw-kartographer-maplink" data-mw-kartographer="maplink" data-style="osm-intl" href="/wiki/Special:Map/0/50.282777777778/24.6375/en" data-lat="50.282777777778" data-lon="24.6375" data-overlays="["_d6faf6d8c3ee589815c027b58fc219920bee028c"]">50°16′58″N 24°38′15″E</a></span></span> </p><p>The vertical stretching comment of 150% is the same as shrinking the horizontal by 2/3. That gives the standard parallels as <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \arccos(2/3)}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>arccos</mi> <mo>⁡<!-- --></mo> <mo stretchy="false">(</mo> <mn>2</mn> <mrow class="MJX-TeXAtom-ORD"> <mo>/</mo> </mrow> <mn>3</mn> <mo stretchy="false">)</mo> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \arccos(2/3)}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/4d18f12a11062ef18b9ab19d4c674e9272d267c4" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:11.514ex; height:2.843ex;" alt="{\displaystyle \arccos(2/3)}"></span> = ±48.1897. </p><p>Locations use circles; it might be better to use symbols. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ff4"</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"#777"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">".71"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"950.74"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"379.56"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"246.42"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"424.61"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"350.01"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"413.3"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"340.11"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"175.71"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1252.6"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"439.46"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1283.4"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"500.98"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"288.49"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"210.71"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"297.69"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"259.51"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"307.23"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"319.26"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"372.29"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"378.3"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"463.15"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"243.6"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"527.85"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"150.26"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1596.7"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"465.5"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1671.8"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"477.12"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ff4"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">".71"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"#777"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1598.5"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"574.58"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1648.1"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"611.47"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1687.9"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"570.18"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1782.4"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"651.77"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1722.5"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"661.25"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1722.1"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"533.15"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1700.9"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"655.44"</span><span class="w"> </span><span class="na">r=</span><span class="s">"3.2"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1540.9"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"377.32"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1577.5"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"330.57"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"#787877"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"#777"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1374.1"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"333.64"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1330.1"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"312.07"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1464.5"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"261.7"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span><span class="nt"></g></span> </pre></div> <p>Sensible grouping may be done by finding a location circle and then finding nearby text. Alternatively, locate all circles near some text. The grouping also allows translation issues to be detected. For example, the anchor point of some text may need to be moved if a translation is significantly longer or shorter than the original. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g></span> <span class="w"> </span><span class="nt"><circle</span><span class="w"> </span><span class="na">class=</span><span class="s">"city"</span><span class="w"> </span><span class="na">r=</span><span class="s">"3"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">class=</span><span class="s">"city"</span><span class="w"> </span><span class="na">x=</span><span class="s">"10"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="nt">></span>City<span class="w"> </span>Name<span class="nt"></text></span> <span class="nt"></g></span> </pre></div> <p>The map may use a more sensible grouping of communities within districts. </p><p>Would like to detect content that is a date. </p><p>The text should use <code>class</code> attributes and CSS for the formatting. Map (font, font size, color) → class. </p><p>Several <code>g</code> elements are used to default the font size (or other formatting characteristics) of their contained <code>text</code> elements. Unwinding those groups is a difficult problem. Perhaps detect a group that has presentation attributes and only <code>text</code> children. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"Calibri"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"3.27"</span><span class="w"> </span><span class="na">font-weight=</span><span class="s">"bold"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">".61"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"923.1"</span><span class="w"> </span><span class="na">y=</span><span class="s">"241.1"</span><span class="nt">></span>1<span class="w"> </span>April<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1180.34"</span><span class="w"> </span><span class="na">y=</span><span class="s">"253.12"</span><span class="nt">></span>1<span class="w"> </span>April<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1133.34"</span><span class="w"> </span><span class="na">y=</span><span class="s">"158.79"</span><span class="nt">></span>2<span class="w"> </span>April<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1372.74"</span><span class="w"> </span><span class="na">y=</span><span class="s">"238.32"</span><span class="nt">></span>2<span class="w"> </span>April<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1446.72"</span><span class="w"> </span><span class="na">y=</span><span class="s">"159.12"</span><span class="nt">></span>4<span class="w"> </span>April<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"936.76"</span><span class="w"> </span><span class="na">y=</span><span class="s">"345.97"</span><span class="nt">></span>30<span class="w"> </span>March<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"983.05"</span><span class="w"> </span><span class="na">y=</span><span class="s">"390.31"</span><span class="nt">></span>31<span class="w"> </span>March<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1047.81"</span><span class="w"> </span><span class="na">y=</span><span class="s">"215.22"</span><span class="nt">></span>31<span class="w"> </span>March<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"1180.34"</span><span class="w"> </span><span class="na">y=</span><span class="s">"204.35"</span><span class="nt">></span>1<span class="w"> </span>April<span class="nt"></text></span> <span class="nt"></g></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> There are several screwy <code>transform</code> attributes. For example, <code>transform="scale(1.000,1)"</code>. Some other transforms have rotations of a fraction of a degree. The effective rotations are small enough that they can be ignored (except for the additional translation they introduce). Some matrices have a similar small rotation. There is even the bizarre: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><circle</span><span class="w"> </span><span class="na">transform=</span><span class="s">"scale(1 -1)"</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1291.2"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"-261.91"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="nt">/></span> <span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1128.4"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"255.56"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">fill-rule=</span><span class="s">"evenodd"</span><span class="w"> </span><span class="na">stroke-linecap=</span><span class="s">"round"</span><span class="w"> </span><span class="na">stroke-linejoin=</span><span class="s">"round"</span><span class="nt">/></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> There are <code>text</code> elements that are not stroked but have stroking attributes. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> There are <code>switch</code> elements that have a single default clause. Other editors have used SVG Translate on the file, so the problem has disappeared. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Bombing locations should be symbols, but they may not even be grouped. These use relative coordinates, so the path matching may be easier than expected. The DOM dropped path primitives. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"m791.33 600.27 5.164 3.958 1.051-3.741 1.484 3.803 4.113-3.556-2.226 4.607 3.525-.124-2.288 2.876 3.061 1.979-3.649.062 3.216 3.865-4.607-2.134-.495 4.143-2.257-3.34-3.154 4.298.309-5.38-4.298.866 2.69-3.525-2.196-3.587 3.061.588z"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"red"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"m792.98 602.35 3.877 2.972.789-2.809 1.114 2.856 3.088-2.67-1.672 3.459 2.647-.093-1.718 2.159 2.299 1.486-2.74.047 2.415 2.902-3.459-1.602-.372 3.111-1.695-2.507-2.368 3.227.232-4.04-3.227.65 2.02-2.647-1.648-2.693 2.299.441z"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ff8000"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"m794.64 604.5 2.49 1.908.507-1.804.716 1.834 1.983-1.715-1.074 2.221 1.7-.06-1.103 1.387 1.476.954-1.759.03 1.551 1.864-2.222-1.029-.239 1.998-1.088-1.61-1.521 2.072.149-2.594-2.073.418 1.297-1.7-1.059-1.729 1.476.283z"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ff0"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><path</span><span class="w"> </span><span class="na">d=</span><span class="s">"M798.43 608.4a.777.777 0 1 1-1.553 0 .777.777 0 1 1 1.553 0z"</span><span class="nt">/></span> </pre></div> <p>The last path uses two arcs to make a circle of radius 0.777 and diameter 1.553. It would give the center of the bombing location and the presumptive symbol origin. </p><p>It may be better to localize the file with XSLT, fix some issues, and then restart the translations. </p> <div class="mw-heading mw-heading4"><h4 id="Source_data">Source data</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=172" title="Edit section: Source data"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See <a href="https://en.wikipedia.org/wiki/Template:Russo-Ukrainian_War_detailed_map" class="extiw" title="w:Template:Russo-Ukrainian War detailed map">w:Template:Russo-Ukrainian War detailed map</a> and <a href="https://en.wikipedia.org/wiki/Module:Russo-Ukrainian_War_detailed_map" class="extiw" title="w:Module:Russo-Ukrainian War detailed map">w:Module:Russo-Ukrainian War detailed map</a>. These maps are made with technology on the English Wikipedia. The air bases and nuclear installations have names. Cities with latitude and longitude by Oblast. Labels are wikilinks such as <a href="https://en.wikipedia.org/wiki/Zelenodolsk,_Ukraine" class="extiw" title="w:Zelenodolsk, Ukraine">Zelenodolsk</a>, and following that link produces the WikiData item <a href="https://www.wikidata.org/wiki/Q640713" class="extiw" title="d:Q640713"><span title="town in Dnipropetrovsk Oblast, Ukraine">Zelenodolsk <small>(Q640713)</small></span></a>. The diagram has lost of lot of information. </p><p>The module has some data in an apparent Lua object. I do not know if the data is available as JSON. </p> <ul><li><a href="https://www.wikidata.org/wiki/Property:P131" class="extiw" title="d:Property:P131"><span title="the item is located on the territory of the following administrative entity. Use P276 for specifying locations that are non-administrative places and for items about events. Use P1382 if the item falls only partially into the administrative entity.">located in the administrative territorial entity <small>(P131)</small></span></a> (allows sorting by Oblast?)</li> <li><a href="https://www.wikidata.org/wiki/Property:P625" class="extiw" title="d:Property:P625"><span title="geocoordinates of the subject. For Earth, please note that only WGS84 coordinating system is supported at the moment">coordinate location <small>(P625)</small></span></a> (allows checking location)</li> <li><a href="https://www.wikidata.org/wiki/Property:P1082" class="extiw" title="d:Property:P1082"><span title="number of people inhabiting the place; number of people of subject">population <small>(P1082)</small></span></a> (allows checking dot size)</li></ul> <p>How do I find which items have links to a Wikipedia article? </p><p>What is the best query approach? </p> <div class="mw-heading mw-heading5"><h5 id="Wikidata_API_queries">Wikidata API queries</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=173" title="Edit section: Wikidata API queries"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>From a wiki article, find the Q-item? See <a class="external free" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bwbentityusage">https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bwbentityusage</a> </p> <ul><li><a class="external free" href="https://en.wikipedia.org/w/api.php?action=query&prop=wbentityusage&titles=Zelenodolsk,%20Ukraine">https://en.wikipedia.org/w/api.php?action=query&prop=wbentityusage&titles=Zelenodolsk,%20Ukraine</a></li></ul> <p>returns </p> <pre>{ "batchcomplete": "", "query": { "pages": { "33276544": { "pageid": 33276544, "ns": 0, "title": "Zelenodolsk, Ukraine", "wbentityusage": { "Q10172305": { "aspects": [ "S" ] }, "Q640713": { "aspects": [ "C", "D.en", "O", "S", "T" ] } } } } } } </pre> <p>Can a SPARQL query find which item has a link to the article? </p> <div class="mw-heading mw-heading5"><h5 id="Position-based_SPARQL_query">Position-based SPARQL query</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=174" title="Edit section: Position-based SPARQL query"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Find a settlement using its latitude and longitude. </p><p>For example, Zelenodolsk is at <code>Point(33.652359815 47.563096347)</code>. Find the settlements near that point: </p> <div><div class="mw-highlight mw-highlight-lang-sparql mw-content-ltr" dir="ltr"><pre><span></span><span class="c">#title: places in Ukraine near a coordinate</span> <span class="c"># SELECT ?place ?placeLabel ?location WHERE {</span> <span class="c"># wd:Q640713 wdt:P625 ?coord. # coordinates of the location</span> <span class="c"># ?place wdt:P17 wd:Q212; # country: Ukraine</span> <span class="c"># wdt:P625 ?location.</span> <span class="c"># FILTER(geof:distance(?location, ?coord) < 10). # less than 10 km away</span> <span class="k">SELECT</span> <span class="k">DISTINCT</span> <span class="nv">?place</span> <span class="nv">?placeLabel</span> <span class="nv">?oblastLabel</span> <span class="nv">?location</span> <span class="nv">?distance</span> <span class="k">WHERE</span> <span class="p">{</span> <span class="k">Bind</span><span class="p">(</span><span class="s">"Point(33.652359815 47.563096347)"</span><span class="o">^^</span><span class="nn">geo</span><span class="p">:</span><span class="nt">wktLiteral</span> <span class="k">as</span> <span class="nv">?coord</span><span class="p">).</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P31</span><span class="o">/</span><span class="nn">wdt</span><span class="p">:</span><span class="nt">P279</span><span class="o">*</span> <span class="nn">wd</span><span class="p">:</span><span class="nt">Q12051488</span> <span class="p">.</span> <span class="c"># populated place in Ukraine</span> <span class="c"># ?place wdt:P131* ?oblast.</span> <span class="c"># ?oblast wdt:P31 wd:Q3348196. # located in Ukrainian oblast</span> <span class="c"># Search by Nearest</span> <span class="k">SERVICE</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">around</span> <span class="p">{</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P625</span> <span class="nv">?location</span> <span class="p">.</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">center</span> <span class="nv">?coord</span> <span class="p">.</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">radius</span> <span class="s">"10"</span> <span class="p">.</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">distance</span> <span class="nv">?distance</span> <span class="p">.</span> <span class="p">}</span> <span class="k">SERVICE</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">label</span> <span class="p">{</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">language</span> <span class="s">"en"</span> <span class="p">}</span> <span class="p">}</span> <span class="k">Order by</span> <span class="nv">?distance</span> </pre></div></div><p><a class="external text" href="https://query.wikidata.org/#%23title%3A%20places%20in%20Ukraine%20near%20a%20coordinate%0A%23%20SELECT%20%3Fplace%20%3FplaceLabel%20%3Flocation%20WHERE%20%7B%0A%23%20%20wd%3AQ640713%20wdt%3AP625%20%3Fcoord.%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20coordinates%20of%20the%20location%0A%23%20%20%3Fplace%20wdt%3AP17%20wd%3AQ212%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20country%3A%20Ukraine%0A%23%20%20%20%20%20%20%20%20%20wdt%3AP625%20%3Flocation.%0A%23%20%20FILTER%28geof%3Adistance%28%3Flocation%2C%20%3Fcoord%29%20%3C%2010%29.%20%23%20less%20than%2010%20km%20away%0ASELECT%20DISTINCT%20%3Fplace%20%3FplaceLabel%20%3FoblastLabel%20%3Flocation%20%3Fdistance%20WHERE%20%7B%0A%20%20Bind%28%22Point%2833.652359815%2047.563096347%29%22%5E%5Egeo%3AwktLiteral%20as%20%3Fcoord%29.%0A%20%20%3Fplace%20wdt%3AP31%2Fwdt%3AP279%2A%20wd%3AQ12051488%20.%20%23%20populated%20place%20in%20Ukraine%0A%20%20%23%20%3Fplace%20wdt%3AP131%2A%20%3Foblast.%0A%20%20%23%20%3Foblast%20wdt%3AP31%20wd%3AQ3348196.%20%23%20located%20in%20Ukrainian%20oblast%0A%20%20%0A%20%20%23%20Search%20by%20Nearest%0A%20%20SERVICE%20wikibase%3Aaround%20%7B%20%0A%20%20%20%20%3Fplace%20wdt%3AP625%20%3Flocation%20.%20%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Acenter%20%3Fcoord%20.%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Aradius%20%2210%22%20.%20%0A%20%20%20%20bd%3AserviceParam%20wikibase%3Adistance%20%3Fdistance%20.%0A%20%20%7D%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D%20%0AOrder%20by%20%3Fdistance">Try it!</a> </p><div class="mw-heading mw-heading5"><h5 id="Inverted_SPARQL_query">Inverted SPARQL query</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=175" title="Edit section: Inverted SPARQL query"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Alternatively, invert the problem. Get a list of human settlements in Ukraine and use that list to match the names. This query takes less than 4 seconds and returns 30,000 results. It does not find Kyiv because Kyiv is not located in an Oblast — like Washington D.C. is not located within a state. So the Oblast could be optional. Furthermore, not all settlements have a population. If I do not acquire population, then the query takes 30 seconds. </p> <div><div class="mw-highlight mw-highlight-lang-sparql mw-content-ltr" dir="ltr"><pre><span></span><span class="c">#title: populated places in Ukraine</span> <span class="c"># -> 30,000 results w/o population, 6000 w population, 1700 w pop >= 1000</span> <span class="k">SELECT</span> <span class="k">DISTINCT</span> <span class="nv">?place</span> <span class="nv">?placeLabel</span> <span class="nv">?oblastLabel</span> <span class="nv">?location</span> <span class="nv">?population</span> <span class="nv">?native</span> <span class="k">WHERE</span> <span class="p">{</span> <span class="c"># populated place in Ukraine</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P31</span><span class="o">/</span><span class="nn">wdt</span><span class="p">:</span><span class="nt">P279</span><span class="o">*</span> <span class="nn">wd</span><span class="p">:</span><span class="nt">Q12051488</span> <span class="p">.</span> <span class="c"># coordinates for that place</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P625</span> <span class="nv">?location</span> <span class="p">.</span> <span class="c"># try to get the population</span> <span class="k">optional</span> <span class="p">{</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P1082</span> <span class="nv">?population</span> <span class="p">.</span> <span class="c"># filter (?population >= 200000) .</span> <span class="p">}</span> <span class="c"># try to get the oblast</span> <span class="k">optional</span> <span class="p">{</span> <span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P131</span><span class="o">*</span> <span class="nv">?oblast</span> <span class="p">.</span> <span class="c"># located in an administrative region</span> <span class="nv">?oblast</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P31</span> <span class="nn">wd</span><span class="p">:</span><span class="nt">Q3348196</span><span class="p">.</span> <span class="c"># that is a Ukrainian oblast</span> <span class="p">}</span> <span class="c"># get the native name of the settlement</span> <span class="k">optional</span> <span class="p">{</span><span class="nv">?place</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P1705</span> <span class="nv">?native</span> <span class="p">.}</span> <span class="k">SERVICE</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">label</span> <span class="p">{</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">language</span> <span class="s">"[AUTO_LANGUAGE],en"</span> <span class="p">}</span> <span class="p">}</span> <span class="k">Order by</span> <span class="nv">?placeLabel</span> </pre></div></div><p><a class="external text" href="https://query.wikidata.org/#%23title%3A%20populated%20places%20in%20Ukraine%0A%23%20-%3E%2030%2C000%20results%20w%2Fo%20population%2C%206000%20w%20population%2C%201700%20w%20pop%20%3E%3D%201000%0ASELECT%20DISTINCT%20%3Fplace%20%3FplaceLabel%20%3FoblastLabel%20%3Flocation%20%3Fpopulation%20%3Fnative%20WHERE%20%7B%0A%20%20%23%20populated%20place%20in%20Ukraine%0A%20%20%3Fplace%20wdt%3AP31%2Fwdt%3AP279%2A%20wd%3AQ12051488%20.%0A%0A%20%20%23%20coordinates%20for%20that%20place%0A%20%20%3Fplace%20wdt%3AP625%20%3Flocation%20.%0A%0A%20%20%23%20try%20to%20get%20the%20population%0A%20%20optional%20%7B%0A%20%20%20%20%3Fplace%20wdt%3AP1082%20%3Fpopulation%20.%0A%20%20%20%20%23%20filter%20%28%3Fpopulation%20%3E%3D%20200000%29%20.%0A%20%20%7D%0A%0A%20%20%23%20try%20to%20get%20the%20oblast%0A%20%20optional%20%7B%0A%20%20%20%20%3Fplace%20wdt%3AP131%2A%20%3Foblast%20.%20%23%20located%20in%20an%20administrative%20region%0A%20%20%20%20%3Foblast%20wdt%3AP31%20wd%3AQ3348196.%20%23%20that%20is%20a%20Ukrainian%20oblast%0A%20%20%7D%0A%0A%20%20%23%20get%20the%20native%20name%20of%20the%20settlement%0A%20%20optional%20%7B%3Fplace%20wdt%3AP1705%20%3Fnative%20.%7D%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22%20%7D%0A%7D%20%0AOrder%20by%20%3FplaceLabel">Try it!</a> </p><p>There are more issues for oblasts. Several settlements are repeated because their oblast changed over time. Consequently, start times and end times for administrative regions are important. Is there an easy way to screen for outdated oblasts? </p><p>The name matching does not work well. The map has about 600 place names, but only 249 matches are found. Many settlements do not have a native label (they may have a Ukrainian label). In addition, the English spelling used on the map does not always match the WikiData label. Approximate string matching may help. </p><p>I trimmed the query to just a settlement with a location. Out of 650 map locations, I find name matches for all but about 50 names. I'm updating some Wikidata entries so matches will be found. That involves spelling changes and instance-of/subclass-of populated place in Ukraine. Some place names represent commercial places (power plants and a steel mill), so they are not found by the query. </p><p>Even with the simplified query, some place names have dozens of rows even when I do not ask for population or oblast. For example, Vesele. </p><p>Nearby matching still has plenty of matching problems. Matching distance is large because the labels may be far away (<code>text-anchor</code> is always <code>middle</code>?). Looks like there are Wikidata items that should be merged. </p> <div class="mw-heading mw-heading4"><h4 id="Fixes">Fixes</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=176" title="Edit section: Fixes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I made some fixes to the file, and there were surprises. Several graphic elements had been merged or shuffled, and it takes a lot of work to find even simple cases. It is tedious work by hand. Another problem with working on a frequently updated file: new revisions. A recent revision caught me half-way through doing some housekeeping edits. Now I need to figure out how to merge them. That is further complicated by Inkscape's verbose output: one attribute per line (with the addition of an <code>id</code> attribute to every element). It is tougher to edit the file by hand. Time to run it through an XML pretty printer. I cannot really complain. Inkscape maintained the file structure and even the XML comments of my most recent upload. More importantly, the recent edit added content. </p><p>Another realization is another SVG Translate issue. Most of the file is a planar translation. It has a high-level <code>switch</code> with the separate planes as <code>g</code> elements. SVG translate leaves the complicated groups with <code>systemLanguage</code> attributes alone, but it apparently processes the default clause. That processing includes adding <code>switch</code> translations to every <code>text</code> element. </p><p>I got caught again. This time, the file was changed with SVG Translate (the legend is now a good target for SVG Translate, but not the rest of the file) while I was working on some changes. </p><p>Planning other fixes.... </p> <div class="mw-heading mw-heading5"><h5 id="Locations">Locations</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=177" title="Edit section: Locations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The circles used to display cities are inconsistent. There are several radii to represent the size of the city, but the Ukrainian cities have a gray stroke while the Russian-held cities do not have a stroked border: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1597.2"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"395.17"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ff4"</span><span class="w"> </span><span class="na">stroke=</span><span class="s">"#777"</span><span class="w"> </span><span class="na">stroke-width=</span><span class="s">".71"</span><span class="nt">/></span> <span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1680.7"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"408.34"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"red"</span><span class="nt">/></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The stroke width is almost exclusively 0.71, but there are some cases with 1.09, 0.5, and 0.41. Some CSS would be neater and allow quickly adding a border: </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">circle</span><span class="p">.</span><span class="nc">uk</span><span class="w"> </span><span class="p">{</span><span class="k">fill</span><span class="p">:</span><span class="w"> </span><span class="mh">#ff4</span><span class="p">;</span><span class="w"> </span><span class="k">stroke</span><span class="p">:</span><span class="w"> </span><span class="mh">#777</span><span class="p">;</span><span class="w"> </span><span class="k">stroke-width</span><span class="p">:</span><span class="w"> </span><span class="mf">.71</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="nt">circle</span><span class="p">.</span><span class="nc">ru</span><span class="w"> </span><span class="p">{</span><span class="k">fill</span><span class="p">:</span><span class="w"> </span><span class="kc">red</span><span class="p">;</span><span class="w"> </span><span class="k">stroke</span><span class="p">:</span><span class="w"> </span><span class="kc">none</span><span class="p">;</span><span class="w"> </span><span class="k">stroke-width</span><span class="p">:</span><span class="w"> </span><span class="mf">.71</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1597.2"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"395.17"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">class=</span><span class="s">"uk"</span><span class="nt">/></span> <span class="nt"><circle</span><span class="w"> </span><span class="na">cx=</span><span class="s">"1680.7"</span><span class="w"> </span><span class="na">cy=</span><span class="s">"408.34"</span><span class="w"> </span><span class="na">r=</span><span class="s">"2.49"</span><span class="w"> </span><span class="na">class=</span><span class="s">"ru"</span><span class="nt">/></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The Russian fill is usually red <span style="background:red;color:red;font-weight:400;" title="red"><span style="visibility:hidden; color:transparent;">00</span></span>, but sometimes it is #fa2c29 <span style="background:#fa2c29;color:red;font-weight:400;" title="#fa2c29"><span style="visibility:hidden; color:transparent;">00</span></span>. </p> <ul><li><span style="font-family: monospace"><span style="background:#fa2c29;color:#FFF;font-weight:400;" title="#fa2c29"><span style="visibility:hidden; color:transparent;">0</span>#fa2c29<span style="visibility:hidden; color:transparent;">0</span></span></span></li> <li><span style="font-family: monospace"><span style="background:#ff0000;color:#FFF;font-weight:400;" title="#ff0000"><span style="visibility:hidden; color:transparent;">0</span>#ff0000<span style="visibility:hidden; color:transparent;">0</span></span></span></li></ul> <p>Just using red seems reasonable. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Date label fills use yellow and a darker red: </p> <ul><li><span style="font-family: monospace"><span style="background:#ff0;color:#000;font-weight:400;" title="#ff0"><span style="visibility:hidden; color:transparent;">0</span>#ff0<span style="visibility:hidden; color:transparent;">0</span></span></span></li> <li><span style="font-family: monospace"><span style="background:#dc0000;color:#FFF;font-weight:400;" title="#dc0000"><span style="visibility:hidden; color:transparent;">0</span>#dc0000<span style="visibility:hidden; color:transparent;">0</span></span></span></li></ul> <p>Much of the placename text is a blue #04a <span style="background:#04a;color:red;font-weight:400;" title="#04a"><span style="visibility:hidden; color:transparent;">00</span></span>. </p><p>The placename text usually is the same as the placenames used in the English version. Just use the English placenames and then add back the few changes (e.g., French uses Kiev). </p><p>The biggest problem with placenames is the dot size and the font size. Those sizes reflect the population, but consistent handling of those items is tough. In addition, some placename text may need different text anchors. Putting a size value in the <code>class</code> would work to set the font size, but it may not work for SVG 1.1 <code>circle</code> elements. The <code>r</code> radius is a geometry property that can be set with CSS in SVG 2.0, but it is just an attribute in SVG 1.1.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup> </p><p>The issue of dot size. </p> <table class="wikitable"> <caption>Towns and Villages </caption> <tbody><tr> <th>Population</th> <th>Dot Size</th> <th>Possible r</th> <th>Label Size</th> <th>Possible font-size</th> <th>Contested city size </th></tr> <tr> <td>Capital</td> <td>Size: 35</td> <td>8.71</td> <td>label size: 140</td> <td>17.79</td> <td> </td></tr> <tr> <td>Population 1M +</td> <td>Size: 28</td> <td></td> <td>label size: 130</td> <td></td> <td> </td></tr> <tr> <td>Population 500K +</td> <td>Size: 24</td> <td></td> <td>label size: 120</td> <td></td> <td> </td></tr> <tr> <td>Population 200K +</td> <td>Size: 20</td> <td></td> <td>label size: 110</td> <td></td> <td> </td></tr> <tr> <td>Population 100K +</td> <td>Size: 16</td> <td></td> <td>label size: 100</td> <td></td> <td> </td></tr> <tr> <td>Population 50K +</td> <td>Size: 14</td> <td></td> <td>label size: 90</td> <td></td> <td> </td></tr> <tr> <td>Population 20K +</td> <td>Size: 12</td> <td></td> <td>label size: 80</td> <td></td> <td> </td></tr> <tr> <td>Population 10K +</td> <td>Size: 10</td> <td></td> <td>label size: 70</td> <td></td> <td> </td></tr> <tr> <td>Population 5K +</td> <td>Size: 8</td> <td></td> <td>label size: 60</td> <td></td> <td> </td></tr> <tr> <td>Population < 5K</td> <td>Size: 6</td> <td></td> <td>label size: 0 or 50</td> <td></td> <td> </td></tr></tbody></table> <pre> --Towns & Villages -- Dotsize vs. Population --Arranged by Oblasts, then cities, alphabetical order </pre> <p>Locations </p> <ul><li><a href="/wiki/File:Location_dot_blue.svg" title="File:Location dot blue.svg">File:Location dot blue.svg</a></li> <li><a href="/wiki/File:Location_dot_red.svg" title="File:Location dot red.svg">File:Location dot red.svg</a></li> <li><a href="/wiki/File:80x80-red-blue-anim.gif" title="File:80x80-red-blue-anim.gif">File:80x80-red-blue-anim.gif</a></li></ul> <div class="mw-heading mw-heading5"><h5 id="Styling_with_class">Styling with class</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=178" title="Edit section: Styling with class"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I would like to use <code>class</code> attribute and CSS to set styling. I did that in the map legend, but some web searches suggest that it is difficult to use class/CSS formatting in Inkscape. I need to find out more to avoid making the file difficult for others to edit. </p><p>Some comments suggested that <code>class</code> must be set in the XML editor (which might be daunting for many editors and have substantial peril). In addition, changing the <code>class</code> may not cause Inkscape's visual display to be updated. How does Inkscape handle styling? There were also comments about using Inkscape styling extensions, but extensions are not a good route. </p> <div class="mw-heading mw-heading5"><h5 id="Date_text">Date text</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=179" title="Edit section: Date text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The date text does vary among versions, but the translations are direct. A wholesale use of the <code>systemLanguage="en"</code> group followed by editing the dates should work. </p><p>Dates are done in Calibri bold. The date text depends on the background. Russian dates are white, Ukrainian dates are black. Unfortunately, <code>librsvg</code> does not handle class conjunctions:<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">text</span><span class="p">.</span><span class="nc">date</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">font-family</span><span class="p">:</span><span class="w"> </span><span class="n">Calibri</span><span class="p">;</span><span class="w"> </span><span class="k">font-weight</span><span class="p">:</span><span class="w"> </span><span class="kc">bold</span><span class="p">;</span><span class="w"> </span><span class="k">font-size</span><span class="p">:</span><span class="w"> </span><span class="mf">3.27</span><span class="kt">px</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">middle</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="nt">text</span><span class="p">.</span><span class="nc">date</span><span class="p">.</span><span class="nc">ru</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">fill</span><span class="p">:</span><span class="w"> </span><span class="mh">#FFF</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> <span class="nt">text</span><span class="p">.</span><span class="nc">date</span><span class="p">.</span><span class="nc">uk</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">fill</span><span class="p">:</span><span class="w"> </span><span class="mh">#000</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <div class="mw-heading mw-heading5"><h5 id="Dates_and_background_rects">Dates and background rects</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=180" title="Edit section: Dates and background rects"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> A date label was made with a <code>rect</code> element for the background and a <code>text</code> element for the date. I changed the <code>rect</code> elements to use the <code>#labelru</code> and <code>#labeluk</code> symbols. I also paired the symbols with their corresponding text, so the SVG now looks like: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">x=</span><span class="s">"961.3"</span><span class="w"> </span><span class="na">y=</span><span class="s">"378.84"</span><span class="w"> </span><span class="nt">/></span> <span class="nt"><switch</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#fff"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(965.88, 382.3)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">><tspan></span>25<span class="w"> </span>February<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan></span>25<span class="w"> </span>février<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tr"</span><span class="nt">><tspan></span>25<span class="w"> </span>Şubat<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text><tspan></span>25<span class="w"> </span>February<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The text does not use <code>text-anchor="middle"</code>, so the "25 Subat" will skew to the left. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The text <i>x</i>-coordinate should be shifted to the midpoint of the <code>use</code> element. That would be <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x'=x+{25.41 \over 2}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <msup> <mi>x</mi> <mo>′</mo> </msup> <mo>=</mo> <mi>x</mi> <mo>+</mo> <mrow class="MJX-TeXAtom-ORD"> <mfrac> <mn>25.41</mn> <mn>2</mn> </mfrac> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x'=x+{25.41 \over 2}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/05ccc92b1bc45b2139081028b50f4498017d8078" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -1.838ex; width:15.416ex; height:5.176ex;" alt="{\displaystyle x'=x+{25.41 \over 2}}"></span>. </p><p>Ideally, the origin of the symbol and the midpoint of the text would coincide. The <code>#labelru</code> and <code>#labeluk</code> symbols can be shifted to use the same origin as the text. </p><p>Filters would be a better way to handle the rect. Rather than having a separate <code>use</code>, the <code>switch</code> or the <code>text</code> could use a filter instead. The filter could even adjust to the length of the date. The support for <code>filter</code> may be troublesome. The best method may use <code>feImage</code> that points to SVG for a rounded rectangle image, but I doubt there is reasonable support for that construct. Using rectangles would have good support, but it would have sharp corners. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:SVG_Test_Label.svg" class="mw-file-description" title="rect and filter methods"><img alt="rect and filter methods" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/SVG_Test_Label.svg/400px-SVG_Test_Label.svg.png" decoding="async" width="400" height="234" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/SVG_Test_Label.svg/600px-SVG_Test_Label.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/SVG_Test_Label.svg/800px-SVG_Test_Label.svg.png 2x" data-file-width="512" data-file-height="299" /></a></span></div> <div class="gallerytext">rect and filter methods</div> </li> </ul> <p>Ugh. Clear that bounding boxes for text elements are not computed correctly. </p> <div class="mw-heading mw-heading5"><h5 id="Dates_and_groups">Dates and groups</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=181" title="Edit section: Dates and groups"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Placing both elements in a group would allow positioning both. Such a grouping may be confusing to others. </p><p>Several labels have the same date and consequently redundant translations. A simplification would be to put each date into a symbol where it would be translated once. It could even be used in both symbols: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="err">...</span><span class="nt">></span> <span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#april_15"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#fff"</span><span class="nt">/></span> <span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labeluk"</span><span class="w"> </span><span class="err">...</span><span class="nt">></span> <span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#april_15"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#000"</span><span class="nt">/></span> </pre></div> <p>That change may also be confusing to others. </p> <div class="mw-heading mw-heading5"><h5 id="Dates_and_automatic_translations">Dates and automatic translations</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=182" title="Edit section: Dates and automatic translations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The Intl package can format international dates.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-js mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">var</span><span class="w"> </span><span class="nx">date</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="ow">new</span><span class="w"> </span><span class="nb">Date</span><span class="p">(</span><span class="mf">2022</span><span class="p">,</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"> </span><span class="mf">15</span><span class="p">);</span> <span class="ow">new</span><span class="w"> </span><span class="nb">Intl</span><span class="p">.</span><span class="nx">DateTimeFormat</span><span class="p">(</span><span class="s2">"de"</span><span class="p">,</span><span class="w"> </span><span class="p">{</span><span class="nx">day</span><span class="o">:</span><span class="w"> </span><span class="s2">"numeric"</span><span class="p">,</span><span class="w"> </span><span class="nx">month</span><span class="o">:</span><span class="w"> </span><span class="s2">"long"</span><span class="p">}).</span><span class="nx">format</span><span class="p">(</span><span class="nx">date</span><span class="p">);</span> </pre></div> <p>There are some issues: <code>"en"</code> → "March 15", <code>"en-GB"</code> → "15 March". For German, a period is added after the day. Hand translation for French gives "<span lang="fr">1er avril</span>".<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup> For Italian, "<span lang="it">1º aprile</span>".<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup> The flourishes are only for the first day of the month. </p><p>It would be better if the dates were generated automatically rather than manually translated. </p><p>I use the Date object to parse the default date (<code>Date.parse(el.textContent + " 2022")</code>). Then I use the Intl package to compare the dates in the <code>switch</code> element clauses. </p><p>From a data standpoint, a more sensible default clause would use an ISO date format. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">></span>15<span class="w"> </span>March<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text></span>2022-03-15<span class="nt"></text></span> <span class="nt"></switch></span> </pre></div> <p>Unfortunately, that would confuse SVG Translate. Going from English to another language would present "15 March", but going from default would present "2022-03-15". </p> <div class="mw-heading mw-heading5"><h5 id="Copies_and_strange_transformations">Copies and strange transformations</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=183" title="Edit section: Copies and strange transformations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I'm seeing strange changes to the SVG. Notice the <code>y="31.370001</code>. That suggests the number 31.37 was bumped by a single-float epsilon. Furthermore, <code>transform="rotate(9.267) translate(1485.7, Y)"</code> was rewritten as <code>transform="rotate(9.267,-957.72641,9148.3009)"</code>. It is rotating the origin to a desired location!<br /> Gross check (needs work):<br /> 1460.7007169041, 273.62571979975<br /> 1460.7006854713, 273.62571624018 <br /> Is the rewrite done by Inkscape or by SVG Translate? </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(9.267)"</span><span class="w"> </span><span class="na">x=</span><span class="s">"1473"</span><span class="w"> </span><span class="na">y=</span><span class="s">"31.370001"</span><span class="w"> </span><span class="na">id=</span><span class="s">"use4827"</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="nt">/></span> <span class="nt"><switch</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ffffff"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(9.267,-957.72641,9148.3009)"</span><span class="w"> </span><span class="na">id=</span><span class="s">"switch4839"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg973"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg776"</span><span class="nt">></span>25<span class="w"> </span>February<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg974"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg777"</span><span class="nt">></span>25<span class="w"> </span>février<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975-tr"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778-tr"</span><span class="nt">></span>25<span class="w"> </span>Şubat<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975-it"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"it"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778-it"</span><span class="nt">></span>25<span class="w"> </span>febbraio<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975-ru"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ru"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778-ru"</span><span class="nt">></span>25<span class="w"> </span>февраля<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975-pt"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"pt"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778-pt"</span><span class="nt">></span>25<span class="w"> </span>de<span class="w"> </span>Fevereiro<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975-el"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"el"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778-el"</span><span class="nt">></span>25<span class="w"> </span>Φεβρουαρίου<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg975"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg778"</span><span class="nt">></span>25<span class="w"> </span>February<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p>Somebody is going nuts duplicating rotated <code>use</code> elements. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">x=</span><span class="s">"1937.40"</span><span class="w"> </span><span class="na">y=</span><span class="s">"544.58002"</span><span class="nt">/></span> <span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">x=</span><span class="s">"1937.40"</span><span class="w"> </span><span class="na">y=</span><span class="s">"544.58002"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(0.334,-4875.8035,-16138.871)"</span><span class="nt">/></span> <span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">x=</span><span class="s">"1937.40"</span><span class="w"> </span><span class="na">y=</span><span class="s">"544.58002"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"rotate(0.668,-5215.2903,-325.84574)"</span><span class="nt">/></span> <span class="nt"><switch</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#ffffff"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(1924.7,548.29)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">><tspan></span>6<span class="w"> </span>March<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan></span>6<span class="w"> </span>mars<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tr"</span><span class="nt">><tspan></span>6<span class="w"> </span>Mart<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"it"</span><span class="nt">><tspan></span>6<span class="w"> </span>marzo<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ru"</span><span class="nt">><tspan></span>6<span class="w"> </span>марта<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"pt"</span><span class="nt">><tspan></span>6<span class="w"> </span>de<span class="w"> </span>Março<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"el"</span><span class="nt">><tspan></span>6<span class="w"> </span>Μαρτίου<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ca"</span><span class="nt">><tspan></span>6<span class="w"> </span>de<span class="w"> </span>març<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text><tspan></span>6<span class="w"> </span>March<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p>See <a rel="nofollow" class="external text" href="https://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#InterfaceSVGAnimatedTransformList">SVGAnimatedTransformList</a>. The API has a wonderful <code>.consolidate()</code> method. The API is incomplete. There is not a method to copy a transform or a list of transforms. Instead of using the API to concatenate two transform lists, it was easier to concatenate text strings: </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="nx">el2</span><span class="p">.</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s2">"transform"</span><span class="p">,</span><span class="w"> </span><span class="nx">el1</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="s2">"transform"</span><span class="p">)</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s2">" "</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nx">el2</span><span class="p">.</span><span class="nx">getAttribute</span><span class="p">(</span><span class="s2">"transform"</span><span class="p">));</span> </pre></div> <div class="mw-heading mw-heading5"><h5 id="Symbols">Symbols</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=184" title="Edit section: Symbols"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are more symbols to extract: air bases, harbors, and power plants. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> Contested city </p> <ul><li><a href="/wiki/File:80x80-red-blue-anim.gif" title="File:80x80-red-blue-anim.gif">File:80x80-red-blue-anim.gif</a></li></ul> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The air base icon </p> <ul><li><a href="/wiki/File:Fighter-jet-blue-icon.svg" title="File:Fighter-jet-blue-icon.svg">File:Fighter-jet-blue-icon.svg</a></li></ul> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The harbor icon </p> <ul><li><a href="/wiki/File:Anchor_pictogram_blue.svg" title="File:Anchor pictogram blue.svg">File:Anchor pictogram blue.svg</a></li></ul> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> The power plant icons have changed from their original form. The Ukrainian version is a solid fill rather than a gradient. The Russian version still has a gradient, but it is not prominent. If I use a solid fill, then they can be a single symbol and the fill can be determined with <code>class="uk"</code> or <code>class="ru"</code>. </p> <ul><li><a href="/wiki/File:Icon_NuclearPowerPlant-yellow.svg" title="File:Icon NuclearPowerPlant-yellow.svg">File:Icon NuclearPowerPlant-yellow.svg</a></li> <li><a href="/wiki/File:Icon_NuclearPowerPlant-red.svg" title="File:Icon NuclearPowerPlant-red.svg">File:Icon NuclearPowerPlant-red.svg</a></li></ul> <p>Hydroelectric plant (not used?) </p> <ul><li><a href="/wiki/File:BSicon_STRl_blue.svg" title="File:BSicon STRl blue.svg">File:BSicon STRl blue.svg</a> check out Kaniv hydroelectric</li></ul> <div class="mw-heading mw-heading5"><h5 id="SVG_Translate_bogus_langtags">SVG Translate bogus langtags</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=185" title="Edit section: SVG Translate bogus langtags"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> </p><p>Change bogus <code>systemLanguage="zh_HANT"</code> to <code>systemLanguage="zh-HANT"</code>. Quick and dirty would select all the <code>systemLanguage</code> attributes and change underscores to hyphens. Killing bad langtags is good practice, but it will give horrible user interactions in SVG Translate. Users may continually try to translate a phrase that already has a translation. That would mean keeping both the bad langtag (to satisfy SVG Trnaslate) and the good langtag (to satisfy SVG). Then updates to the bad langtag would have to be copied to the good langtag. What a mess. </p><p><span typeof="mw:File"><span title="✓"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/15px-Yes_check.svg.png" decoding="async" width="15" height="15" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/23px-Yes_check.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fb/Yes_check.svg/30px-Yes_check.svg.png 2x" data-file-width="600" data-file-height="600" /></span></span> <b><bdi>Done</bdi></b> SVG Translate seems to be duplicating clauses on subsequent invocations. Link to Phab issue. </p> <div class="mw-heading mw-heading5"><h5 id="Text_element_within_switches_with_coordinates">Text element within switches with coordinates</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=186" title="Edit section: Text element within switches with coordinates"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I fixed a few <code>switch</code> element bodies that have translated text. Ideally, the <code>switch</code> element's <code>transform</code> property sets the starting text position. The <code>text</code> element and its first <code>tspan</code> element should not have <code>x</code>, <code>y</code>, or <code>transform</code> attributes. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch</span><span class="w"> </span><span class="na">id=</span><span class="s">"switch4565-3-6-9"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(1354.865,893.27667)"</span><span class="w"> </span><span class="na">class=</span><span class="s">"place"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"5.34px"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"font-family:'Liberation Sans', Arial, sans-serif;text-anchor:middle;fill:#0044aa"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg2351-1-1-88"</span><span class="w"> </span><span class="na">x=</span><span class="s">"11.933496"</span><span class="w"> </span><span class="na">y=</span><span class="s">"1.381068"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan17037-0-9-2"</span><span class="nt">></span>Vysokopillia<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text4206-2-uk-1-5"</span><span class="w"> </span><span class="na">inkscape:label=</span><span class="s">"text4206-2"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"uk"</span><span class="w"> </span><span class="na">x=</span><span class="s">"12"</span><span class="w"> </span><span class="na">y=</span><span class="s">"2"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan16021-7-uk-5-0"</span><span class="nt">></span>Високопілля<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text4206-2-7-94"</span><span class="w"> </span><span class="na">inkscape:label=</span><span class="s">"text4206-2"</span><span class="w"> </span><span class="na">x=</span><span class="s">"12"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan16021-7-6-0"</span><span class="nt">></span>Vysokopillia<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p>The problem may be common enough so I should try to detect it. </p> <ul><li><code>switch/text[x] | switch/text[y] | switch/text[transform]</code></li> <li><code>switch/text[x or y or transform]</code></li></ul> <div class="mw-heading mw-heading5"><h5 id="Elements_with_redundant_style_information">Elements with redundant <code>style</code> information</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=187" title="Edit section: Elements with redundant style information"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Replace <code>style</code> attribute with equivalent <code>class</code> value. </p><p>Perhaps hoist information to the parent <code>switch</code> element. </p> <div class="mw-heading mw-heading5"><h5 id="Overridden_attributes">Overridden attributes</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=188" title="Edit section: Overridden attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <code>fill</code> attribute below is overridden by the <code>style</code> attribute. It should be removed (or replaced with the <code>style</code> value. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><path</span> <span class="w"> </span><span class="na">d=</span><span class="s">"m 1843.9558,570.10404 c 2.6735,-9.49081 14.9422,-26.82254 30.9812,-32.57107 l -1.8944,-1.36528 8.0776,-0.85102 -3.664,6.36843 -1.0336,-2.24336 c -8.1598,4.31111 -14.7336,27.48597 -14.5545,35.09065 -1.1877,0.10078 -15.9766,-2.62975 -17.9123,-4.42835 z"</span> <span class="w"> </span><span class="na">fill=</span><span class="s">"url(#bb)"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"path707-1"</span> <span class="w"> </span><span class="na">style=</span><span class="s">"fill:url(#linearGradient17463);fill-opacity:1;stroke-width:1.3109"</span> <span class="w"> </span><span class="na">sodipodi:nodetypes=</span><span class="s">"cccccccc"</span><span class="w"> </span><span class="nt">/></span> </pre></div> <div class="mw-heading mw-heading5"><h5 id="Transform_removal">Transform removal</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=189" title="Edit section: Transform removal"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some code that simplifies <code>use</code> elements with a <code>transform</code> attribute should be generalized. The <code>width="100%"</code> and <code>height="100%"</code> attributes may be removed. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><use</span> <span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#bomb"</span> <span class="w"> </span><span class="na">x=</span><span class="s">"1569.3"</span> <span class="w"> </span><span class="na">y=</span><span class="s">"857.94"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"use819-9"</span> <span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span> <span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span> <span class="w"> </span><span class="na">transform=</span><span class="s">"translate(150.788,415.75052)"</span><span class="w"> </span><span class="nt">/></span> </pre></div> <p>Simple translations are consolidated, but handling scales are problematic. </p> <div class="mw-heading mw-heading5"><h5 id="Null_translations">Null translations</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=190" title="Edit section: Null translations"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>If the <code>textContent</code> of all the <code>switch</code> clauses is the same... </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><switch</span><span class="w"> </span><span class="na">id=</span><span class="s">"switch329"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(147.16, 1453.72)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-zh-hant"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-hant"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-zh-hant"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-zh-tw"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-tw"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-zh-tw"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-zh-cn"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-cn"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-zh-cn"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg1744"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg1120"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-fr"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-fr"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-es"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"es"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-es"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-el"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"el"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-el"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-uk"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"uk"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-uk"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-ka"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ka"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-ka"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-lt"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"lt"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-lt"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-ca"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ca"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-ca"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-ko"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ko"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-ko"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-mn"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"mn"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-mn"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-nl"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"nl"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-nl"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274-zh"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43-zh"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text274"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg43"</span><span class="nt">></span>40<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"></switch></span> </pre></div> <p>The matching algorithm should not just delete clauses that match the default. Language preferences can produce unexpected results. </p> <div class="mw-heading mw-heading5"><h5 id="Mongolian_dates">Mongolian dates</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=191" title="Edit section: Mongolian dates"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Apparently, the Intl package gives an unexpected result. When checking the date 5 May, I get the mismatch message. </p> <ul><li><code>Bad date (mn): 5 сарын 28 != тавдугаар сарын 28</code></li></ul> <p>The transliterated result is "fifth month 28" rather than "5 month 28". </p> <ul><li><code>new Intl.DateTimeFormat('mn', { month: 'long', day: 'numeric' }).format(date) → "тавдугаар сарын 28"</code></li> <li><code>new Intl.DateTimeFormat('mn', { month: 'short', day: 'numeric' }).format(date) → "5-р сарын 28"</code></li> <li><code>new Intl.DateTimeFormat('mn', { month: 'narrow', day: 'numeric' }).format(date) → "Vын 28"</code></li> <li><code>new Intl.DateTimeFormat('mn', { month: 'numeric', day: 'numeric' }).format(date) → "V/28"</code></li></ul> <div class="mw-heading mw-heading5"><h5 id="River_translations_are_duplicated">River translations are duplicated</h5><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=192" title="Edit section: River translations are duplicated"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Unlike cities, rivers often have several labels along their length. Ideally, the labels would use <code>textPath</code> elements. The Ukrainian invasion file could use that technology because it is usually viewed directly in a browser. </p><p>The current implementation uses straight line text in separate <code>switch</code> elements, which means that the translations are repeated. A better plan would put the translation in the <code>defs</code> element and then <code>use</code> the definition for each label instance. </p><p>SVG does not have a way to do this task for <code>textPath</code>. See discussion about <a href="#tref_element"><code>tref</code> element</a> being both unimplemented and inadequate. </p> <div class="mw-heading mw-heading4"><h4 id="A_better_understanding_of_casual_group_formatting">A better understanding of casual group formatting</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=193" title="Edit section: A better understanding of casual group formatting"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The file uses casual groups to impose a common style on items that do not make their own sensible group. For example, a small set of Ukrainian villages may be grouped to impose a Ukrainian <code>fill</code> color on the group. The group of villages does not have a good reason to exist as a group. If the Russians gained control of one of the villages, then the group would need to be pierced to change its rendering. </p><p>Similarly, several text elements may be grouped to impose a common font selection, size, or color. That is presentation style rather than semantics, and it should be done with CSS. </p><p>Many of the formatting groups have been removed from cities, places, and dates. That puts the city circles at toplevel. The places are one-level down inside a group of places. The dates are one-level down inside a group of dates. </p><p>There are elements that should be grouped, and they should be grouped to the point of making a symbol. For example, contested cities are represented as a checkerboard. The checkerboard is four grouped path elements followed by an outside-the-group rectangle. All of those elements are semantically related, and they should be a symbol in the <code>defs</code> section. These groups have been converted to use a <code>g</code> or <code>symbol</code> inside the <code>defs</code> element. That step uncovered some issues. The origin for an SVG 1.1 <code>symbol</code> is always the upper-left corner. Furthermore, Inkscape has trouble cloning something that is inside the <code>defs</code> element. </p><p>Some groupings would make sense. The circles used for cities should be grouped with the names of the city. The symbols used for nuclear power plants should be grouped with the name of the power plant. The arrows showing the troop movements should be grouped with their dates. The date label boxes should be grouped with the date text. </p><p>SVG does not have the notion of associated labels. Consider a flag note that contains a date. The file does that by drawing a rectangle and then overlaying that rectangle with text. That takes two elements. Logically, the elements should be grouped so they move together. To change the text, one must penetrate the grouping. </p><p>Given the restrictions on the symbol origin, a possibility for dates would be </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(...)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><use</span><span class="w"> </span><span class="na">xlink:href=</span><span class="s">"#labelru"</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"><switch</span><span class="w"> </span><span class="na">class=</span><span class="s">"date"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"fff"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">></span>March<span class="w"> </span>15<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text></span>March<span class="w"> </span>15<span class="nt"></text></span> <span class="w"> </span><span class="nt"></switch></span> <span class="nt"></g></span> </pre></div> <p>So all the group's children are at the origin. A symbol would need a negative offset. Limitations on the WMF renderer prevents using CSS to set the <code>text</code> color. </p><p>An alternative is to use a <code>filter</code> on the text. The filter would automatically size for the text, so it could be better than a fixed label size. Inkscape may start making copies.... </p><p>Does Inkscape's notion of layers allow easy editing? That is, does it avoid the cumbersome ungrouping and regrouping of an ordinary <code>g</code> element? </p><p>What does it take to make an Inkscape layer? Presumably toplevel <code>g</code> elements with two <code>inkscape:</code> attributes and an <code>id</code> of the form <code>layer<i>n</i></code> (just like Inkscape identifies all its elements).<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g</span> <span class="w"> </span><span class="na">inkscape:label=</span><span class="s">"Layer 1"</span> <span class="w"> </span><span class="na">inkscape:groupmode=</span><span class="s">"layer"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"layer1"</span><span class="w"> </span><span class="nt">/></span> </pre></div> <p>To use layers, must all graphics elements be in toplevel layers? If not, what happens to graphics elements that are outside of the layers? </p><p>Furthermore, removing the two attributes or the <code>id</code> may not be wise. </p><p>Layers and objects can be locked with <code>sodipodi:insensitive="true"</code>; it is the presence of the attribute and not its value that matters. See <a rel="nofollow" class="external free" href="https://wiki.inkscape.org/wiki/Inkscape-specific_XML_attributes">https://wiki.inkscape.org/wiki/Inkscape-specific_XML_attributes</a> and example at <a rel="nofollow" class="external free" href="https://gist.github.com/hedefalk/5b428772f7deefc906a194f297371e9e">https://gist.github.com/hedefalk/5b428772f7deefc906a194f297371e9e</a> . The latter file suggests the group <code>id</code> does not need a layer name. </p><p>See also <a rel="nofollow" class="external free" href="https://wiki.inkscape.org/wiki/index.php/Inkscape_SVG_vs._plain_SVG">https://wiki.inkscape.org/wiki/index.php/Inkscape_SVG_vs._plain_SVG</a> . </p><p>Inkscape has the notion of symbols and clones, but I'm not sure that it expects to clone objects in the <code>defs</code> section. What sort of access does Inkscape give to the <code>defs</code> section? </p><p>Layers would do a better job of enforcing painting order. While the order was consistent, it is now confused. Some arrows are drawn before place names are rendered, and some arrows are drawn after. </p> <div class="mw-heading mw-heading4"><h4 id="Languages:_LTR_and_RTL">Languages: LTR and RTL</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=194" title="Edit section: Languages: LTR and RTL"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The Hebrew and Arabic versions of this file swap the graphics on the map legend. There is also a cosmology illustration that does something similar. What is a good way to handle that problem? Two separate map legends? </p> <div class="mw-heading mw-heading4"><h4 id="Metadata_for_the_file">Metadata for the file</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=195" title="Edit section: Metadata for the file"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Consider adding some metadata to the file. There was a recent comment that Inkscape prevented a user from editing someone else's SVG. Could that be a result of CC-BY-ND license? Or describing the license with a similar requirement? How could SVG Translate figure that out? How would it be handled in a production environment? </p><p>A CC license should have a URL link to the license. </p><p>A CC-BY license should have the attribution names or an attribution URL. </p><p>In a derivative work, it is not enough to just give attribution to the creator of the derivative work. The license attribution requirements do not disappear for a derivative work. Many Commons files state incomplete attributions. </p><p>There is a question about crediting the source maps. It may be that a link to their pages on Commons is enough. Should the metadata include the license information for the images that the derivative work uses? </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><metadata></span> <span class="w"> </span><span class="nt"><rdf:RDF</span><span class="w"> </span><span class="na">xmlns:rdf=</span><span class="s">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</span> <span class="w"> </span><span class="na">xmlns:dc=</span><span class="s">"http://purl.org/dc/terms/"</span> <span class="w"> </span><span class="na">xmlns:cc=</span><span class="s">"http://creativecommons.org/ns#"</span><span class="w"> </span><span class="nt">></span> <span class="w"> </span><span class="nt"><cc:Work</span><span class="w"> </span><span class="na">rdf:about=</span><span class="s">""</span><span class="nt">></span> <span class="w"> </span><span class="nt"><dc:creator</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/User_talk:Viewsridge"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><dc:source></span> <span class="w"> </span><span class="nt"><rdf:Bag></span> <span class="w"> </span><span class="nt"><rdf:li</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/File:Russo-Ukraine_Conflict_(2014-2021).svg"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><rdf:li</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/File:Ukraine_adm_location_map.svg"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></rdf:Bag></span> <span class="w"> </span><span class="nt"></dc:source></span> <span class="w"> </span><span class="nt"><dc:publisher</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"http://commons.wikimedia.org"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><cc:license</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://creativecommons.org/licenses/by-sa/4.0/deed.en"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><cc:attributionName></span> <span class="w"> </span><span class="nt"><rdf:Seq></span> <span class="w"> </span><span class="nt"><rdf:li</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/User_talk:Viewsridge"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><rdf:li</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/User:Rr016"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"><rdf:li</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/User:NordNordWest"</span><span class="nt">/></span> <span class="w"> </span><span class="nt"></rdf:Seq></span> <span class="w"> </span><span class="nt"></cc:attributionName></span> <span class="w"> </span><span class="nt"><cc:attributionUrl</span><span class="w"> </span><span class="na">rdf:resource=</span><span class="s">"https://commons.wikimedia.org/wiki/File:2022_Russian_invasion_of_Ukraine.svg"</span><span class="w"> </span><span class="nt">/></span> <span class="w"> </span><span class="nt"></cc:Work></span> <span class="w"> </span><span class="nt"></rdf:RDF></span> <span class="nt"></metadata></span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="SVG_Translate">SVG Translate</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=196" title="Edit section: SVG Translate"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG Translate is an application that helps users translate SVG files with <code>text</code> elements into other languages. </p> <div class="mw-heading mw-heading3"><h3 id="History">History</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=197" title="Edit section: History"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Discuss history, Summer of Code, ... XXX, <a href="/wiki/User:Jarry1250" title="User:Jarry1250">Jarry1250</a>,<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup> 2017 Wishlist,<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup> WMF Community Tech.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading3"><h3 id="What_it_does">What it does</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=198" title="Edit section: What it does"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Diagrams need to be simple for it to work well. Single line text is best. Leave plenty of room because some languages use more text than others. </p><p>See <a href="/wiki/File:BirdBeaksA.svg" title="File:BirdBeaksA.svg">File:BirdBeaksA.svg</a> and <a href="/wiki/Template:Other_versions/BirdBeaksA" title="Template:Other versions/BirdBeaksA"><span style="font-family:monospace,monospace;">{{Other versions/BirdBeaksA}}</span></a>. Several language versions that just vary the text labels. </p><p>Syntactically, the text to translate must be a <code>text</code> element with 0 or more <code>tspan</code> elements. The <code>tspan</code> elements may not have any children. The tool expects only text; it does not expect <code>switch</code> elements containing group (<code>g</code>) elements or other graphics elements. </p> <div class="mw-heading mw-heading3"><h3 id="What_it_does_not_do">What it does not do</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=199" title="Edit section: What it does not do"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Transformer3d_col3.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/220px-Transformer3d_col3.svg.png" decoding="async" width="220" height="165" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/330px-Transformer3d_col3.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/440px-Transformer3d_col3.svg.png 2x" data-file-width="763" data-file-height="573" /></a><figcaption>A difficult image for SVG Translate</figcaption></figure> <p>It does not handle complex text. It expects text to be lines of simple, unadorned, text. Text that tries to emphasize some words with bold or italic styles are not handled. Similarly, it does not handle changing text colors or fonts. It does not handle subscripts or superscripts. </p><p>It does not handle adjusting the position of the text or the anchors. That is more of a graphics task than a translation task. SVG Translate is a text rather than a graphics application. In commercial translation settings, translators are not responsible for text positioning. </p><p>Vertical text. There are different conventions. In the USA, a book title on the book's spine is rotated +90°. In Europe, the title on the spine is rotated -90°. In China, text is written vertically without rotating the characters; generally, English readers find such text difficult. Bizzare Chinese ambulance. </p><p>Numbers, quantities, currency, and dates. SVG should have better support. Javascript has the <code>Intl</code> object, but Commons prohibits scripts. Different cultures use different punctuation and formatting for numbers: "1,000.00" (US) versus "1.000,00" (German). Quantities are numbers with units; the units may be spelled out (meters) or abbreviated with a symbol (m). Currency is even more problematic: should $10 stay as $10 or should it be converted to some other national currency (Marks, Pounds, or Euros)? Dates are often represented in a few ways. Translation from English "May 12, 1944" to German "12 Mai 1944". HTML has <code><time datetime="1944-05-12">May 12, 1944</time></code>, but it does not imply processing; it is just a machine-readable time for the text content. </p><p>Hyphenation and word breaking. The semantics of <code>&shy;</code> is confused: hy­phen­a­tion. </p><p>Exotic CSS can fix some issues, but there must be support. </p> <div class="mw-heading mw-heading3"><h3 id="Success_stories?"><span id="Success_stories.3F"></span>Success stories?</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=200" title="Edit section: Success stories?"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading4"><h4 id="Invasion_of_Ukraine">Invasion of Ukraine</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=201" title="Edit section: Invasion of Ukraine"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a> </p> <div class="mw-heading mw-heading4"><h4 id="Attempted_assassination_of_Donald_Trump">Attempted assassination of Donald Trump</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=202" title="Edit section: Attempted assassination of Donald Trump"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/File:Assassination_attempt_of_Donald_Trump_diagram.svg" title="File:Assassination attempt of Donald Trump diagram.svg">File:Assassination attempt of Donald Trump diagram.svg</a> has an interesting history of development. As of 18 July 2024, it had 13 translations. </p><p>SVG Translate was quickly applied to the diagram. SVG Translate apparently did not cause trouble for the author who was able to make subsequent graphics changes. </p><p>There was a locking/overwrite issue with SVG Translate. The file on Commons was updated while someone was translating the previous version, and SVG Translate overwrote the updated version. SVG Translate should check for that.... </p><p>.see <a href="https://phabricator.wikimedia.org/T271663" class="extiw" title="phab:T271663">Phab:T271663</a> Offer to invert text-anchor for RTL languages </p><p>The SVG Translate BIDI issue appears for "200 ft". SVG believes the text is LTR with <code>text-anchor="start"</code>. BIDI encounters "200", which is weak LTR. The number is set. The following space is neutral, so it gets tacked on to right. Then it encounters "قدم", which is strong LTR. That group is set RTL, but the group is placed to the right of the previously set text. The result is "<bdi dir="ltr">200 قدم</bdi>" because BIDI was fooled by the weak LTR start; if the string had started with some strong RTL text, it would have worked correctly. The desired result is "<bdi dir="rtl">200 قدم</bdi>". The direction and text anchor must be changed. </p><p>Some CSS can change the direction and text anchor: </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">text</span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">=</span><span class="s2">"ar"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="k">direction</span><span class="p">:</span><span class="w"> </span><span class="kc">rtl</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="kc">end</span><span class="p">;</span><span class="w"> </span><span class="p">}</span> </pre></div> <p>The workaround is good if all the other text is expected to be <code>text-anchor: start</code>. </p><p>The <code>lang()</code> selector has better features, but it would require adding both <code>systemLanguage</code> and <code>xml:lang</code> attributes to the <code>switch</code> clauses. </p><p>The CSS must be more circumspect. If <code>systemLanguage="ar"</code> and ancestor-or-self is <code>text-anchor="start"</code>, then switch to <code>end</code>. If Arabic and ancestor-or-self is <code>text-anchor="end"</code>, then switch to <code>start</code>. Some experiments are in order.... </p><p>This issue is important in the diagram. The compass heading "N" for English should be "شمال" for Arabic. Consequently, that text should be <code>text-anchor="middle"</code>. The CSS was improved so <code>text-anchor="middle"</code> would work. </p><p>A Hebrew translation was added, so additional CSS was added. Currently, the CSS looks like </p> <div class="mw-highlight mw-highlight-lang-css mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">text</span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">=</span><span class="s2">"ar"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">direction</span><span class="p">:</span><span class="w"> </span><span class="kc">rtl</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">end</span><span class="p">;}</span> <span class="nt">switch</span><span class="o">[</span><span class="nt">text-anchor</span><span class="o">=</span><span class="s2">"middle"</span><span class="o">]</span><span class="w"> </span><span class="nt">text</span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">=</span><span class="s2">"ar"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">direction</span><span class="p">:</span><span class="w"> </span><span class="kc">rtl</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">middle</span><span class="p">;}</span> <span class="nt">text</span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">=</span><span class="s2">"he"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">direction</span><span class="p">:</span><span class="w"> </span><span class="kc">rtl</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">end</span><span class="p">;}</span> <span class="nt">switch</span><span class="o">[</span><span class="nt">text-anchor</span><span class="o">=</span><span class="s2">"middle"</span><span class="o">]</span><span class="w"> </span><span class="nt">text</span><span class="o">[</span><span class="nt">systemLanguage</span><span class="o">=</span><span class="s2">"he"</span><span class="o">]</span><span class="w"> </span><span class="p">{</span><span class="k">direction</span><span class="p">:</span><span class="w"> </span><span class="kc">rtl</span><span class="p">;</span><span class="w"> </span><span class="n">text-anchor</span><span class="p">:</span><span class="w"> </span><span class="kc">middle</span><span class="p">;}</span> </pre></div> <p>It assumes just left-aligned or center-aligned text. </p><p>It gets even worse in the general case: A <code>text</code> element may inherit both <code>systemLanguage</code> (attribute only?) and <code>text-anchor</code> (property). SVG 2.0 and newer CSS adds to the problem and possibly simplifies some parts. </p><p>A simplification would insist that the <code>switch</code> element carry <code>class</code> or <code>text-anchor</code> settings that determine the major format information. I prefer using <code>class</code> attributes. Of course, <code>style</code> attributes cause more problems because they override everything. With confined formatting rules, the language-specific CSS need only examine the <code>switch</code> and the <code>text</code> elements. A goal is to keep the <code>text</code> elements as simple as possible (i.e., most of the formatting information is promoted to the <code>switch</code> element. Maybe <code>text</code> elements should not have any <code>class</code> attributes. </p><p>Main right-to-left languages: </p> <ul><li>Arabic → Arabic</li> <li>Aramaic → Aramaic ?</li> <li>Azeri → Azerbaijani ?</li> <li>Dhivehi/Maldivian → Divehi</li> <li>Hebrew → Hebrew</li> <li>Kurdish (Sorani) → Kurdish</li> <li>Persian/Farsi → Persian</li> <li>Urdu → Urdu</li></ul> <table class="wikitable"> <caption>File updates </caption> <tbody><tr> <th>Time and Date</th> <th>Change </th></tr> <tr> <td>08:53, 14 July 2024</td> <td>Illustration created by <a href="/wiki/User:BmboB" title="User:BmboB">BmboB</a> </td></tr> <tr> <td>11:11, 14 July 2024</td> <td>First SVG Translate translation added (ca) </td></tr> <tr> <td>11:18, 14 July 2024</td> <td>Second SVG Translate translation added (be-tarask) </td></tr> <tr> <td>12:20, 14 July 2024</td> <td>*** separate file generated for (fr). Would not get subsequent improvements. Now not used in any French articles. </td></tr> <tr> <td>13:26, 14 July 2024</td> <td>Map scale added. </td></tr> <tr> <td>06:02, 15 July 2024</td> <td>SVG Translate translation added (ar) (has problem with Unicode BIDI) </td></tr> <tr> <td>06:24, 15 July 2024</td> <td>*** separate file generated for (ar). Text converted to curves. </td></tr> <tr> <td>11:40, 15 July 2024</td> <td>Substantial improvement to the diagram </td></tr> <tr> <td>17:41, 15 July 2024</td> <td>File updated. </td></tr> <tr> <td>17:43, 15 July 2024</td> <td>SVG Translate translation overwrite (lij) (User probably accessed copy before update) related: <a href="https://phabricator.wikimedia.org/T250012" class="extiw" title="phab:T250012">Phab:T250012</a> </td></tr> <tr> <td>17:44, 15 July 2024</td> <td>SVG Translate translation overwrite (it) (uses lij version) </td></tr> <tr> <td>12:27, 18 July 2024</td> <td>SVG Translate translation added (fr). Now used in the French article and a French category. </td></tr></tbody></table> <div class="mw-heading mw-heading3"><h3 id="SVG_Translate_usage">SVG Translate usage</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=203" title="Edit section: SVG Translate usage"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/User:JoKalliauer" title="User:JoKalliauer">JoKalliauer</a> question about SVG Translate usage: <a class="external text" href="https://commons.wikimedia.org/w/index.php?title=User_talk:JoKalliauer&oldid=684845987#Editing_error_in_c:File:2022_Russian_invasion_of_Ukraine.svg">talk page</a> </p> <div class="mw-heading mw-heading3"><h3 id="Translate_me!"><span id="Translate_me.21"></span>Translate me!</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=204" title="Edit section: Translate me!"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Consider a simple template that takes an argument that defaults to FULLPAGENAME. </p> <ul><li><a class="external free" href="https://svgtranslate.toolforge.org/File:Conic_Sections.svg">https://svgtranslate.toolforge.org/File:Conic_Sections.svg</a> (errs — non-node content within a switch) <dl><dd><a href="/wiki/File:Conic_Sections.svg" title="File:Conic Sections.svg">File:Conic Sections.svg</a></dd> <dd><a class="external free" href="https://svgtranslate.toolforge.org/File%3AConic_Sections.svg">https://svgtranslate.toolforge.org/File%3AConic_Sections.svg</a></dd></dl></li> <li><a class="external free" href="https://svgtranslate.toolforge.org/File:First_Ionization_Energy.svg">https://svgtranslate.toolforge.org/File:First_Ionization_Energy.svg</a> (errs)</li> <li><a class="external free" href="https://svgtranslate.toolforge.org/User:Glrx">https://svgtranslate.toolforge.org/User:Glrx</a></li></ul> <p>Consider mechanism to solicit translations of popular or significant images. </p><p>Say an image were served as SVG. The image could have </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><a</span><span class="w"> </span><span class="na">href=</span><span class="s">"http://svgtranslate.wmftools.org/File:image.svg"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text></span>{Translate<span class="w"> </span>icon}<span class="nt"></text></span> <span class="nt"></a></span> </pre></div></dd></dl> <p>The translate icon could disappear if the file has the desired translations. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><a</span><span class="w"> </span><span class="na">href=</span><span class="s">"http://svgtranslate.wmftools.org/File:image.svg"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">></text></span> <span class="w"> </span><span class="nt"><text></span>{Translate<span class="w"> </span>icon}<span class="nt"></text></span> <span class="w"> </span><span class="nt"></switch></span> <span class="nt"></a></span> </pre></div></dd></dl> <p>Maybe there is a game to play with the <code>systemLanguage</code> attribute. </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><a</span><span class="w"> </span><span class="na">href=</span><span class="s">"http://svgtranslate.wmftools.org/File:image.svg"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text><tspan</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"es"</span><span class="nt">></span>{translation<span class="w"> </span>requested}<span class="nt"></tspan><tspan</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ru"</span><span class="nt">></span>{translation<span class="w"> </span>requested}<span class="nt"></tspan></text></span> <span class="nt"></a></span> </pre></div></dd></dl> <div class="mw-heading mw-heading4"><h4 id="Catalan_Translation_Challenge_2023">Catalan Translation Challenge 2023</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=205" title="Edit section: Catalan Translation Challenge 2023"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://ca.wikipedia.org/wiki/Viquiprojecte:Viquirepte/500_vectorials">https://ca.wikipedia.org/wiki/Viquiprojecte:Viquirepte/500_vectorials</a></li> <li><a href="https://en.wikipedia.org/wiki/ca:Viquiprojecte:Viquirepte/500_vectorials" class="extiw" title="w:ca:Viquiprojecte:Viquirepte/500 vectorials">w:ca:Viquiprojecte:Viquirepte/500_vectorials</a></li></ul> <ol><li>Query category for files <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2">https://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2</a></li></ul></li> <li>For each file, look at <code>imageinfo</code> <ul><li><a class="external free" href="https://www.mediawiki.org/wiki/API:Imageinfo">https://www.mediawiki.org/wiki/API:Imageinfo</a> (comment has SVG Translate, timestamp in range, size indicates problem file) <dl><dd><code>"size": 483566,</code></dd> <dd><code>"comment": "File uploaded using svgtranslate tool (<a class="external free" href="https://svgtranslate.toolforge.org/">https://svgtranslate.toolforge.org/</a>). Added translation for ca."</code></dd></dl></li> <li>example: <dl><dd><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&titles=File:Biafra_independent_state_map-en.svg&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize&format=json&formatversion=2">https://commons.wikimedia.org/w/api.php?action=query&titles=File:Biafra_independent_state_map-en.svg&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize&format=json&formatversion=2</a></dd></dl></li></ul></li> <li>Query Catalan Wiki for image usage <dl><dd><a class="external free" href="https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bimageusage">https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bimageusage</a> <ul><li><a class="external free" href="https://ca.wikipedia.org/w/api.php?action=query&list=imageusage&iutitle=File:Biafra_independent_state_map-en.svg">https://ca.wikipedia.org/w/api.php?action=query&list=imageusage&iutitle=File:Biafra_independent_state_map-en.svg</a></li></ul></dd></dl></li></ol> <p>Roll first two steps together using a generator </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2">https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2</a></li></ul> <p>Generator and <code>imageinfo</code> </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize">https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:SVG_test_suite_files_by_Glrx&formatversion=2&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize</a></li></ul> <p><a href="/wiki/File:Biafra_independent_state_map-en.svg" title="File:Biafra independent state map-en.svg">File:Biafra_independent_state_map-en.svg</a> has category <a href="/wiki/Category:Maps_of_Biafra" title="Category:Maps of Biafra">Category:Maps of Biafra</a> </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Maps_of_Biafra&formatversion=2&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize">https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtitle=Category:Maps_of_Biafra&formatversion=2&prop=imageinfo&iilimit=2&iiprop=timestamp%7Cuser%7Cmetadata%7Ccomment%7Csize</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Good_translation_targets">Good translation targets</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=206" title="Edit section: Good translation targets"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>There are English SVG files that are already included on many Wikipedias. Running SVG Translate on these files would make the files more accessible. </p> <ul><li><a href="/wiki/File:Eukaryote_DNA-en.svg" title="File:Eukaryote DNA-en.svg">File:Eukaryote DNA-en.svg</a></li> <li><a href="/wiki/File:Endomembrane_system_diagram_en.svg" title="File:Endomembrane system diagram en.svg">File:Endomembrane system diagram en.svg</a> many separate translations; one invocation of SVG Translate.</li> <li><a href="/wiki/File:Larynx_external_en.svg" title="File:Larynx external en.svg">File:Larynx external en.svg</a> (has Wikdata template)</li> <li><a href="/wiki/File:Active_Margin.svg" title="File:Active Margin.svg">File:Active Margin.svg</a> Well used file.</li> <li><a href="/wiki/File:R%C3%B6mische_Tetrarchie.svg" title="File:Römische Tetrarchie.svg">File:Römische Tetrarchie.svg</a> many separate translations</li> <li><a href="/wiki/File:Grand_Si%C3%A8ge_de_Malte-fr.svg" title="File:Grand Siège de Malte-fr.svg">File:Grand Siège de Malte-fr.svg</a> has some multiline</li> <li><a href="/wiki/File:Wikisource_Inclusion_Venn_Diagram.svg" title="File:Wikisource Inclusion Venn Diagram.svg">File:Wikisource Inclusion Venn Diagram.svg</a></li> <li><a href="/wiki/File:Parts_of_a_shark.svg" title="File:Parts of a shark.svg">File:Parts of a shark.svg</a> many separate translations</li></ul> <pre>Spiracle Q20755118 Eye Q7364 Nostril Q858590 Snout Q167896 Mouth Q9635 Labial furrows Gill openings Q132390 + Pectoral fin Q363040 Dorsal fin spine First dorsal fin + Q1568355 Pelvic fin Q3335089 Clasper (males) Q35413 + Anal fin Q3335087 Caudal keel Second dorsal fin + Q1568355 Precaudal pit Caudal fin Q7887513 HEAD Q23640 TRUNK Q160695 TAIL Q60960 </pre> <div class="mw-heading mw-heading3"><h3 id="SVG_Translate_simple_text_requirement">SVG Translate simple text requirement</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=207" title="Edit section: SVG Translate simple text requirement"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG Translate expects lines of simple text. Font shifts, subscripts, superscripts (i.e., nested <code>tspan</code> elements) are not allowed. Many images have such text. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 210px;"><span typeof="mw:File"><a href="/wiki/File:Abbe-diagram.svg" class="mw-file-description" title="Optical glass diagram"><img alt="Optical glass diagram" src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Abbe-diagram.svg/202px-Abbe-diagram.svg.png" decoding="async" width="202" height="180" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Abbe-diagram.svg/302px-Abbe-diagram.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Abbe-diagram.svg/403px-Abbe-diagram.svg.png 2x" data-file-width="994" data-file-height="888" /></a></span></div> <div class="gallerytext">Optical glass diagram</div> </li> </ul> <ul><li>Refractive index <var>n<sub>d</sub></var> (λ = 587.6 nm)</li> <li>Abbe number <var>V</var></li></ul> <p>Wikidata for </p> <ul><li><a href="https://www.wikidata.org/wiki/Q174102" class="extiw" title="d:Q174102"><span title="ratio of the speed of light in vacuum to that in the medium">refractive index <small>(Q174102)</small></span></a> (<a href="https://www.wikidata.org/wiki/Q174102" class="extiw" title="d:Q174102"><span title="ratio of the speed of light in vacuum to that in the medium">Brechungsindex <small>(Q174102)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q174102" class="extiw" title="d:Q174102"><span title="ratio of the speed of light in vacuum to that in the medium">indice de réfraction <small>(Q174102)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q174102" class="extiw" title="d:Q174102"><span title="ratio of the speed of light in vacuum to that in the medium">показатель преломления <small>(Q174102)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q174102" class="extiw" title="d:Q174102"><span title="ratio of the speed of light in vacuum to that in the medium">折射率<small>(Q174102)</small></span></a>) <dl><dd><a href="https://www.wikidata.org/wiki/Property:P416" class="extiw" title="d:Property:P416"><span title="symbol for a mathematical or physical quantity">quantity symbol (string) <small>(P416)</small></span></a></dd> <dd>subscript for the wavelength (e.g., <var>d</var> is sodium line)</dd> <dd>so there could be qualified symbols</dd></dl></li> <li><a href="https://www.wikidata.org/wiki/Q178674" class="extiw" title="d:Q178674"><span title="SI unit of length equal to one billionth of a metre">nanometre <small>(Q178674)</small></span></a> (much more complicated than expected) <dl><dd>and <a href="https://www.wikidata.org/wiki/Property:P5061" class="extiw" title="d:Property:P5061"><span title="abbreviation of a unit for each language; if not provided, then it should default to English">unit symbol <small>(P5061)</small></span></a> by language (rather than script)</dd></dl></li> <li><a href="https://www.wikidata.org/wiki/Q306259" class="extiw" title="d:Q306259"><span title="material dispersion property">Abbe number <small>(Q306259)</small></span></a> (<a href="https://www.wikidata.org/wiki/Q306259" class="extiw" title="d:Q306259"><span title="material dispersion property">Abbe-Zahl <small>(Q306259)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q306259" class="extiw" title="d:Q306259"><span title="material dispersion property">nombre d'Abbe <small>(Q306259)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q306259" class="extiw" title="d:Q306259"><span title="material dispersion property">Число Аббе <small>(Q306259)</small></span></a>, <a href="https://www.wikidata.org/wiki/Q306259" class="extiw" title="d:Q306259"><span title="material dispersion property">阿贝数<small>(Q306259)</small></span></a>) <dl><dd><a href="https://www.wikidata.org/wiki/Property:P7973" class="extiw" title="d:Property:P7973"><span title="symbol for a mathematical or physical quantity in LaTeX">quantity symbol (LaTeX) <small>(P7973)</small></span></a></dd> <dd>Why is LaTeX different? Unicode has some subscripts but does not have a general subscript; LaTeX does: (e.g., <code>N_d</code>)</dd></dl></li> <li><a href="https://www.wikidata.org/wiki/Q13326" class="extiw" title="d:Q13326"><span title="special kinds of glass used for making various components of optical devices and systems">optical glass <small>(Q13326)</small></span></a> (Wikidata is weak on coverage; just two subsclasses) <dl><dd><a href="https://www.wikidata.org/wiki/Q1506435" class="extiw" title="d:Q1506435"><span title="type of glass">crown glass <small>(Q1506435)</small></span></a></dd> <dd><a href="https://www.wikidata.org/wiki/Q943896" class="extiw" title="d:Q943896"><span title="optical glass that has relatively high refractive index and low Abbe number (high dispersion)">flint glass <small>(Q943896)</small></span></a></dd></dl></li></ul> <p>I cannot create this diagram with a Wikidata query that finds instances of optical glass (such as those in the Schott catalog). </p> <div class="mw-heading mw-heading3"><h3 id="SVG_Translate_Issues">SVG Translate Issues</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=208" title="Edit section: SVG Translate Issues"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate">https://github.com/wikimedia/svgtranslate</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/pull/643">https://github.com/wikimedia/svgtranslate/pull/643</a></li> <li><a class="external free" href="https://phabricator.wikimedia.org/tag/svg_translate_tool/">https://phabricator.wikimedia.org/tag/svg_translate_tool/</a></li></ul> <p>clean code. </p> <div class="mw-heading mw-heading4"><h4 id="Bloating_SVG_files">Bloating SVG files</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=209" title="Edit section: Bloating SVG files"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Several reasonable graphics designers have been frustrated by SVG Translate's manipulations. </p><p>SVG Translate inserts lots of identifiers that are not needed in the final SVG file. In addition, SVG Translate will add unneeded <code>tspan</code> elements to simple text labels. Furthermore, SVG Translate will slavishly copy attributes rather than sensibly manipulate them. The result is a more verbose SVG file than needed. </p><p>The graphics editor Inkscape will also add extraneous identifiers and style information. That will bloat the SVG file.   The extra SVG code frustrates human editors who developed illustrations with simplified SVG. These editors may flag the file with the <a href="/wiki/Template:SimplSVG" title="Template:SimplSVG"><span style="font-family:monospace,monospace;">{{SimplSVG}}</span></a> template to discourage other editors from using tools such as SVG Translate that may bloat their work. </p> <div class="mw-heading mw-heading4"><h4 id="Suppressing_translation">Suppressing translation</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=210" title="Edit section: Suppressing translation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:CNO_Cycle.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/CNO_Cycle.svg/220px-CNO_Cycle.svg.png" decoding="async" width="220" height="220" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/CNO_Cycle.svg/330px-CNO_Cycle.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/21/CNO_Cycle.svg/440px-CNO_Cycle.svg.png 2x" data-file-width="1000" data-file-height="1000" /></a><figcaption>Example file where <code>translate="no"</code> is useful. No need to translate chemical symbols or greek letters.</figcaption></figure> <p>SVG Translate does not obey <code>translate="no"</code>. </p><p>The notion of blocking translation is deeper than just yes or no. For example, most European languages use the same representation for numbers. Labels that are just numbers probably do not need to be translated: "100", "200", and "300". Even strings such as "100 km", "200 km", and "300 km" do not need translations for Latin languages. However, the units should be translated when the script changes from Latin to Cyrillic or something else: "km" versus "км" versus "粁" (<a href="https://www.wikidata.org/wiki/Property:P5061" class="extiw" title="d:Property:P5061"><span title="abbreviation of a unit for each language; if not provided, then it should default to English">unit symbol <small>(P5061)</small></span></a> for <a href="https://www.wikidata.org/wiki/Q828224" class="extiw" title="d:Q828224"><span title="SI unit of length equal to one thousand metres">kilometre <small>(Q828224)</small></span></a>). Moreover, some languages use different conventions for numbers. Decimal points, thousands separators, and even the groupings may vary. Some languages also do not use the same characters for numbers: English versus Arabic. Currency is more troublesome: should dollars be converted into Euros or yen? </p><p>Dates are also troublesome. Dates should be translated, but why not automatically? Just give a format specification. See also the HTML <code>time</code> element and <code>datetime</code> attribute. "The US celebrates <time datetime="1776-07-04" title="1776-07-04">Independence Day</time> (does not display a tooltip without an explicit <code>title</code> attribute; see usage at <a href="https://en.wikipedia.org/wiki/Amelia_Earhart" class="extiw" title="en:Amelia Earhart">en:Amelia Earhart</a>). </p><p>Even if some text is marked <code>translate="no"</code>, an editing tool may want to change the text. Consider a physical quantity such as the mass of neutrino; a new measurement may be available. </p> <div class="mw-heading mw-heading4"><h4 id="The_copied_text_problem">The copied text problem</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=211" title="Edit section: The copied text problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>This problem existed in <a href="/wiki/File:Active_Margin.svg" title="File:Active Margin.svg">File:Active Margin.svg</a>. </p><p>Say there is a <code>text id="text0001"</code> element that is an English label. </p><p>Say that <code>text</code> element is also copied with a <code>use xlink:href="#text0001"</code> element because the label is used twice in the image. </p><p>SVG Translate comes along and translates the <code>text</code> element into German using a <code>switch</code>. </p><p>The translation fails. The original will appear in German, but the <code>use xlink:href="#text0001"</code> element still targets the English <code>text</code> label, so the copy will appear in English. </p> <div class="mw-heading mw-heading4"><h4 id="The_default_clause_problem">The default clause problem</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=212" title="Edit section: The default clause problem"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T312907" class="extiw" title="phabricator:T312907"><span class="tracked-url trakfab-T312907">Task T312907</span></a></b><br /><span class="status"></span></div> <p>The tool does not work well with language preferences. Adding a German translation to </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><text></span>Hello,<span class="w"> </span>world<span class="nt"></text></span> </pre></div></dd></dl> <p>produces something similar to </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"de"</span><span class="nt">></span>Hallo<span class="w"> </span>Welt.<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text></span>Hello,<span class="w"> </span>world.<span class="nt"></text></span> <span class="nt"></text></span> </pre></div></dd></dl> <p>That works OK with WMF tools, but can be bizarre when displayed in a browser. For example, one can set a browser to prefer English but accept German. In that circumstance, the English language text should be displayed, but the SVG above will display German. The SVG agent does not know the default is English. The translation should be </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">></span>Hello,<span class="w"> </span>World.<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"de"</span><span class="nt">></span>Hallo<span class="w"> </span>Welt.<span class="nt"></text></span> <span class="w"> </span><span class="nt"><text></span>Hello,<span class="w"> </span>world.<span class="nt"></text></span> <span class="nt"></text></span> </pre></div></dd></dl> <p>The fix is to copy the default clause, add <code>systemLanguage="en"</code>, and then insert that element into the <code>switch</code> element. The <code>insertNodeBefore(<i>newNode</i>, <i>referenceNode</i>)</code>. The SVG DOM method <code>.cloneNode(<i>deep</i>)</code> copies the <code>id</code> attribute, so the identifiers must be changed or removed. </p><p>An example file is <a href="/wiki/File:Active_Margin.svg" title="File:Active Margin.svg">File:Active Margin.svg</a>. It has explicit Catalan, Bangla, and Basque; default is English. Detection of the problem could be done in SVG Translate: just check that the default clause matches an explicit language. If not, then ask what the default language is. </p> <div class="mw-heading mw-heading4"><h4 id="Autocomplete">Autocomplete</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=213" title="Edit section: Autocomplete"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG Translate input boxes get filled in with previous inputs even if the file changed. Turn off autocomplete? </p> <ul><li><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete">https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="SVG_Translate_should_handle_textPath">SVG Translate should handle <code>textPath</code></h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=214" title="Edit section: SVG Translate should handle textPath"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T252347" class="extiw" title="phabricator:T252347"><span class="tracked-url trakfab-T252347">Task T252347</span></a></b><br /><span class="status"></span></div> <p>The Gibraltar map has a <code>textPath</code> element. </p><p>Treat <code>textPath</code> as equivalent to <code>tspan</code>. </p><p>IIRC, mentioned in some Phabricator issue. </p><p>Possible add another test to reject <code>textPath</code> similar to this test: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="191"></span> <span class="k">if</span> <span class="p">(</span><span class="mi">0</span> <span class="o">!==</span> <span class="nv">$this</span><span class="o">-></span><span class="na">document</span><span class="o">-></span><span class="na">getElementsByTagName</span><span class="p">(</span><span class="s1">'tref'</span><span class="p">)</span><span class="o">-></span><span class="na">length</span><span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="192"></span> <span class="c1">// Tref tags not (yet) supported</span> <span class="linenos" data-line="193"></span> <span class="nv">$this</span><span class="o">-></span><span class="na">logFileProblem</span><span class="p">(</span><span class="s1">'File {file} has <tref> tags'</span><span class="p">);</span> <span class="linenos" data-line="194"></span> <span class="k">return</span> <span class="k">false</span><span class="p">;</span> <span class="linenos" data-line="195"></span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="SVG_Translate_descends_too_deeply">SVG Translate descends too deeply</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=215" title="Edit section: SVG Translate descends too deeply"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T248136" class="extiw" title="phabricator:T248136"><span class="tracked-url trakfab-T248136">Task T248136</span></a></b><br /><span class="status"></span></div> <p>SVG Translate does not recognize planar translations. If it sees a <code>switch</code> element with <code>systemLanguage</code> clauses, then it should not process that subtree. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><g</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tlh"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text></span>Klingon<span class="w"> </span>text<span class="w"> </span>cannot<span class="w"> </span>be<span class="w"> </span>translated<span class="w"> </span>to<span class="w"> </span>any<span class="w"> </span>other<span class="w"> </span>language<span class="nt"></text></span> <span class="w"> </span><span class="nt"></g></span> <span class="w"> </span><span class="nt"><g></span> <span class="w"> </span><span class="nt"><text></span>Default<span class="w"> </span>text<span class="w"> </span>can<span class="w"> </span>be<span class="w"> </span>translated,<span class="w"> </span>but<span class="w"> </span>it<span class="w"> </span>will<span class="w"> </span>be<span class="w"> </span>ugly<span class="nt"></text></span> <span class="w"> </span><span class="nt"></g></span> <span class="nt"></switch></span> </pre></div> <p>SVG Translate does not walk the tree, so it does not notice the problem. Instead, it fetches elements no matter their location in the with operations such as </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span> <span class="nv">$texts</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="na">document</span><span class="o">-></span><span class="na">getElementsByTagName</span><span class="p">(</span><span class="s1">'text'</span><span class="p">);</span> </pre></div> <p>If the elements have an ancestor with a <code>systemLanguage</code> attribute, then it should not process the element; the element's ability to be translated has been foreclosed already. </p><p>Where did I write about this before? </p><p>A file with planar translations: </p> <ul><li><a href="/wiki/File:CollapsedtreeLabels-simplified.svg" title="File:CollapsedtreeLabels-simplified.svg">File:CollapsedtreeLabels-simplified.svg</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="Does_SVG_Translate_multiply_text?_No."><span id="Does_SVG_Translate_multiply_text.3F_No."></span>Does SVG Translate multiply text? No.</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=216" title="Edit section: Does SVG Translate multiply text? No."><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>To simply matters with language matching, SVG Translate explodes a <code>systemLanguage</code> attribute with a language list. A single element with three langtags is morphed into three elements with a single langtag. </p><p>SVG allows elements with <code>systemLanguage</code> attributes anywhere; they need not be inside a switch. </p><p>Check that the combination of the two operations is safe or at least harmless. Maybe it is always harmless? If text is wrapped in a <code>switch</code> before being copied, then it should be harmless? </p><p>The fear is isolated text with <code>systemLanguage="en, en-US, en-GB"</code> gets duplicated three times. </p><p>Not a problem. The explosion is at line 370, and it is done while processing the children of a <code>switch</code>. </p> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li></ul> <div class="mw-heading mw-heading4"><h4 id="SVG_Translate_switch_processing">SVG Translate <code>switch</code> processing</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=217" title="Edit section: SVG Translate switch processing"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Switch_Test.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/220px-SVG_Switch_Test.svg.png" decoding="async" width="220" height="77" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/330px-SVG_Switch_Test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/440px-SVG_Switch_Test.svg.png 2x" data-file-width="512" data-file-height="179" /></a><figcaption>The second line is a <code>switch</code> with annotation elements <code>title</code>, <code>desc</code>, and <code>metadata</code>.</figcaption></figure> <p>SVG permits more than just <code>text</code> elements within a <code>switch</code>. In particular, <code>title</code>, <code>desc</code>, <code>metadata</code>, and comments should not confuse processing. Less likely but still permitted elements are <code>metadata</code> and animation elements. </p><p>Does the sorting of hyphenated langtags come into play? The <code>title</code> element should be first for many SVG agents. </p><p>Run SVG Translate: </p> <ul><li><a class="external free" href="https://svgtranslate.toolforge.org/File:SVG_Switch_Test.svg">https://svgtranslate.toolforge.org/File:SVG_Switch_Test.svg</a></li></ul> <p>Looks like SVG Translate works on line 2. </p><p>What is going on? The method <code>makeTranslationReady()</code> (line 136) </p> <ul><li>does a bunch of stuff not relevant here</li> <li>loops through all the <code>switch</code> tags at line 329.</li> <li>looks at the childNodes of the switch (it could just look at elements)</li> <li>returns false if the childnode is a non-empty <code>#text</code> node.</li> <li>returns false if the childnode is not an element. So a PI or comment should return false.</li> <li>returns false if the childnode is not a <code>text</code> element.</li> <li>examines <code>systemLanguage</code></li> <li>explodes if <code>systemLanguage</code> is multivalued.</li></ul> <p>I understood that <code>makeTranslationReady()</code> returning false nixes the translation of the whole file. </p><p>Maybe not. Look at <code>_construct()</code>. The last line is the call to <code>makeTranslationReady()</code>, but it does not check the result. Looks like somebody does not check <code>isTranslationReady()</code>. </p><p>I should split the test file into three files. KISS. </p><p>SVG Translate should add a dummy <code>switch</code>. See <a href="https://phabricator.wikimedia.org/T270999" class="extiw" title="phab:T270999">Phab:T270999</a>. </p> <div style="clear:both;"></div> <div class="mw-heading mw-heading4"><h4 id="Check_switch_processing">Check <code>switch</code> processing</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=218" title="Edit section: Check switch processing"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li></ul> <p>IETF lowercase at 293, but only to <code>text</code> elements. </p><p>At line 324, all the <code>switch</code> elements are grabbed. (No namespace check.) </p><p>Then all child nodes are examined at line 329. </p><p>(DOMElement <a rel="nofollow" class="external free" href="https://www.php.net/manual/en/class.domelement.php">https://www.php.net/manual/en/class.domelement.php</a> does not have <code>$children</code>, so code must use <code>$childNodes</code>.) </p><p>Non-empty text nodes cause a problem at line 337; return false. </p><p>Non-element nodes cause a problem at line 344; return false. Does this mean a comment node returns false? </p><p>If the child is not a <code>text</code> element, it fails at line 349. That should kill <code>title</code>, <code>desc</code>, <code>metadata</code>, and animation elements, but I thought they were getting through.... </p><p>Language split is at 356. It only happens inside a <code>switch</code>. That should answer the isolated <code>systemLanguage</code> element question. </p><p>An explosion will increase the number of <code>text</code> elements in the live list, so some will be missed. </p> <div class="mw-heading mw-heading4"><h4 id="Identifiers_take_up_a_lot_of_text">Identifiers take up a lot of text</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=219" title="Edit section: Identifiers take up a lot of text"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here is a clause from a <code>switch</code> translation. Compare it with and without identifiers: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg1077-9-1-8-zh-tw"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-tw"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg880-0-6-4-zh-tw"</span><span class="nt">></span>5/10<span class="nt"></tspan></text></span> <span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-tw"</span><span class="nt">><tspan></span>5/10<span class="nt"></tspan></text></span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="DOM:_tags_and_namespace">DOM: tags and namespace</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=220" title="Edit section: DOM: tags and namespace"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Translate_test_namespace.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/220px-SVG_Translate_test_namespace.svg.png" decoding="async" width="220" height="28" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/330px-SVG_Translate_test_namespace.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/440px-SVG_Translate_test_namespace.svg.png 2x" data-file-width="512" data-file-height="64" /></a><figcaption>file that uses arbitrary prefix for the SVG namespace.</figcaption></figure> <p>The DOM distinguishes </p> <ul><li><code>nodeName</code></li> <li><code>localName</code></li> <li><code>namespaceURI</code></li></ul> <p>A <code>nodeName</code> may or may not have a prefix. For example, <code>text</code> or <code>svg:text</code>. </p><p>The tag name has some interesting capitalization issues for HTML, but that is not relevant for SVG. In the case of just HTML, there is only one namespace, so the name ambiguity is not as important. </p> <ul><li><a rel="nofollow" class="external free" href="https://dom.spec.whatwg.org/#concept-getelementsbytagname">https://dom.spec.whatwg.org/#concept-getelementsbytagname</a></li></ul> <p>The specification says that <code>getElementsbyTagName()</code> searches for a qualified name. <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName">https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName</a> says that the tag name for an element is the <code>nodeName</code>. So what does a DOM implementation return? In an SVG file, if I ask for <code>"text"</code>, do I get all the nodes in the default namespace? That is, those names do not need prefixes. Do I get the same nodes if I ask for <code>"svg:text"</code>? Do some implementations simply provide all the elements with the <code>localName</code> and ignore the namespace? </p><p>In particular, I think qualified names can vary depending on the context. It is possible to set the default namespace for a subtree. </p><p>The method <code>getElementsByTagNameNS()</code> is far clearer. It looks for elements with the <code>localName</code> and in the <code>namespaceURI</code>. An implementation is not going to mess that up. It also does not depend on which prefixes are active. </p><p>I expected this to fail. It may work even if it fails. </p> <ul><li><a class="external free" href="https://svgtranslate.toolforge.org/File:SVG_Translate_test_namespace.svg">https://svgtranslate.toolforge.org/File:SVG_Translate_test_namespace.svg</a></li></ul> <p>I added a <code>rdf:text</code> element. SVG Translate wrapped the <code>.textContent</code> with a <code>tspan</code> element in the SVG namespace, but it did not offer the text to be translated (the elements never got <code>id</code> attributes. </p><p>Looking at the code, the <code>rdf:text</code> element was found at line 201: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="197"></span> <span class="c1">// Strip empty tspans, texts, fill $idsInUse</span> <span class="linenos" data-line="198"></span> <span class="nv">$idsInUse</span> <span class="o">=</span> <span class="p">[</span> <span class="mi">0</span> <span class="p">];</span> <span class="linenos" data-line="199"></span> <span class="nv">$translatableNodes</span> <span class="o">=</span> <span class="p">[];</span> <span class="linenos" data-line="200"></span> <span class="nv">$tspans</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="na">document</span><span class="o">-></span><span class="na">getElementsByTagName</span><span class="p">(</span><span class="s1">'tspan'</span><span class="p">);</span> <span class="linenos" data-line="201"></span> <span class="nv">$texts</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="na">document</span><span class="o">-></span><span class="na">getElementsByTagName</span><span class="p">(</span><span class="s1">'text'</span><span class="p">);</span> </pre></div> <p>So the PHP DOM implementation looks for the <code>localName</code>. </p><p>The source for PHP </p> <ul><li><a rel="nofollow" class="external free" href="https://github.com/php/php-src/blob/master/ext/dom/element.c">https://github.com/php/php-src/blob/master/ext/dom/element.c</a></li></ul> <p>cites to the spec </p> <ul><li><a rel="nofollow" class="external free" href="http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D">http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D</a></li></ul> <p>which only claims the search is by "tag name" but does not define that term. The namespace version is explicit about using <code>localName</code>. So using the non-namespace version for an XML document is not a good idea. </p><p>It also becomes clear that the identifier assignment believes that <code>trsvg[0-9]+</code> identifiers will only appear on <code>text</code> and <code>tspan</code> elements. Also, the code does not need to keep the entire set of attributes around. </p> <div class="mw-heading mw-heading4"><h4 id="Is_the_svg_prefix_required?"><span id="Is_the_svg_prefix_required.3F"></span>Is the <code>svg</code> prefix required?</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=221" title="Edit section: Is the svg prefix required?"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T316741" class="extiw" title="phabricator:T316741"><span class="tracked-url trakfab-T316741">Task T316741</span></a></b><br /><span class="status"></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Translate_test_namespace.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/220px-SVG_Translate_test_namespace.svg.png" decoding="async" width="220" height="28" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/330px-SVG_Translate_test_namespace.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/SVG_Translate_test_namespace.svg/440px-SVG_Translate_test_namespace.svg.png 2x" data-file-width="512" data-file-height="64" /></a><figcaption>Faulty namespace processing</figcaption></figure> <p>SVG Translate does not process namespaces correctly. </p><p><a href="https://phabricator.wikimedia.org/T316741" class="extiw" title="phab:T316741">Phab:T316741</a> (Allow svg namespace prefixes other than 'svg') was opened. </p> <ul><li><a class="external free" href="https://svgtranslate.toolforge.org/File:SVG_Translate_test_namespace.svg">https://svgtranslate.toolforge.org/File:SVG_Translate_test_namespace.svg</a> <dl><dd>→ This file has unexpected content within a text element. Only tspan elements should be used within text.</dd></dl></li></ul> <p>I see a lot of tests that are something like <code>('svg:element' === $el->nodeName)</code>. Does that mean the code depends on files using the <code>svg:</code> prefix? Does using <code>xmlns:foo="<a rel="nofollow" class="external free" href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>"</code> and <code><foo:text></code> confuse SVG Translate? </p><p>Is the problem with the PHP DOM or with the code? </p> <ul><li><a rel="nofollow" class="external free" href="https://www.php.net/manual/en/class.domnode.php">https://www.php.net/manual/en/class.domnode.php</a></li></ul> <p>Should tests such as </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">if</span> <span class="p">(</span><span class="s1">'tspan'</span> <span class="o">===</span> <span class="nv">$node</span><span class="o">-></span><span class="na">nodeName</span> <span class="o">||</span> <span class="s1">'svg:tspan'</span> <span class="o">===</span> <span class="nv">$node</span><span class="o">-></span><span class="na">nodeName</span><span class="p">)</span> <span class="p">{</span> <span class="k">continue</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>be written </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">if</span> <span class="p">(</span><span class="s1">'tspan'</span> <span class="o">===</span> <span class="nv">$node</span><span class="o">-></span><span class="na">localName</span> <span class="o">&&</span> <span class="s1">'http://www.w3.org/2000/svg'</span> <span class="o">===</span> <span class="nv">$node</span><span class="o">-></span><span class="na">namespaceURI</span><span class="p">)</span> <span class="p">{</span> <span class="k">continue</span><span class="p">;</span> <span class="p">}</span> </pre></div> <p>If a file does not use the SVG namespace, then SVG Translate may refuse to translate it. </p><p>Programming idioms from when the PHP DOM did not do namespaces? </p> <div class="mw-heading mw-heading4"><h4 id="Reorder_text_elements">Reorder <code>text</code> elements</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=222" title="Edit section: Reorder text elements"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Sorting the langtags so the hyphenated langtags come first. </p><p>Is it needed? </p><p>Does it compromise SVG 1.1 semantics? If I ask for <code>en-GB</code>, then it should not match the <code>en</code> clause. </p><p>If I promote <code>en-RAREDIALECT</code> to first position in the clauses, then asking for generic <code>en</code> gives me the rare dialect. </p><p>The only good way around this is <code>allowReorder</code>. </p><p>With the underscore, it would work around the old <code>librsvg</code> langtag matching bug. </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="sd">/**</span> <span class="sd"> * Reorder text elements within the document so that all sublocales (i.e. systemLanguage values</span> <span class="sd"> * containing a hyphen or underscore, e.g. de_CH) are moved to the beginning of the switch</span> <span class="sd"> * element, and all fallback elements are moved to the end.</span> <span class="sd"> */</span> <span class="k">protected</span> <span class="k">function</span> <span class="nf">reorderTexts</span><span class="p">()</span><span class="o">:</span> <span class="nx">void</span> </pre></div> <ul><li>Bulleted list item</li></ul> <div class="mw-heading mw-heading4"><h4 id="The_underscore_issue">The underscore issue</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=223" title="Edit section: The underscore issue"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T271000" class="extiw" title="phabricator:T271000"><span class="tracked-url trakfab-T271000">Task T271000</span></a></b><br /><span class="status resolved">RESOLVED</span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:SVG_Switch_Test.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/220px-SVG_Switch_Test.svg.png" decoding="async" width="220" height="77" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/330px-SVG_Switch_Test.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/SVG_Switch_Test.svg/440px-SVG_Switch_Test.svg.png 2x" data-file-width="512" data-file-height="179" /></a><figcaption>The third line is a <code>switch</code> with en, zh_Hans, zh-Hant, and default clauses.</figcaption></figure> <p>SVG Translate uses parochial <code>systemLanguage</code> identifiers instead of IETF langtags. This bug arises as a workaround to langtag processing bugs in <code>librsvg</code> and langtag passing methods in MediaWiki. First, the C-language version of <code>librsvg</code> that WMF uses only matches langtags to the first hyphen. It treats <code>zh-Hans</code> and <code>zh-Hant</code> as equivalent. Second, MediaWiki passes langtags in the <code>LANG</code> environment variable; that variable expects a locale string rather than an IETF langtag. Third, <code>librsvg</code> uses the <code>LANG</code> environment variable as a langtag. SVG Translate exploits those problems by using <code>zh_HANS</code> rather than the correct <code>zh-Hant</code> IETF langtag. It makes the display work on (broken) WMF servers, but the SVG files do not work on other SVG user agents. </p><p>The underscore issue is even more twisted. Multiple SVG Translate invocations are adding multiple identical clauses with non-unique identifiers: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch</span><span class="w"> </span><span class="na">id=</span><span class="s">"switch2174"</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(1853.7,532.54)"</span><span class="w"> </span><span class="na">class=</span><span class="s">"place"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"5.34px"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-zh-tw"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-zh-tw"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-zh-hant"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-zh-hant"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-zh-tw"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-zh-tw"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-zh-hant"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-zh-hant"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6217"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6215"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6221"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6219"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6225"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6223"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6229"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6227"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6233"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6231"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6237"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6235"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6241"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_TW"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6239"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6245"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6243"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text6249"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh_HANT"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"tspan6247"</span><span class="nt">></span>基夫沙里夫卡<span class="nt"></tspan></text></span> <span class="w"> </span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg1842"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg1218"</span><span class="nt">></span>Kivsharivka<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-it"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"it"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-it"</span><span class="nt">></span>Kovšarovka<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-fr"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-fr"</span><span class="nt">></span>Kivcharivka<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-el"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"el"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-el"</span><span class="nt">></span>Κιβσαρίφσκα<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-ru"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ru"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-ru"</span><span class="nt">></span>Ковшаровка<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-uk"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"uk"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-uk"</span><span class="nt">></span>Ківшарівка<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-ka"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ka"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-ka"</span><span class="nt">></span>კივშარივკა<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-lt"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"lt"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-lt"</span><span class="nt">></span>Kivšarivka<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001-ca"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"ca"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142-ca"</span><span class="nt">></span>Kivxàrivka<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"text3001"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg142"</span><span class="nt">></span>Kivsharivka<span class="nt"></tspan></text></span> <span class="nt"></switch></span> </pre></div> <p>The relevant SVG Translate code: </p> <ul><li><a rel="nofollow" class="external text" href="https://github.com/wikimedia/svgtranslate/blob/913c447750ef16a023daed3681b3f57f39af29f1/src/Model/Svg/SvgFile.php">src/Model/Svg/SvgFile.php</a></li></ul> <p>OK, it looks like a problem with inadvertently distinguishing equivalent langtags. The code mistakenly distinguishes <code>zh_hant</code>, <code>zh_Hant</code>, and <code>zh_HANT</code>. </p><p>I believe <code>$language</code> will be lowercase because </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="431"></span> <span class="nv">$langCode</span> <span class="o">=</span> <span class="nb">str_replace</span><span class="p">(</span><span class="s1">'_'</span><span class="p">,</span> <span class="s1">'-'</span><span class="p">,</span> <span class="nb">strtolower</span><span class="p">(</span><span class="nv">$lang</span><span class="p">));</span> </pre></div> <p>So the code reasonable canonizes all langtags to lower case and converts non-standard underscore langtags to hypen langtags. </p><p>Consequently, the code below will work for all-lowercase langtags (such as the usual <code>en</code> or <code>de</code>) that are present in the SVG file, but it will never match langtags with an uppercase character (such as <code>zh-Hant</code>) because they have a capital letter. Furthermore, it will never match the converted, non-standard, langtags (such as <code>zh_HANT</code>) even with a case-insensitive match because the underscore was changed to a hyphen. Also notice that if two or more <code>text</code> elements match, then nothing will be changed, and no error will be logged. </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="605"></span> <span class="c1">// Put text tag into document</span> <span class="linenos" data-line="606"></span> <span class="nv">$path</span> <span class="o">=</span> <span class="s1">'fallback'</span> <span class="o">===</span> <span class="nv">$language</span> <span class="o">?</span> <span class="linenos" data-line="607"></span> <span class="s2">"svg:text[not(@systemLanguage)]|text[not(@systemLanguage)]"</span> <span class="o">:</span> <span class="linenos" data-line="608"></span> <span class="s2">"svg:text[@systemLanguage='</span><span class="si">$language</span><span class="s2">']|text[@systemLanguage='</span><span class="si">$language</span><span class="s2">']"</span><span class="p">;</span> <span class="linenos" data-line="609"></span> <span class="nv">$existing</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="na">xpath</span><span class="o">-></span><span class="na">query</span><span class="p">(</span><span class="nv">$path</span><span class="p">,</span> <span class="nv">$switch</span><span class="p">);</span> <span class="linenos" data-line="610"></span> <span class="k">if</span> <span class="p">(</span><span class="mi">1</span> <span class="o">==</span> <span class="nv">$existing</span><span class="o">-></span><span class="na">length</span><span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="611"></span> <span class="c1">// Only one matching text node, replace if different</span> <span class="linenos" data-line="612"></span> <span class="k">if</span> <span class="p">(</span><span class="nv">$this</span><span class="o">-></span><span class="na">nodeToArray</span><span class="p">(</span><span class="nv">$newTextTag</span><span class="p">)</span> <span class="o">===</span> <span class="nv">$this</span><span class="o">-></span><span class="na">nodeToArray</span><span class="p">(</span><span class="nv">$existing</span><span class="o">-></span><span class="na">item</span><span class="p">(</span><span class="mi">0</span><span class="p">)))</span> <span class="p">{</span> <span class="linenos" data-line="613"></span> <span class="k">continue</span><span class="p">;</span> <span class="linenos" data-line="614"></span> <span class="p">}</span> <span class="linenos" data-line="615"></span> <span class="nv">$switch</span><span class="o">-></span><span class="na">replaceChild</span><span class="p">(</span><span class="nv">$newTextTag</span><span class="p">,</span> <span class="nv">$existing</span><span class="o">-></span><span class="na">item</span><span class="p">(</span><span class="mi">0</span><span class="p">));</span> <span class="linenos" data-line="616"></span> <span class="p">}</span> <span class="k">elseif</span> <span class="p">(</span><span class="mi">0</span> <span class="o">==</span> <span class="nv">$existing</span><span class="o">-></span><span class="na">length</span><span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="617"></span> <span class="c1">// No matching text node for this language, so we'll create one</span> <span class="linenos" data-line="618"></span> <span class="nv">$switch</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$newTextTag</span><span class="p">);</span> <span class="linenos" data-line="619"></span> <span class="p">}</span> </pre></div> <p>OK, tried a file with <code>systemLanguage="FR"</code>, added a German translation, and the French clause was duplicated. SVG Translate produced: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="nt"><switch</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(20, 60)"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>This<span class="w"> </span>title<span class="w"> </span>should<span class="w"> </span>display.<span class="nt"></title></span> <span class="w"> </span><span class="nt"><desc></span>Test<span class="w"> </span>that<span class="w"> </span>title,<span class="w"> </span>desc,<span class="w"> </span>and<span class="w"> </span>metadata<span class="w"> </span>process<span class="w"> </span>correctly.<span class="nt"></desc></span> <span class="w"> </span><span class="nt"><metadata/></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"tlh"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg13"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg2"</span><span class="nt">></span>Klingon<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"FR"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg14"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg3"</span><span class="nt">></span>French<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg15"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg4"</span><span class="nt">></span>English<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg14"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg3"</span><span class="nt">></span>French<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg16-de"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"de"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg5-de"</span><span class="nt">></span>German<span class="w"> </span>2<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg16"</span><span class="nt">><tspan</span><span class="w"> </span><span class="na">id=</span><span class="s">"trsvg5"</span><span class="nt">></span>Default<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"></switch></span> </pre></div> <p>The basic issue above is the case-sensitive comparison in <code>text[@systemLanguage='$language']</code>. XPath 1.0 does not have a case-sensitive comparison. A possible fix is to modify the XPath filter to fix both the lowercase and the underscore issues: </p> <div class="mw-highlight mw-highlight-lang-xquery mw-content-ltr" dir="ltr"><pre><span></span><span class="nt">text</span><span class="p">[</span><span class="nf">translate</span><span class="p">(</span><span class="na">@systemLanguage</span><span class="p">,</span><span class="w"> </span><span class="s2">"ABCDEFGHIJKLMNOPQRSTUVWXYZ_"</span><span class="p">,</span><span class="w"> </span><span class="s2">"abcdefghijklmnopqrstuvwxyz-"</span><span class="p">)</span><span class="o">=</span><span class="s1">'$language'</span><span class="p">]</span> </pre></div> <p>There are still some questions about the code. How does <code>systemLanguage="zh_HANT"</code> enter? Are translation selections edited in the UI? And how does the file's <code>systemLanguage="zh-Hant"</code> turn into <code>systemLanguage="zh_HANT"</code>? </p><p>Looks like this routine will change <code>zh-hant</code> into <code>zh_HANT</code>: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="825"></span> <span class="sd">/**</span> <span class="linenos" data-line="826"></span><span class="sd"> * @param string $langCode</span> <span class="linenos" data-line="827"></span><span class="sd"> * @return string</span> <span class="linenos" data-line="828"></span><span class="sd"> */</span> <span class="linenos" data-line="829"></span> <span class="k">private</span> <span class="k">static</span> <span class="k">function</span> <span class="nf">langCodeToOs</span><span class="p">(</span><span class="nx">string</span> <span class="nv">$langCode</span><span class="p">)</span><span class="o">:</span> <span class="nx">string</span> <span class="linenos" data-line="830"></span> <span class="p">{</span> <span class="linenos" data-line="831"></span> <span class="k">if</span> <span class="p">(</span><span class="k">false</span> <span class="o">===</span> <span class="nb">strpos</span><span class="p">(</span><span class="nv">$langCode</span><span class="p">,</span> <span class="s1">'-'</span><span class="p">))</span> <span class="p">{</span> <span class="linenos" data-line="832"></span> <span class="c1">// No territory specified, so no change to make (fr => fr)</span> <span class="linenos" data-line="833"></span> <span class="k">return</span> <span class="nv">$langCode</span><span class="p">;</span> <span class="linenos" data-line="834"></span> <span class="p">}</span> <span class="linenos" data-line="835"></span> <span class="p">[</span> <span class="nv">$prefix</span><span class="p">,</span> <span class="nv">$suffix</span> <span class="p">]</span> <span class="o">=</span> <span class="nb">explode</span><span class="p">(</span><span class="s1">'-'</span><span class="p">,</span> <span class="nv">$langCode</span><span class="p">,</span> <span class="mi">2</span><span class="p">);</span> <span class="linenos" data-line="836"></span> <span class="k">return</span> <span class="nv">$prefix</span><span class="o">.</span><span class="s1">'_'</span><span class="o">.</span><span class="nb">strtoupper</span><span class="p">(</span><span class="nv">$suffix</span><span class="p">);</span> <span class="linenos" data-line="837"></span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="The_number_of_tspan_elements_must_match">The number of <code>tspan</code> elements must match</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=224" title="Edit section: The number of tspan elements must match"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Here's a <a href="https://phabricator.wikimedia.org/T216283#5106699" class="extiw" title="phab:T216283">Phab:T216283#5106699</a> discussing mismatching number of <code>tspan</code> elements. </p><p>Somewhere there was a more specific problem where SVG Translate drops the <code>tspan</code>. Searching for it, but have not found it. </p><p>Look in the code to find this requirement. </p> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li></ul> <p>IIRC, some code deletes empty <code>text</code> and <code>tspan</code>. </p><p>In addition, I think there was a Phabricator item where an empty <code>tspan</code> was removed, and that cause subsequent translation problems. </p><p>The trouble may be at line 254. All the translatable nodes (<code>text</code> and <code>tspan</code> elements) are scanned. If the element has no child nodes (which would be true for an empty <code>tspan</code>), then that element would be removed. Consider a two-line translation where some lines may be empty. This code will remove the empty line. When a translation on that <code>switch</code> is attempted, the number of <code>tspan</code> elements will not match. </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="254"></span> <span class="k">if</span> <span class="p">(</span><span class="o">!</span><span class="nv">$translatableNode</span><span class="o">-></span><span class="na">hasChildNodes</span><span class="p">())</span> <span class="p">{</span> <span class="linenos" data-line="255"></span> <span class="c1">// Empty tag, will just confuse translators if we leave it in</span> <span class="linenos" data-line="256"></span> <span class="nv">$translatableNode</span><span class="o">-></span><span class="na">parentNode</span><span class="o">-></span><span class="na">removeChild</span><span class="p">(</span><span class="nv">$translatableNode</span><span class="p">);</span> <span class="linenos" data-line="257"></span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="The_$_issue"><span id="The_.24_issue"></span>The $ issue</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=225" title="Edit section: The $ issue"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <dl><dd><small><b>FIXED</b> <a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/pull/620">https://github.com/wikimedia/svgtranslate/pull/620</a></small></dd></dl> <p>SVG Translate is supposed to refuse to translate text that has a dollar sign followed by a number (e.g., "$17"). </p><p>I suspect the code has a bug because it does not escape the <code>$</code> in the <code>preg_match</code> on line 288. </p> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li></ul> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="285"></span><span class="c1">// Text strings like $1, $2 will cause problems later because</span> <span class="linenos" data-line="286"></span><span class="c1">// self::replaceIndicesRecursive() will try to replace them</span> <span class="linenos" data-line="287"></span><span class="c1">// with (non-existent) child nodes.</span> <span class="linenos" data-line="288"></span><span class="k">if</span> <span class="p">(</span><span class="nb">preg_match</span><span class="p">(</span><span class="s1">'/$[0-9]/'</span><span class="p">,</span> <span class="nv">$text</span><span class="o">-></span><span class="na">textContent</span><span class="p">))</span> <span class="p">{</span> <span class="linenos" data-line="289"></span> <span class="nv">$this</span><span class="o">-></span><span class="na">logFileProblem</span><span class="p">(</span><span class="s1">'File {file} has text with $-numbers'</span><span class="p">);</span> <span class="linenos" data-line="290"></span> <span class="k">return</span> <span class="k">false</span><span class="p">;</span> <span class="linenos" data-line="291"></span><span class="p">}</span> </pre></div> <p>The issue was mentioned at <a href="https://phabricator.wikimedia.org/T271000#8134211" class="extiw" title="phab:T271000">Phab:T271000#8134211</a>. <cite>Bad language code: zh_Hans should be zh-Hans</cite>. </p> <div class="mw-heading mw-heading4"><h4 id="The_style_element_must_have_trailing_characters">The <code>style</code> element must have trailing characters</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=226" title="Edit section: The style element must have trailing characters"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="https://phabricator.wikimedia.org/T271595" class="extiw" title="phab:T271595">Phab:T271595</a> <cite>SVG translate tool replaces all fields with "$1" (style element needs at least one trailing character)</cite> </p><p>What's left over after a failed media rule parse? </p> <ul><li><code>@media printer { text { fill: black; } }</code></li></ul> <p>The regex match does not balance parentheses, so the second brace is collected as part of the ruleset. The trailing character is a right brace. </p> <div class="mw-heading mw-heading4"><h4 id="Hoisting_style_attributes">Hoisting <code>style</code> attributes</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=227" title="Edit section: Hoisting style attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>At <a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a> I hope this does not do what I think it does: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="304"></span> <span class="c1">// Non-translatable style elements on texts get lost, so bump up to switch</span> <span class="linenos" data-line="305"></span> <span class="k">if</span> <span class="p">(</span><span class="nv">$text</span><span class="o">-></span><span class="na">hasAttribute</span><span class="p">(</span><span class="s1">'style'</span><span class="p">))</span> <span class="p">{</span> <span class="linenos" data-line="306"></span> <span class="nv">$style</span> <span class="o">=</span> <span class="nv">$text</span><span class="o">-></span><span class="na">getAttribute</span><span class="p">(</span><span class="s1">'style'</span><span class="p">);</span> <span class="linenos" data-line="307"></span> <span class="nv">$text</span><span class="o">-></span><span class="na">parentNode</span><span class="o">-></span><span class="na">setAttribute</span><span class="p">(</span><span class="s1">'style'</span><span class="p">,</span> <span class="nv">$style</span><span class="p">);</span> <span class="linenos" data-line="308"></span> <span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Splitting_langtags_duplicates_identifiers">Splitting langtags duplicates identifiers</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=228" title="Edit section: Splitting langtags duplicates identifiers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Splitting <code>systemLanguage</code> langtags duplicates <code>id</code> attributes: </p> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="365"></span> <span class="k">foreach</span> <span class="p">(</span><span class="nv">$realLangs</span> <span class="k">as</span> <span class="nv">$realLang</span><span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="366"></span> <span class="c1">// Although the SVG spec supports multi-language text tags (e.g. "en,fr,de")</span> <span class="linenos" data-line="367"></span> <span class="c1">// these are a really poor idea since (a) they are confusing to read and (b) the</span> <span class="linenos" data-line="368"></span> <span class="c1">// desired translations could diverge at any point. So get rid.</span> <span class="linenos" data-line="369"></span> <span class="nv">$singleLanguageNode</span> <span class="o">=</span> <span class="nv">$sibling</span><span class="o">-></span><span class="na">cloneNode</span><span class="p">(</span><span class="k">true</span><span class="p">);</span> <span class="linenos" data-line="370"></span> <span class="nv">$singleLanguageNode</span><span class="o">-></span><span class="na">setAttribute</span><span class="p">(</span><span class="s1">'systemLanguage'</span><span class="p">,</span> <span class="nv">$realLang</span><span class="p">);</span> <span class="linenos" data-line="371"></span> <span class="linenos" data-line="372"></span> <span class="c1">// @todo: Should also go into tspans and change their ids, too.</span> <span class="linenos" data-line="373"></span> <span class="c1">// $prefix = implode( '-', explode( '-', $singleLanguageNode->getAttribute( 'id' ), -1 ) );</span> <span class="linenos" data-line="374"></span> <span class="c1">// $singleLanguageNode->setAttribute( 'id', "$prefix-$realLang" );</span> <span class="linenos" data-line="375"></span> <span class="linenos" data-line="376"></span> <span class="c1">// Add in new element</span> <span class="linenos" data-line="377"></span> <span class="nv">$switch</span><span class="o">-></span><span class="na">appendChild</span><span class="p">(</span><span class="nv">$singleLanguageNode</span><span class="p">);</span> <span class="linenos" data-line="378"></span> <span class="p">}</span> <span class="linenos" data-line="379"></span> <span class="nv">$switch</span><span class="o">-></span><span class="na">removeChild</span><span class="p">(</span><span class="nv">$sibling</span><span class="p">);</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Is_the_lang_attribute_copied">Is the <code>lang</code> attribute copied</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=229" title="Edit section: Is the lang attribute copied"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Something to test. If the <code>text</code> element has a <code>lang</code> attribute, is that attribute copied to the translations? </p> <div class="mw-heading mw-heading4"><h4 id="PHP_static_analyzer">PHP static analyzer</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=230" title="Edit section: PHP static analyzer"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T316310" class="extiw" title="phabricator:T316310"><span class="tracked-url trakfab-T316310">Task T316310</span></a></b><br /><span class="status"></span></div> <p>SVG Translate already has some phpdoc (JavaDoc-style) comments, but the declarations have some issues. <a href="https://phabricator.wikimedia.org/T316310" class="extiw" title="phab:T316310">Phab:T316310</a> seeks to add the PHP static analyzer / linter <a rel="nofollow" class="external text" href="https://github.com/phan/phan">Phan</a>. A proposed patch adds Phan to the build process. </p><p>See the <a rel="nofollow" class="external free" href="https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base">https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base</a> tutorial. A baseline run on SVG Translate produced </p> <pre>// PhanUndeclaredMethod : 10+ occurrences // PhanTypeMismatchArgumentNullableInternal : 7 occurrences // PhanCommentDuplicateParam : 3 occurrences // PhanDeprecatedFunction : 3 occurrences // PhanTypeMismatchArgumentInternalProbablyReal : 2 occurrences // PhanTypeMismatchDeclaredParamNullable : 2 occurrences // PhanTypeMismatchPropertyProbablyReal : 2 occurrences // PhanAccessMethodInternal : 1 occurrence // PhanTypeMismatchArgumentNullable : 1 occurrence // PhanTypeMismatchArgumentProbablyReal : 1 occurrence // PhanTypePossiblyInvalidDimOffset : 1 occurrence // PhanTypeSuspiciousNonTraversableForeach : 1 occurrence </pre> <p>That does not look outrageous. Some look like expected trivial fixes. Maybe a higher analysis level will complain about code not looking at the returned value. I have not seen the start out with weak checking plan and increase the level later. Software engineering advice has been to set the warning level at maximum and just deal with the flood. The ratchet-up-later plan sounds interesting, but somebody needs to remember to do the ratcheting. (Ah, Eric just wanting to ignore 200+ warnings that had to be wrong.) </p><p>Phan has not been around a long time (in development in 2017). What other PHP linters are there? </p><p><a rel="nofollow" class="external free" href="https://github.com/phan/phan/wiki/Incrementally-Strengthening-Analysis">https://github.com/phan/phan/wiki/Incrementally-Strengthening-Analysis</a> </p> <div class="mw-heading mw-heading4"><h4 id="Mere_mortals_cannot_view_the_log">Mere mortals cannot view the log</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=231" title="Edit section: Mere mortals cannot view the log"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See <a class="external free" href="https://phabricator.wikimedia.org/T271000#8201384">https://phabricator.wikimedia.org/T271000#8201384</a> </p><p>So raise a creature feature request for a logging window. </p><p>I think I was bit by silent errors. The code detected a problem, logged an error, stopped further processing in that metnod, but forged ahead with subsequent tasks that GIGO'd. </p> <div class="mw-heading mw-heading4"><h4 id="Generated_SVG_Translate_URLs_marked_as_dead">Generated SVG Translate URLs marked as dead</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=232" title="Edit section: Generated SVG Translate URLs marked as dead"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T349247" class="extiw" title="phabricator:T349247"><span class="tracked-url trakfab-T349247">Task T349247</span></a></b><br /><span class="status"></span></div> <p>See <a href="https://meta.wikimedia.org/wiki/User_talk:InternetArchiveBot#Generated_link_marked_as_dead" class="extiw" title="meta:User talk:InternetArchiveBot">Meta:User_talk:InternetArchiveBot#Generated_link_marked_as_dead</a> </p><p>The marked link takes a long time to load. It is not clear that SVG Translate responds to a HEAD request. Check the sources. </p> <div class="mw-heading mw-heading4"><h4 id="Phabricator_tickets">Phabricator tickets</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=233" title="Edit section: Phabricator tickets"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>I need to update some SVG Phabricator tickets and create some others. </p> <pre>T271000 Mentioned In T319259: Check that document element is <svg> and in the right namespace rGSVTd5fc9388e033: Allow tspan to be in svg namespace (#622) T248252: SVG Translate: Skip unsupported text pattern and continue with the supported ones rGSVTb8c23d973c36: Create (and catch) exceptions for all existing error states T316741: Allow svg namespace prefixes other than 'svg' rGSVT91689a31bb6b: Fix regex to find $1, $2, etc. rGSVT05d2724e6765: Normalize lang codes when reading SVGs and writing translations T261192: Rendering multilingual (systemLanguage) SVG files fails locally after upgrading librsvg from 2.40.21 to 2.44.10 T40010: RFC: Re-evaluate librsvg as SVG renderer on Wikimedia wikis T275263: Translation dropdown not available on File: page after translating a specific SVG file on Commons via svgtranslate tool T271595: SVG translate tool replaces all fields with "$1" (style element needs at least one trailing character) Mentioned Here T271595: SVG translate tool replaces all fields with "$1" (style element needs at least one trailing character) T221382: [BUG] Some CSS selectors break translation input T319259: Check that document element is <svg> and in the right namespace T316310: Add Phan to SVG Translate CI T316741: Allow svg namespace prefixes other than 'svg' T221453: Add "newer" open fonts T280718: Re-evaluate whether keeping around https://noc.wikimedia.org/conf/fc-list is a good practive T261192: Rendering multilingual (systemLanguage) SVG files fails locally after upgrading librsvg from 2.40.21 to 2.44.10 T40010: RFC: Re-evaluate librsvg as SVG renderer on Wikimedia wikis T154237: SVG image wikisyntax can't use "lang=zh-hant" T265549: Update librsvg to > 2.44.10 </pre> <ul><li><a href="https://phabricator.wikimedia.org/T248136" class="extiw" title="phab:T248136">Phab:T248136</a> SVG translate Tool ignores inherit group-attributes</li> <li><a href="https://phabricator.wikimedia.org/T241500" class="extiw" title="phab:T241500">Phab:T241500</a> Add link to translate the SVG Translate tool itself</li> <li><a href="https://phabricator.wikimedia.org/T327573" class="extiw" title="phab:T327573">Phab:T327573</a> SVG Translate does not output translated clause. <dl><dd>" 90" translations are ignored?</dd> <dd><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons_talk%3ASVG_Translate_tool&diff=739576458&oldid=739464714&diffmode=source#Label_is_not_translated">https://commons.wikimedia.org/w/index.php?title=Commons_talk%3ASVG_Translate_tool&diff=739576458&oldid=739464714&diffmode=source#Label_is_not_translated</a></dd></dl></li> <li><a href="https://phabricator.wikimedia.org/T252347" class="extiw" title="phab:T252347">Phab:T252347</a> SVG Translate should support textPath</li> <li><a href="https://phabricator.wikimedia.org/T335654" class="extiw" title="phab:T335654">Phab:T335654</a> SVG Translate github repo has paused Dependabot</li> <li><a href="https://phabricator.wikimedia.org/T335663" class="extiw" title="phab:T335663">Phab:T335663</a> Unable to compile assets (digital envelope routines unsupported)</li></ul> <p><br /> RSVG bugs </p> <ul><li><a href="https://phabricator.wikimedia.org/T370044" class="extiw" title="phab:T370044">Phab:T370044</a> PNG thumbnail of SVG file: Text not centered and cut off (RSVG anisotropic scaling bug)</li></ul> <div class="mw-heading mw-heading3"><h3 id="Hoisting_attributes">Hoisting attributes</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=234" title="Edit section: Hoisting attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/wiki/File:Twilight_subcategories.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Twilight_subcategories.svg/220px-Twilight_subcategories.svg.png" decoding="async" width="220" height="147" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Twilight_subcategories.svg/330px-Twilight_subcategories.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Twilight_subcategories.svg/440px-Twilight_subcategories.svg.png 2x" data-file-width="512" data-file-height="343" /></a><figcaption>An SVG image with attribute hoisting opportunities</figcaption></figure> <p>SVG Translate produces verbose output. One reason is that it copies all the attributes on the original <code>text</code> element to the <code>switch</code> element clauses. Consequently, we see something like </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"100"</span><span class="w"> </span><span class="na">y=</span><span class="s">"200"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"Arial"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"10"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">><tspan></span>Hello,<span class="w"> </span>world.<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"100"</span><span class="w"> </span><span class="na">y=</span><span class="s">"200"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"Arial"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"10"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"de"</span><span class="nt">><tspan></span>Hallo<span class="w"> </span>Welt.<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">x=</span><span class="s">"100"</span><span class="w"> </span><span class="na">y=</span><span class="s">"200"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"Arial"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"10"</span><span class="nt">><tspan></span>Hello,<span class="w"> </span>world.<span class="nt"></tspan></text></span> <span class="nt"></text></span> </pre></div></dd></dl> <p>A more concise version would be </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch</span><span class="w"> </span><span class="na">transform=</span><span class="s">"translate(100, 200)"</span><span class="w"> </span><span class="na">font-family=</span><span class="s">"Arial"</span><span class="w"> </span><span class="na">font-size=</span><span class="s">"10"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">><tspan></span>Hello,<span class="w"> </span>world.<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"de"</span><span class="nt">><tspan></span>Hallo<span class="w"> </span>Welt.<span class="nt"></tspan></text></span> <span class="w"> </span><span class="nt"><text><tspan></span>Hello,<span class="w"> </span>world.<span class="nt"></tspan></text></span> <span class="nt"></text></span> </pre></div></dd></dl> <p>There can be a list of attributes to promote. For example, attributes <code>font-family</code>, <code>font-size</code>, <code>font-weight</code>, and <code>font-style</code>. If a <code>switch</code> element has only <code>text</code> elements and each of those elements have the same attribute <i>z</i>, then delete <i>z</i> from each child and move it to the <code>switch</code> element. The replacement may override a value on the <code>switch</code> element. </p> <div class="mw-heading mw-heading4"><h4 id="Class_and_Style_confuse_the_issue">Class and Style confuse the issue</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=235" title="Edit section: Class and Style confuse the issue"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <code>class</code> and <code>style</code> attributes complicate the replacement. The simple method would insist those attributes are not present on any element. There may still be a CSS selector that matches the <code>switch</code> or <code>text</code> elements. The priority of CSS rules is higher than attributes, so the only real trouble is the <code>class</code> attribute. Leave the <code>class</code> attribute on any element. </p> <dl><dd><small>Note: SVG 1.1 does not require CSS or <code>style</code> attribute support.<sup id="cite_ref-34" class="reference"><a href="#cite_note-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup></small></dd></dl> <p>There are many ways to specify presentation properties, and those specifications may conflict. The conflicts are resolved by assigning priorities to the property specifications:<sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup> </p> <ul><li>Attributes (lowest priority)</li> <li>CSS selectors have calculated priorities based on specificity and order</li> <li>inline styles (may be overridden with CSS <code>!important</code> selectors) (highest priority)</li></ul> <p>The style priority makes hoisting difficult. It also means that inline styles are not (usually) overridden with CSS patterns. </p><p>Mozilla <a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity">https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity</a> says </p> <blockquote> <p>Your global CSS file that sets visual aspects of your site globally may be overwritten by inline styles defined directly on individual elements. Both inline styles and !important are considered bad practice, but sometimes you need the latter to override the former. </p> </blockquote> <p>Inkscape heavily uses inline styles. In a way, that makes interpretation easier: inline styles have the highest precedence, so it is the least confusing way to apply style information. It is unlikely to be overridden by other information. At the same time, it also means that converting inline style information to attributes may have unexpected results if a CSS selector applies contradicting information. </p> <div class="mw-heading mw-heading4"><h4 id="Prefer_class">Prefer class</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=236" title="Edit section: Prefer class"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>It makes sense to prefer class (or other selectors) over explicit <code>style</code> attributes. For example, say a <code>class</code> selector sets the font characteristics to certain values and the <code>style</code> attribute sets the same values. A <code>class</code> selector may apply to more elements, so it should be favored. </p><p>A quick and dirty way to play this game is to remove the <code>style</code> attribute and then <code>Window.getComputedStyle()</code>. Any properties in the <code>style</code> attribute that are already present may be removed. Coding can be a bit tricky. </p><p>Being more direct is also difficult. One can access the stylesheets and the <code>style</code> attribute, but the CSSRule (Media rules make a multiverse), CSSStyleRule (does not parse selectors), and CSSStyleDeclaration do not have more mechanism. CSSStyleRule provides the <code>selectorText</code>, but the interface does not provide a priority list of which rules apply to an element. Parsing and interpreting selectors is a difficult task. </p><p>There is <code>querySelector</code>, so the inverted test may be done. Should check at how well that method works. The method does not return the priority. </p><p>Pseudo selectors may be difficult to get right. For example, <code>:active</code> suggests the need to example all possibilities. </p><p>Animation may also cause trouble. </p> <div class="mw-heading mw-heading4"><h4 id="Transformation_rewrites">Transformation rewrites</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=237" title="Edit section: Transformation rewrites"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The <code>transform</code> rewrite is more complicated. A potential method chooses a suitable translation, appends it to the <code>switch</code> element's <code>transform</code>, and then adjusts the coordinates of all the children. For the <code>text</code> element, if the coordinate adjusts to zero, then remove the attribute. Do not remove the zero attributes of <code>tspan</code> elements because they start new text chunks. A <code>transform</code> element on the <code>text</code> or <code>tspan</code> elements would cause a lot of trouble. So hoist the <code>transform</code> attributes first and give up if they do not hoist. </p><p>Is this step a good idea? If the file is localized, all this information would be moved back into the <code>text</code> element. In addition, the styling may be accomplished with a <code>class</code> attribute and CSS, so it is not a heavy penalty for each clause. Moving styling information into a <code>text</code> element may be the better goal. The issue of hoisting position information may still be reasonable. </p> <div class="mw-heading mw-heading3"><h3 id="Multiline_trick">Multiline trick</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=238" title="Edit section: Multiline trick"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Merge with <code>tspan</code> count issue. </p><p>It may be possible to do a multiline with vertical alignment trick. Instead of a one-line translation or a two-line translation, make it a three-line translation. For one-line translations, only one <code>tspan</code> is used; the other two are left empty. For a two-line translation, the one-line <code>tspan</code> is left empty. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><text></span> <span class="w"> </span><span class="nt"><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"0"</span><span class="nt">></span>One-line<span class="w"> </span>translation<span class="nt"></tspan></span> <span class="w"> </span><span class="nt"><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"-20"</span><span class="nt">></span>Two-line<span class="w"> </span>translation,<span class="w"> </span>line<span class="w"> </span>1<span class="nt"></tspan></span> <span class="w"> </span><span class="nt"><tspan</span><span class="w"> </span><span class="na">x=</span><span class="s">"0"</span><span class="w"> </span><span class="na">y=</span><span class="s">"20"</span><span class="nt">></span>Two-line<span class="w"> </span>translation,<span class="w"> </span>line<span class="w"> </span>2<span class="nt"></tspan></span> <span class="w"> </span><span class="nt"></text></span> <span class="nt"></switch></span> </pre></div> <p>When will <code>librsvg</code> support the CSS <code>lh</code> unit? </p> <ul><li><a href="/wiki/File:SVG_Test_CSS_Lengths.svg" title="File:SVG Test CSS Lengths.svg">File:SVG Test CSS Lengths.svg</a> shows some units, but not lh (CSS 4.0). Could use EM.</li> <li>See <a href="#Support_for_CSS_units">#Support for CSS units</a> above</li></ul> <div class="mw-heading mw-heading3"><h3 id="WMF_warts">WMF warts</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=239" title="Edit section: WMF warts"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://www.debian.org/releases/">https://www.debian.org/releases/</a> Debian releases...</li></ul> <p>More information:<a rel="nofollow" class="external autonumber" href="https://packages.debian.org/search?keywords=librsvg">[3]</a> </p><p><a href="https://en.wikipedia.org/wiki/Debian_version_history" class="extiw" title="en:Debian version history">en:Debian version history</a> (also has end of support) </p> <table class="wikitable"> <caption>Debian releases and <code>librsvg</code> versions </caption> <tbody><tr> <th colspan="5">Debian</th> <th colspan="2"><code>librsvg</code></th> <th>WMF </th></tr> <tr> <th>code name</th> <th>version</th> <th>date</th> <th>status</th> <th>end of support</th> <th>version</th> <th>date</th> <th>WMF deploy </th></tr> <tr> <td>Jessie</td> <td>8</td> <td>2015-04</td> <td>archived</td> <td>2018-06</td> <td></td> <td></td> <td> </td></tr> <tr> <td>Stretch</td> <td>9</td> <td>2017-06</td> <td>archived</td> <td>2020-07</td> <td></td> <td></td> <td> </td></tr> <tr> <td>Buster</td> <td>10</td> <td>2019-07</td> <td>old old stable</td> <td>2022-09</td> <td>2.44.10</td> <td></td> <td>April 2023 </td></tr> <tr> <td>Bullseye</td> <td>11</td> <td>2021-08</td> <td>old stable</td> <td>2024-07</td> <td>2.50.3</td> <td></td> <td>June 2024 </td></tr> <tr> <td>Bookworm</td> <td>12</td> <td>2023-06</td> <td>stable</td> <td>2026-06</td> <td>2.54.5</td> <td></td> <td> </td></tr> <tr> <td>Trixie</td> <td>13</td> <td></td> <td>testing</td> <td></td> <td>2.54.5</td> <td></td> <td> </td></tr> <tr> <td>Sid</td> <td>14</td> <td></td> <td>unstable</td> <td></td> <td>2.54.5</td> <td></td> <td> </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="MinT">MinT</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=240" title="Edit section: MinT"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>WMF now has a translation service called MinT (Machine in Translation). </p> <ul><li><a class="external free" href="https://www.mediawiki.org/wiki/MinT">https://www.mediawiki.org/wiki/MinT</a> <a href="https://www.mediawiki.org/wiki/MinT" class="extiw" title="mw:MinT">MW:MinT</a></li> <li><a rel="nofollow" class="external free" href="https://translate.wmcloud.org/">https://translate.wmcloud.org/</a></li> <li>formats: "html" "json" "markdown" "text" "svg" "webpage" <dl><dd>will translate SVG <dl><dd>GET <a rel="nofollow" class="external free" href="https://translate.wmcloud.org/svg">https://translate.wmcloud.org/svg</a> →</dd></dl></dd> <dd>GET <a rel="nofollow" class="external free" href="https://translate.wmcloud.org/docs">https://translate.wmcloud.org/docs</a> API documentation</dd> <dd>GET <a rel="nofollow" class="external free" href="https://translate.wmcloud.org/healthz">https://translate.wmcloud.org/healthz</a> →</dd> <dd>GET <a rel="nofollow" class="external free" href="https://translate.wmcloud.org/api/languages">https://translate.wmcloud.org/api/languages</a> → list of languages</dd> <dd>POST <a rel="nofollow" class="external free" href="https://translate.wmcloud.org/api/translate">https://translate.wmcloud.org/api/translate</a> → translation</dd></dl></li> <li><a class="external free" href="https://diff.wikimedia.org/2023/11/20/unlocking-the-worlds-languages-in-wikipedia-a-look-into-mints-impact-so-far/">https://diff.wikimedia.org/2023/11/20/unlocking-the-worlds-languages-in-wikipedia-a-look-into-mints-impact-so-far/</a></li> <li><a class="external free" href="https://diff.wikimedia.org/2023/11/21/what-users-think-about-the-machine-in-translation-mint-service/">https://diff.wikimedia.org/2023/11/21/what-users-think-about-the-machine-in-translation-mint-service/</a></li> <li><a rel="nofollow" class="external free" href="https://linuxmint-translation-guide.readthedocs.io/en/latest/verify.html">https://linuxmint-translation-guide.readthedocs.io/en/latest/verify.html</a> <dl><dd><a rel="nofollow" class="external free" href="https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html">https://www.gnu.org/software/gettext/manual/html_node/PO-Files.html</a></dd> <dd>put in a container...</dd></dl></li> <li><a rel="nofollow" class="external free" href="https://forums.linuxmint.com/viewtopic.php?t=413666">https://forums.linuxmint.com/viewtopic.php?t=413666</a></li> <li><a rel="nofollow" class="external free" href="https://aws.amazon.com/translate/">https://aws.amazon.com/translate/</a> Amazon service</li> <li><a rel="nofollow" class="external free" href="https://translate.google.com">https://translate.google.com</a> Google service</li> <li>Microsoft service</li></ul> <p>Where were my other notes about sources for translations? </p> <ul><li>MinT (cannot restrict subject)</li> <li>Wikitionary</li> <li>Wikidata (problems with singular / plural)</li></ul> <div class="mw-heading mw-heading2"><h2 id="SVG_and_graphics_editors">SVG and graphics editors</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=241" title="Edit section: SVG and graphics editors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Also round tripping </p> <div class="mw-heading mw-heading3"><h3 id="Adobe_Illustrator">Adobe Illustrator</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=242" title="Edit section: Adobe Illustrator"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Adobe Illustrator uses SVG as an interchange format, but it has limitations. </p><p>Font specifications are encoded in the <code>font-family</code> attribute. The <code>font-family</code> attribute also merges bold and italic attributes. Adobe Illustrator does not set <code>font-weight</code> or <code>font-style</code>. Instead there will be a font name such as TimesRomanBoldItalic. </p><p>Adobe Illustrator may be using the PostScript or the Macintosh font names. That may frustrate font matching on Unix and Windows systems. </p><p>The TrueType Open specification lists several names. </p><p>Adobe Illustrator does not set the <code>text-anchor</code> appropriately. </p> <dl><dd>SVG output always uses <code>text-anchor="start"</code> — even for right-aligned text.</dd> <dd>The left/start alignment causes problems when fonts are substituted; different text metrics may underrun or overrun</dd> <dd>The left/start alignment causes problems when translations are made; the text length will vary.</dd> <dd>Repair Adobe Illustrator files <ul><li><a href="/wiki/File:Culex_pipiens_diagram_en.svg" title="File:Culex pipiens diagram en.svg">File:Culex pipiens diagram en.svg</a> fixed</li> <li><a href="/wiki/File:Scheme_ant_worker_anatomy-en.svg" title="File:Scheme ant worker anatomy-en.svg">File:Scheme ant worker anatomy-en.svg</a> needs fixing</li></ul></dd></dl> <p>Adobe Illustrator creates dozens of styles for classes with names such as <code>.st0</code>, <code>.st1</code>, .... Each CSS block is limited it in its scope. It might just set a font, a fill, or a clipping path. The drawing elements will then set several classes. For example, <code>class="st5 st17 st31"</code>. </p><p>Limiting the scope of a CSS block may reduce the number of the blocks that need to be defined. </p><p>Adobe Illustrator usually avoids setting attributes, but I've seen files that set the <code>clip-path</code> two ways: once as a <code>clip-path</code> attribute and again as a CSS property accessed through a <code>class</code> attribute. I do not know if Illustrator does that or if it comes about from another graphics editor (such as Inkscape) subsequently modifying the file. </p> <div class="mw-heading mw-heading3"><h3 id="CorelDraw">CorelDraw</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=243" title="Edit section: CorelDraw"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Inkscape_2">Inkscape</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=244" title="Edit section: Inkscape"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inkscape is an editor that will preserve a lot of SVG because Inkscape uses SVG as its internal representation. Unlike other graphics editors, Inkscape does not have a different native format. </p> <div class="mw-heading mw-heading4"><h4 id="Inkscape_style_attributes">Inkscape style attributes</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=245" title="Edit section: Inkscape style attributes"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inkscape puts a lot of information in <code>style</code> attributes. The information is often redundant, but it simplifies moving graphics elements from one place to another. </p> <div class="mw-heading mw-heading4"><h4 id="Inkscape_clone_model">Inkscape clone model</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=246" title="Edit section: Inkscape clone model"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inkscape allows copying or cloning. Copying duplicates all the drawing code. Cloning just refers to the earlier drawing code with a <code>use</code> element. </p><p>Ideally, an object should be defined in the <code>defs</code> section and referred to in the body. Inkscape does not do it that way, and also does not let one edit blocks in the <code>defs</code> section. Instead, Inkscape just refers to a pre-existing block in the body. </p><p>Cloning is also awkward in that Inkscape will allow editors to clone clones. </p><p>At least Inkscape has a consistent <code>id</code> naming strategy when it copies code. When copying, Inkscape appends a number to the existing <code>id</code> attributes. That should allow an application to recognize copying. </p> <div class="mw-heading mw-heading4"><h4 id="Inkscape_gradients">Inkscape gradients</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=247" title="Edit section: Inkscape gradients"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>SVG often uses two systems of units. For example, gradients have a <code>gradientUnits</code> attribute that can be either <code>userBoundingBox</code> or <code>userSpaceOnUse</code>. </p><p>Inkscape uses concrete bounding boxes. </p><p>Test the following scenario. An SVG image with 4 circles and each circle points to a <code>linearGradient</code> element. The linear gradient uses the default <code>gradientUnits="objectBoundingBox"</code>. I believe Inkscape will manufacture 4 new <code>linearGradient</code> elements, and those elements will be <code>gradientUnits="userSpaceOnUse"</code>. Test if moving an object changes the coordinates or creates a new linear gradient. </p> <div class="mw-heading mw-heading4"><h4 id="Inkscape_units">Inkscape units</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=248" title="Edit section: Inkscape units"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Inkscape produces bizarre numbers. Single precision formatted as a double. Metric conversions. </p><p>I worked on this topic somewhere else.... </p><p>Notice the strange units in this header. </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><svg</span> <span class="w"> </span><span class="na">width=</span><span class="s">"1281.4634mm"</span> <span class="w"> </span><span class="na">height=</span><span class="s">"246.60315mm"</span> <span class="w"> </span><span class="na">viewBox=</span><span class="s">"0 0 5125.8537 986.41263"</span> <span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span> <span class="w"> </span><span class="na">id=</span><span class="s">"svg370"</span> <span class="w"> </span><span class="na">xml:space=</span><span class="s">"preserve"</span> <span class="w"> </span><span class="na">inkscape:version=</span><span class="s">"1.2 (dc2aedaf03, 2022-05-15)"</span> <span class="w"> </span><span class="na">sodipodi:docname=</span><span class="s">"Chronologie_constitutions_françaises.svg"</span> <span class="w"> </span><span class="na">xmlns:inkscape=</span><span class="s">"http://www.inkscape.org/namespaces/inkscape"</span> <span class="w"> </span><span class="na">xmlns:sodipodi=</span><span class="s">"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"</span> <span class="w"> </span><span class="na">xmlns:xlink=</span><span class="s">"http://www.w3.org/1999/xlink"</span> <span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span> <span class="w"> </span><span class="na">xmlns:svg=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="nt">></span> </pre></div> <p>The <code>viewBox</code> x-zoom: 0.24999999512276 → 1/4 to a single-float epsilon<br /> The <code>viewBox</code> y-zoom: 0.24999999239669 → 1/4 to a single-float epsilon<br /> Convert the 5125.8537 pixels to inches: 53.394309375<br /> Convert the 5125.8537 pixels to mm: 1356.215458125<br /> Convert the width of 1281.4634 mm to inches: 50.45131496063<br /> Convert the width of 1281.4634 mm to CSS pixels: 4843.3262362205 </p> <div class="mw-heading mw-heading2"><h2 id="Accuracy">Accuracy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=249" title="Edit section: Accuracy"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Some random issues about technical accuracy. </p> <div class="mw-heading mw-heading3"><h3 id="Refractometer">Refractometer</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=250" title="Edit section: Refractometer"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>No clear schematic of how it works. Handheld and Abbe. </p><p>See <a href="https://en.wikipedia.org/wiki/Refractometer" class="extiw" title="w:Refractometer">w:Refractometer</a>. </p><p><span typeof="mw:File"><a href="/wiki/File:Refractometer.jpg" class="mw-file-description" title="Refractometer"><img alt="Refractometer" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Refractometer.jpg/400px-Refractometer.jpg" decoding="async" width="400" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Refractometer.jpg/600px-Refractometer.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/9e/Refractometer.jpg/800px-Refractometer.jpg 2x" data-file-width="1600" data-file-height="1200" /></a></span> </p><p><span typeof="mw:File"><a href="/wiki/File:Prinzip_Refraktometer.png" class="mw-file-description" title="Refractometer"><img alt="Refractometer" src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Prinzip_Refraktometer.png/200px-Prinzip_Refraktometer.png" decoding="async" width="200" height="497" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Prinzip_Refraktometer.png/300px-Prinzip_Refraktometer.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/9/94/Prinzip_Refraktometer.png 2x" data-file-width="370" data-file-height="920" /></a></span> </p><p>See <a href="/wiki/Category:Refractometers" title="Category:Refractometers">Category:Refractometers</a> </p> <div class="mw-heading mw-heading3"><h3 id="Motors">Motors</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=251" title="Edit section: Motors"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Compare diagram of a 3-phase induction motors <a href="/wiki/File:Vierpolig-3str%C3%A4nge.svg" title="File:Vierpolig-3stränge.svg">File:Vierpolig-3stränge.svg</a> with <a href="/wiki/File:Asynchronous_Motor.svg" title="File:Asynchronous Motor.svg">File:Asynchronous Motor.svg</a>. Look at the flux lines. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Vierpolig-3str%C3%A4nge.svg" class="mw-file-description" title="4-pole 3-phase motor"><img alt="4-pole 3-phase motor" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Vierpolig-3str%C3%A4nge.svg/300px-Vierpolig-3str%C3%A4nge.svg.png" decoding="async" width="300" height="360" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Vierpolig-3str%C3%A4nge.svg/450px-Vierpolig-3str%C3%A4nge.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Vierpolig-3str%C3%A4nge.svg/600px-Vierpolig-3str%C3%A4nge.svg.png 2x" data-file-width="750" data-file-height="900" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Vierpolig-3str%C3%A4nge.svg" class="galleryfilename galleryfilename-truncate" title="File:Vierpolig-3stränge.svg">Vierpolig-3stränge.svg</a> 4-pole 3-phase motor</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 430px;"><span typeof="mw:File"><a href="/wiki/File:Asynchronous_Motor.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Asynchronous_Motor.svg/300px-Asynchronous_Motor.svg.png" decoding="async" width="300" height="285" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Asynchronous_Motor.svg/450px-Asynchronous_Motor.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Asynchronous_Motor.svg/600px-Asynchronous_Motor.svg.png 2x" data-file-width="512" data-file-height="486" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Asynchronous_Motor.svg" class="galleryfilename galleryfilename-truncate" title="File:Asynchronous Motor.svg">Asynchronous Motor.svg</a> </div> </li> </ul> <p>Motor winding </p> <ul><li><a rel="nofollow" class="external free" href="https://www.youtube.com/watch?v=KxGMrr2Atso">https://www.youtube.com/watch?v=KxGMrr2Atso</a> 3-phase <dl><dd></dd></dl></li></ul> <table class="wikitable"> <caption>3-phase 4-pole motor winding with 24 slots </caption> <tbody><tr> <th>Terminal</th> <th>Phase</th> <th>Slot</th> <th>Slot</th> <th>connect to </th></tr> <tr> <td>1</td> <td>1</td> <td>1</td> <td>6</td> <td>12 </td></tr> <tr> <td>6</td> <td>2</td> <td>3</td> <td>8</td> <td>2 </td></tr> <tr> <td>8</td> <td>3</td> <td>5</td> <td>10</td> <td>4 </td></tr> <tr> <td>4</td> <td>1</td> <td>7</td> <td>12</td> <td>6 </td></tr> <tr> <td>9</td> <td>2</td> <td>9</td> <td>14</td> <td>20 </td></tr> <tr> <td>5</td> <td>3</td> <td>11</td> <td>16</td> <td>22 </td></tr> <tr> <td>7</td> <td>1</td> <td>13</td> <td>18</td> <td>24 </td></tr> <tr> <td>12</td> <td>2</td> <td>15</td> <td>20</td> <td>14 </td></tr> <tr> <td>2</td> <td>3</td> <td>17</td> <td>22</td> <td>16 </td></tr> <tr> <td>10</td> <td>1</td> <td>19</td> <td>24</td> <td>18 </td></tr> <tr> <td>3</td> <td>2</td> <td>21</td> <td>2</td> <td>8 </td></tr> <tr> <td>11</td> <td>3</td> <td>23</td> <td>4</td> <td>10 </td></tr></tbody></table> <ul><li>also concentric windings...</li></ul> <p>Wiring diagram on Commons? </p> <ul><li><a rel="nofollow" class="external free" href="https://faceitsalon.com/dual-voltage-single-phase-motor-wiring-diagram-database/">https://faceitsalon.com/dual-voltage-single-phase-motor-wiring-diagram-database/</a></li></ul> <p>NEMA and IEC </p> <ul><li><a rel="nofollow" class="external free" href="https://electricmotorwarehouse.com/motor-connection-diagrams/">https://electricmotorwarehouse.com/motor-connection-diagrams/</a></li> <li><a rel="nofollow" class="external free" href="https://download.sew-eurodrive.com/download/pdf/9PD0048.pdf">https://download.sew-eurodrive.com/download/pdf/9PD0048.pdf</a></li> <li><a rel="nofollow" class="external free" href="https://www.gulfelectroquip.com/wp-geq/wp-content/uploads/GEQ-Terminal-Markings-and-Connections-Guide-020520.pdf">https://www.gulfelectroquip.com/wp-geq/wp-content/uploads/GEQ-Terminal-Markings-and-Connections-Guide-020520.pdf</a></li></ul> <p>General </p> <ul><li><a rel="nofollow" class="external free" href="https://www.nema.org/docs/default-source/motor-and-generator-guides-and-resources-library/6-electric-motor-terminology-and-performance-characteristics-v2.pdf">https://www.nema.org/docs/default-source/motor-and-generator-guides-and-resources-library/6-electric-motor-terminology-and-performance-characteristics-v2.pdf</a></li> <li><a rel="nofollow" class="external free" href="https://motor-hmc.com/wp-content/uploads/2014/03/Motor-Glossary-from-Rockwell.pdf">https://motor-hmc.com/wp-content/uploads/2014/03/Motor-Glossary-from-Rockwell.pdf</a></li></ul> <p>I have trouble with this diagram of a shaded pole motor. The vertical flux paths are too thick. Compare to an actual design. Also winding flux path should be similar width. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Spleetpoolmotor.svg" class="mw-file-description" title="shaded pole motor]]"><img alt="shaded pole motor]]" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Spleetpoolmotor.svg/195px-Spleetpoolmotor.svg.png" decoding="async" width="195" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Spleetpoolmotor.svg/292px-Spleetpoolmotor.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Spleetpoolmotor.svg/389px-Spleetpoolmotor.svg.png 2x" data-file-width="512" data-file-height="316" /></a></span></div> <div class="gallerytext">shaded pole motor]]</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg" class="mw-file-description" title="shaded pole motor. Notice that bracket holding rotor bearings is not magnetic: a magnetic bracket would shunt the magnetic field around the rotor."><img alt="shaded pole motor. Notice that bracket holding rotor bearings is not magnetic: a magnetic bracket would shunt the magnetic field around the rotor." src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg/120px-Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg/180px-Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg/240px-Braun_Camera-Werk_Novamat_M_330_-_shaded-pole_motor_EM2518-123-3104.jpg 2x" data-file-width="3624" data-file-height="3624" /></a></span></div> <div class="gallerytext">shaded pole motor. Notice that bracket holding rotor bearings is not magnetic: a magnetic bracket would shunt the magnetic field around the rotor.</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Shaded_pole_detail.jpg" class="mw-file-description" title="shaded pole motor. Note thin sides."><img alt="shaded pole motor. Note thin sides." src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Shaded_pole_detail.jpg/190px-Shaded_pole_detail.jpg" decoding="async" width="190" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Shaded_pole_detail.jpg/284px-Shaded_pole_detail.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Shaded_pole_detail.jpg/379px-Shaded_pole_detail.jpg 2x" data-file-width="768" data-file-height="487" /></a></span></div> <div class="gallerytext">shaded pole motor. Note thin sides.</div> </li> </ul> <div class="mw-heading mw-heading3"><h3 id="Microphones_and_flux_path">Microphones and flux path</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=252" title="Edit section: Microphones and flux path"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A ribbon microphone with no flux return path. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B%C3%A4ndchenmikrofon.svg" class="mw-file-description" title="ribbon microphone"><img alt="ribbon microphone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/B%C3%A4ndchenmikrofon.svg/174px-B%C3%A4ndchenmikrofon.svg.png" decoding="async" width="174" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/B%C3%A4ndchenmikrofon.svg/262px-B%C3%A4ndchenmikrofon.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/29/B%C3%A4ndchenmikrofon.svg/349px-B%C3%A4ndchenmikrofon.svg.png 2x" data-file-width="900" data-file-height="620" /></a></span></div> <div class="gallerytext">ribbon microphone</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Mikrofon_szalag.png" class="mw-file-description" title="ribbon microphone with return path"><img alt="ribbon microphone with return path" src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Mikrofon_szalag.png/120px-Mikrofon_szalag.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Mikrofon_szalag.png/181px-Mikrofon_szalag.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Mikrofon_szalag.png/241px-Mikrofon_szalag.png 2x" data-file-width="738" data-file-height="735" /></a></span></div> <div class="gallerytext">ribbon microphone with return path</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Transformer3d_col3.svg" class="mw-file-description" title="transformer"><img alt="transformer" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/160px-Transformer3d_col3.svg.png" decoding="async" width="160" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/240px-Transformer3d_col3.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Transformer3d_col3.svg/320px-Transformer3d_col3.svg.png 2x" data-file-width="763" data-file-height="573" /></a></span></div> <div class="gallerytext"> transformer</div> </li> </ul> <div class="mw-heading mw-heading3"><h3 id="Solenoids_and_flux_path">Solenoids and flux path</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=253" title="Edit section: Solenoids and flux path"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>DC solenoids: current determined by resistance. </p><p>AC solenoids: current determined by impedance. Retraction increases impedance and reduces the current. </p> <div class="mw-heading mw-heading3"><h3 id="MOSFET">MOSFET</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=254" title="Edit section: MOSFET"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Lateral_mosfet.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Lateral_mosfet.svg/300px-Lateral_mosfet.svg.png" decoding="async" width="300" height="180" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Lateral_mosfet.svg/450px-Lateral_mosfet.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Lateral_mosfet.svg/600px-Lateral_mosfet.svg.png 2x" data-file-width="600" data-file-height="360" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>Fix translations: no default English. </p><p>Fix text anchors. </p><p>Difficult to find items. Wikidata needs more items? Field-effect transistor needs more parts (just has the gate). </p> <div class="transunits" style="background:lightgray"> <p>Translations added to this section should be free of copyright claims (either CC0 or public domain). </p> <dl><dt>FET ≅ <a href="https://www.wikidata.org/wiki/Q176097" class="extiw" title="d:Q176097"><span title="transistor that uses an electric field to control its electrical behaviour">field-effect transistor <small>(Q176097)</small></span></a></dt> <dd>FET</dd></dl> <dl><dt>MOSFET ≅ <a href="https://www.wikidata.org/wiki/Q210793" class="extiw" title="d:Q210793"><span title="type of field-effect transistor">MOSFET <small>(Q210793)</small></span></a></dt> <dd>MOSFET</dd></dl> <dl><dt>source</dt> <dd>source</dd></dl> <dl><dt>gate ≅ <a href="https://www.wikidata.org/wiki/Q16699995" class="extiw" title="d:Q16699995"><span title="one of terminals of a field-effect transistor">gate <small>(Q16699995)</small></span></a></dt> <dd>gate</dd></dl> <dl><dt>drain</dt> <dd>drain</dd></dl> <dl><dt>oxide</dt> <dd>oxide</dd></dl> <dl><dt>silicon dioxide ≅ <a href="https://www.wikidata.org/wiki/Q116269" class="extiw" title="d:Q116269"><span title="chemical compound">silicon dioxide <small>(Q116269)</small></span></a></dt> <dd>silicon dioxide</dd></dl> <dl><dt>body</dt> <dd>body</dd></dl> <dl><dt>substrate</dt> <dd>substrate</dd></dl> </div> <p>This query only turns up a few electrodes... </p> <div><div class="mw-highlight mw-highlight-lang-sparql mw-content-ltr" dir="ltr"><pre><span></span><span class="k">SELECT</span> <span class="nv">?electrode</span> <span class="nv">?electrodeLabel</span> <span class="k">WHERE</span> <span class="p">{</span> <span class="nv">?electrode</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P31</span><span class="o">/</span><span class="nn">wdt</span><span class="p">:</span><span class="nt">P279</span><span class="o">*</span> <span class="nn">wd</span><span class="p">:</span><span class="nt">Q176140</span><span class="p">;</span> <span class="k">SERVICE</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">label</span> <span class="p">{</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">language</span> <span class="s">"en"</span> <span class="p">.}</span> <span class="p">.</span> <span class="p">}</span> </pre></div></div><p><a class="external text" href="https://query.wikidata.org/#SELECT%20%3Felectrode%20%3FelectrodeLabel%20WHERE%0A%7B%0A%20%20%3Felectrode%20wdt%3AP31%2Fwdt%3AP279%2A%20wd%3AQ176140%3B%0A%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%7D%20.%0A%0A%7D">Try it!</a> </p><div class="mw-heading mw-heading3"><h3 id="Blast_furnace">Blast furnace</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=255" title="Edit section: Blast furnace"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Blast_Furnace_Reactions.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Blast_Furnace_Reactions.jpg/412px-Blast_Furnace_Reactions.jpg" decoding="async" width="412" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Blast_Furnace_Reactions.jpg/617px-Blast_Furnace_Reactions.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/Blast_Furnace_Reactions.jpg/823px-Blast_Furnace_Reactions.jpg 2x" data-file-width="1300" data-file-height="948" /></a></span></div> <div class="gallerytext"></div> </li> <li class="gallerybox" style="width: 535px"> <div class="thumb" style="width: 530px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG/392px-Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG" decoding="async" width="392" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG/589px-Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG/785px-Flow_chart_of_blast-furnace_production_%E2%80%94_%D0%A1%D1%85%D0%B5%D0%BC%D0%B0_%D0%B4%D0%BE%D0%BC%D0%B5%D0%BD%D0%BD%D0%BE%D0%B3%D0%BE_%D0%B2%D0%B8%D1%80%D0%BE%D0%B1%D0%BD%D0%B8%D1%86%D1%82%D0%B2%D0%B0.PNG 2x" data-file-width="5820" data-file-height="4451" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>Compare African with industrial. I had an early reference somewhere. </p> <pre>Колошниковий пил Концентрат Руда < 10 мм AC Чушковий чавун Флюс Фабрика грудкування На переробку Коксик < 25 ММ Агломерат Окамки Пиловугільне паливо Природний газ Мазут Коксовий газ VN16 - ONTVO Рідкий шлак OVELO У відвал Відсів дріб'язку Розливна машина Кокс Доменна піч Флюс FOLLO Рідкий чавун Hazpime дуття Кисень Колошниковий газ t Повітронагрівачі У переробні цехи для переробки на сталь AA Газоочистка Повітря Повітродувка Газ на нагрівання повітронагрівачів Енергетичне паливо </pre> <div class="mw-heading mw-heading3"><h3 id="Vacuum_pumps_and_details">Vacuum pumps and details</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=256" title="Edit section: Vacuum pumps and details"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Rotary_vane_pump.svg" class="mw-file-description" title="Rotary vane pump. SVG. Missing details."><img alt="Rotary vane pump. SVG. Missing details." src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Rotary_vane_pump.svg/300px-Rotary_vane_pump.svg.png" decoding="async" width="300" height="294" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Rotary_vane_pump.svg/450px-Rotary_vane_pump.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/2d/Rotary_vane_pump.svg/600px-Rotary_vane_pump.svg.png 2x" data-file-width="2448" data-file-height="2400" /></a></span></div> <div class="gallerytext">Rotary vane pump. SVG. Missing details.</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Liquid_ring.png" class="mw-file-description" title="Liquid ring pump. PNG. Missing details"><img alt="Liquid ring pump. PNG. Missing details" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Liquid_ring.png/300px-Liquid_ring.png" decoding="async" width="300" height="283" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/Liquid_ring.png/450px-Liquid_ring.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/0/0c/Liquid_ring.png 2x" data-file-width="472" data-file-height="445" /></a></span></div> <div class="gallerytext">Liquid ring pump. PNG. Missing details</div> </li> </ul> <p>Stator shape, reflood, exhaust valve, oil seals, oil pump, foam, vanes through the axle. Connecting stages. Ballast. </p><p>Side seals. </p><p>Clearances. Bearings and something like an Oldham coupling. </p><p>Liquid ring vacuum pump. </p> <div class="mw-heading mw-heading3"><h3 id="Bourdon_tube">Bourdon tube</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=257" title="Edit section: Bourdon tube"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:WPGaugeFace-2.jpg" class="mw-file-description" title="Different scales for negative/positive pressure"><img alt="Different scales for negative/positive pressure" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/WPGaugeFace-2.jpg/240px-WPGaugeFace-2.jpg" decoding="async" width="240" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/a/a5/WPGaugeFace-2.jpg 1.5x" data-file-width="247" data-file-height="309" /></a></span></div> <div class="gallerytext">Different scales for negative/positive pressure</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:WPPressGaugeMech-2.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fd/WPPressGaugeMech-2.jpg/230px-WPPressGaugeMech-2.jpg" decoding="async" width="230" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/f/fd/WPPressGaugeMech-2.jpg 1.5x" data-file-width="242" data-file-height="315" /></a></span></div> <div class="gallerytext"></div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:WPPressGaugeDetailHC.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/WPPressGaugeDetailHC.jpg/300px-WPPressGaugeDetailHC.jpg" decoding="async" width="300" height="295" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/WPPressGaugeDetailHC.jpg/450px-WPPressGaugeDetailHC.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/8/87/WPPressGaugeDetailHC.jpg 2x" data-file-width="504" data-file-height="495" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>No math at <a href="https://en.wikipedia.org/wiki/Pressure_measurement#Bourdon_tube" class="extiw" title="en:Pressure measurement">en:Pressure measurement#Bourdon_tube</a>. I suspect the linkage does some linearization; could it do calibration? Is the torsion constant enough to be ignored? Or is that the purpose of the bend at 5? </p> <ul><li><a rel="nofollow" class="external free" href="https://www.av8n.com/physics/bourdon-basics.htm">https://www.av8n.com/physics/bourdon-basics.htm</a></li> <li><a rel="nofollow" class="external free" href="https://patentimages.storage.googleapis.com/8d/c4/3b/2170bad2063cd2/US9163.pdf">https://patentimages.storage.googleapis.com/8d/c4/3b/2170bad2063cd2/US9163.pdf</a></li> <li><a rel="nofollow" class="external text" href="http://v3.espacenet.com/textdoc?DB=EPODOC&IDX=US9163">US patent 9163</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Electrochemical_cell">Electrochemical cell</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=258" title="Edit section: Electrochemical cell"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span typeof="mw:File"><a href="/wiki/File:Galvanic_cell_labeled.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Galvanic_cell_labeled.svg/300px-Galvanic_cell_labeled.svg.png" decoding="async" width="300" height="270" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Galvanic_cell_labeled.svg/450px-Galvanic_cell_labeled.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Galvanic_cell_labeled.svg/600px-Galvanic_cell_labeled.svg.png 2x" data-file-width="545" data-file-height="491" /></a></span> </p><p>I do not think the salt bridge works that way. KNO<sub>3</sub>. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Alkaline-battery-english.svg" class="mw-file-description" title="SVG (15 kB) 5 June 2011"><img alt="SVG (15 kB) 5 June 2011" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Alkaline-battery-english.svg/300px-Alkaline-battery-english.svg.png" decoding="async" width="300" height="248" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Alkaline-battery-english.svg/450px-Alkaline-battery-english.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Alkaline-battery-english.svg/600px-Alkaline-battery-english.svg.png 2x" data-file-width="850" data-file-height="703" /></a></span></div> <div class="gallerytext"> SVG (15 kB) 5 June 2011</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Schnitt_Alkali-Mn-Batterie.jpg" class="mw-file-description" title="JPEG (111 kB) 15 May 2010"><img alt="JPEG (111 kB) 15 May 2010" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Schnitt_Alkali-Mn-Batterie.jpg/300px-Schnitt_Alkali-Mn-Batterie.jpg" decoding="async" width="300" height="300" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Schnitt_Alkali-Mn-Batterie.jpg/450px-Schnitt_Alkali-Mn-Batterie.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/Schnitt_Alkali-Mn-Batterie.jpg/600px-Schnitt_Alkali-Mn-Batterie.jpg 2x" data-file-width="860" data-file-height="860" /></a></span></div> <div class="gallerytext"> JPEG (111 kB) 15 May 2010</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Schnitt_Alkali-Mn-Batterie.svg" class="mw-file-description" title="SVG (215 kB) 23 September 2017"><img alt="SVG (215 kB) 23 September 2017" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Schnitt_Alkali-Mn-Batterie.svg/300px-Schnitt_Alkali-Mn-Batterie.svg.png" decoding="async" width="300" height="298" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Schnitt_Alkali-Mn-Batterie.svg/450px-Schnitt_Alkali-Mn-Batterie.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Schnitt_Alkali-Mn-Batterie.svg/600px-Schnitt_Alkali-Mn-Batterie.svg.png 2x" data-file-width="1294" data-file-height="1287" /></a></span></div> <div class="gallerytext"> SVG (215 kB) 23 September 2017</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:CNX_Chem_17_05_AlkalineBat.png" class="mw-file-description" title="PNG (178 kB) 24 November 2017"><img alt="PNG (178 kB) 24 November 2017" src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/CNX_Chem_17_05_AlkalineBat.png/300px-CNX_Chem_17_05_AlkalineBat.png" decoding="async" width="300" height="296" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/CNX_Chem_17_05_AlkalineBat.png/450px-CNX_Chem_17_05_AlkalineBat.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/CNX_Chem_17_05_AlkalineBat.png/600px-CNX_Chem_17_05_AlkalineBat.png 2x" data-file-width="650" data-file-height="642" /></a></span></div> <div class="gallerytext"> PNG (178 kB) 24 November 2017</div> </li> </ul> <p>See <a rel="nofollow" class="external free" href="https://kids.britannica.com/students/assembly/view/106626">https://kids.britannica.com/students/assembly/view/106626</a> </p> <div class="mw-heading mw-heading3"><h3 id="Mechanical_seals">Mechanical seals</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=259" title="Edit section: Mechanical seals"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The sealing only happens around the compression nut </p> <ul><li><a href="/wiki/File:Seal_mechanical_compression.png" title="File:Seal mechanical compression.png">File:Seal mechanical compression.png</a></li></ul> <p>Also KF seals prevent over compression. </p> <div class="mw-heading mw-heading3"><h3 id="Bicycle">Bicycle</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=260" title="Edit section: Bicycle"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Where did I do the spoke weave? </p> <ul><li><a href="/wiki/File:Bicycle_diagram-en.svg" title="File:Bicycle diagram-en.svg">File:Bicycle diagram-en.svg</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Biology">Biology</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=261" title="Edit section: Biology"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>The comment ("This picture is obsolete. the pluripotent stemcell of the blood is giving origin to a lymphoid and a myeloid cell line.") at </p> <ul><li><a href="/wiki/File:Illu_blood_cell_lineage.jpg" title="File:Illu blood cell lineage.jpg">File:Illu blood cell lineage.jpg</a></li></ul> <p>and </p> <ul><li><a href="/wiki/File:Hematopoiesis_simple.svg" title="File:Hematopoiesis simple.svg">File:Hematopoiesis simple.svg</a></li></ul> <p>Many have worked on similar diagrams, so sort out the effort. </p> <ul><li><a href="/wiki/File:Illu_blood_cell_lineage.jpg" title="File:Illu blood cell lineage.jpg">File:Illu blood cell lineage.jpg</a> 2006-05-17 on Commons. 77 kB. NIH (when?).</li> <li><a href="/wiki/File:Hematopoiesis_(human)_diagram.png" title="File:Hematopoiesis (human) diagram.png">File:Hematopoiesis (human) diagram.png</a> 2006-08-11 1.18 MB. <a href="/wiki/User:A._Rad~commonswiki" title="User:A. Rad~commonswiki">A. Rad</a>. Has dense text block. There is also an extensive description about the cell images. It has an incompatible Commons license: "GFDL-self. This image is released under the GFDL-self license and is considered freely distributable. This image or any reproductions/customizations thereof (or any reproductions/customizations of its reproductions/customizations, and so forth) may NOT be sold without my explicit consent." The separate licensing section has just {{self|GFDL}}, so the licensing terms are inconsistent. <ul><li><a href="/wiki/File:Hematopoiesis_(human)_diagram.svg" title="File:Hematopoiesis (human) diagram.svg">File:Hematopoiesis (human) diagram.svg</a> 2010-02-06 3.1 MB. <a href="/wiki/User:Spacebirdy" title="User:Spacebirdy">Spacebirdy</a>, no text <ul><li><a href="/wiki/File:Hematopoiesis_(human)_diagram_en.svg" title="File:Hematopoiesis (human) diagram en.svg">File:Hematopoiesis (human) diagram en.svg</a> 2010-02-07 1.68 MB. <a href="/wiki/User:RexxS" title="User:RexxS">RexxS</a> + others, first versions do not thumbnail in history section, has display=none text <ul><li><a href="/wiki/File:Hematopoiesis_(human)_diagram_switch.svg" title="File:Hematopoiesis (human) diagram switch.svg">File:Hematopoiesis (human) diagram switch.svg</a> 2020-07-18 1.33 MB. <a href="/wiki/User:JoKalliauer" title="User:JoKalliauer">JoKalliauer</a>, render in X issue. Easy to fix the render in X issue, but the <code>switch</code> translations are planar. No default language. Transforms with rotate and then x-y positioning. Only used on ja.Wiki. There are about 75 strings per plane and a dozen planes. Not a quick task. It would be nice to upload it to the _en ver, but then it would be difficult to do graphics edits.</li></ul></li></ul></li></ul></li></ul> <p>The license issue is troubling. It affects all derivatives. It also has further issues because many files have been extracted from <a href="/wiki/File:Hematopoiesis_(human)_diagram_en.svg" title="File:Hematopoiesis (human) diagram en.svg">File:Hematopoiesis (human) diagram en.svg</a>. See, for example, <a href="/wiki/File:Monoblast.svg" title="File:Monoblast.svg">File:Monoblast.svg</a>. </p><p>Comments on individual versions. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Illu_blood_cell_lineage.jpg" class="mw-file-description" title="JPEG NIH"><img alt="JPEG NIH" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Illu_blood_cell_lineage.jpg/400px-Illu_blood_cell_lineage.jpg" decoding="async" width="400" height="292" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/2/20/Illu_blood_cell_lineage.jpg 1.5x" data-file-width="480" data-file-height="350" /></a></span></div> <div class="gallerytext">JPEG NIH</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Hematopoiesis_(human)_diagram.png" class="mw-file-description" title="PNG human"><img alt="PNG human" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Hematopoiesis_%28human%29_diagram.png/400px-Hematopoiesis_%28human%29_diagram.png" decoding="async" width="400" height="263" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Hematopoiesis_%28human%29_diagram.png/600px-Hematopoiesis_%28human%29_diagram.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/Hematopoiesis_%28human%29_diagram.png/800px-Hematopoiesis_%28human%29_diagram.png 2x" data-file-width="3472" data-file-height="2280" /></a></span></div> <div class="gallerytext">PNG human</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Hematopoiesis_simple.png" class="mw-file-description" title="PNG more modern (lost backarrow)"><img alt="PNG more modern (lost backarrow)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Hematopoiesis_simple.png/400px-Hematopoiesis_simple.png" decoding="async" width="400" height="267" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Hematopoiesis_simple.png/600px-Hematopoiesis_simple.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Hematopoiesis_simple.png/800px-Hematopoiesis_simple.png 2x" data-file-width="4000" data-file-height="2667" /></a></span></div> <div class="gallerytext">PNG more modern (lost backarrow)</div> </li> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 330px;"><span typeof="mw:File"><a href="/wiki/File:Hematopoiesis_simple.svg" class="mw-file-description" title="SVG more modern (lost backarrow)"><img alt="SVG more modern (lost backarrow)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Hematopoiesis_simple.svg/400px-Hematopoiesis_simple.svg.png" decoding="async" width="400" height="267" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Hematopoiesis_simple.svg/600px-Hematopoiesis_simple.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Hematopoiesis_simple.svg/800px-Hematopoiesis_simple.svg.png 2x" data-file-width="1800" data-file-height="1200" /></a></span></div> <div class="gallerytext">SVG more modern (lost backarrow)</div> </li> </ul> <p>Look at Wikidata items. Examine instance and subclass relations. (<a href="https://www.wikidata.org/wiki/Property:P3094" class="extiw" title="d:Property:P3094"><span title="this class of items develops from another class of items (biology)">develops from <small>(P3094)</small></span></a>, <a href="https://www.wikidata.org/wiki/Property:P155" class="extiw" title="d:Property:P155"><span title="immediately prior item in a series of which the subject is a part, preferably use as qualifier of P179 [if the subject has replaced the preceding item, e.g. political offices, use "replaces" (P1365)]">follows <small>(P155)</small></span></a>, <a href="https://www.wikidata.org/wiki/Property:P156" class="extiw" title="d:Property:P156"><span title="immediately following item in a series of which the subject is a part, preferably use as qualifier of P179 [if the subject has been replaced, e.g. political offices, use "replaced by" (P1366)]">followed by <small>(P156)</small></span></a>) </p> <ul><li>Hemocytoblast <a href="https://www.wikidata.org/wiki/Q514525" class="extiw" title="d:Q514525"><span title="stem cell type that gives rise to other blood cells">hematopoietic stem cell <small>(Q514525)</small></span></a></li> <li>Proerythroblast <a href="https://www.wikidata.org/wiki/Q2284254" class="extiw" title="d:Q2284254"><span title="Red blood cell">proerythroblast <small>(Q2284254)</small></span></a></li> <li>Myeloblast <a href="https://www.wikidata.org/wiki/Q1956556" class="extiw" title="d:Q1956556"><span title="stem cell">myeloblast <small>(Q1956556)</small></span></a></li> <li>lymphoblast <a href="https://www.wikidata.org/wiki/Q1873857" class="extiw" title="d:Q1873857"><span title="cell type">lymphoblast <small>(Q1873857)</small></span></a></li> <li>monoblast <a href="https://www.wikidata.org/wiki/Q2617333" class="extiw" title="d:Q2617333"><span title="cell that matures into a monocyte">monoblast <small>(Q2617333)</small></span></a></li> <li>megakaryoblast <a href="https://www.wikidata.org/wiki/Q2984950" class="extiw" title="d:Q2984950"><span title="cell type">megakaryoblast <small>(Q2984950)</small></span></a></li> <li>polychromatic erythroblast ??? <a href="https://www.wikidata.org/wiki/Q3296909" class="extiw" title="d:Q3296909"><span title="cell type; precursor of erythrocytes">erythroblast <small>(Q3296909)</small></span></a></li> <li>progranulocyte ??? <a href="https://www.wikidata.org/wiki/Q2382063" class="extiw" title="d:Q2382063"><span title="granulocyte precursor cell">promyelocyte <small>(Q2382063)</small></span></a> with dup <a href="https://www.wikidata.org/wiki/Q66590191" class="extiw" title="d:Q66590191"><span title="cell type">promyelocyte <small>(Q66590191)</small></span></a></li> <li>lymphocyte <a href="https://www.wikidata.org/wiki/Q715347" class="extiw" title="d:Q715347"><span title="subtype of white blood cell">lymphocyte <small>(Q715347)</small></span></a></li> <li>monocyte <a href="https://www.wikidata.org/wiki/Q107244" class="extiw" title="d:Q107244"><span title="sub-type of white blood cells">monocyte <small>(Q107244)</small></span></a></li> <li>megakaryocyte <a href="https://www.wikidata.org/wiki/Q821701" class="extiw" title="d:Q821701"><span title="large bone marrow cell responsible for the production of platelets">megakaryocyte <small>(Q821701)</small></span></a></li> <li>erythrocytes <a href="https://www.wikidata.org/wiki/Q37187" class="extiw" title="d:Q37187"><span title="most common type of blood cell">red blood cell <small>(Q37187)</small></span></a></li> <li>basophil <a href="https://www.wikidata.org/wiki/Q107988" class="extiw" title="d:Q107988"><span title="type of white blood cell">basophil <small>(Q107988)</small></span></a></li> <li>eosinophil <a href="https://www.wikidata.org/wiki/Q107238" class="extiw" title="d:Q107238"><span title="variety of white blood cell">eosinophil <small>(Q107238)</small></span></a></li> <li>neutrophil <a href="https://www.wikidata.org/wiki/Q188417" class="extiw" title="d:Q188417"><span title="most abundant white blood cell, a type of granulocyte">neutrophil <small>(Q188417)</small></span></a></li> <li>granulocytes <a href="https://www.wikidata.org/wiki/Q223143" class="extiw" title="d:Q223143"><span title="mature white blood cells with granules in the cytoplasm">granulocyte <small>(Q223143)</small></span></a></li> <li>agranulocytes <a href="https://www.wikidata.org/wiki/Q1775422" class="extiw" title="d:Q1775422"><span title="mature lymphocytes and monocytes transported by the blood to extravascular space">agranulocytes <small>(Q1775422)</small></span></a></li> <li>leukocytes <a href="https://www.wikidata.org/wiki/Q42395" class="extiw" title="d:Q42395"><span title="type of cells of the immunological system">white blood cell <small>(Q42395)</small></span></a></li> <li>thrombocytes <a href="https://www.wikidata.org/wiki/Q101026" class="extiw" title="d:Q101026"><span title="component of blood aiding in coagulation">platelet <small>(Q101026)</small></span></a></li></ul> <p>Looking for files extracted from <a href="/wiki/File:Hematopoiesis_(human)_diagram_en.svg" title="File:Hematopoiesis (human) diagram en.svg">File:Hematopoiesis (human) diagram en.svg</a>. Keeping track of derivatives is nice.... </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B._metamyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/B._metamyelocyte.svg/120px-B._metamyelocyte.svg.png" decoding="async" width="120" height="110" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/B._metamyelocyte.svg/180px-B._metamyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/B._metamyelocyte.svg/240px-B._metamyelocyte.svg.png 2x" data-file-width="37" data-file-height="34" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:B._metamyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:B. metamyelocyte.svg">B. metamyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B._myelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/B._myelocyte.svg/120px-B._myelocyte.svg.png" decoding="async" width="120" height="101" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/B._myelocyte.svg/180px-B._myelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/B._myelocyte.svg/240px-B._myelocyte.svg.png 2x" data-file-width="44" data-file-height="37" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:B._myelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:B. myelocyte.svg">B. myelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B._band.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/B._band.svg/120px-B._band.svg.png" decoding="async" width="120" height="53" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/B._band.svg/180px-B._band.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/91/B._band.svg/240px-B._band.svg.png 2x" data-file-width="79" data-file-height="35" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:B._band.svg" class="galleryfilename galleryfilename-truncate" title="File:B. band.svg">B. band.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B._promyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/B._promyelocyte.svg/120px-B._promyelocyte.svg.png" decoding="async" width="120" height="106" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/B._promyelocyte.svg/180px-B._promyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/B._promyelocyte.svg/240px-B._promyelocyte.svg.png 2x" data-file-width="51" data-file-height="45" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:B._promyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:B. promyelocyte.svg">B. promyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Basophilic_erythoblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Basophilic_erythoblast.svg/120px-Basophilic_erythoblast.svg.png" decoding="async" width="120" height="114" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Basophilic_erythoblast.svg/180px-Basophilic_erythoblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Basophilic_erythoblast.svg/240px-Basophilic_erythoblast.svg.png 2x" data-file-width="40" data-file-height="38" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Basophilic_erythoblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Basophilic erythoblast.svg">Basophilic erythoblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Basophil.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Basophil.svg/120px-Basophil.svg.png" decoding="async" width="120" height="114" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Basophil.svg/180px-Basophil.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Basophil.svg/240px-Basophil.svg.png 2x" data-file-width="37" data-file-height="35" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Basophil.svg" class="galleryfilename galleryfilename-truncate" title="File:Basophil.svg">Basophil.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:B_lymphocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/B_lymphocyte.svg/116px-B_lymphocyte.svg.png" decoding="async" width="116" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/B_lymphocyte.svg/175px-B_lymphocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/B_lymphocyte.svg/233px-B_lymphocyte.svg.png 2x" data-file-width="33" data-file-height="34" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:B_lymphocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:B lymphocyte.svg">B lymphocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Common_lymphoid_progenitor.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Common_lymphoid_progenitor.svg/120px-Common_lymphoid_progenitor.svg.png" decoding="async" width="120" height="111" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Common_lymphoid_progenitor.svg/180px-Common_lymphoid_progenitor.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Common_lymphoid_progenitor.svg/240px-Common_lymphoid_progenitor.svg.png 2x" data-file-width="41" data-file-height="38" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Common_lymphoid_progenitor.svg" class="galleryfilename galleryfilename-truncate" title="File:Common lymphoid progenitor.svg">Common lymphoid progenitor.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:E._band.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/E._band.svg/120px-E._band.svg.png" decoding="async" width="120" height="51" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/E._band.svg/180px-E._band.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/cb/E._band.svg/240px-E._band.svg.png 2x" data-file-width="78" data-file-height="33" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:E._band.svg" class="galleryfilename galleryfilename-truncate" title="File:E. band.svg">E. band.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Common_myeloid_progenitor.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Common_myeloid_progenitor.svg/120px-Common_myeloid_progenitor.svg.png" decoding="async" width="120" height="111" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Common_myeloid_progenitor.svg/180px-Common_myeloid_progenitor.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/8/8c/Common_myeloid_progenitor.svg/240px-Common_myeloid_progenitor.svg.png 2x" data-file-width="41" data-file-height="38" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Common_myeloid_progenitor.svg" class="galleryfilename galleryfilename-truncate" title="File:Common myeloid progenitor.svg">Common myeloid progenitor.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:E._metamyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/E._metamyelocyte.svg/120px-E._metamyelocyte.svg.png" decoding="async" width="120" height="113" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/E._metamyelocyte.svg/180px-E._metamyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/69/E._metamyelocyte.svg/240px-E._metamyelocyte.svg.png 2x" data-file-width="35" data-file-height="33" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:E._metamyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:E. metamyelocyte.svg">E. metamyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:E._promyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/E._promyelocyte.svg/120px-E._promyelocyte.svg.png" decoding="async" width="120" height="111" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/E._promyelocyte.svg/180px-E._promyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/E._promyelocyte.svg/240px-E._promyelocyte.svg.png 2x" data-file-width="52" data-file-height="48" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:E._promyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:E. promyelocyte.svg">E. promyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:E._myelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/E._myelocyte.svg/120px-E._myelocyte.svg.png" decoding="async" width="120" height="103" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/E._myelocyte.svg/180px-E._myelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/E._myelocyte.svg/240px-E._myelocyte.svg.png 2x" data-file-width="50" data-file-height="43" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:E._myelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:E. myelocyte.svg">E. myelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Erythrocyte_(2).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Erythrocyte_%282%29.svg/120px-Erythrocyte_%282%29.svg.png" decoding="async" width="120" height="55" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Erythrocyte_%282%29.svg/180px-Erythrocyte_%282%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Erythrocyte_%282%29.svg/240px-Erythrocyte_%282%29.svg.png 2x" data-file-width="57" data-file-height="26" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Erythrocyte_(2).svg" class="galleryfilename galleryfilename-truncate" title="File:Erythrocyte (2).svg">Erythrocyte (2).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Eosinophil.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Eosinophil.svg/120px-Eosinophil.svg.png" decoding="async" width="120" height="107" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Eosinophil.svg/180px-Eosinophil.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Eosinophil.svg/240px-Eosinophil.svg.png 2x" data-file-width="36" data-file-height="32" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Eosinophil.svg" class="galleryfilename galleryfilename-truncate" title="File:Eosinophil.svg">Eosinophil.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Lymphoblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Lymphoblast.svg/120px-Lymphoblast.svg.png" decoding="async" width="120" height="107" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Lymphoblast.svg/180px-Lymphoblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Lymphoblast.svg/240px-Lymphoblast.svg.png 2x" data-file-width="54" data-file-height="48" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Lymphoblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Lymphoblast.svg">Lymphoblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Lymphoid_dendritic_cell_(3).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Lymphoid_dendritic_cell_%283%29.svg/120px-Lymphoid_dendritic_cell_%283%29.svg.png" decoding="async" width="120" height="112" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Lymphoid_dendritic_cell_%283%29.svg/180px-Lymphoid_dendritic_cell_%283%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Lymphoid_dendritic_cell_%283%29.svg/240px-Lymphoid_dendritic_cell_%283%29.svg.png 2x" data-file-width="89" data-file-height="83" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Lymphoid_dendritic_cell_(3).svg" class="galleryfilename galleryfilename-truncate" title="File:Lymphoid dendritic cell (3).svg">Lymphoid dendritic cell (3).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Megakaryoblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Megakaryoblast.svg/120px-Megakaryoblast.svg.png" decoding="async" width="120" height="114" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Megakaryoblast.svg/180px-Megakaryoblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Megakaryoblast.svg/240px-Megakaryoblast.svg.png 2x" data-file-width="62" data-file-height="59" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Megakaryoblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Megakaryoblast.svg">Megakaryoblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Mast_cell.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Mast_cell.svg/120px-Mast_cell.svg.png" decoding="async" width="120" height="46" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Mast_cell.svg/180px-Mast_cell.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Mast_cell.svg/240px-Mast_cell.svg.png 2x" data-file-width="68" data-file-height="26" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Mast_cell.svg" class="galleryfilename galleryfilename-truncate" title="File:Mast cell.svg">Mast cell.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Megakaryocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Megakaryocyte.svg/120px-Megakaryocyte.svg.png" decoding="async" width="120" height="109" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Megakaryocyte.svg/180px-Megakaryocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Megakaryocyte.svg/240px-Megakaryocyte.svg.png 2x" data-file-width="138" data-file-height="125" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Megakaryocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:Megakaryocyte.svg">Megakaryocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Monoblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Monoblast.svg/120px-Monoblast.svg.png" decoding="async" width="120" height="109" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Monoblast.svg/180px-Monoblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/d1/Monoblast.svg/240px-Monoblast.svg.png 2x" data-file-width="56" data-file-height="51" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Monoblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Monoblast.svg">Monoblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Multipotential_hematopoietic_stem_cell.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Multipotential_hematopoietic_stem_cell.svg/120px-Multipotential_hematopoietic_stem_cell.svg.png" decoding="async" width="120" height="117" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Multipotential_hematopoietic_stem_cell.svg/180px-Multipotential_hematopoietic_stem_cell.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Multipotential_hematopoietic_stem_cell.svg/240px-Multipotential_hematopoietic_stem_cell.svg.png 2x" data-file-width="39" data-file-height="38" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Multipotential_hematopoietic_stem_cell.svg" class="galleryfilename galleryfilename-truncate" title="File:Multipotential hematopoietic stem cell.svg">Multipotential hematopoietic stem cell.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Myeloblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Myeloblast.svg/120px-Myeloblast.svg.png" decoding="async" width="120" height="104" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Myeloblast.svg/180px-Myeloblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Myeloblast.svg/240px-Myeloblast.svg.png 2x" data-file-width="60" data-file-height="52" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Myeloblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Myeloblast.svg">Myeloblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Myeloid_dendritic_cell_(3).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Myeloid_dendritic_cell_%283%29.svg/120px-Myeloid_dendritic_cell_%283%29.svg.png" decoding="async" width="120" height="112" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Myeloid_dendritic_cell_%283%29.svg/180px-Myeloid_dendritic_cell_%283%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Myeloid_dendritic_cell_%283%29.svg/240px-Myeloid_dendritic_cell_%283%29.svg.png 2x" data-file-width="89" data-file-height="83" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Myeloid_dendritic_cell_(3).svg" class="galleryfilename galleryfilename-truncate" title="File:Myeloid dendritic cell (3).svg">Myeloid dendritic cell (3).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Monocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Monocyte.svg/120px-Monocyte.svg.png" decoding="async" width="120" height="53" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Monocyte.svg/180px-Monocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Monocyte.svg/240px-Monocyte.svg.png 2x" data-file-width="96" data-file-height="42" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Monocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:Monocyte.svg">Monocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:N._band.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/N._band.svg/120px-N._band.svg.png" decoding="async" width="120" height="56" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/N._band.svg/180px-N._band.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/N._band.svg/240px-N._band.svg.png 2x" data-file-width="79" data-file-height="37" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:N._band.svg" class="galleryfilename galleryfilename-truncate" title="File:N. band.svg">N. band.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:N._metamyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/N._metamyelocyte.svg/116px-N._metamyelocyte.svg.png" decoding="async" width="116" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/N._metamyelocyte.svg/174px-N._metamyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/N._metamyelocyte.svg/232px-N._metamyelocyte.svg.png 2x" data-file-width="30" data-file-height="31" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:N._metamyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:N. metamyelocyte.svg">N. metamyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:N._myelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/N._myelocyte.svg/120px-N._myelocyte.svg.png" decoding="async" width="120" height="103" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/N._myelocyte.svg/180px-N._myelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/N._myelocyte.svg/240px-N._myelocyte.svg.png 2x" data-file-width="57" data-file-height="49" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:N._myelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:N. myelocyte.svg">N. myelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:N._promyelocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/N._promyelocyte.svg/120px-N._promyelocyte.svg.png" decoding="async" width="120" height="102" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/N._promyelocyte.svg/180px-N._promyelocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/N._promyelocyte.svg/240px-N._promyelocyte.svg.png 2x" data-file-width="59" data-file-height="50" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:N._promyelocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:N. promyelocyte.svg">N. promyelocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Nautral_killer_cell_(Large_granular_lymphocyte).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg/120px-Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg.png" decoding="async" width="120" height="103" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg/180px-Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg/240px-Nautral_killer_cell_%28Large_granular_lymphocyte%29.svg.png 2x" data-file-width="49" data-file-height="42" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Nautral_killer_cell_(Large_granular_lymphocyte).svg" class="galleryfilename galleryfilename-truncate" title="File:Nautral killer cell (Large granular lymphocyte).svg">Nautral killer cell (Large granular lymphocyte).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Orthochromatic_erythroblast_(Normoblast).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Orthochromatic_erythroblast_%28Normoblast%29.svg/109px-Orthochromatic_erythroblast_%28Normoblast%29.svg.png" decoding="async" width="109" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Orthochromatic_erythroblast_%28Normoblast%29.svg/163px-Orthochromatic_erythroblast_%28Normoblast%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/31/Orthochromatic_erythroblast_%28Normoblast%29.svg/217px-Orthochromatic_erythroblast_%28Normoblast%29.svg.png 2x" data-file-width="29" data-file-height="32" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Orthochromatic_erythroblast_(Normoblast).svg" class="galleryfilename galleryfilename-truncate" title="File:Orthochromatic erythroblast (Normoblast).svg">Orthochromatic erythroblast (Normoblast).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Polychromatic_erythtocyte_(1)_(Reticulocyte).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg/120px-Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg.png" decoding="async" width="120" height="57" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg/180px-Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/7f/Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg/240px-Polychromatic_erythtocyte_%281%29_%28Reticulocyte%29.svg.png 2x" data-file-width="63" data-file-height="30" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Polychromatic_erythtocyte_(1)_(Reticulocyte).svg" class="galleryfilename galleryfilename-truncate" title="File:Polychromatic erythtocyte (1) (Reticulocyte).svg">Polychromatic erythtocyte (1) (Reticulocyte).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Plasma_cell.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Plasma_cell.svg/120px-Plasma_cell.svg.png" decoding="async" width="120" height="117" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Plasma_cell.svg/180px-Plasma_cell.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Plasma_cell.svg/240px-Plasma_cell.svg.png 2x" data-file-width="47" data-file-height="46" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Plasma_cell.svg" class="galleryfilename galleryfilename-truncate" title="File:Plasma cell.svg">Plasma cell.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Polychromatic_erythroblast.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Polychromatic_erythroblast.svg/120px-Polychromatic_erythroblast.svg.png" decoding="async" width="120" height="113" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Polychromatic_erythroblast.svg/180px-Polychromatic_erythroblast.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Polychromatic_erythroblast.svg/240px-Polychromatic_erythroblast.svg.png 2x" data-file-width="34" data-file-height="32" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Polychromatic_erythroblast.svg" class="galleryfilename galleryfilename-truncate" title="File:Polychromatic erythroblast.svg">Polychromatic erythroblast.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Proerythroblast_(Pronormoblast).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Proerythroblast_%28Pronormoblast%29.svg/120px-Proerythroblast_%28Pronormoblast%29.svg.png" decoding="async" width="120" height="112" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Proerythroblast_%28Pronormoblast%29.svg/180px-Proerythroblast_%28Pronormoblast%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Proerythroblast_%28Pronormoblast%29.svg/240px-Proerythroblast_%28Pronormoblast%29.svg.png 2x" data-file-width="47" data-file-height="44" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Proerythroblast_(Pronormoblast).svg" class="galleryfilename galleryfilename-truncate" title="File:Proerythroblast (Pronormoblast).svg">Proerythroblast (Pronormoblast).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Prolymphocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Prolymphocyte.svg/120px-Prolymphocyte.svg.png" decoding="async" width="120" height="115" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Prolymphocyte.svg/180px-Prolymphocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Prolymphocyte.svg/240px-Prolymphocyte.svg.png 2x" data-file-width="50" data-file-height="48" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Prolymphocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:Prolymphocyte.svg">Prolymphocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Promegakaryocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Promegakaryocyte.svg/120px-Promegakaryocyte.svg.png" decoding="async" width="120" height="114" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Promegakaryocyte.svg/180px-Promegakaryocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Promegakaryocyte.svg/240px-Promegakaryocyte.svg.png 2x" data-file-width="82" data-file-height="78" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Promegakaryocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:Promegakaryocyte.svg">Promegakaryocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Promonocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Promonocyte.svg/120px-Promonocyte.svg.png" decoding="async" width="120" height="113" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Promonocyte.svg/180px-Promonocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Promonocyte.svg/240px-Promonocyte.svg.png 2x" data-file-width="52" data-file-height="49" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Promonocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:Promonocyte.svg">Promonocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Small_lymphocyte_(4).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Small_lymphocyte_%284%29.svg/116px-Small_lymphocyte_%284%29.svg.png" decoding="async" width="116" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Small_lymphocyte_%284%29.svg/175px-Small_lymphocyte_%284%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/b/be/Small_lymphocyte_%284%29.svg/233px-Small_lymphocyte_%284%29.svg.png 2x" data-file-width="33" data-file-height="34" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Small_lymphocyte_(4).svg" class="galleryfilename galleryfilename-truncate" title="File:Small lymphocyte (4).svg">Small lymphocyte (4).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Thrombocytes.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Thrombocytes.svg/120px-Thrombocytes.svg.png" decoding="async" width="120" height="64" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Thrombocytes.svg/180px-Thrombocytes.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Thrombocytes.svg/240px-Thrombocytes.svg.png 2x" data-file-width="41" data-file-height="22" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Thrombocytes.svg" class="galleryfilename galleryfilename-truncate" title="File:Thrombocytes.svg">Thrombocytes.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:T_lymphocyte.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/T_lymphocyte.svg/116px-T_lymphocyte.svg.png" decoding="async" width="116" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/T_lymphocyte.svg/175px-T_lymphocyte.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/T_lymphocyte.svg/233px-T_lymphocyte.svg.png 2x" data-file-width="33" data-file-height="34" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:T_lymphocyte.svg" class="galleryfilename galleryfilename-truncate" title="File:T lymphocyte.svg">T lymphocyte.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Neutrophil.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Neutrophil.svg/117px-Neutrophil.svg.png" decoding="async" width="117" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Neutrophil.svg/175px-Neutrophil.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Neutrophil.svg/233px-Neutrophil.svg.png 2x" data-file-width="34" data-file-height="35" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Neutrophil.svg" class="galleryfilename galleryfilename-truncate" title="File:Neutrophil.svg">Neutrophil.svg</a> </div> </li> </ul> <div class="mw-heading mw-heading3"><h3 id="Phases_of_the_moon">Phases of the moon</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=262" title="Edit section: Phases of the moon"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 635px"> <div class="thumb" style="width: 630px; height: 280px;"><span typeof="mw:File"><a href="/wiki/File:Phases_of_the_Moon.png" class="mw-file-description" title="Troubled PNG."><img alt="Troubled PNG." src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Phases_of_the_Moon.png/600px-Phases_of_the_Moon.png" decoding="async" width="600" height="181" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Phases_of_the_Moon.png/900px-Phases_of_the_Moon.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e3/Phases_of_the_Moon.png/1200px-Phases_of_the_Moon.png 2x" data-file-width="1350" data-file-height="408" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Phases_of_the_Moon.png" class="galleryfilename galleryfilename-truncate" title="File:Phases of the Moon.png">Phases of the Moon.png</a> Troubled PNG.</div> </li> <li class="gallerybox" style="width: 635px"> <div class="thumb" style="width: 630px; height: 280px;"><span typeof="mw:File"><a href="/wiki/File:Sur3_Moon_phases_es.jpg" class="mw-file-description" title="Better JPEG; show sunlight angle"><img alt="Better JPEG; show sunlight angle" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Sur3_Moon_phases_es.jpg/600px-Sur3_Moon_phases_es.jpg" decoding="async" width="600" height="240" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Sur3_Moon_phases_es.jpg/900px-Sur3_Moon_phases_es.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/6/64/Sur3_Moon_phases_es.jpg/1200px-Sur3_Moon_phases_es.jpg 2x" data-file-width="2400" data-file-height="960" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Sur3_Moon_phases_es.jpg" class="galleryfilename galleryfilename-truncate" title="File:Sur3 Moon phases es.jpg">Sur3 Moon phases es.jpg</a> Better JPEG; show sunlight angle</div> </li> <li class="gallerybox" style="width: 635px"> <div class="thumb" style="width: 630px; height: 280px;"><span typeof="mw:File"><a href="/wiki/File:Moon_phases_00.jpg" class="mw-file-description" title="English source JPEG"><img alt="English source JPEG" src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Moon_phases_00.jpg/600px-Moon_phases_00.jpg" decoding="async" width="600" height="228" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Moon_phases_00.jpg/900px-Moon_phases_00.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a6/Moon_phases_00.jpg/1200px-Moon_phases_00.jpg 2x" data-file-width="2400" data-file-height="910" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Moon_phases_00.jpg" class="galleryfilename galleryfilename-truncate" title="File:Moon phases 00.jpg">Moon phases 00.jpg</a> English source JPEG</div> </li> </ul> <p>Many problems. The orbit of the Earth should be roughly circular. The lunar month is about 1/12 year, which is 30°. Consequently, the sun's rays are not vertical. Scale issues. </p> <div class="mw-heading mw-heading3"><h3 id="Torque_wrenches_and_drivers">Torque wrenches and drivers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=263" title="Edit section: Torque wrenches and drivers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Direct_pawl_clicker_torque_concept.png" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Direct_pawl_clicker_torque_concept.png/120px-Direct_pawl_clicker_torque_concept.png" decoding="async" width="120" height="34" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Direct_pawl_clicker_torque_concept.png/180px-Direct_pawl_clicker_torque_concept.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Direct_pawl_clicker_torque_concept.png/240px-Direct_pawl_clicker_torque_concept.png 2x" data-file-width="2154" data-file-height="610" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <p>The basics are covered, but the details are not. Consider the Utica torque screwdriver patent. </p><p>Examine the dependence on length. </p> <ul><li><a href="https://en.wikipedia.org/wiki/Torque_wrench" class="extiw" title="en:Torque wrench">en:Torque wrench</a></li> <li><a href="/wiki/Category:Torque_wrenches" title="Category:Torque wrenches">Category:Torque wrenches</a></li> <li><a rel="nofollow" class="external free" href="https://www.heamar.co.uk/blog/88_click-vs-cam-over-torque-technology">https://www.heamar.co.uk/blog/88_click-vs-cam-over-torque-technology</a></li> <li><a rel="nofollow" class="external free" href="https://patents.google.com/patent/US2962918A/en">https://patents.google.com/patent/US2962918A/en</a></li> <li><a rel="nofollow" class="external free" href="https://patents.google.com/patent/US3772942A/en">https://patents.google.com/patent/US3772942A/en</a></li> <li><a rel="nofollow" class="external free" href="https://patents.google.com/patent/US7451674B2/en">https://patents.google.com/patent/US7451674B2/en</a></li></ul> <p>Move to journal. </p> <div class="mw-heading mw-heading3"><h3 id="Hepatitis_B">Hepatitis B</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=264" title="Edit section: Hepatitis B"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><span class="editsection">[<span class="noprint plainlinks"><a class="external text" href="https://commons.wikimedia.org/w/index.php?title=Template:Other_versions/Hepatitis_B_virus_v2&action=edit">edit</a></span>]</span><br clear="all" /> </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Deltavirus_virion_right-HBV.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Deltavirus_virion_right-HBV.jpg/120px-Deltavirus_virion_right-HBV.jpg" decoding="async" width="120" height="100" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Deltavirus_virion_right-HBV.jpg/180px-Deltavirus_virion_right-HBV.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Deltavirus_virion_right-HBV.jpg/240px-Deltavirus_virion_right-HBV.jpg 2x" data-file-width="343" data-file-height="287" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Deltavirus_virion_right-HBV.jpg" class="galleryfilename galleryfilename-truncate" title="File:Deltavirus virion right-HBV.jpg">Deltavirus virion right-HBV.jpg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:HBV.png" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/HBV.png/120px-HBV.png" decoding="async" width="120" height="76" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/HBV.png/180px-HBV.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/HBV.png/240px-HBV.png 2x" data-file-width="711" data-file-height="452" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:HBV.png" class="galleryfilename galleryfilename-truncate" title="File:HBV.png">HBV.png</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2.png" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Hepatitis_B_virus_v2.png/120px-Hepatitis_B_virus_v2.png" decoding="async" width="120" height="82" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Hepatitis_B_virus_v2.png/180px-Hepatitis_B_virus_v2.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/2/2c/Hepatitis_B_virus_v2.png/240px-Hepatitis_B_virus_v2.png 2x" data-file-width="843" data-file-height="577" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2.png" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2.png">Hepatitis B virus v2.png</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2.svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/120px-Hepatitis_B_virus_v2.svg.png" decoding="async" width="120" height="82" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/180px-Hepatitis_B_virus_v2.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Hepatitis_B_virus_v2.svg/240px-Hepatitis_B_virus_v2.svg.png 2x" data-file-width="512" data-file-height="350" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2.svg" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2.svg">Hepatitis B virus v2.svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2_(2).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Hepatitis_B_virus_v2_%282%29.svg/120px-Hepatitis_B_virus_v2_%282%29.svg.png" decoding="async" width="120" height="68" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Hepatitis_B_virus_v2_%282%29.svg/180px-Hepatitis_B_virus_v2_%282%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f4/Hepatitis_B_virus_v2_%282%29.svg/240px-Hepatitis_B_virus_v2_%282%29.svg.png 2x" data-file-width="754" data-file-height="428" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2_(2).svg" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2 (2).svg">Hepatitis B virus v2 (2).svg</a> </div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:Hepatitis_B_virus_v2_(3).svg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Hepatitis_B_virus_v2_%283%29.svg/120px-Hepatitis_B_virus_v2_%283%29.svg.png" decoding="async" width="120" height="85" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Hepatitis_B_virus_v2_%283%29.svg/180px-Hepatitis_B_virus_v2_%283%29.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Hepatitis_B_virus_v2_%283%29.svg/240px-Hepatitis_B_virus_v2_%283%29.svg.png 2x" data-file-width="512" data-file-height="363" /></a></span></div> <div class="gallerytext"><a href="/wiki/File:Hepatitis_B_virus_v2_(3).svg" class="galleryfilename galleryfilename-truncate" title="File:Hepatitis B virus v2 (3).svg">Hepatitis B virus v2 (3).svg</a> </div> </li> </ul> <p><br /> I go to vectorize the file </p> <ul><li><a href="/wiki/File:Hepatitis_B_virus_v2.png" title="File:Hepatitis B virus v2.png">File:Hepatitis B virus v2.png</a></li></ul> <p>Should not be too hard except for the DNA. Here's my work so far: </p> <ul><li><a href="/wiki/File:Hepatitis_B_virus_v2.svg" title="File:Hepatitis B virus v2.svg">File:Hepatitis B virus v2.svg</a></li></ul> <p>While contemplating how to do the "partially double-stranded DNA," I am perplexed. The PNG has not drawn two complementary DNA strands but rather something reminiscent of a chromosome: essentially two independent DNA strands. I'm thinking that "partially double-stranded DNA" means a strand with its complement that has a separation so the DNA polymerase can do its work. The two strands should be tightly locked together. </p><p>But then there is </p> <ul><li><a href="/wiki/File:Hepatitis_B_virus_v2_(2).svg" title="File:Hepatitis B virus v2 (2).svg">File:Hepatitis B virus v2 (2).svg</a></li></ul> <p>which shows a DNA strand that has a second strand in some parts but not others. How is that supposed to happen? If the virus takes over the DNA replicating machinery of its victim, why wouldn't there be a complementary strand everywhere? Is there a long DNA strand and short DNA stand that cling together? </p><p>Some illustrations get around the whole issue with a plasmid-like DNA ring. </p><p>I'm also getting suspicious of the core antigens (HBcAg) and the diagrammatic hexagon. Is the hexagon supposed to represent the core? So if HBcAg is shown, then the hexagon should not be shown? </p><p>What about the surface antigen variants? </p><p>Then I discover the file </p> <ul><li><a href="/wiki/File:Hepatitis_B_virus_v2_(3).svg" title="File:Hepatitis B virus v2 (3).svg">File:Hepatitis B virus v2 (3).svg</a></li></ul> <p>and think that somebody has already done the SVG conversion. While fixing the cropping on that file, I discover it is just a PNG in SVG's clothing. It is essentially </p> <ul><li><a href="/wiki/File:HBV.png" title="File:HBV.png">File:HBV.png</a></li></ul> <p><a href="/wiki/File:Hepatitis_B_virus_v2_(2).svg" title="File:Hepatitis B virus v2 (2).svg">File:Hepatitis B virus v2 (2).svg</a> is a real SVG file, but something is screwy with the click through: it shows a tiny image. </p><p>So I'm stalled on the image. </p> <div class="mw-heading mw-heading2"><h2 id="Clean_up">Clean up</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=265" title="Edit section: Clean up"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Category:Chromatic_aberration_diagrams" title="Category:Chromatic aberration diagrams">Category:Chromatic aberration diagrams</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Image_maps">Image maps</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=266" title="Edit section: Image maps"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>A post at Commons:Graphics village pump: </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons%3AGraphics_village_pump&diff=723914535&oldid=721138336">https://commons.wikimedia.org/w/index.php?title=Commons%3AGraphics_village_pump&diff=723914535&oldid=721138336</a></li></ul> <p>The template is </p> <ul><li><a href="/wiki/Template:Clickable_map_of_a_simple_treadle_floorloom,_line_drawing.png" title="Template:Clickable map of a simple treadle floorloom, line drawing.png">Template:Clickable map of a simple treadle floorloom, line drawing.png</a></li></ul> <p>It uses <code><imagemap></code>. </p><p>The loom file is <a href="/wiki/File:Simple_treadle_floorloom,_line_drawing.png" title="File:Simple treadle floorloom, line drawing.png">File:Simple_treadle_floorloom,_line_drawing.png</a>. </p><p>The <code>imagemap</code> lines look like: </p> <pre>poly 735 1063 1335 731 1488 825 1016 1148 [[Lease rods]] poly 1360 808 1904 553 1921 1152 1399 1437 [[Heddle|Heddles and heddle frames or harness]] poly 2036 510 1998 1386 2678 812 2614 315 [[Beater (weaving)|Batten bar or beater bar]] poly 2155 1063 2538 799 2542 888 2164 1161 [[Reed (weaving)|Reed]] poly 2648 816 2559 922 2627 961 2721 876 [[Shuttle (weaving)|Shuttle]] poly 1611 1590 1462 1836 2780 2023 2993 1768 [[Treadle]]s poly 2729 829 2470 1058 2491 1271 2835 969 2831 820 [[Breast beam]] poly 327 990 336 1186 999 897 1024 799 973 723 [[Warp beam]] </pre> <p>The post has various questions. </p><p>Multilingual from Wikidata items: </p> <table class="wikitable"> <caption>Multilingual from Wikidata Items </caption> <tbody><tr> <th>Wikidata Item</th> <th>Label</th> <th>Wikipedia Article </th></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q173056" class="extiw" title="d:Q173056"><span title="device for weaving textiles">loom <small>(Q173056)</small></span></a></td> <td><a href="https://en.wikipedia.org/wiki/en:Loom" class="extiw" title="w:en:Loom"><span title="device for weaving textiles">loom</span></a></td> <td><a href="https://en.wikipedia.org/wiki/Loom" class="extiw" title="w:Loom">w:Loom</a> </td></tr> <tr> <td></td> <td></td> <td><a href="https://en.wikipedia.org/wiki/Lease_rods" class="extiw" title="w:Lease rods">w:Lease rods</a> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q39515" class="extiw" title="d:Q39515"><span title="wire, string, or similar component of a loom which is used to lift warp threads, making a shed for the weft thread to pass through">heddle <small>(Q39515)</small></span></a></td> <td><a href="https://en.wikipedia.org/wiki/en:Heddle" class="extiw" title="w:en:Heddle"><span title="wire, string, or similar component of a loom which is used to lift warp threads, making a shed for the weft thread to pass through">heddle</span></a></td> <td><a href="https://en.wikipedia.org/wiki/Heddle" class="extiw" title="w:Heddle">w:Heddle</a> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q4877042" class="extiw" title="d:Q4877042"><span title="weaving tool of various shapes used to push the weft yarn securely into place">beater <small>(Q4877042)</small></span></a></td> <td><a href="https://en.wikipedia.org/wiki/en:Beater_(weaving)" class="extiw" title="w:en:Beater (weaving)"><span title="weaving tool of various shapes used to push the weft yarn securely into place">beater</span></a></td> <td><a href="https://en.wikipedia.org/wiki/Beater_(weaving)" class="extiw" title="w:Beater (weaving)">w:Beater (weaving)</a> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q3500504" class="extiw" title="d:Q3500504"><span title="part of loom">reed <small>(Q3500504)</small></span></a></td> <td><a href="https://en.wikipedia.org/wiki/en:Reed_(weaving)" class="extiw" title="w:en:Reed (weaving)"><span title="part of loom">reed</span></a></td> <td><a href="https://en.wikipedia.org/wiki/Reed_(weaving)" class="extiw" title="w:Reed (weaving)">w:Reed (weaving)</a> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q519840" class="extiw" title="d:Q519840"><span title="tool designed to neatly and compactly store a holder that carries the thread of the weft yarn while weaving with a loom">shuttle <small>(Q519840)</small></span></a></td> <td><a href="https://en.wikipedia.org/wiki/en:Shuttle_(weaving)" class="extiw" title="w:en:Shuttle (weaving)"><span title="tool designed to neatly and compactly store a holder that carries the thread of the weft yarn while weaving with a loom">shuttle</span></a></td> <td><a href="https://en.wikipedia.org/wiki/Shuttle_(weaving)" class="extiw" title="w:Shuttle (weaving)">w:Shuttle (weaving)</a> </td></tr> <tr> <td></td> <td></td> <td><a href="https://en.wikipedia.org/wiki/Breast_beam" class="extiw" title="w:Breast beam">w:Breast beam</a> </td></tr> <tr> <td></td> <td></td> <td><a href="https://en.wikipedia.org/wiki/Warp_beam" class="extiw" title="w:Warp beam">w:Warp beam</a> </td></tr></tbody></table> <p>Looms have interesting features. Keep tension on the warp while feeding and taking up. Use treadles to open the shed in different patterns. </p> <ul><li><a rel="nofollow" class="external free" href="https://www.glimakrausa.com/learning-about-looms">https://www.glimakrausa.com/learning-about-looms</a></li> <li><a rel="nofollow" class="external free" href="https://warpologynotufos.files.wordpress.com/2012/12/norwwod-booklet2.pdf">https://warpologynotufos.files.wordpress.com/2012/12/norwwod-booklet2.pdf</a></li></ul> <p>Several people have proposed Wikipedia links from a Wikidata item. From <a href="https://www.wikidata.org/wiki/Q39515" class="extiw" title="d:Q39515"><span title="wire, string, or similar component of a loom which is used to lift warp threads, making a shed for the weft thread to pass through">heddle <small>(Q39515)</small></span></a>, hyperlink to the appropriate language Wikipedia entry if it exists. </p> <ul><li><a href="https://www.wikidata.org/wiki/Wikidata:How_to_use_data_on_Wikimedia_projects" class="extiw" title="d:Wikidata:How to use data on Wikimedia projects">d:Wikidata:How to use data on Wikimedia projects</a></li> <li><a href="https://www.wikidata.org/wiki/Wikidata:Data_access" class="extiw" title="d:Wikidata:Data access">d:Wikidata:Data access</a></li></ul> <p>Multilingual static (not tool tip) labels (as done at <a href="/wiki/File:2022_Russian_invasion_of_Ukraine.svg" title="File:2022 Russian invasion of Ukraine.svg">File:2022 Russian invasion of Ukraine.svg</a>) are possible. </p><p>SVG has tool tips, and tool tips would be better than an image map because users do not supply the hit geometry. The method fails for MediaWiki because SVG is not served directly. Browsers have good support for tool tips, but they do not support SVG multilingual tool tips such as: </p> <dl><dd><div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="nt"><g></span> <span class="w"> </span><span class="nt"><title</span><span class="w"> </span><span class="na">lang=</span><span class="s">"en"</span><span class="nt">></span>English<span class="nt"></title></span> <span class="w"> </span><span class="nt"><title</span><span class="w"> </span><span class="na">lang=</span><span class="s">"de"</span><span class="nt">></span>Deutsch<span class="nt"></title></span> <span class="w"> </span><span class="nt"><title</span><span class="w"> </span><span class="na">lang=</span><span class="s">"fr"</span><span class="nt">></span>Francais<span class="nt"></title></span> <span class="w"> </span>... <span class="nt"></g></span> </pre></div></dd></dl> <p>The SVG 2.0 specification has apparently dropped multilingual titles. See <a rel="nofollow" class="external free" href="https://svgwg.org/svg2-draft/struct.html#TitleElement">https://svgwg.org/svg2-draft/struct.html#TitleElement</a> </p><p>Animated SVG can be done. Make some conventional SVG visible upon a mouse over. The table of chemical elements technology. </p> <div class="mw-heading mw-heading2"><h2 id="Copyright">Copyright</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=267" title="Edit section: Copyright"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://commons.wikimedia.org/wiki/Commons:Graphic_Lab/Illustration_workshop/Archive/2022#SVG_for_a_common_anti-capitalist_graffiti">https://commons.wikimedia.org/wiki/Commons:Graphic_Lab/Illustration_workshop/Archive/2022#SVG_for_a_common_anti-capitalist_graffiti</a></li> <li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Copyright&diff=672607382&oldid=672478602#IWM_Non_Commercial_Licence">https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump/Copyright&diff=672607382&oldid=672478602#IWM_Non_Commercial_Licence</a></li> <li><a rel="nofollow" class="external free" href="https://web.archive.org/web/20120801211652/https://open.umich.edu/wiki/Casebook#Charts">https://web.archive.org/web/20120801211652/https://open.umich.edu/wiki/Casebook#Charts</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="URAA">URAA</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=268" title="Edit section: URAA"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump%2FCopyright&diff=856742690&oldid=856361764#URAA">https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump%2FCopyright&diff=856742690&oldid=856361764#URAA</a></li></ul> <div class="mw-heading mw-heading3"><h3 id="Moonrise_and_Adams">Moonrise and Adams</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=269" title="Edit section: Moonrise and Adams"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a class="external free" href="https://commons.wikimedia.org/wiki/Commons:Village_pump/Copyright/Archive/2024/10#File%3AMoonrise%2C_Hernandez%2C_New_Mexico.jpg">https://commons.wikimedia.org/wiki/Commons:Village_pump/Copyright/Archive/2024/10#File%3AMoonrise%2C_Hernandez%2C_New_Mexico.jpg</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="MediaWiki_upgrades">MediaWiki upgrades</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=270" title="Edit section: MediaWiki upgrades"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See <a href="https://phabricator.wikimedia.org/T265549#8145732" class="extiw" title="phab:T265549">Phab:T265549#8145732</a> <a href="https://phabricator.wikimedia.org/T216815" class="extiw" title="phab:T216815">Phab:T216815</a> </p><p>The new version of <code>librsvg</code> now takes the langtag through the <code>--accept-language</code> command line argument rather than the <code>$LANG</code> environment variable. Well, it still uses the <code>$LANG</code> and other environment locale variables, but those environment variables must now be Unix locale strings. </p><p>In general, an SVG langtag should never be passed through the <code>$LANG</code> environment variable. The latter takes an opaque Unix locale string rather than an IETF language tag. It happened to work for early versions of <code>librsvg</code> because those versions did a <code>getenv("LANG")</code> and used that result as an IETF langtag. (As a separate issue, the early versions also did not process hyphenated langtags correctly.) The Rust versions of <code>librsvg</code> now use a library routine to digest the locale string. </p> <div class="mw-heading mw-heading3"><h3 id="Command_line_arguments">Command line arguments</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=271" title="Edit section: Command line arguments"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Outdated man page: </p> <ul><li><a rel="nofollow" class="external free" href="https://manpages.ubuntu.com/manpages/trusty/man1/rsvg-convert.1.html">https://manpages.ubuntu.com/manpages/trusty/man1/rsvg-convert.1.html</a></li></ul> <ol><li>-f --format: png</li> <li>-w --width: integer</li> <li>-h --height: integer</li> <li>-o --output filename</li> <li>-d --dpi-x (default 90!)</li> <li>-p --dpi-y (default 90!)</li> <li>-a --keep-aspect-ratio</li> <li>-u undocumented; see unlimited below</li></ol> <p>Source </p> <ul><li><a rel="nofollow" class="external free" href="https://gitlab.gnome.org/GNOME/librsvg">https://gitlab.gnome.org/GNOME/librsvg</a></li> <li><a rel="nofollow" class="external free" href="https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/src/accept_language.rs">https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/src/accept_language.rs</a></li> <li><a rel="nofollow" class="external free" href="https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/rsvg-convert.rst">https://gitlab.gnome.org/GNOME/librsvg/-/blob/main/rsvg-convert.rst</a> <dl><dd>This wants to use different argument names? <ol><li>-w --width</li> <li>-h --height</li> <li>-o --output</li> <li>-f --format</li> <li>-a --keep-aspect-ratio</li> <li>-d --dpi-x</li> <li>-p --dpi-y</li> <li>-l --accept-language (New)</li> <li>-u --unlimited; turn off limited XML parsing</li></ol></dd></dl></li></ul> <div class="mw-heading mw-heading3"><h3 id="Resvg_command_line_arguments">Resvg command line arguments</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=272" title="Edit section: Resvg command line arguments"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/resvg">https://github.com/RazrFalcon/resvg</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/RazrFalcon/resvg/blob/master/src/main.rs">https://github.com/RazrFalcon/resvg/blob/master/src/main.rs</a> <ol><li>resvg in.svg out.png</li> <li>-w --width</li> <li>-h --height</li> <li>--dpi (default 96)</li> <li>--languages</li></ol></li></ul> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_external_converter">MediaWiki external converter</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=273" title="Edit section: MediaWiki external converter"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For conventional MediaWiki, there is a configuration variable: </p> <ul><li><a class="external free" href="https://www.mediawiki.org/wiki/Manual:$wgSVGConverters">https://www.mediawiki.org/wiki/Manual:$wgSVGConverters</a></li></ul> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span></span><span class="nv">$wgSVGConverters</span> <span class="o">=</span> <span class="p">[</span> <span class="s1">'ImageMagick'</span> <span class="o">=></span> <span class="s1">'$path/convert -background "#ffffff00" -thumbnail $widthx$height\\! $input PNG:$output'</span><span class="p">,</span> <span class="s1">'sodipodi'</span> <span class="o">=></span> <span class="s1">'$path/sodipodi -z -w $width -f $input -e $output'</span><span class="p">,</span> <span class="s1">'inkscape'</span> <span class="o">=></span> <span class="s1">'$path/inkscape -z -w $width -f $input -e $output'</span><span class="p">,</span> <span class="s1">'batik'</span> <span class="o">=></span> <span class="s1">'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input'</span><span class="p">,</span> <span class="s1">'rsvg'</span> <span class="o">=></span> <span class="s1">'$path/rsvg-convert -w $width -h $height -o $output $input'</span><span class="p">,</span> <span class="s1">'imgserv'</span> <span class="o">=></span> <span class="s1">'$path/imgserv-wrapper -i svg -o png -w$width $input $output'</span><span class="p">,</span> <span class="s1">'ImagickExt'</span> <span class="o">=></span> <span class="p">[</span> <span class="s1">'SvgHandler::rasterizeImagickExt'</span><span class="p">,</span> <span class="p">],</span> <span class="p">];</span> </pre></div> <p>The configuration should set the <code>$wgSVGConverter</code> variable. Presumably, that is set to <code>rsvg</code>. </p><p>I thought there were type declarations in MediaWiki PHP code. See, for example, </p> <ul><li><a class="external free" href="https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/includes/upload/UploadBase.php">https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/includes/upload/UploadBase.php</a></li> <li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate">https://github.com/wikimedia/svgtranslate</a> <ul><li><a rel="nofollow" class="external free" href="https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php">https://github.com/wikimedia/svgtranslate/blob/master/src/Model/Svg/SvgFile.php</a></li></ul></li></ul> <p>See PHP info: </p> <ul><li><a rel="nofollow" class="external free" href="https://www.php.net/manual/en/language.types.declarations.php">https://www.php.net/manual/en/language.types.declarations.php</a></li></ul> <p>It looks like the SVG Translate source has JavaDoc style annotations (but there was a strict assignment). See </p> <ul><li><a rel="nofollow" class="external free" href="https://docs.phpdoc.org/">https://docs.phpdoc.org/</a></li></ul> <p>See <a rel="nofollow" class="external free" href="https://www.php.net/manual/en/function.str-replace.php">https://www.php.net/manual/en/function.str-replace.php</a> and its "Replacement order gotcha" comment. Replacement is done left to right. The filename should always be rightmost. </p> <ul><li><a class="external free" href="https://doc.wikimedia.org/mediawiki-core/master/php/SvgHandler_8php_source.html">https://doc.wikimedia.org/mediawiki-core/master/php/SvgHandler_8php_source.html</a></li></ul> <div class="mw-highlight mw-highlight-lang-php mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="327"></span> <span class="k">public</span> <span class="k">function</span> <span class="nf">rasterize</span><span class="p">(</span> <span class="nv">$srcPath</span><span class="p">,</span> <span class="nv">$dstPath</span><span class="p">,</span> <span class="nv">$width</span><span class="p">,</span> <span class="nv">$height</span><span class="p">,</span> <span class="nv">$lang</span> <span class="o">=</span> <span class="k">false</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="328"></span> <span class="nv">$mainConfig</span> <span class="o">=</span> <span class="nx">MediaWikiServices</span><span class="o">::</span><span class="na">getInstance</span><span class="p">()</span><span class="o">-></span><span class="na">getMainConfig</span><span class="p">();</span> <span class="linenos" data-line="329"></span> <span class="nv">$svgConverters</span> <span class="o">=</span> <span class="nv">$mainConfig</span><span class="o">-></span><span class="na">get</span><span class="p">(</span> <span class="nx">MainConfigNames</span><span class="o">::</span><span class="na">SVGConverters</span> <span class="p">);</span> <span class="linenos" data-line="330"></span> <span class="nv">$svgConverter</span> <span class="o">=</span> <span class="nv">$mainConfig</span><span class="o">-></span><span class="na">get</span><span class="p">(</span> <span class="nx">MainConfigNames</span><span class="o">::</span><span class="na">SVGConverter</span> <span class="p">);</span> <span class="linenos" data-line="331"></span> <span class="nv">$svgConverterPath</span> <span class="o">=</span> <span class="nv">$mainConfig</span><span class="o">-></span><span class="na">get</span><span class="p">(</span> <span class="nx">MainConfigNames</span><span class="o">::</span><span class="na">SVGConverterPath</span> <span class="p">);</span> <span class="linenos" data-line="332"></span> <span class="nv">$err</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span> <span class="linenos" data-line="333"></span> <span class="nv">$retval</span> <span class="o">=</span> <span class="s1">''</span><span class="p">;</span> <span class="linenos" data-line="334"></span> <span class="k">if</span> <span class="p">(</span> <span class="nb">isset</span><span class="p">(</span> <span class="nv">$svgConverters</span><span class="p">[</span><span class="nv">$svgConverter</span><span class="p">]</span> <span class="p">)</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="335"></span> <span class="k">if</span> <span class="p">(</span> <span class="nb">is_array</span><span class="p">(</span> <span class="nv">$svgConverters</span><span class="p">[</span><span class="nv">$svgConverter</span><span class="p">]</span> <span class="p">)</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="336"></span> <span class="c1">// This is a PHP callable</span> <span class="linenos" data-line="337"></span> <span class="nv">$func</span> <span class="o">=</span> <span class="nv">$svgConverters</span><span class="p">[</span><span class="nv">$svgConverter</span><span class="p">][</span><span class="mi">0</span><span class="p">];</span> <span class="linenos" data-line="338"></span> <span class="k">if</span> <span class="p">(</span> <span class="o">!</span><span class="nb">is_callable</span><span class="p">(</span> <span class="nv">$func</span> <span class="p">)</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="339"></span> <span class="k">throw</span> <span class="k">new</span> <span class="nx">MWException</span><span class="p">(</span> <span class="s2">"</span><span class="si">$func</span><span class="s2"> is not callable"</span> <span class="p">);</span> <span class="linenos" data-line="340"></span> <span class="p">}</span> <span class="linenos" data-line="341"></span> <span class="nv">$err</span> <span class="o">=</span> <span class="nv">$func</span><span class="p">(</span> <span class="nv">$srcPath</span><span class="p">,</span> <span class="linenos" data-line="342"></span> <span class="nv">$dstPath</span><span class="p">,</span> <span class="linenos" data-line="343"></span> <span class="nv">$width</span><span class="p">,</span> <span class="linenos" data-line="344"></span> <span class="nv">$height</span><span class="p">,</span> <span class="linenos" data-line="345"></span> <span class="nv">$lang</span><span class="p">,</span> <span class="linenos" data-line="346"></span> <span class="o">...</span><span class="nb">array_slice</span><span class="p">(</span> <span class="nv">$svgConverters</span><span class="p">[</span><span class="nv">$svgConverter</span><span class="p">],</span> <span class="mi">1</span> <span class="p">)</span> <span class="linenos" data-line="347"></span> <span class="p">);</span> <span class="linenos" data-line="348"></span> <span class="nv">$retval</span> <span class="o">=</span> <span class="p">(</span><span class="nx">bool</span><span class="p">)</span><span class="nv">$err</span><span class="p">;</span> <span class="linenos" data-line="349"></span> <span class="p">}</span> <span class="k">else</span> <span class="p">{</span> <span class="linenos" data-line="350"></span> <span class="c1">// External command</span> <span class="linenos" data-line="351"></span> <span class="nv">$cmd</span> <span class="o">=</span> <span class="nb">str_replace</span><span class="p">(</span> <span class="linenos" data-line="352"></span> <span class="p">[</span> <span class="s1">'$path/'</span><span class="p">,</span> <span class="s1">'$width'</span><span class="p">,</span> <span class="s1">'$height'</span><span class="p">,</span> <span class="s1">'$input'</span><span class="p">,</span> <span class="s1">'$output'</span> <span class="p">],</span> <span class="linenos" data-line="353"></span> <span class="p">[</span> <span class="nv">$svgConverterPath</span> <span class="o">?</span> <span class="nx">Shell</span><span class="o">::</span><span class="na">escape</span><span class="p">(</span> <span class="s2">"</span><span class="si">{</span><span class="nv">$svgConverterPath</span><span class="si">}</span><span class="s2">/"</span> <span class="p">)</span> <span class="o">:</span> <span class="s2">""</span><span class="p">,</span> <span class="linenos" data-line="354"></span> <span class="nb">intval</span><span class="p">(</span> <span class="nv">$width</span> <span class="p">),</span> <span class="linenos" data-line="355"></span> <span class="nb">intval</span><span class="p">(</span> <span class="nv">$height</span> <span class="p">),</span> <span class="linenos" data-line="356"></span> <span class="nx">Shell</span><span class="o">::</span><span class="na">escape</span><span class="p">(</span> <span class="nv">$srcPath</span> <span class="p">),</span> <span class="linenos" data-line="357"></span> <span class="nx">Shell</span><span class="o">::</span><span class="na">escape</span><span class="p">(</span> <span class="nv">$dstPath</span> <span class="p">)</span> <span class="p">],</span> <span class="linenos" data-line="358"></span> <span class="nv">$svgConverters</span><span class="p">[</span><span class="nv">$svgConverter</span><span class="p">]</span> <span class="linenos" data-line="359"></span> <span class="p">);</span> <span class="linenos" data-line="360"></span> <span class="linenos" data-line="361"></span> <span class="nv">$env</span> <span class="o">=</span> <span class="p">[];</span> <span class="linenos" data-line="362"></span> <span class="k">if</span> <span class="p">(</span> <span class="nv">$lang</span> <span class="o">!==</span> <span class="k">false</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="363"></span> <span class="nv">$env</span><span class="p">[</span><span class="s1">'LANG'</span><span class="p">]</span> <span class="o">=</span> <span class="nv">$lang</span><span class="p">;</span> <span class="linenos" data-line="364"></span> <span class="p">}</span> <span class="linenos" data-line="365"></span> <span class="linenos" data-line="366"></span> <span class="nx">wfDebug</span><span class="p">(</span> <span class="no">__METHOD__</span> <span class="o">.</span> <span class="s2">": </span><span class="si">$cmd</span><span class="s2">"</span> <span class="p">);</span> <span class="linenos" data-line="367"></span> <span class="nv">$err</span> <span class="o">=</span> <span class="nx">wfShellExecWithStderr</span><span class="p">(</span> <span class="nv">$cmd</span><span class="p">,</span> <span class="nv">$retval</span><span class="p">,</span> <span class="nv">$env</span> <span class="p">);</span> <span class="linenos" data-line="368"></span> <span class="p">}</span> <span class="linenos" data-line="369"></span> <span class="p">}</span> <span class="linenos" data-line="370"></span> <span class="c1">// @phan-suppress-next-line PhanTypeMismatchArgumentNullable False positive</span> <span class="linenos" data-line="371"></span> <span class="nv">$removed</span> <span class="o">=</span> <span class="nv">$this</span><span class="o">-></span><span class="na">removeBadFile</span><span class="p">(</span> <span class="nv">$dstPath</span><span class="p">,</span> <span class="nv">$retval</span> <span class="p">);</span> <span class="linenos" data-line="372"></span> <span class="k">if</span> <span class="p">(</span> <span class="nv">$retval</span> <span class="o">!=</span> <span class="mi">0</span> <span class="o">||</span> <span class="nv">$removed</span> <span class="p">)</span> <span class="p">{</span> <span class="linenos" data-line="373"></span> <span class="c1">// @phan-suppress-next-next-line PhanPossiblyUndeclaredVariable cmd is set when used</span> <span class="linenos" data-line="374"></span> <span class="c1">// @phan-suppress-next-line PhanTypeMismatchArgumentNullable cmd is set when used</span> <span class="linenos" data-line="375"></span> <span class="nv">$this</span><span class="o">-></span><span class="na">logErrorForExternalProcess</span><span class="p">(</span> <span class="nv">$retval</span><span class="p">,</span> <span class="nv">$err</span><span class="p">,</span> <span class="nv">$cmd</span> <span class="p">);</span> <span class="linenos" data-line="376"></span> <span class="k">return</span> <span class="k">new</span> <span class="nx">MediaTransformError</span><span class="p">(</span> <span class="s1">'thumbnail_error'</span><span class="p">,</span> <span class="nv">$width</span><span class="p">,</span> <span class="nv">$height</span><span class="p">,</span> <span class="nv">$err</span> <span class="p">);</span> <span class="linenos" data-line="377"></span> <span class="p">}</span> <span class="linenos" data-line="378"></span> <span class="linenos" data-line="379"></span> <span class="k">return</span> <span class="k">true</span><span class="p">;</span> <span class="linenos" data-line="380"></span> <span class="p">}</span> </pre></div> <p>The change is straightforward. </p><p>Change the <code>rsvg</code> configuration (or make a <code>rsvglang</code>). </p> <dl><dd><code>'rsvg' => '$path/rsvg-convert -w $width -h $height -l $lang -o $output $input',</code></dd></dl> <p>Should this line also have a <code>-u</code> to match Thumbor? </p><p>Also add a <code>resvg</code> line </p> <dl><dd><code>'resvg' => '$path/resvg -w $width -h $height --languages $lang $input $output',</code></dd></dl> <p>Before line 350, set <code>$lang</code> to an actual langtag: </p> <dl><dd><code>if ( $lang === false ) $lang = "en";</code></dd></dl> <p>It might be cleaner to default <code>$lang = 'en'</code> in the argument list.... Declare the argument to be a string type. </p><p>Add a <code>"$lang"</code> substitution in lines 352–357. The substitution should be before the <code>$input</code> position in the array. </p><p>Delete lines 362–364 (do not pass a langtag in the environment). This will break old versions of <code>librsvg</code>. </p> <div class="mw-heading mw-heading3"><h3 id="Thumbor">Thumbor</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=274" title="Edit section: Thumbor"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>For <code>librsvg</code> used by Thumbor </p> <ul><li><code><i>rsvg-convert</i> <i>source.svg</i> -u -f png -w <i>width</i> -h <i>height</i> --accept-language <i>lang</i></code></li></ul> <ul><li><a class="external free" href="https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/thumbor-plugins/+/refs/heads/master/wikimedia_thumbor/engine/svg/svg.py">https://gerrit.wikimedia.org/r/plugins/gitiles/operations/software/thumbor-plugins/+/refs/heads/master/wikimedia_thumbor/engine/svg/svg.py</a></li></ul> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="40"></span> <span class="k">def</span> <span class="nf">create_image</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">buffer</span><span class="p">):</span> <span class="linenos" data-line="41"></span> <span class="bp">self</span><span class="o">.</span><span class="n">prepare_source</span><span class="p">(</span><span class="n">buffer</span><span class="p">)</span> <span class="linenos" data-line="42"></span> <span class="linenos" data-line="43"></span> <span class="n">command</span> <span class="o">=</span> <span class="p">[</span> <span class="linenos" data-line="44"></span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">config</span><span class="o">.</span><span class="n">RSVG_CONVERT_PATH</span><span class="p">,</span> <span class="linenos" data-line="45"></span> <span class="bp">self</span><span class="o">.</span><span class="n">source</span><span class="p">,</span> <span class="linenos" data-line="46"></span> <span class="s1">'-u'</span><span class="p">,</span> <span class="linenos" data-line="47"></span> <span class="s1">'-f'</span><span class="p">,</span> <span class="linenos" data-line="48"></span> <span class="s1">'png'</span> <span class="linenos" data-line="49"></span> <span class="p">]</span> <span class="linenos" data-line="50"></span> <span class="linenos" data-line="51"></span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">width</span> <span class="o">></span> <span class="mi">0</span><span class="p">:</span> <span class="linenos" data-line="52"></span> <span class="n">command</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">'-w'</span><span class="p">,</span> <span class="s1">'</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">width</span><span class="p">]</span> <span class="linenos" data-line="53"></span> <span class="linenos" data-line="54"></span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">height</span> <span class="o">></span> <span class="mi">0</span><span class="p">:</span> <span class="c1"># pragma: no cover</span> <span class="linenos" data-line="55"></span> <span class="n">command</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">'-h'</span><span class="p">,</span> <span class="s1">'</span><span class="si">%d</span><span class="s1">'</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">height</span><span class="p">]</span> <span class="linenos" data-line="56"></span> <span class="linenos" data-line="57"></span> <span class="n">env</span> <span class="o">=</span> <span class="kc">None</span> <span class="linenos" data-line="58"></span> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="p">,</span> <span class="s1">'lang'</span><span class="p">):</span> <span class="linenos" data-line="59"></span> <span class="n">env</span> <span class="o">=</span> <span class="p">{</span><span class="s1">'LANG'</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">lang</span><span class="o">.</span><span class="n">upper</span><span class="p">()}</span> <span class="linenos" data-line="60"></span> <span class="linenos" data-line="61"></span> <span class="n">png</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">command</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">env</span><span class="p">)</span> <span class="linenos" data-line="62"></span> <span class="linenos" data-line="63"></span> <span class="k">return</span> <span class="nb">super</span><span class="p">(</span><span class="n">Engine</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">create_image</span><span class="p">(</span><span class="n">png</span><span class="p">)</span> </pre></div> <p>Change the above code: </p><p>Add before line 57: </p> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="p">,</span> <span class="s1">'lang'</span><span class="p">):</span> <span class="n">command</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">'-l'</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">context</span><span class="o">.</span><span class="n">request</span><span class="o">.</span><span class="n">lang</span><span class="p">]</span> </pre></div> <p>The <code>.upper()</code> is not needed; langtags are not case sensitive. Alternatively, an unspecified lang may be set to "en". </p><p>Delete lines 58–59; do not pass the langtag in the environment. </p> <div class="mw-heading mw-heading4"><h4 id="Hyphenated_langtags">Hyphenated langtags</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=275" title="Edit section: Hyphenated langtags"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T337139" class="extiw" title="phabricator:T337139"><span class="tracked-url trakfab-T337139">Task T337139</span></a></b><br /><span class="status"></span></div> <p>Hyphenated langtags show NO TEXT — not even the default text. </p><p>Apparent thumbnailer issue with librsvg 2.44.10 and Thumbor/7.3.2. </p> <dl><dt>Thumbnail for az-latn has no text</dt> <dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-latn-506px-IPv6_header-en.svg.png?20230520164902">https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-latn-506px-IPv6_header-en.svg.png?20230520164902</a></dd> <dt>Thumbnail for az has text</dt> <dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-506px-IPv6_header-en.svg.png?20230520164902">https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-506px-IPv6_header-en.svg.png?20230520164902</a></dd></dl> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 180px;"><span typeof="mw:File"><a href="/wiki/File:IPv6_header-en.svg" class="mw-file-description" title="default"><img alt="default" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/300px-IPv6_header-en.svg.png" decoding="async" width="300" height="138" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/450px-IPv6_header-en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/600px-IPv6_header-en.svg.png 2x" data-file-width="506" data-file-height="233" /></a></span></div> <div class="gallerytext">default</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 180px;"><span typeof="mw:File"><a href="/w/index.php?title=File:IPv6_header-en.svg&lang=az-latn" class="mw-file-description" title="az-latn"><img alt="az-latn" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-latn-300px-IPv6_header-en.svg.png" decoding="async" width="300" height="138" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-latn-450px-IPv6_header-en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-latn-600px-IPv6_header-en.svg.png 2x" data-file-width="506" data-file-height="233" /></a></span></div> <div class="gallerytext">az-latn</div> </li> <li class="gallerybox" style="width: 335px"> <div class="thumb" style="width: 330px; height: 180px;"><span typeof="mw:File"><a href="/w/index.php?title=File:IPv6_header-en.svg&lang=az" class="mw-file-description" title="az"><img alt="az" src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-300px-IPv6_header-en.svg.png" decoding="async" width="300" height="138" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-450px-IPv6_header-en.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/4/4c/IPv6_header-en.svg/langaz-600px-IPv6_header-en.svg.png 2x" data-file-width="506" data-file-height="233" /></a></span></div> <div class="gallerytext">az</div> </li> </ul> <div class="mw-heading mw-heading4"><h4 id="Non-English_default_langtags">Non-English default langtags</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=276" title="Edit section: Non-English default langtags"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="tracked plainlinks mw-trackedTemplate"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r914379029">Tracked in <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Phabricator" class="extiw" title="mw:Special:MyLanguage/Phabricator">Phabricator</a><br /><b><a href="https://phabricator.wikimedia.org/T337199" class="extiw" title="phabricator:T337199"><span class="tracked-url trakfab-T337199">Task T337199</span></a></b><br /><span class="status"></span></div> <p>File using non-English default language displays default language rather than English. </p> <div class="mw-heading mw-heading4"><h4 id="Unit_tests">Unit tests</h4><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=277" title="Edit section: Unit tests"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Investigate <a class="external free" href="https://gerrit.wikimedia.org/r/c/operations/software/thumbor-plugins/+/853402/">https://gerrit.wikimedia.org/r/c/operations/software/thumbor-plugins/+/853402/</a> </p><p><a rel="nofollow" class="external free" href="https://github.com/wikimedia/operations-software-thumbor-plugins/blob/master/tests/integration/test_svg.py">https://github.com/wikimedia/operations-software-thumbor-plugins/blob/master/tests/integration/test_svg.py</a> </p><p>In particular, </p> <div class="mw-highlight mw-highlight-lang-python mw-content-ltr" dir="ltr"><pre><span></span> <span class="k">def</span> <span class="nf">run_and_check_ssim_and_size</span><span class="p">(</span> <span class="bp">self</span><span class="p">,</span> <span class="n">url</span><span class="p">,</span> <span class="n">mediawiki_reference_thumbnail</span><span class="p">,</span> <span class="n">perfect_reference_thumbnail</span><span class="p">,</span> <span class="n">expected_width</span><span class="p">,</span> <span class="n">expected_height</span><span class="p">,</span> <span class="n">expected_ssim</span><span class="p">,</span> <span class="n">size_tolerance</span><span class="p">,</span> <span class="p">):</span> <span class="w"> </span><span class="sd">"""Request URL and check ssim and size.</span> <span class="sd"> Arguments:</span> <span class="sd"> url -- thumbnail URL</span> <span class="sd"> mediawiki_reference_thumbnail -- reference thumbnail file</span> <span class="sd"> expected_width -- expected thumbnail width</span> <span class="sd"> expected_height -- expected thumbnail height</span> <span class="sd"> expected_ssim -- minimum SSIM score</span> <span class="sd"> size_tolerance -- maximum file size ratio between reference and result</span> <span class="sd"> perfect_reference_thumbnail -- perfect lossless version of the target thumbnail, for visual comparison</span> <span class="sd"> """</span> <span class="k">try</span><span class="p">:</span> </pre></div> <p><a href="https://en.wikipedia.org/wiki/Structural_similarity" class="extiw" title="en:Structural similarity">Structural Similarity Index Measure (SSIM)</a>. </p><p>So make 200px × 200px images named 200px-Test_Patch_000 to 200px-Test_Patch_FFF. </p><p>Then check SSIM between those images. That will allow determining a reasonable accept/reject range. </p><p>To test default English is generated, test this SVG against the appropriate patches: </p> <div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span></span><span class="cp"><?xml version="1.0" encoding="UTF-8"?></span> <span class="nt"><svg</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://www.w3.org/2000/svg"</span><span class="w"> </span><span class="na">version=</span><span class="s">"1.1"</span><span class="w"> </span><span class="na">width=</span><span class="s">"200"</span><span class="w"> </span><span class="na">height=</span><span class="s">"200"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><switch></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#0F0"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"en"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>en<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#00F"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"fr"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>en<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#0FF"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>zh-Hans<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#F0F"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-Hans"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>zh-Hans<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#FF0"</span><span class="w"> </span><span class="na">systemLanguage=</span><span class="s">"zh-Hant"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>zh-Hant<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"><rect</span><span class="w"> </span><span class="na">width=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">height=</span><span class="s">"100%"</span><span class="w"> </span><span class="na">fill=</span><span class="s">"#F00"</span><span class="nt">></span> <span class="w"> </span><span class="nt"><title></span>default<span class="nt"></title></span> <span class="w"> </span><span class="nt"></rect></span> <span class="w"> </span><span class="nt"></switch></span> <span class="nt"></svg></span> </pre></div> <p>OK, <a href="/wiki/File:SVG_Test_System_Language.svg" title="File:SVG Test System Language.svg">File:SVG Test System Language.svg</a> produces color patches. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/wiki/File:SVG_Test_System_Language.svg" class="mw-file-description" title="default should produce  0F0 Green  FAIL"><img alt="default should produce  0F0 Green  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">default should produce <span style="background-color:#0F0;border:1px solid darkgray;" title="#0F0"> 0F0 Green </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=en" class="mw-file-description" title="en should produce  0F0 Green  FAIL"><img alt="en should produce  0F0 Green  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">en should produce <span style="background-color:#0F0;border:1px solid darkgray;" title="#0F0"> 0F0 Green </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=fr" class="mw-file-description" title="fr should produce  00F Blue "><img alt="fr should produce  00F Blue " src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">fr should produce <span style="background-color:#00F;border:1px solid darkgray;" title="#00F"> 00F Blue </span></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=und" class="mw-file-description" title="und should produce  F00 Red "><img alt="und should produce  F00 Red " src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langund-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langund-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langund-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">und should produce <span style="background-color:#F00;border:1px solid darkgray;" title="#F00"> F00 Red </span></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=en-gb" class="mw-file-description" title="en-gb should produce  F00 Red  FAIL"><img alt="en-gb should produce  F00 Red  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langen-gb-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langen-gb-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langen-gb-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">en-gb should produce <span style="background-color:#F00;border:1px solid darkgray;" title="#F00"> F00 Red </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=fr-it" class="mw-file-description" title="fr-it should produce  F00 Red  FAIL"><img alt="fr-it should produce  F00 Red  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-it-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-it-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langfr-it-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">fr-it should produce <span style="background-color:#F00;border:1px solid darkgray;" title="#F00"> F00 Red </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=zh-tw" class="mw-file-description" title="zh-tw should produce  F00 Red  FAIL"><img alt="zh-tw should produce  F00 Red  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-tw-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-tw-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-tw-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">zh-tw should produce <span style="background-color:#F00;border:1px solid darkgray;" title="#F00"> F00 Red </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=zh" class="mw-file-description" title="zh should produce any of 3:  0FF ,  F0F ,  FF0 "><img alt="zh should produce any of 3:  0FF ,  F0F ,  FF0 " src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">zh should produce any of 3: <span style="background-color:#0FF;border:1px solid darkgray;" title="#0FF"> 0FF </span>, <span style="background-color:#F0F;border:1px solid darkgray;" title="#F0F"> F0F </span>, <span style="background-color:#FF0;border:1px solid darkgray;" title="#FF0"> FF0 </span></div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=zh-hans" class="mw-file-description" title="zh-hans  F0F  FAIL"><img alt="zh-hans  F0F  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hans-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hans-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hans-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">zh-hans <span style="background-color:#F0F;border:1px solid darkgray;" title="#F0F"> F0F </span> FAIL</div> </li> <li class="gallerybox" style="width: 155px"> <div class="thumb" style="width: 150px; height: 150px;"><span typeof="mw:File"><a href="/w/index.php?title=File:SVG_Test_System_Language.svg&lang=zh-hant" class="mw-file-description" title="zh-hant  FF0  FAIL"><img alt="zh-hant  FF0  FAIL" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hant-120px-SVG_Test_System_Language.svg.png" decoding="async" width="120" height="120" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hant-180px-SVG_Test_System_Language.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/c/c8/SVG_Test_System_Language.svg/langzh-hant-240px-SVG_Test_System_Language.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span></div> <div class="gallerytext">zh-hant <span style="background-color:#FF0;border:1px solid darkgray;" title="#FF0"> FF0 </span> FAIL</div> </li> </ul> <p>During an upgrade, Thumbor started producing incorrect thumbnails. See <a href="https://phabricator.wikimedia.org/T335361" class="extiw" title="phab:T335361">Phab:T335361</a>. That problem (<code>$LANG</code> versus <code>$LC_ALL</code>) was fixed. No unit tests were added, and it may be that WMF does not subject Thumbor to unit tests. </p><p>Generally, there should be unit tests for <code>librsvg</code> to make sure it does its job. In additions, there should be unit tests for the SVG thumbnailing code (the standard method and Thumbor). The later tests are needed to make sure that the language is properly communicated to <code>librsvg</code>. That mechanism will fail again soon. </p><p>The reason is Thumbor 7.3.2 is using <code>librsvg v2.44</code>. IIRC, that version still uses Unix environment variables to communicate the system language. (There may also be problems with hyphenated language tags: Unix may not understand the locale string <code>sr-Latn</code> or <code>zh-Hans</code>.) In later versions of <code>librsvg</code>, the system language should be passed through the <code>--accept-language</code> command line argument. Without valid unit tests, Thumbor may again quietly fail. </p><p>Where was the Phabricator issue that addressed environment variables? </p><p>Cannot set <code>lang</code> for <code>filepath</code> </p> <ul><li><code>{{filepath:Multilingual SVG example.svg|nowiki}}</code> → <dl><dd>https://upload.wikimedia.org/wikipedia/commons/1/1e/Multilingual_SVG_example.svg</dd></dl></li> <li><code>{{filepath:Multilingual SVG example.svg|800}}</code> → <dl><dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/800px-Multilingual_SVG_example.svg.png">https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/800px-Multilingual_SVG_example.svg.png</a></dd></dl></li> <li><code>{{filepath:Multilingual SVG example.svg|langzh-800}}</code> → (fails) <dl><dd><a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/1/1e/Multilingual_SVG_example.svg">https://upload.wikimedia.org/wikipedia/commons/1/1e/Multilingual_SVG_example.svg</a></dd></dl></li></ul> <p>Workaround: generate the filepath for 800px and then replace "/800px" with "/langXX-800px". </p><p>Try OCR </p> <ul><li>test German <dl><dd><a rel="nofollow" class="external free" href="https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/langde-800px-Multilingual_SVG_example.svg.png&lang=de">https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/langde-800px-Multilingual_SVG_example.svg.png&lang=de</a> → <dl><dd><div class="mw-highlight mw-highlight-lang-json mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span><span class="nt">"image"</span><span class="p">:</span><span class="s2">"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1e\/Multilingual_SVG_example.svg\/langde-800px-Multilingual_SVG_example.svg.png"</span><span class="p">,</span><span class="nt">"engine"</span><span class="p">:</span><span class="s2">"google"</span><span class="p">,</span><span class="nt">"langs"</span><span class="p">:[</span><span class="s2">"de"</span><span class="p">],</span><span class="nt">"psm"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="nt">"crop"</span><span class="p">:[],</span><span class="nt">"image_hosts"</span><span class="p">:[</span><span class="s2">"upload.wikimedia.org"</span><span class="p">,</span><span class="s2">"upload.wikimedia.beta.wmflabs.org"</span><span class="p">],</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"Liebe geht\ndurch den Magen."</span><span class="p">}</span> </pre></div></dd> <dd>→ "Liebe geht\ndurch den Magen."</dd></dl></dd></dl></li> <li>test French <dl><dd><a rel="nofollow" class="external free" href="https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/langfr-800px-Multilingual_SVG_example.svg.png&lang=fr">https://ocr.wmcloud.org/api.php?engine=google&image=https://upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Multilingual_SVG_example.svg/langfr-800px-Multilingual_SVG_example.svg.png&lang=fr</a> → <dl><dd><div class="mw-highlight mw-highlight-lang-json mw-content-ltr" dir="ltr"><pre><span></span><span class="p">{</span><span class="nt">"image"</span><span class="p">:</span><span class="s2">"https:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/1\/1e\/Multilingual_SVG_example.svg\/langfr-800px-Multilingual_SVG_example.svg.png"</span><span class="p">,</span><span class="nt">"engine"</span><span class="p">:</span><span class="s2">"google"</span><span class="p">,</span><span class="nt">"langs"</span><span class="p">:[</span><span class="s2">"fr"</span><span class="p">],</span><span class="nt">"psm"</span><span class="p">:</span><span class="mi">3</span><span class="p">,</span><span class="nt">"crop"</span><span class="p">:[],</span><span class="nt">"image_hosts"</span><span class="p">:[</span><span class="s2">"upload.wikimedia.org"</span><span class="p">,</span><span class="s2">"upload.wikimedia.beta.wmflabs.org"</span><span class="p">],</span><span class="nt">"text"</span><span class="p">:</span><span class="s2">"L'amour passe\npar l'estomac."</span><span class="p">}</span> </pre></div></dd> <dd>→ "L'amour passe\npar l'estomac."</dd></dl></dd></dl></li></ul> <div class="mw-heading mw-heading2"><h2 id="Interest">Interest</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=278" title="Edit section: Interest"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li>signs of the <a rel="nofollow" class="external text" href="https://www.ris.bka.gv.at/Dokumente/BgblPdf/1997_101_2/1997_101_2.pdf">austrian KennV Regulation</a></li> <li><a href="/wiki/Category:Kennzeichnungsverordnung" title="Category:Kennzeichnungsverordnung">Category:Kennzeichnungsverordnung</a></li> <li>Allied Shipping Losses. See <a rel="nofollow" class="external free" href="https://www.youtube.com/watch?v=gp5diNUq-rU&t=1m37s">https://www.youtube.com/watch?v=gp5diNUq-rU&t=1m37s</a> at 1:37. Should be bar chart. Events should be lines.</li></ul> <div class="mw-heading mw-heading2"><h2 id="HTML_5">HTML 5</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=279" title="Edit section: HTML 5"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Wikitext supports some HTML markup. </p> <table class="wikitable"> <caption>Wikitext Support </caption> <tbody><tr> <th>Tag</th> <th>Supported</th> <th>Markup</th> <th>Result</th> <th>Comment </th></tr> <tr> <td>abbr</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><abbr title="abbreviation">abbr</abbr></code></td> <td><abbr title="abbreviation">abbr</abbr></td> <td>abbreviations </td></tr> <tr> <td>acronym</td> <td><strong style="padding:0 .3em;color:#F60001"><span class="mw-default-size" typeof="mw:File"><span title="No"><img alt="✘" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/20px-OOjs_UI_icon_close-ltr-destructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/30px-OOjs_UI_icon_close-ltr-destructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/40px-OOjs_UI_icon_close-ltr-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[No]</span></strong></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><acronym title="Central Intelligence Agency">CIA</acronym></code></td> <td><acronym title="Central Intelligence Agency">CIA</acronym></td> <td>deprecated </td></tr> <tr> <td>address</td> <td><strong style="padding:0 .3em;color:#F60001"><span class="mw-default-size" typeof="mw:File"><span title="No"><img alt="✘" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/20px-OOjs_UI_icon_close-ltr-destructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/30px-OOjs_UI_icon_close-ltr-destructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/40px-OOjs_UI_icon_close-ltr-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[No]</span></strong></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><address>123 Main St.</address></code></td> <td><address>123 Main St.</address></td> <td> </td></tr> <tr> <td>aside</td> <td><strong style="padding:0 .3em;color:#F60001"><span class="mw-default-size" typeof="mw:File"><span title="No"><img alt="✘" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/20px-OOjs_UI_icon_close-ltr-destructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/30px-OOjs_UI_icon_close-ltr-destructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/40px-OOjs_UI_icon_close-ltr-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[No]</span></strong></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><aside>margin comment</aside></code></td> <td><aside>margin comment</aside></td> <td> </td></tr> <tr> <td>cite</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><cite>Knuth1973</cite></code></td> <td><cite>Knuth1973</cite></td> <td>usage advice varies </td></tr> <tr> <td>code</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><code>x = 3;</code></code></td> <td><code>x = 3;</code></td> <td> </td></tr> <tr> <td>data</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><data value="17" title="value is 17">data</data></code></td> <td><data value="17" title="value is 17">data</data></td> <td> </td></tr> <tr> <td>details</td> <td><strong style="padding:0 .3em;color:#F60001"><span class="mw-default-size" typeof="mw:File"><span title="No"><img alt="✘" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/20px-OOjs_UI_icon_close-ltr-destructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/30px-OOjs_UI_icon_close-ltr-destructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/40px-OOjs_UI_icon_close-ltr-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[No]</span></strong></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><details><summary>summary</summary> The details.</details></code></td> <td><details><summary>summary</summary> The details.</details></td> <td> </td></tr> <tr> <td>kbd</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><kbd>ls *</kbd></code></td> <td><kbd>ls *</kbd></td> <td>keyboard input </td></tr> <tr> <td>mark</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><mark>highlight</mark></code></td> <td><mark>highlight</mark></td> <td>highlight </td></tr> <tr> <td>q</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><q>quotation</q></code></td> <td><q>quotation</q></td> <td>quotations </td></tr> <tr> <td>rp</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"></code></td> <td>Example</td> <td>part of ruby markup </td></tr> <tr> <td>ruby</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"></code></td> <td>Example</td> <td> </td></tr> <tr> <td>samp</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><samp>Hello, world!</samp></code></td> <td><samp>Hello, world!</samp></td> <td>sample output </td></tr> <tr> <td>time</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><time datetime="12:00" title="12:00">noon</time></code></td> <td><time datetime="12:00" title="12:00">noon</time></td> <td> </td></tr> <tr> <td>var</td> <td><span class="mw-default-size" typeof="mw:File"><span title="OK"><img alt="✓" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/20px-OOjs_UI_icon_check-constructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/30px-OOjs_UI_icon_check-constructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/OOjs_UI_icon_check-constructive.svg/40px-OOjs_UI_icon_check-constructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[OK]</span></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><var>T</var></code></td> <td><var>T</var></td> <td>mark variables </td></tr> <tr> <td>style</td> <td><strong style="padding:0 .3em;color:#F60001"><span class="mw-default-size" typeof="mw:File"><span title="No"><img alt="✘" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/20px-OOjs_UI_icon_close-ltr-destructive.svg.png" decoding="async" width="20" height="20" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/30px-OOjs_UI_icon_close-ltr-destructive.svg.png 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/OOjs_UI_icon_close-ltr-destructive.svg/40px-OOjs_UI_icon_close-ltr-destructive.svg.png 2x" data-file-width="20" data-file-height="20" /></span></span><span style="display:none">[No]</span></strong></td> <td><code class="mw-highlight mw-content-ltr" dir="ltr"><style> /* CSS */ </style></code></td> <td><style> /* CSS */ </style></td> <td> </td></tr></tbody></table> <ul><li><rp>rp</rp> (rp should disappear; part of ruby)</li> <li><ruby>ruby  <rp>(</rp><rt>text</rt><rp>)</rp> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp>字 <rp>(</rp><rt>ji</rt><rp>)</rp></ruby></li></ul> <p>Try <code>figure</code> and <code>figcaption</code> (not recognized). <figure> </p> <p>figure content...</p> <p><figcaption>Caption content</figcaption> </figure> </p><p>Using <code>tag</code> magic word:<br /> <figure id="gizmo">foolishness</figure> </p><p>There is also the <code>picture</code> element with required <code>img</code> element. </p> <div class="mw-heading mw-heading2"><h2 id="MediaWiki_hacks">MediaWiki hacks</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=280" title="Edit section: MediaWiki hacks"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="mw-heading mw-heading3"><h3 id="Basics">Basics</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=281" title="Edit section: Basics"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Template:Igen" class="mw-redirect" title="Template:Igen"><span style="font-family:monospace,monospace;">{{Igen}}</span></a></li> <li><a href="/wiki/Template:Key_press" title="Template:Key press"><span style="font-family:monospace,monospace;">{{Key press}}</span></a> → <kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">A</kbd>, <kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">Ctrl</kbd>+<kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">F</kbd>, <kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">Ctrl</kbd>+<kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">alt</kbd>+<kbd class="keyboard-key nowrap" style="border:1px solid #aaa;border-radius:.2em;-moz-box-shadow:.1em .1em .2em rgba(0,0,0,.1);-webkit-box-shadow:.1em .1em .2em rgba(0,0,0,.1);box-shadow:.1em .1em .2em rgba(0,0,0,.1);background:#f9f9f9;background-image:-moz-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-o-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:-webkit-linear-gradient(top,#eee,#f9f9f9,#eee);background-image:linear-gradient(to bottom,#eee,#f9f9f9,#eee);padding:.1em .3em;font-family:inherit;font-size:.85em">delete</kbd></li> <li><a href="/wiki/Template:Language" title="Template:Language"><span style="font-family:monospace,monospace;">{{Language}}</span></a> → English, German, Russian, Traditional Chinese</li> <li>{{#language: ... }} → English, Deutsch, русский, 中文(繁體) <dl><dd>language in English: Russian, language in Spanish: ruso</dd></dl></li> <li>{{#expr: ... }} → 4, 3.14</li> <li><a href="/wiki/Template:Published" title="Template:Published"><span style="font-family:monospace,monospace;">{{Published}}</span></a></li> <li>{{#dir:en}} → ltr</li> <li>{{#dir:ar}} → rtl</li></ul> <div class="mw-heading mw-heading3"><h3 id="Wikidata">Wikidata</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=282" title="Edit section: Wikidata"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="https://www.wikidata.org/wiki/Property:P625" class="extiw" title="d:Property:P625"><span title="geocoordinates of the subject. For Earth, please note that only WGS84 coordinating system is supported at the moment">coordinate location <small>(P625)</small></span></a> for <a href="https://www.wikidata.org/wiki/Q131305" class="extiw" title="d:Q131305"><span title="coral island in the central Pacific Ocean; unincorporated, unorganized territory of the United States of America">Howland Island <small>(Q131305)</small></span></a> <dl><dd>{{#property:P625|from=Q131305}} → 0°48'24"N, 176°36'59"W</dd> <dd><a href="/wiki/Template:Data" title="Template:Data"><span style="font-family:monospace,monospace;">{{Data}}</span></a> {{Data|item=Q131305|property=P625|displayformat=latitude}} → 0.80666666666667</dd> <dd><a href="/wiki/Template:Data" title="Template:Data"><span style="font-family:monospace,monospace;">{{Data}}</span></a> {{Data|item=Q131305|property=P625|displayformat=longitude}} → -176.61638888889</dd></dl></li> <li>See <a class="external free" href="https://www.mediawiki.org/wiki/Wikibase/Notes/Inclusion_syntax">https://www.mediawiki.org/wiki/Wikibase/Notes/Inclusion_syntax</a></li> <li>For quantities, we run into Wikidata language issues: properties are not expected to be qualified by language. Consider <a href="https://www.wikidata.org/wiki/Q828224" class="extiw" title="d:Q828224"><span title="SI unit of length equal to one thousand metres">kilometre <small>(Q828224)</small></span></a> (<a href="https://www.wikidata.org/wiki/Q828224" class="extiw" title="d:Q828224"><span title="SI unit of length equal to one thousand metres">километр <small>(Q828224)</small></span></a>) and <a href="https://www.wikidata.org/wiki/Property:P5061" class="extiw" title="d:Property:P5061"><span title="abbreviation of a unit for each language; if not provided, then it should default to English">unit symbol <small>(P5061)</small></span></a> <dl><dd>Get the <a href="https://www.wikidata.org/wiki/Property:P5061" class="extiw" title="d:Property:P5061"><span title="abbreviation of a unit for each language; if not provided, then it should default to English">unit symbol <small>(P5061)</small></span></a> for <a href="https://www.wikidata.org/wiki/Q828224" class="extiw" title="d:Q828224"><span title="SI unit of length equal to one thousand metres">kilometre <small>(Q828224)</small></span></a> (need to qualify it by language) <dl><dd>{{#property:P5061|from=Q828224}} → km, كم, км, کیلومتر, ק"מ, 公里, কি.মি., км, കി.മീ., км, 千米, კმ, கி.மீ., 粁, キロメートル, km, km, km, km, km, քմ, км, km, км, χλμ, km, km, km, կմ, km, km, km, км</dd> <dd>try with Data to impose selection: <bdi lang="en">km</bdi>, <bdi lang="ar">كم</bdi>, <bdi lang="ru">км</bdi>, <bdi lang="fa">کیلومتر</bdi>, <bdi lang="he">ק"מ</bdi>, <bdi lang="zh">公里</bdi>, <bdi lang="bn">কি.মি.</bdi>, <bdi lang="mk">км</bdi>, <bdi lang="ml">കി.മീ.</bdi>, <bdi lang="uk">км</bdi>, <bdi lang="zh-cn">千米</bdi>, <bdi lang="ka">კმ</bdi>, <bdi lang="ta">கி.மீ.</bdi>, <bdi lang="ja">粁</bdi>, <bdi lang="ja">キロメートル</bdi>, <bdi lang="ro">km</bdi>, <bdi lang="ca">km</bdi>, <bdi lang="az">km</bdi>, <bdi lang="sl">km</bdi>, <bdi lang="ast">km</bdi>, <bdi lang="hyw">քմ</bdi>, <bdi lang="tg">км</bdi>, <bdi lang="nb">km</bdi>, <bdi lang="be">км</bdi>, <bdi lang="el">χλμ</bdi>, <bdi lang="lt">km</bdi>, <bdi lang="bg">km</bdi>, <bdi lang="mul">km</bdi>, <bdi lang="hy">կմ</bdi>, <bdi lang="ang">km</bdi>, <bdi lang="pap">km</bdi>, <bdi lang="lb">km</bdi> and <bdi lang="be-tarask">км</bdi></dd></dl></dd> <dd>it may also make more sense to qualify by script rather than language.</dd> <dd><a href="https://www.wikidata.org/wiki/Property:P416" class="extiw" title="d:Property:P416"><span title="symbol for a mathematical or physical quantity">quantity symbol (string) <small>(P416)</small></span></a> for <a href="https://www.wikidata.org/wiki/Q1111" class="extiw" title="d:Q1111"><span title="physical property that quantifies an object's interaction with electric fields">electric charge <small>(Q1111)</small></span></a>: q, Q</dd> <dd><a href="https://www.wikidata.org/wiki/Property:P7973" class="extiw" title="d:Property:P7973"><span title="symbol for a mathematical or physical quantity in LaTeX">quantity symbol (LaTeX) <small>(P7973)</small></span></a> for <a href="https://www.wikidata.org/wiki/Q76379025" class="extiw" title="d:Q76379025"><span title="physical quantity">mass fraction of water <small>(Q76379025)</small></span></a>: w_{\mathrm{H}_2\mathrm{O}}</dd></dl></li></ul> <div class="mw-heading mw-heading3"><h3 id="Magic_words">Magic words</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=283" title="Edit section: Magic words"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="https://www.mediawiki.org/wiki/Help:Magic_words" class="extiw" title="mw:Help:Magic words">Magic words</a> </p> <ul><li>146,124,602 pages</li> <li>106,931,717 articles</li> <li>111,143,706 files</li> <li>13,061,259 users</li> <li>36,763 active users → Users who have performed an action in the last 30 days</li> <li>180 admins</li></ul> <p>Page names </p> <ul><li>FULLPAGENAME → User:Glrx</li> <li>PAGENAME → Glrx <dl><dd>is this what <code>var title = mw.config.get('wgTitle');</code> obtains?</dd></dl></li></ul> <p>Getting an associated page... </p> <ul><li>TALKPAGENAME (useful on file and article pages) → User talk:Glrx</li> <li>SUBJECTPAGENAME and ARTICLEPAGENAME (useful on talk pages) → User:Glrx</li></ul> <p>The base page name goes up one level in the hierarchy. Consider the magic word BASEPAGENAME → Glrx </p> <ul><li>on <a class="mw-selflink selflink">User:Glrx</a> → Glrx</li> <li>on <a href="/wiki/User_talk:Glrx" title="User talk:Glrx">User talk:Glrx</a> → Glrx</li> <li>on <a href="/wiki/File:Foo.jpg" title="File:Foo.jpg">File:Foo.jpg</a> expect Foo.jpg</li> <li>on <a href="/wiki/File_talk:Foo.jpg" title="File talk:Foo.jpg">File talk:Foo.jpg</a> expect Foo.jpg</li></ul> <p>Magic words and parser functions. </p><p>Expensive parser tests: </p><p>Possible to find the number of bytes in an image? </p> <ul><li><code>{{PAGESIZE:{{FULLPAGENAME}}</code> → 366,097</li> <li><code>{{PAGESIZE:File:Silversmith.jpg}}</code> → 2,950 (size of description page)</li> <li><code>{{PAGESIZE:Media:Silversmith.jpg}}</code> → 0 (media does not work)</li> <li><code>{{filepath:Silversmith.jpg}}</code> → <a class="external free" href="https://upload.wikimedia.org/wikipedia/commons/4/41/Silversmith.jpg">https://upload.wikimedia.org/wikipedia/commons/4/41/Silversmith.jpg</a></li> <li><code>{{PAGESIZE:{{filepath:Silversmith.jpg}}}}</code> → 0</li></ul> <p>Of course, an API call works, but that is not wiki text </p> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/api.php?action=query&format=json&prop=imageinfo&iiprop=size&titles=File:Silversmith.jpg">https://commons.wikimedia.org/w/api.php?action=query&format=json&prop=imageinfo&iiprop=size&titles=File:Silversmith.jpg</a></li></ul> <p>language </p> <ul><li>{{#language:sr-ec}} → српски (ћирилица)</li> <li>{{language|sr-ec}} → Serbian (Cyrillic script)</li></ul> <p><a href="https://phabricator.wikimedia.org/T366623" class="extiw" title="phab:T366623">Phab:T366623</a>: </p> <ul><li><a href="/wiki/Template:BCP47" title="Template:BCP47"><span style="font-family:monospace,monospace;">{{BCP47}}</span></a> template maps wiki language to IETF langtag. {{BCP47|sr-ec}} → sr-Cyrl.</li> <li>Proposed parser function {{#bcp47:simple}} → en-simple</li></ul> <p><a href="https://phabricator.wikimedia.org/T310581" class="extiw" title="phab:T310581">Phab:T310581</a> </p> <ul><li>Lua <code>LanguageCode::bcp47()</code></li> <li>Invoking Lua</li></ul> <p><a href="https://phabricator.wikimedia.org/T359761" class="extiw" title="phab:T359761">Phab:T359761</a> </p> <ul><li>Proposed parser function {{#dir:ar}} → rtl</li></ul> <div class="mw-heading mw-heading3"><h3 id="MediaWiki_Common.js">MediaWiki Common.js</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=284" title="Edit section: MediaWiki Common.js"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See <a href="https://www.mediawiki.org/wiki/Manual:Interface/JavaScript" class="extiw" title="mw:Manual:Interface/JavaScript">MW:Manual:Interface/JavaScript</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Sets_of_numbers">Sets of numbers</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=285" title="Edit section: Sets of numbers"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>See also <a href="https://www.wikidata.org/wiki/Help:Data_type" class="extiw" title="d:Help:Data type">d:Help:Data type</a>. </p> <table class="wikitable"> <caption>Wikidata Sets of Numbers </caption> <tbody><tr> <th>Wikidata Item</th> <th><a href="https://www.wikidata.org/wiki/Property:P1993" class="extiw" title="d:Property:P1993"><span title="string to show a concept in TeX or LaTeX">TeX string <small>(P1993)</small></span></a></th> <th><a href="https://www.wikidata.org/wiki/Property:P487" class="extiw" title="d:Property:P487"><span title="Unicode character representing the item">Unicode character <small>(P487)</small></span></a></th> <th><a href="https://www.wikidata.org/wiki/Property:P2534" class="extiw" title="d:Property:P2534"><span title="mathematical formula representing a theorem or law">defining formula <small>(P2534)</small></span></a></th> <th><a href="https://www.wikidata.org/wiki/Property:P7235" class="extiw" title="d:Property:P7235"><span title="any symbol used in the defining formula (P2534)">in defining formula <small>(P7235)</small></span></a></th> <th><a href="https://www.wikidata.org/wiki/Property:P913" class="extiw" title="d:Property:P913"><span title="mathematical notation or another symbol">notation <small>(P913)</small></span></a> </th></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q26851286" class="extiw" title="d:Q26851286"><span title="set of numbers">set of complex numbers <small>(Q26851286)</small></span></a></td> <td>\mathbb{C}</td> <td>ℂ</td> <td></td> <td></td> <td> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q1174982" class="extiw" title="d:Q1174982"><span title="set whose elements are the real numbers">set of real numbers <small>(Q1174982)</small></span></a></td> <td>\reals, \mathbb{R}</td> <td>ℝ</td> <td></td> <td></td> <td> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q47005650" class="extiw" title="d:Q47005650"><span title="set of number that can be expressed as the quotient of two integers">set of rational numbers <small>(Q47005650)</small></span></a></td> <td></td> <td>ℚ</td> <td></td> <td></td> <td> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q47007735" class="extiw" title="d:Q47007735"><span title="the set of all integers">set of integers <small>(Q47007735)</small></span></a></td> <td></td> <td>ℤ</td> <td>\mathbb{Z} = \{\ldots, -2, -1, 0, 1, 2, \ldots\}</td> <td>\mathbb{Z}</td> <td> </td></tr> <tr> <td><a href="https://www.wikidata.org/wiki/Q28777634" class="extiw" title="d:Q28777634"><span title="the set of positive integers and zero">set of non-negative integers <small>(Q28777634)</small></span></a></td> <td></td> <td>ℕ</td> <td>\mathbb{N}_0 = \{0, 1, 2, 3, \ldots\}</td> <td>\mathbb{N}_0</td> <td>ℕ </td></tr></tbody></table> <ul><li>Try using the TeX strings <dl><dd>Works: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=e^{x}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=e^{x}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/de8cc7dfc048bf7d883517d82fdf2f5689d5d8d6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.684ex; height:2.343ex;" alt="{\displaystyle x=e^{x}}"></span></dd> <dd>Works: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle x=e^{x}}"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>x</mi> <mo>=</mo> <msup> <mi>e</mi> <mrow class="MJX-TeXAtom-ORD"> <mi>x</mi> </mrow> </msup> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle x=e^{x}}</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/de8cc7dfc048bf7d883517d82fdf2f5689d5d8d6" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:6.684ex; height:2.343ex;" alt="{\displaystyle x=e^{x}}"></span></dd> <dd>Works: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {C} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">C</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbb {C} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f9add4085095b9b6d28d045fd9c92c2c09f549a7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.678ex; height:2.176ex;" alt="{\displaystyle \mathbb {C} }"></span></dd> <dd>Works: <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle \mathbb {C} }"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mrow class="MJX-TeXAtom-ORD"> <mi mathvariant="double-struck">C</mi> </mrow> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle \mathbb {C} }</annotation> </semantics> </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f9add4085095b9b6d28d045fd9c92c2c09f549a7" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.338ex; width:1.678ex; height:2.176ex;" alt="{\displaystyle \mathbb {C} }"></span> (spaces required!)</dd> <dd>Fails: <strong class="error texerror">Failed to parse (syntax error): {\displaystyle \mathbb&#123;C&#125; }</strong> <ul><li>Problem is the Wikidata string has XML entity text (rather than the Unicode brace characters)</li></ul></dd> <dd>Fails: <strong class="error texerror">Failed to parse (syntax error): {\displaystyle \mathbb&#123;C&#125; }</strong> (subst)</dd> <dd>Fails: <strong class="error texerror">Failed to parse (syntax error): {\displaystyle \mathbb&#123;C&#125; }</strong> (safesubst)</dd></dl></li></ul> <div class="mw-heading mw-heading3"><h3 id="KML_and_geoshape_files">KML and geoshape files</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=286" title="Edit section: KML and geoshape files"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump&diff=810358271&oldid=810213904#Show_red_line_for_road_on_infobox">https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump&diff=810358271&oldid=810213904#Show_red_line_for_road_on_infobox</a> </p><p>About adding lines to a map using a <a href="https://www.wikidata.org/wiki/Property:P3096" class="extiw" title="d:Property:P3096"><span title="item with sitelinks to wikimedia page containing text of a relevant KML file">KML file <small>(P3096)</small></span></a>; e.g., <a href="https://en.wikipedia.org/wiki/Template:Attached_KML/Forrest_Highway" class="extiw" title="en:Template:Attached KML/Forrest Highway">en:Template:Attached KML/Forrest Highway</a>. </p> <ul><li><a href="https://www.wikidata.org/wiki/Q1437953" class="extiw" title="d:Q1437953"><span title="highway in Western Australia">Forrest Highway <small>(Q1437953)</small></span></a> → Forrest Highway (Q1437953) <ul><li>fetch property <a href="https://www.wikidata.org/wiki/Property:P3096" class="extiw" title="d:Property:P3096"><span title="item with sitelinks to wikimedia page containing text of a relevant KML file">KML file <small>(P3096)</small></span></a> from <a href="https://www.wikidata.org/wiki/Q1437953" class="extiw" title="d:Q1437953"><span title="highway in Western Australia">Forrest Highway <small>(Q1437953)</small></span></a> →Template:Attached KML/Forrest Highway</li></ul></li></ul> <p>Alternative is <a href="https://www.wikidata.org/wiki/Property:P3896" class="extiw" title="d:Property:P3896"><span title="geographic data from Wikimedia Commons">geoshape <small>(P3896)</small></span></a> and GeoJSON; property type is geo-shape; e.g., <a href="/wiki/Data:Uzbekistan/Tashkent_City.map" title="Data:Uzbekistan/Tashkent City.map">Data:Uzbekistan/Tashkent City.map</a>. </p> <ul><li><a href="https://www.wikidata.org/wiki/Q269" class="extiw" title="d:Q269"><span title="capital of Uzbekistan">Tashkent <small>(Q269)</small></span></a> <ul><li>fetch property <a href="https://www.wikidata.org/wiki/Property:P3896" class="extiw" title="d:Property:P3896"><span title="geographic data from Wikimedia Commons">geoshape <small>(P3896)</small></span></a> from <a href="https://www.wikidata.org/wiki/Q269" class="extiw" title="d:Q269"><span title="capital of Uzbekistan">Tashkent <small>(Q269)</small></span></a> →Data:Uzbekistan/Tashkent City.map</li></ul></li></ul> <div class="mw-heading mw-heading3"><h3 id="Image_cropping">Image cropping</h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=287" title="Edit section: Image cropping"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p><a href="/wiki/Template:CSS_image_crop" title="Template:CSS image crop"><span style="font-family:monospace,monospace;">{{CSS image crop}}</span></a> </p> <div class="mw-highlight mw-content-ltr" dir="ltr"><pre>{{CSS image crop |Image = Helix, v.4, no.10, Oct. 10, 1968 - DPLA - c0c34376a3f9eab625c173e036b6238c (page 20).jpg |bSize = 2400 |cWidth = 200 |cHeight = 100 |oTop = 3000 |oLeft = 1950 |Location = right |Description = The signature }}</pre></div> <div class="mw-heading mw-heading2"><h2 id="Playing_cards">Playing cards</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=288" title="Edit section: Playing cards"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Category:SVG_playing_cards_6" title="Category:SVG playing cards 6">Category:SVG playing cards 6</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Sewing_machines">Sewing machines</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=289" title="Edit section: Sewing machines"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Chain stitch. Lock stitch. Commons has illustrations and animations. We should show more details. </p> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Chainstitch1.gif" class="mw-file-description" title="chain stitch"><img alt="chain stitch" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Chainstitch1.gif/320px-Chainstitch1.gif" decoding="async" width="320" height="213" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Chainstitch1.gif/480px-Chainstitch1.gif 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Chainstitch1.gif/640px-Chainstitch1.gif 2x" data-file-width="1800" data-file-height="1200" /></a></span></div> <div class="gallerytext">chain stitch</div> </li> <li class="gallerybox" style="width: 355px"> <div class="thumb" style="width: 350px; height: 350px;"><span typeof="mw:File"><a href="/wiki/File:Lockstitch.gif" class="mw-file-description" title="lock stitch"><img alt="lock stitch" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Lockstitch.gif/268px-Lockstitch.gif" decoding="async" width="268" height="320" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Lockstitch.gif/402px-Lockstitch.gif 1.5x, https://upload.wikimedia.org/wikipedia/commons/8/87/Lockstitch.gif 2x" data-file-width="419" data-file-height="500" /></a></span></div> <div class="gallerytext">lock stitch</div> </li> </ul> <ul><li class="mw-empty-elt"></li> <li><a rel="nofollow" class="external text" href="https://www.youtube.com/watch?v=RQYuyHNLPTQ">The Surprising Genius of Sewing Machines</a>, Veritasium, 22 November 2023. History, patents, animations.</li></ul> <div class="mw-heading mw-heading2"><h2 id="Controversy">Controversy</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=290" title="Edit section: Controversy"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul class="gallery mw-gallery-traditional"> <li class="gallerybox" style="width: 435px"> <div class="thumb" style="width: 430px; height: 630px;"><span typeof="mw:File"><a href="/wiki/File:Evolution_of_Hindu-Arabic_numerals.jpg" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Evolution_of_Hindu-Arabic_numerals.jpg/400px-Evolution_of_Hindu-Arabic_numerals.jpg" decoding="async" width="400" height="495" class="mw-file-element" srcset="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Evolution_of_Hindu-Arabic_numerals.jpg/600px-Evolution_of_Hindu-Arabic_numerals.jpg 1.5x, https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Evolution_of_Hindu-Arabic_numerals.jpg/800px-Evolution_of_Hindu-Arabic_numerals.jpg 2x" data-file-width="881" data-file-height="1091" /></a></span></div> <div class="gallerytext"></div> </li> </ul> <ul><li><a class="external free" href="https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump%2FCopyright&diff=844603515&oldid=844258821#History_of_Hindu%E2%80%93Arabic_numerals_images_are_almost_certainly_copyright_violation">https://commons.wikimedia.org/w/index.php?title=Commons%3AVillage_pump%2FCopyright&diff=844603515&oldid=844258821#History_of_Hindu%E2%80%93Arabic_numerals_images_are_almost_certainly_copyright_violation</a></li> <li><a href="https://en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system" class="extiw" title="w:Hindu–Arabic numeral system">w:Hindu–Arabic numeral system</a></li> <li><a href="https://en.wikipedia.org/wiki/Brahmic_scripts" class="extiw" title="w:Brahmic scripts">w:Brahmic scripts</a> at §Numbers</li> <li><a rel="nofollow" class="external free" href="https://archive.org/details/numberwordsnumbe00menn/page/418/mode/1up">https://archive.org/details/numberwordsnumbe00menn/page/418/mode/1up</a></li></ul> <p>Unicode </p> <table class="wikitable"> <caption>Numerals </caption> <tbody><tr> <th>Digits</th> <th>Language</th> <th>Comments </th></tr> <tr> <td></td> <td>Shang numerals</td> <td> </td></tr> <tr> <td>𑁒𑁓𑁔𑁕𑁖𑁗𑁘𑁙𑁚</td> <td>Bhrami numerals</td> <td>no zero </td></tr> <tr> <td></td> <td>Indian (Gvalior)</td> <td> </td></tr> <tr> <td>०१२३४५६७८९</td> <td>Sanskrit-Devanagari (Indian)</td> <td>mismatches </td></tr> <tr> <td></td> <td>West Arabic (gubar)</td> <td> </td></tr> <tr> <td></td> <td>East Arabic</td> <td>still used in Turkey </td></tr> <tr> <td></td> <td>11th Century (apices)</td> <td> </td></tr> <tr> <td></td> <td>15th Century</td> <td> </td></tr> <tr> <td>0123456789</td> <td>16th Century (Dürer)</td> <td> </td></tr></tbody></table> <div class="mw-heading mw-heading2"><h2 id="Music">Music</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=291" title="Edit section: Music"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>LilyPond. MIDI. File conversions. </p> <ul><li><a href="/wiki/File:La_guillotine_permanente.svg" title="File:La guillotine permanente.svg">File:La guillotine permanente.svg</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="Structured_Data_Query">Structured Data Query</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=292" title="Edit section: Structured Data Query"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div><div class="mw-highlight mw-highlight-lang-sparql mw-content-ltr" dir="ltr"><pre><span></span><span class="c">#defaultView:Map</span> <span class="k">SELECT</span> <span class="nv">?file</span> <span class="nv">?image</span> <span class="nv">?location</span> <span class="nv">?filename</span> <span class="k">WHERE</span> <span class="p">{</span> <span class="k">SERVICE</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">box</span> <span class="p">{</span> <span class="nv">?file</span> <span class="nn">wdt</span><span class="p">:</span><span class="nt">P1259</span> <span class="nv">?location</span><span class="p">.</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">cornerWest</span> <span class="s">"Point(-121.872777777 36.304166666)"</span><span class="o">^^</span><span class="nn">geo</span><span class="p">:</span><span class="nt">wktLiteral</span> <span class="p">.</span> <span class="nn">bd</span><span class="p">:</span><span class="nt">serviceParam</span> <span class="nn">wikibase</span><span class="p">:</span><span class="nt">cornerEast</span> <span class="s">"Point(-121.486111111 38.575277777)"</span><span class="o">^^</span><span class="nn">geo</span><span class="p">:</span><span class="nt">wktLiteral</span> <span class="p">.</span> <span class="p">}</span> <span class="nv">?file</span> <span class="nn">schema</span><span class="p">:</span><span class="nt">url</span> <span class="nv">?image</span><span class="p">;</span> <span class="nn">schema</span><span class="p">:</span><span class="nt">contentUrl</span> <span class="nv">?url</span><span class="p">.</span> <span class="k">BIND</span><span class="p">(</span><span class="nn">wikibase</span><span class="p">:</span><span class="nt">decodeUri</span><span class="p">(</span><span class="nf">CONCAT</span><span class="p">(</span><span class="s">"File:"</span><span class="p">,</span> <span class="nf">SUBSTR</span><span class="p">(</span><span class="nf">STR</span><span class="p">(</span><span class="nv">?url</span><span class="p">),</span> <span class="mi">53</span> <span class="p">)))</span> <span class="k">AS</span> <span class="nv">?filename</span><span class="p">)</span> <span class="p">}</span> <span class="k">LIMIT</span> <span class="mi">100</span> </pre></div></div><p><a class="external text" href="https://commons-query.wikimedia.org/#%23defaultView%3AMap%0ASELECT%20%3Ffile%20%3Fimage%20%3Flocation%20%3Ffilename%20WHERE%20%0A%7B%0A%20%20SERVICE%20wikibase%3Abox%20%0A%20%20%7B%0A%20%20%20%20%3Ffile%20wdt%3AP1259%20%3Flocation.%0A%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerWest%20%22Point%28-121.872777777%2036.304166666%29%22%5E%5Egeo%3AwktLiteral%20.%0A%20%20%20%20bd%3AserviceParam%20wikibase%3AcornerEast%20%22Point%28-121.486111111%2038.575277777%29%22%5E%5Egeo%3AwktLiteral%20.%0A%20%20%7D%0A%20%20%3Ffile%20schema%3Aurl%20%3Fimage%3B%20%0A%20%20schema%3AcontentUrl%20%3Furl.%0A%20%20BIND%28wikibase%3AdecodeUri%28CONCAT%28%22File%3A%22%2C%20SUBSTR%28STR%28%3Furl%29%2C%2053%20%29%29%29%20AS%20%3Ffilename%29%0A%7D%0ALIMIT%20100">Try it!</a> </p><div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=User:Glrx&action=edit&section=293" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <div class="reflist references-column-width" style="-moz-column-width:30em;-webkit-column-width:30em;column-width:30em; list-style-type: decimal;"> <ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching">Caching</a>, Mozilla.org</span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.alibabacloud.com/blog/what-is-domain-resolution-and-how-it-works_597610">https://www.alibabacloud.com/blog/what-is-domain-resolution-and-how-it-works_597610</a></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><a href="#cite_ref-3">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://serverfault.com/questions/347689/how-to-share-domain-name-with-multiple-servers">https://serverfault.com/questions/347689/how-to-share-domain-name-with-multiple-servers</a></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><a href="#cite_ref-4">↑</a></span> <span class="reference-text">See <a rel="nofollow" class="external free" href="https://aeronav.faa.gov/user_guide/20211202/cug-complete.pdf">https://aeronav.faa.gov/user_guide/20211202/cug-complete.pdf</a> at page 43. In those images, the NDB symbol is a dot, ring, and only 5 dotted rings.</span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><a href="#cite_ref-5">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.w3.org/TR/SVG2/struct.html#DescriptionAndTitleElements">SVG 2.0 Chapter 5 Document Structure § 5.8</a></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><a href="#cite_ref-6">↑</a></span> <span class="reference-text">Cory Doctorow, <a rel="nofollow" class="external text" href="https://doctorow.medium.com/a-bug-in-early-creative-commons-licenses-has-enabled-a-new-breed-of-superpredator-5f6360713299">A Bug in early Creative Commons licenses has enabled a new breed of superpredator</a></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><a href="#cite_ref-7">↑</a></span> <span class="reference-text"><a href="/wiki/Commons:Village_pump/Archive/2022/01#Cory_Doctorow_post_on_"copyleft_trolls"_mentions_Commons" title="Commons:Village pump/Archive/2022/01">Village Pump: Cory Doctorow post on "copyleft trolls" mentions Commons</a></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><a href="#cite_ref-8">↑</a></span> <span class="reference-text"><a href="/wiki/Commons:Village_pump/Archive/2022/02#cc-by_<_4.0_not_ok_any_more" title="Commons:Village pump/Archive/2022/02">Village pump:cc-by < 4.0 not ok any more</a></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><a href="#cite_ref-9">↑</a></span> <span class="reference-text"><a href="/wiki/Commons:Deletion_requests/Files_by_Larry_Philpot" title="Commons:Deletion requests/Files by Larry Philpot">Commons:Deletion requests/Files by Larry Philpot</a></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><a href="#cite_ref-10">↑</a></span> <span class="reference-text">e.g., <a rel="nofollow" class="external free" href="https://id.loc.gov/vocabulary/relators.html">https://id.loc.gov/vocabulary/relators.html</a></span> </li> <li id="cite_note-11"><span class="mw-cite-backlink"><a href="#cite_ref-11">↑</a></span> <span class="reference-text">Adobe, <a rel="nofollow" class="external text" href="https://wwwimages2.adobe.com/content/dam/acom/en/devnet/xmp/pdfs/XMP%20SDK%20Release%20cc-2016-08/XMPSpecificationPart1.pdf">XMP Specification Part 1</a> at Table 4.</span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><a href="#cite_ref-12">↑</a></span> <span class="reference-text">Nevile, Liddy; Lissonnet, Sophie (January 2004) <cite>The Case for a Person/Agent Dublin Core Metadata Element Set</cite><sup><a rel="nofollow" class="external autonumber" href="https://dcpapers.dublincore.org/pubs/article/download/780/776.pdf">[1]</a></sup></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><a href="#cite_ref-13">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.compart.com/en/unicode/charsets/Adobe-Symbol-Encoding">https://www.compart.com/en/unicode/charsets/Adobe-Symbol-Encoding</a></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><a href="#cite_ref-14">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.compart.com/en/unicode/charsets/x-Adobe-Zapf-Dingbats-Encoding">https://www.compart.com/en/unicode/charsets/x-Adobe-Zapf-Dingbats-Encoding</a></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><a href="#cite_ref-15">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://fonts2u.com/sonata.font">https://fonts2u.com/sonata.font</a> <a rel="nofollow" class="external free" href="https://adobe-type-tools.github.io/font-tech-notes/pdfs/5045.Sonata.pdf">https://adobe-type-tools.github.io/font-tech-notes/pdfs/5045.Sonata.pdf</a></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><a href="#cite_ref-16">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://stackoverflow.com/questions/36486716/the-14-standard-pdf-fonts-and-character-encoding">https://stackoverflow.com/questions/36486716/the-14-standard-pdf-fonts-and-character-encoding</a></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><a href="#cite_ref-17">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.compart.com/en/unicode/charsets/Adobe-Standard-Encoding">https://www.compart.com/en/unicode/charsets/Adobe-Standard-Encoding</a></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><a href="#cite_ref-18">↑</a></span> <span class="reference-text">Mozilla (2021) <cite>SVG Fonts</cite><sup><a rel="nofollow" class="external autonumber" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/SVG_fonts">[2]</a></sup></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><a href="#cite_ref-19">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.enzolifesciences.com/science-center/technotes/2019/december/what-are-the-differences-between-northern-southern-and-western-blotting?/">https://www.enzolifesciences.com/science-center/technotes/2019/december/what-are-the-differences-between-northern-southern-and-western-blotting?/</a></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><a href="#cite_ref-20">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://thumbor.readthedocs.io/en/latest/">https://thumbor.readthedocs.io/en/latest/</a></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><a href="#cite_ref-21">↑</a></span> <span class="reference-text">“ꝺ” U+A77A Latin Small Letter Insular D Unicode Character</span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><a href="#cite_ref-22">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://linux.die.net/man/1/xsltproc">https://linux.die.net/man/1/xsltproc</a></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><a href="#cite_ref-23">↑</a></span> <span class="reference-text"><a class="external free" href="https://www.wikidata.org/w/index.php?title=Special:Search&limit=100&offset=0&profile=default&search=Pershotravneve&ns0=1&ns120=1">https://www.wikidata.org/w/index.php?title=Special:Search&limit=100&offset=0&profile=default&search=Pershotravneve&ns0=1&ns120=1</a></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><a href="#cite_ref-24">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.google.com/maps/place/Radekhiv,+Lviv+Oblast,+Ukraine/@50.2811748,24.6012475,13z">https://www.google.com/maps/place/Radekhiv,+Lviv+Oblast,+Ukraine/@50.2811748,24.6012475,13z</a></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><a href="#cite_ref-25">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/circle</a></span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><a href="#cite_ref-26">↑</a></span> <span class="reference-text">See <a href="/wiki/File:SVG_CSS_Test.svg" title="File:SVG CSS Test.svg">File:SVG CSS Test.svg</a> for a test of <code>.cls2.cls3</code> selection.</span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><a href="#cite_ref-27">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor">https://tc39.es/ecma402/#sec-intl-datetimeformat-constructor</a></span> </li> <li id="cite_note-28"><span class="mw-cite-backlink"><a href="#cite_ref-28">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.wikihow.com/Write-the-Date-in-French">Write the Date in French</a>, wikihow.com. The first is pronounced "premier".</span> </li> <li id="cite_note-29"><span class="mw-cite-backlink"><a href="#cite_ref-29">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external text" href="https://www.thoughtco.com/italian-ordinal-numbers-2011379">Italian Ordinal Numbers and Numerical Rank</a>, thoughtco.com. "il primo".</span> </li> <li id="cite_note-30"><span class="mw-cite-backlink"><a href="#cite_ref-30">↑</a></span> <span class="reference-text">Inkscape Tutorial. Chapter 6. SVG File Format. <a rel="nofollow" class="external free" href="https://inkscapetutorial.org/svg-file-format.html">https://inkscapetutorial.org/svg-file-format.html</a></span> </li> <li id="cite_note-31"><span class="mw-cite-backlink"><a href="#cite_ref-31">↑</a></span> <span class="reference-text"><a class="external free" href="https://www.mediawiki.org/wiki/User:Jarry1250/GSoC_2012_roadmap">https://www.mediawiki.org/wiki/User:Jarry1250/GSoC_2012_roadmap</a></span> </li> <li id="cite_note-32"><span class="mw-cite-backlink"><a href="#cite_ref-32">↑</a></span> <span class="reference-text"><a href="https://meta.wikimedia.org/wiki/Community_Wishlist_Survey_2017/Multimedia_and_Commons/SVG-Translate" class="extiw" title="meta:Community Wishlist Survey 2017/Multimedia and Commons/SVG-Translate">Meta:Community Wishlist Survey 2017/Multimedia and Commons/SVG-Translate</a></span> </li> <li id="cite_note-33"><span class="mw-cite-backlink"><a href="#cite_ref-33">↑</a></span> <span class="reference-text"><a href="https://meta.wikimedia.org/wiki/Community_Tech/SVG_translation" class="extiw" title="meta:Community Tech/SVG translation">Meta:Community Tech/SVG translation</a></span> </li> <li id="cite_note-34"><span class="mw-cite-backlink"><a href="#cite_ref-34">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://www.w3.org/TR/SVG/styling.html">https://www.w3.org/TR/SVG/styling.html</a></span> </li> <li id="cite_note-35"><span class="mw-cite-backlink"><a href="#cite_ref-35">↑</a></span> <span class="reference-text"><a rel="nofollow" class="external free" href="https://drafts.csswg.org/selectors/#specificity-rules">https://drafts.csswg.org/selectors/#specificity-rules</a></span> </li> </ol></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐554bb6b4dc‐vb46l Cached time: 20241127133632 Cache expiry: 3600 Reduced expiry: true Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 1.594 seconds Real time usage: 2.688 seconds Preprocessor visited node count: 23956/1000000 Post‐expand include size: 163133/2097152 bytes Template argument size: 26472/2097152 bytes Highest expansion depth: 22/100 Expensive parser function count: 125/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 450942/5000000 bytes Lua time usage: 0.282/10.000 seconds Lua memory usage: 5409467/52428800 bytes Number of Wikibase entities loaded: 17/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1830.207 1 -total 31.29% 572.753 136 Template:Label 28.77% 526.615 119 Template:Q 6.02% 110.163 9 Template:Data 3.84% 70.198 4 Template:Userbox 2.70% 49.482 31 Template:Tl 2.63% 48.052 12 Template:Tracked/layout 2.49% 45.563 31 Template:T/main 2.48% 45.467 8 Template:Phabricator 2.03% 37.110 1 Template:User_since --> <!-- Saved in parser cache with key commonswiki:pcache:idhash:113551363-0!dateformat=default and timestamp 20241127133632 and revision id 962100398. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://commons.wikimedia.org/w/index.php?title=User:Glrx&oldid=962100398">https://commons.wikimedia.org/w/index.php?title=User:Glrx&oldid=962100398</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:Categories" title="Special:Categories">Categories</a>: <ul><li><a href="/wiki/Category:User_en" title="Category:User en">User en</a></li><li><a href="/wiki/Category:User_en-N" title="Category:User en-N">User en-N</a></li><li><a href="/wiki/Category:Pages_with_math_render_errors" title="Category:Pages with math render errors">Pages with math render errors</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-user-shown">Hidden categories: <ul><li><a href="/wiki/Category:Pages_with_syntax_highlighting_errors" title="Category:Pages with syntax highlighting errors">Pages with syntax highlighting errors</a></li><li><a href="/wiki/Category:Pages_with_coordinates" title="Category:Pages with coordinates">Pages with coordinates</a></li><li><a href="/wiki/Category:Pages_with_math_errors" title="Category:Pages with math errors">Pages with math errors</a></li></ul></div></div> </div> </div> <div id="mw-navigation"> <h2>Navigation menu</h2> <div id="mw-head"> <nav id="p-personal" class="mw-portlet mw-portlet-personal vector-user-menu-legacy vector-menu" aria-labelledby="p-personal-label" > <h3 id="p-personal-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Personal tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-uls" class="mw-list-item active"><a class="uls-trigger" href="#"><span>English</span></a></li><li id="pt-anonuserpage" class="mw-list-item"><span title="The user page for the IP address you are editing as">Not logged in</span></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li><li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-createaccount" class="mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=User%3AGlrx" title="You are encouraged to create an account and log in; however, it is not mandatory"><span>Create account</span></a></li><li id="pt-login" class="mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=User%3AGlrx" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o"><span>Log in</span></a></li> </ul> </div> </nav> <div id="left-navigation"> <nav id="p-namespaces" class="mw-portlet mw-portlet-namespaces vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-namespaces-label" > <h3 id="p-namespaces-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Namespaces</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-user" class="selected mw-list-item"><a href="/wiki/User:Glrx" title="View the user page [c]" accesskey="c"><span>User page</span></a></li><li id="ca-talk" class="mw-list-item"><a href="/wiki/User_talk:Glrx" rel="discussion" title="Discussion about the content page [t]" accesskey="t"><span>Discussion</span></a></li> </ul> </div> </nav> <nav id="p-variants" class="mw-portlet mw-portlet-variants emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-variants-label" > <input type="checkbox" id="p-variants-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-variants" class="vector-menu-checkbox" aria-labelledby="p-variants-label" > <label id="p-variants-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">English</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> </div> <div id="right-navigation"> <nav id="p-views" class="mw-portlet mw-portlet-views vector-menu-tabs vector-menu-tabs-legacy vector-menu" aria-labelledby="p-views-label" > <h3 id="p-views-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Views</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected mw-list-item"><a href="/wiki/User:Glrx"><span>View</span></a></li><li id="ca-edit" class="mw-list-item"><a href="/w/index.php?title=User:Glrx&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="mw-list-item"><a href="/w/index.php?title=User:Glrx&action=history" title="Past revisions of this page [h]" accesskey="h"><span>History</span></a></li> </ul> </div> </nav> <nav id="p-cactions" class="mw-portlet mw-portlet-cactions emptyPortlet vector-menu-dropdown vector-menu" aria-labelledby="p-cactions-label" title="More options" > <input type="checkbox" id="p-cactions-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-cactions" class="vector-menu-checkbox" aria-labelledby="p-cactions-label" > <label id="p-cactions-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">More</span> </label> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box"> <h3 >Search</h3> <form action="/w/index.php" id="searchform" class="vector-search-box-form"> <div id="simpleSearch" class="vector-search-box-inner" data-search-loc="header-navigation"> <input class="vector-search-box-input" type="search" name="search" placeholder="Search Wikimedia Commons" aria-label="Search Wikimedia Commons" autocapitalize="sentences" title="Search Wikimedia Commons [f]" accesskey="f" id="searchInput" > <input type="hidden" name="title" value="Special:MediaSearch"> <input id="mw-searchButton" class="searchButton mw-fallbackSearchButton" type="submit" name="fulltext" title="Search the pages for this text" value="Search"> <input id="searchButton" class="searchButton" type="submit" name="go" title="Go to a page with this exact name if it exists" value="Go"> </div> </form> </div> </div> </div> <div id="mw-panel" class="vector-legacy-sidebar"> <div id="p-logo" role="banner"> <a class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"></a> </div> <nav id="p-navigation" class="mw-portlet mw-portlet-navigation vector-menu-portal portal vector-menu" aria-labelledby="p-navigation-label" > <h3 id="p-navigation-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Navigate</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-welcome" class="mw-list-item"><a href="/wiki/Commons:Welcome"><span>Welcome</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Commons:Community_portal" title="About the project, what you can do, where to find things"><span>Community portal</span></a></li><li id="n-village-pump" class="mw-list-item"><a href="/wiki/Commons:Village_pump"><span>Village pump</span></a></li><li id="n-help" class="mw-list-item"><a href="/wiki/Special:MyLanguage/Help:Contents" title="The place to find out"><span>Help center</span></a></li> </ul> </div> </nav> <nav id="p-participate" class="mw-portlet mw-portlet-participate vector-menu-portal portal vector-menu" aria-labelledby="p-participate-label" > <h3 id="p-participate-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Participate</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-uploadbtn" class="mw-list-item"><a href="/wiki/Special:UploadWizard"><span>Upload file</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-latestfiles" class="mw-list-item"><a href="/wiki/Special:NewFiles"><span>Latest files</span></a></li><li id="n-randomimage" class="mw-list-item"><a href="/wiki/Special:Random/File" title="Load a random file [x]" accesskey="x"><span>Random file</span></a></li><li id="n-contact" class="mw-list-item"><a href="/wiki/Commons:Contact_us"><span>Contact us</span></a></li> </ul> </div> </nav> <nav id="p-tb" class="mw-portlet mw-portlet-tb vector-menu-portal portal vector-menu" aria-labelledby="p-tb-label" > <h3 id="p-tb-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Tools</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/User:Glrx" title="A list of all wiki pages that link here [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/User:Glrx" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="tb-uploads" class="mw-list-item"><a href="/w/index.php?title=Special:ListFiles/Glrx&ilshowall=1" title="A list of uploads by this user"><span>User uploads</span></a></li><li id="t-contributions" class="mw-list-item"><a href="/wiki/Special:Contributions/Glrx" title="A list of contributions by this user"><span>User contributions</span></a></li><li id="t-log" class="mw-list-item"><a href="/wiki/Special:Log/Glrx"><span>Logs</span></a></li><li id="t-userrights" class="mw-list-item"><a href="/wiki/Special:UserRights/Glrx"><span>View user groups</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=User:Glrx&oldid=962100398" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=User:Glrx&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FUser%3AGlrx"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FUser%3AGlrx"><span>Download QR code</span></a></li> </ul> </div> </nav> <nav id="p-coll-print_export" class="mw-portlet mw-portlet-coll-print_export vector-menu-portal portal vector-menu" aria-labelledby="p-coll-print_export-label" > <h3 id="p-coll-print_export-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">Print/export</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-create_a_book" class="mw-list-item"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=User%3AGlrx"><span>Create a book</span></a></li><li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=User%3AGlrx&action=show-download-screen"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=User:Glrx&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </nav> <nav id="p-wikibase-otherprojects" class="mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet vector-menu-portal portal vector-menu" aria-labelledby="p-wikibase-otherprojects-label" > <h3 id="p-wikibase-otherprojects-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">In other projects</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </nav> <nav id="p-lang" class="mw-portlet mw-portlet-lang vector-menu-portal portal vector-menu" aria-labelledby="p-lang-label" > <h3 id="p-lang-label" class="vector-menu-heading " > <span class="vector-menu-heading-label">In Wikipedia</span> </h3> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Sewing_machine" title="Sewing machine – English" lang="en" hreflang="en" data-title="Sewing machine" data-language-autonym="English" data-language-local-name="English" class="interlanguage-link-target"><span>English</span></a></li> </ul> </div> </nav> </div> </div> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 26 November 2024, at 18:23.</li> <li id="footer-info-copyright">Files are available under licenses specified on their description page. All structured data from the file namespace is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 License</a>; all unstructured text is available under the <a rel="nofollow" class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-ShareAlike License</a>; additional terms may apply. By using this site, you agree to the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a> and the <a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy Policy</a>.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Commons:Welcome">About Wikimedia Commons</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Commons:General_disclaimer">Disclaimers</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/commons.wikimedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//commons.m.wikimedia.org/w/index.php?title=User:Glrx&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> <script>(RLQ=window.RLQ||[]).push(function(){mw.log.warn("This page is using the deprecated ResourceLoader module \"codex-search-styles\".\n[1.43] Use a CodexModule with codexComponents to set your specific components used: https://www.mediawiki.org/wiki/Codex#Using_a_limited_subset_of_components");mw.config.set({"wgHostname":"mw-web.codfw.main-6bb4bcc5b5-ktl52","wgBackendResponseTime":266,"wgPageParseReport":{"limitreport":{"cputime":"1.594","walltime":"2.688","ppvisitednodes":{"value":23956,"limit":1000000},"postexpandincludesize":{"value":163133,"limit":2097152},"templateargumentsize":{"value":26472,"limit":2097152},"expansiondepth":{"value":22,"limit":100},"expensivefunctioncount":{"value":125,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":450942,"limit":5000000},"entityaccesscount":{"value":17,"limit":400},"timingprofile":["100.00% 1830.207 1 -total"," 31.29% 572.753 136 Template:Label"," 28.77% 526.615 119 Template:Q"," 6.02% 110.163 9 Template:Data"," 3.84% 70.198 4 Template:Userbox"," 2.70% 49.482 31 Template:Tl"," 2.63% 48.052 12 Template:Tracked/layout"," 2.49% 45.563 31 Template:T/main"," 2.48% 45.467 8 Template:Phabricator"," 2.03% 37.110 1 Template:User_since"]},"scribunto":{"limitreport-timeusage":{"value":"0.282","limit":"10.000"},"limitreport-memusage":{"value":5409467,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-554bb6b4dc-vb46l","timestamp":"20241127133632","ttl":3600,"transientcontent":true}}});});</script> </body> </html>