CINXE.COM
Wikipedia:Guide to Scribbling - Wikipedia
<!DOCTYPE html> <html class="client-nojs skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Wikipedia:Guide to Scribbling - Wikipedia</title> <script>(function(){var className="client-js skin-theme-clientpref-day mf-expand-sections-clientpref-0 mf-font-size-clientpref-small mw-mf-amc-clientpref-0";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);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":"81c82c0e-205c-45b6-9177-55a6a9f8436d","wgCanonicalNamespace":"Project","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":4,"wgPageName":"Wikipedia:Guide_to_Scribbling","wgTitle":"Guide to Scribbling","wgCurRevisionId":1257544500,"wgRevisionId": 1257544500,"wgArticleId":39390288,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Wikipedia:Guide_to_Scribbling","wgRelevantArticleId":39390288,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFMode":"stable","wgMFAmc":false,"wgMFAmcOutreachActive":false,"wgMFAmcOutreachUserEligible":false,"wgMFLazyLoadImages":true,"wgMFEditNoticesFeatureConflict":false,"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true}, "wgMFIsSupportedEditRequest":true,"wgMFScriptPath":"","wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":30000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":true,"wgEditSubmitButtonLabelPublish":true,"wgDiscussionToolsFeaturesEnabled":{"replytool":true,"newtopictool":true,"sourcemodetoolbar":true,"topicsubscription":false,"autotopicsub":false,"visualenhancements":false,"visualenhancements_reply":false,"visualenhancements_pageframe":false},"wgDiscussionToolsFallbackEditMode":"source","wgSectionTranslationTargetLanguages":["ace","ady","alt","am","ami","an","ang","ann","anp","ar","ary","arz","as","ast","av","avk","awa","ay","az","azb","ba","ban","bar","bbc","bcl","bdr","be","bew","bg","bho","bi","bjn","blk","bm","bn","bo","bpy","br","bs","btm","bug","ca","cdo","ce","ceb","ch","chr","ckb","co","cr","crh","cs","cu","cy","da","dag","de","dga","din","diq","dsb","dtp","dv","dz","ee","el","eml","eo","es","et","eu","fa","fat","ff","fi","fj","fo","fon","fr","frp","frr", "fur","fy","gag","gan","gcr","gl","glk","gn","gom","gor","gpe","gu","guc","gur","guw","gv","ha","hak","haw","he","hi","hif","hr","hsb","ht","hu","hy","hyw","ia","iba","ie","ig","igl","ilo","io","is","it","iu","ja","jam","jv","ka","kaa","kab","kbd","kbp","kcg","kg","kge","ki","kk","kl","km","kn","ko","koi","krc","ks","ku","kus","kv","kw","ky","lad","lb","lez","lg","li","lij","lld","lmo","ln","lo","lt","ltg","lv","mad","mai","map-bms","mdf","mg","mhr","mi","min","mk","ml","mn","mni","mnw","mos","mr","mrj","ms","mt","mwl","my","myv","mzn","nah","nan","nap","nb","nds","nds-nl","ne","new","nia","nl","nn","nqo","nr","nso","ny","oc","om","or","os","pa","pag","pam","pap","pcd","pcm","pdc","pl","pms","pnb","ps","pt","pwn","qu","rm","rn","ro","rsk","rue","rup","rw","sa","sah","sat","sc","scn","sco","sd","se","sg","sgs","sh","shi","shn","si","sk","skr","sl","sm","smn","sn","so","sq","sr","srn","ss","st","stq","su","sv","sw","szl","ta","tay","tcy","tdd","te","tet","tg","th","ti","tk","tl","tly", "tn","to","tpi","tr","trv","ts","tt","tum","tw","ty","tyv","udm","ur","uz","ve","vec","vep","vi","vls","vo","vro","wa","war","wo","wuu","xal","xh","xmf","yi","yo","yue","za","zgh","zh","zu"],"isLanguageSearcherCXEntrypointEnabled":false,"mintEntrypointLanguages":["ace","ast","azb","bcl","bjn","bh","crh","ff","fon","ig","is","ki","ks","lmo","min","sat","ss","tn","vec"],"wgWikibaseItemId":"Q8807155","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false,"wgMinervaPermissions":{"watchable":true,"watch":false},"wgMinervaFeatures":{"beta":false,"donate":true,"mobileOptionsLink":true,"categories":false,"pageIssues":true,"talkAtTop":true,"historyInPageActions":false,"overflowSubmenu":false,"tabsOnSpecials":true,"personalMenu":false, "mainMenuExpanded":false,"echo":true,"nightMode":true},"wgMinervaDownloadNamespaces":[0]};RLSTATE={"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","ext.discussionTools.init.styles":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","skins.minerva.styles":"ready","skins.minerva.content.styles.images":"ready","mediawiki.hlist":"ready","skins.minerva.codex.styles":"ready","skins.minerva.icons":"ready","skins.minerva.amc.styles":"ready","ext.wikimediamessages.styles":"ready","mobile.init.styles":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","mediawiki.page.media","ext.scribunto.logs","site","mediawiki.page.ready","skins.minerva.scripts","ext.centralNotice.geoIP", "ext.centralNotice.startUp","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","ext.popups","mobile.init","ext.echo.centralauth","ext.discussionTools.init","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.cx.eventlogging.campaigns","ext.cx.entrypoints.languagesearcher.init","mw.externalguidance.init","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</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=ext.cite.styles%7Cext.discussionTools.init.styles%7Cext.pygments%2CwikimediaBadges%7Cext.wikimediamessages.styles%7Cmediawiki.hlist%7Cmediawiki.widgets.styles%7Cmobile.init.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.indicators%7Cskins.minerva.amc.styles%7Cskins.minerva.codex.styles%7Cskins.minerva.content.styles.images%7Cskins.minerva.icons%2Cstyles%7Cwikibase.client.init&only=styles&skin=minerva"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=minerva"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=minerva"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <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="theme-color" content="#eaecf0"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0"> <meta property="og:title" content="Wikipedia:Guide to Scribbling - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="manifest" href="/w/api.php?action=webapp-manifest"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Wikipedia:Guide_to_Scribbling"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="ext-discussiontools-replytool-enabled ext-discussiontools-newtopictool-enabled ext-discussiontools-sourcemodetoolbar-enabled mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-4 ns-subject mw-editable page-Wikipedia_Guide_to_Scribbling rootpage-Wikipedia_Guide_to_Scribbling stable skin-minerva action-view skin--responsive mw-mf-amc-disabled mw-mf"><div id="mw-mf-viewport"> <div id="mw-mf-page-center"> <a class="mw-mf-page-center__mask" href="#"></a> <header class="header-container header-chrome"> <div class="minerva-header"> <nav class="navigation-drawer toggle-list view-border-box"> <input type="checkbox" id="main-menu-input" class="toggle-list__checkbox" role="button" aria-haspopup="true" aria-expanded="false" aria-labelledby="mw-mf-main-menu-button"> <label role="button" for="main-menu-input" id="mw-mf-main-menu-button" aria-hidden="true" data-event-name="ui.mainmenu" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet toggle-list__toggle"> <span class="minerva-icon minerva-icon--menu"></span> <span></span> </label> <div id="mw-mf-page-left" class="menu view-border-box"> <ul id="p-navigation" class="toggle-list__list"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--home" href="/wiki/Main_Page" data-mw="interface"> <span class="minerva-icon minerva-icon--home"></span> <span class="toggle-list-item__label">Home</span> </a> </li> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--random" href="/wiki/Special:Random" data-mw="interface"> <span class="minerva-icon minerva-icon--die"></span> <span class="toggle-list-item__label">Random</span> </a> </li> <li class="toggle-list-item skin-minerva-list-item-jsonly"> <a class="toggle-list-item__anchor menu__item--nearby" href="/wiki/Special:Nearby" data-event-name="menu.nearby" data-mw="interface"> <span class="minerva-icon minerva-icon--mapPin"></span> <span class="toggle-list-item__label">Nearby</span> </a> </li> </ul> <ul id="p-personal" class="toggle-list__list"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--login" href="/w/index.php?title=Special:UserLogin&returnto=Wikipedia%3AGuide+to+Scribbling" data-event-name="menu.login" data-mw="interface"> <span class="minerva-icon minerva-icon--logIn"></span> <span class="toggle-list-item__label">Log in</span> </a> </li> </ul> <ul id="pt-preferences" class="toggle-list__list"> <li class="toggle-list-item skin-minerva-list-item-jsonly"> <a class="toggle-list-item__anchor menu__item--settings" href="/w/index.php?title=Special:MobileOptions&returnto=Wikipedia%3AGuide+to+Scribbling" data-event-name="menu.settings" data-mw="interface"> <span class="minerva-icon minerva-icon--settings"></span> <span class="toggle-list-item__label">Settings</span> </a> </li> </ul> <ul id="p-donation" class="toggle-list__list"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--donate" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en&utm_key=minerva" data-event-name="menu.donate" data-mw="interface"> <span class="minerva-icon minerva-icon--heart"></span> <span class="toggle-list-item__label">Donate</span> </a> </li> </ul> <ul class="hlist"> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--about" href="/wiki/Wikipedia:About" data-mw="interface"> <span class="toggle-list-item__label">About Wikipedia</span> </a> </li> <li class="toggle-list-item "> <a class="toggle-list-item__anchor menu__item--disclaimers" href="/wiki/Wikipedia:General_disclaimer" data-mw="interface"> <span class="toggle-list-item__label">Disclaimers</span> </a> </li> </ul> </div> <label class="main-menu-mask" for="main-menu-input"></label> </nav> <div class="branding-box"> <a href="/wiki/Main_Page"> <span><img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"/> </span> </a> </div> <form action="/w/index.php" method="get" class="minerva-search-form"> <div class="search-box"> <input type="hidden" name="title" value="Special:Search"/> <input class="search skin-minerva-search-trigger" id="searchInput" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f"> <span class="search-box-icon-overlay"><span class="minerva-icon minerva-icon--search"></span> </span> </div> <button id="searchIcon" class="cdx-button cdx-button--size-large cdx-button--icon-only cdx-button--weight-quiet skin-minerva-search-trigger"> <span class="minerva-icon minerva-icon--search"></span> <span>Search</span> </button> </form> <nav class="minerva-user-navigation" aria-label="User navigation"> </nav> </div> </header> <main id="content" class="mw-body"> <div class="banner-container"> <div id="siteNotice"></div> </div> <div class="pre-content heading-holder"> <div class="page-heading"> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Wikipedia</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Guide to Scribbling</span></h1> <div class="tagline"></div> </div> <ul id="p-associated-pages" class="minerva__tab-container"> <li class="minerva__tab selected"> <a class="minerva__tab-text" href="/wiki/Wikipedia:Guide_to_Scribbling" rel="" data-event-name="tabs.subject">Project page</a> </li> <li class="minerva__tab "> <a class="minerva__tab-text" href="/wiki/Wikipedia_talk:Guide_to_Scribbling" rel="" data-event-name="tabs.talk">Talk</a> </li> </ul> <nav class="page-actions-menu"> <ul id="p-views" class="page-actions-menu__list"> <li id="language-selector" class="page-actions-menu__list-item"> <a role="button" href="#p-lang" data-mw="interface" data-event-name="menu.languages" title="Language" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet language-selector"> <span class="minerva-icon minerva-icon--language"></span> <span>Language</span> </a> </li> <li id="page-actions-watch" class="page-actions-menu__list-item"> <a role="button" id="ca-watch" href="/w/index.php?title=Special:UserLogin&returnto=Wikipedia%3AGuide+to+Scribbling" data-event-name="menu.watch" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet menu__item--page-actions-watch"> <span class="minerva-icon minerva-icon--star"></span> <span>Watch</span> </a> </li> <li id="page-actions-edit" class="page-actions-menu__list-item"> <a role="button" id="ca-edit" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit" data-event-name="menu.edit" data-mw="interface" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet edit-page menu__item--page-actions-edit"> <span class="minerva-icon minerva-icon--edit"></span> <span>Edit</span> </a> </li> </ul> </nav> <!-- version 1.0.2 (change every time you update a partial) --> <div id="mw-content-subtitle"></div> </div> <div id="bodyContent" class="content"> <div id="mw-content-text" class="mw-body-content"><script>function mfTempOpenSection(id){var block=document.getElementById("mf-section-"+id);block.className+=" open-block";block.previousSibling.className+=" open-block";}</script><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><section class="mf-section-0" id="mf-section-0"><style data-mw-deduplicate="TemplateStyles:r1238436933">.mw-parser-output .ombox{margin:4px 0;border-collapse:collapse;border:1px solid #a2a9b1;background-color:var(--background-color-neutral-subtle,#f8f9fa);box-sizing:border-box;color:var(--color-base,#202122)}.mw-parser-output .ombox.mbox-small{font-size:88%;line-height:1.25em}.mw-parser-output .ombox-speedy{border:2px solid #b32424;background-color:#fee7e6}.mw-parser-output .ombox-delete{border:2px solid #b32424}.mw-parser-output .ombox-content{border:1px solid #f28500}.mw-parser-output .ombox-style{border:1px solid #fc3}.mw-parser-output .ombox-move{border:1px solid #9932cc}.mw-parser-output .ombox-protection{border:2px solid #a2a9b1}.mw-parser-output .ombox .mbox-text{border:none;padding:0.25em 0.9em;width:100%}.mw-parser-output .ombox .mbox-image{border:none;padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .ombox .mbox-imageright{border:none;padding:2px 0.9em 2px 0;text-align:center}.mw-parser-output .ombox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ombox .mbox-invalid-type{text-align:center}@media(min-width:720px){.mw-parser-output .ombox{margin:4px 10%}.mw-parser-output .ombox.mbox-small{clear:right;float:right;margin:4px 0 4px 1em;width:238px}}body.skin--responsive .mw-parser-output table.ombox img{max-width:none!important}@media screen{html.skin-theme-clientpref-night .mw-parser-output .ombox-speedy{background-color:#310402}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .ombox-speedy{background-color:#310402}}</style><table class="plainlinks ombox ombox-notice nutshell" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Walnut.png/30px-Walnut.png" decoding="async" width="30" height="30" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Walnut.png/45px-Walnut.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Walnut.png/60px-Walnut.png 2x" data-file-width="192" data-file-height="192"></span></span></td><td class="mbox-text"><b>This page in a nutshell:</b> Scribbling is a way to create complex templates and is more robust than <a href="/wiki/Help:Magic_words#Parser_functions" title="Help:Magic words">parser functions</a>. A scribbled template consists of only {{#invoke:Name1|Name2}}, which invokes the script at Module:Name1, where the code is written. To get started, refer to <a href="/wiki/Module:Example" title="Module:Example">Module:Example</a>. Try the module by using <a href="/wiki/Template:Basic_scribbling_example" title="Template:Basic scribbling example">Template:Basic scribbling example</a> in your sandbox.</td></tr></tbody></table> <figure class="mw-default-size mw-halign-right" typeof="mw:File/Thumb"><a href="/wiki/File:Wikipe-tan_the_Library_of_Babel.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/1/19/Wikipe-tan_the_Library_of_Babel.png/220px-Wikipe-tan_the_Library_of_Babel.png" decoding="async" width="220" height="275" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/19/Wikipe-tan_the_Library_of_Babel.png/330px-Wikipe-tan_the_Library_of_Babel.png 1.5x, //upload.wikimedia.org/wikipedia/commons/1/19/Wikipe-tan_the_Library_of_Babel.png 2x" data-file-width="400" data-file-height="500"></a><figcaption>"Shh! I'm reading about how to Scribble templates."</figcaption></figure> <style data-mw-deduplicate="TemplateStyles:r1044870489">@media all and (max-width:720px){body.skin-minerva .mw-parser-output .tocright{display:none}.mw-parser-output .tocright{width:100%!important}}@media all and (min-width:720px){.mw-parser-output .tocright{float:right;clear:right;width:auto;margin:0 0 0.5em 1em}.mw-parser-output .tocright-clear-left{clear:left}.mw-parser-output .tocright-clear-both{clear:both}.mw-parser-output .tocright-clear-none{clear:none}}</style><div class="tocright"><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="#Lua"><span class="tocnumber">1</span> <span class="toctext">Lua</span></a></li> <li class="toclevel-1 tocsection-2"><a href="#Template_structure"><span class="tocnumber">2</span> <span class="toctext">Template structure</span></a></li> <li class="toclevel-1 tocsection-3"><a href="#Module_basics"><span class="tocnumber">3</span> <span class="toctext">Module basics</span></a> <ul> <li class="toclevel-2 tocsection-4"><a href="#Overall_structure"><span class="tocnumber">3.1</span> <span class="toctext">Overall structure</span></a> <ul> <li class="toclevel-3 tocsection-5"><a href="#A_named_local_table"><span class="tocnumber">3.1.1</span> <span class="toctext">A named local table</span></a></li> <li class="toclevel-3 tocsection-6"><a href="#An_unnamed_table_generated_on_the_fly"><span class="tocnumber">3.1.2</span> <span class="toctext">An unnamed table generated on the fly</span></a></li> <li class="toclevel-3 tocsection-7"><a href="#Execution"><span class="tocnumber">3.1.3</span> <span class="toctext">Execution</span></a></li> </ul> </li> <li class="toclevel-2 tocsection-8"><a href="#Receiving_template_arguments"><span class="tocnumber">3.2</span> <span class="toctext">Receiving template arguments</span></a></li> <li class="toclevel-2 tocsection-9"><a href="#Errors"><span class="tocnumber">3.3</span> <span class="toctext">Errors</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-10"><a href="#Tips_and_tricks"><span class="tocnumber">4</span> <span class="toctext">Tips and tricks</span></a> <ul> <li class="toclevel-2 tocsection-11"><a href="#Arguments_tables_are_%22special%22."><span class="tocnumber">4.1</span> <span class="toctext">Arguments tables are "special".</span></a></li> <li class="toclevel-2 tocsection-12"><a href="#Copy_table_contents_into_local_variables."><span class="tocnumber">4.2</span> <span class="toctext">Copy table contents into local variables.</span></a></li> <li class="toclevel-2 tocsection-13"><a href="#Don't_expand_templates,_even_though_you_can."><span class="tocnumber">4.3</span> <span class="toctext">Don't expand templates, even though you can.</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-14"><a href="#Notes"><span class="tocnumber">5</span> <span class="toctext">Notes</span></a></li> <li class="toclevel-1 tocsection-15"><a href="#References"><span class="tocnumber">6</span> <span class="toctext">References</span></a> <ul> <li class="toclevel-2 tocsection-16"><a href="#Cross-references"><span class="tocnumber">6.1</span> <span class="toctext">Cross-references</span></a></li> <li class="toclevel-2 tocsection-17"><a href="#Citations"><span class="tocnumber">6.2</span> <span class="toctext">Citations</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-18"><a href="#Further_reading"><span class="tocnumber">7</span> <span class="toctext">Further reading</span></a> <ul> <li class="toclevel-2 tocsection-19"><a href="#Lua_2"><span class="tocnumber">7.1</span> <span class="toctext">Lua</span></a></li> </ul> </li> </ul> </div> </div> <p>This is the Guide to <b>Scribbling</b>. Scribbling, also known as Luafication, is the act of writing a template, or converting a template, so that it uses <a href="https://www.mediawiki.org/wiki/Extension:Scribunto" class="extiw" title="mw:Extension:Scribunto">the Scribunto extension</a> to <a href="/wiki/MediaWiki" title="MediaWiki">MediaWiki</a>. The Scribunto extension<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>a<span class="cite-bracket">]</span></a></sup> was developed by <a href="/wiki/User:Tim_Starling" title="User:Tim Starling">Tim Starling</a> and <a href="/wiki/User:VasilievVV" title="User:VasilievVV">Victor Vasiliev</a>, and allows for embedding scripting languages in MediaWiki. Currently the only supported scripting language is <a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a>. This Guide aims to give you a broad overview of Scribbling, and pointers to further information in various places. </p><p>Scribbled templates come in two parts: the template itself and one or more back-end <i>modules</i> — in the <code>Module:</code> namespace — that contain programs that are run on <a href="https://meta.wikimedia.org/wiki/Wikimedia_servers" class="extiw" title="m:Wikimedia servers">the wiki servers</a> to generate the wikitext that the template expands to. The template invokes a function within a module using a new <a href="https://meta.wikimedia.org/wiki/Help:Parser_function" class="extiw" title="m:Help:Parser function">parser function</a> named <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code>. </p><p>The idea of Scribbling is to improve template processing performance. Scribbling eliminates any need for <i>template parser function programming</i> using parser functions such as <span class="nowrap"><code>{{#if}}</code></span>, <span class="nowrap"><code>{{#ifeq}}</code></span>, <span class="nowrap"><code>{{#switch}}</code></span> and <span class="nowrap"><code>{{#expr}}</code></span>. All of this is instead done in the module, in a language that was actually designed to be a programming language, rather than a template system onto which was bolted various extensions over time to try to make it into a programming language.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>b<span class="cite-bracket">]</span></a></sup> Scribbling also eliminates any need for templates to expand to further templates and potentially hit the <a href="https://meta.wikimedia.org/wiki/Help:Expansion_depth" class="extiw" title="m:Help:Expansion depth">expansion depth limit</a>. A fully Scribbled template should never need to <a href="/wiki/Wikipedia:Transclusion" class="mw-redirect" title="Wikipedia:Transclusion">transclude</a> other templates.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>c<span class="cite-bracket">]</span></a></sup> </p> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(1)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Lua" data-mw-thread-id="h-Lua"><span data-mw-comment-start="" id="h-Lua"></span>Lua<span data-mw-comment-end="h-Lua"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=1" title="Edit section: Lua" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Lua","replies":[]}}--></div><section class="mf-section-1 collapsible-block" id="mf-section-1"> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Further information: <a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua (programming language)</a>, <a href="/wiki/Help:Lua_for_beginners" title="Help:Lua for beginners">Help:Lua for beginners</a>, and <a href="/wiki/Wikipedia:Guide_to_Scribbling/Programmers%27_Quick_start_Guide_to_Lua" title="Wikipedia:Guide to Scribbling/Programmers' Quick start Guide to Lua">Wikipedia:Guide to Scribbling/Programmers' Quick start Guide to Lua</a></div> <p>The language in which modules are written is Lua. Unlike the template parser function system, Lua was actually designed not only to be a proper programming language, but also to be a programming language that is suitable for what is known as <i>embedded scripting</i>. Modules in MediaWiki are an example of embedded scripts. There are several embedded scripting languages that could have been used, including <a href="/wiki/REXX" class="mw-redirect" title="REXX">REXX</a> and <a href="/wiki/Tcl" title="Tcl">tcl</a>; and indeed the original aim of Scribunto was to make available a choice of such languages. At the moment, however, only Lua is available. </p><p>The official reference manual for Lua is <a href="#CITEREFIerusalimschyde_FigueiredoCeles2006">Ierusalimschy, de Figueiredo & Celes 2006</a>. It's a reference, not a tutorial. Consult it if you want to know the syntax or semantics for something. For a tutorial, see either <a href="#CITEREFIerusalimschy2006">Ierusalimschy 2006</a> (<a href="#CITEREFIerusalimschy2003">Ierusalimschy 2003</a> is also available, although it is of course out of date.) or <a href="#CITEREFJungBrown2007">Jung & Brown 2007</a>. The downsides to these books are that quite a lot of the things that they tell you about have no bearing upon using Lua in MediaWiki modules. You don't need to know how to install Lua and how to integrate its interpreter into a program or run it standalone. The MediaWiki developers have done all of that. Similarly, a lot of the Lua library functions are, for security, not available in modules. (For example, it's not possible to do file I/O or to make operating system calls in MediaWiki modules.) So, much of what these books explain about Lua standard library functions and variables that come with the language is either irrelevant or untrue here. </p><p>The original API specification — the Lua standard library functions and variables that are supposed to be available in modules — is given at <a href="https://www.mediawiki.org/wiki/Extension:Scribunto/API_specification" class="extiw" title="mw:Extension:Scribunto/API specification">MW:Extension:Scribunto/API specification</a>. However, even that is untrue. What you'll <i>actually</i> have available is documented in <a href="https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual" class="extiw" title="mw:Extension:Scribunto/Lua reference manual">MW:Extension:Scribunto/Lua reference manual</a>, which is a cut down version of the 1st Edition Lua manual that has been edited down and modified by Tim Starling to bring it more into line with the reality of Scribbling. Again, though, this is a reference manual, not a tutorial. </p><p>The things in Lua that you will mostly be concerned with, writing Scribbled templates, are <i>tables</i>, <i>strings</i> <i>numbers</i>, <i>booleans</i>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">nil</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">if</span> <span class="p">...</span> <span class="kr">then</span> <span class="p">...</span> <span class="kr">else</span> <span class="p">...</span> <span class="kr">end</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">while</span> <span class="p">...</span> <span class="kr">do</span> <span class="p">...</span> <span class="kr">end</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">for</span> <span class="p">...</span> <span class="kr">in</span> <span class="p">...</span> <span class="kr">do</span> <span class="p">...</span> <span class="kr">end</span></code> (generated <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">for</span></code>), <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">for</span> <span class="p">...</span> <span class="kr">do</span> <span class="p">...</span> <span class="kr">end</span></code> (numerical <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">for</span></code>), <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">repeat</span> <span class="p">...</span> <span class="kr">until</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">function</span> <span class="p">...</span> <span class="nf">end</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kd">local</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">return</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">break</span></code>, expressions and the various operators (including <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">#</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">..</span></code>, the arithmetic operators <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">+</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">-</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">*</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">/</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">^</span></code>, and <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="o">%</span></code>), and the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">string</span></code>, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">math</span></code>, and <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">mw</span></code> global tables (i.e. libraries). </p> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(2)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Template_structure" data-mw-thread-id="h-Template_structure"><span data-mw-comment-start="" id="h-Template_structure"></span>Template structure<span data-mw-comment-end="h-Template_structure"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=2" title="Edit section: Template structure" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Template_structure","replies":[]}}--></div><section class="mf-section-2 collapsible-block" id="mf-section-2"> <p>This is simple. Your template comprises one expansion of <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> in the usual case. Here is <span class="nowrap">{{</span><a href="/wiki/Template:Harvard_citation" title="Template:Harvard citation">Harvard citation</a><span class="nowrap">}}</span>, for example: </p> <div class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><pre><span></span><span class="p"><</span><span class="nt">includeonly</span><span class="p">>{{</span><span class="nf">#invoke</span><span class="p">:</span>Footnotes<span class="p">|</span>harvard_citation <span class="p">|</span><span class="nl">bracket_left</span><span class="o">=</span> ( <span class="p">|</span><span class="nl">bracket_right </span><span class="o">=</span> ) <span class="p">}}</</span><span class="nt">includeonly</span><span class="p">><</span><span class="nt">noinclude</span><span class="p">></span> <span class="p">{{</span><span class="nt">documentation</span><span class="p">}}</span> <span class="cm"><!-- Add categories to the /doc subpage, interwikis to Wikidata, not here --></span> <span class="p"></</span><span class="nt">noinclude</span><span class="p">></span> </pre></div> <p>If you find yourself wanting to use other templates within your template, or to use template parser functions, or indeed anything at all other than <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> and possibly some <a href="https://meta.wikimedia.org/wiki/Help:Variable" class="extiw" title="m:Help:Variable">variables</a> as its arguments, <i>then you are using the wrong approach</i>. </p> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(3)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Module_basics" data-mw-thread-id="h-Module_basics"><span data-mw-comment-start="" id="h-Module_basics"></span>Module basics<span data-mw-comment-end="h-Module_basics"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=3" title="Edit section: Module basics" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Module_basics","replies":["h-Overall_structure-Module_basics","h-Receiving_template_arguments-Module_basics","h-Errors-Module_basics"]}}--></div><section class="mf-section-3 collapsible-block" id="mf-section-3"> <div class="mw-heading mw-heading3"><h3 id="Overall_structure" data-mw-thread-id="h-Overall_structure-Module_basics"><span data-mw-comment-start="" id="h-Overall_structure-Module_basics"></span>Overall structure<span data-mw-comment-end="h-Overall_structure-Module_basics"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=4" title="Edit section: Overall structure" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Let's consider a hypothetical module, <a href="/w/index.php?title=Module:Population&action=edit&redlink=1" class="new" title="Module:Population (page does not exist)">Module:Population</a>. It can be structured in one of two ways: </p> <div class="mw-heading mw-heading4"><h4 id="A_named_local_table" data-mw-thread-id="h-A_named_local_table-Overall_structure"><span data-mw-comment-start="" id="h-A_named_local_table-Overall_structure"></span>A named local table<span data-mw-comment-end="h-A_named_local_table-Overall_structure"></span></h4><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=5" title="Edit section: A named local table" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="1"></span><span class="kd">local</span> <span class="n">p</span> <span class="o">=</span> <span class="p">{}</span> <span class="linenos" data-line="2"></span> <span class="linenos" data-line="3"></span><span class="kr">function</span> <span class="nc">p</span><span class="p">.</span><span class="nf">India</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span> <span class="linenos" data-line="4"></span> <span class="kr">return</span> <span class="s2">"1,21,01,93,422 people at (nominally) 2011-03-01 00:00:00 +0530"</span> <span class="linenos" data-line="5"></span><span class="kr">end</span> <span class="linenos" data-line="6"></span> <span class="linenos" data-line="7"></span><span class="kr">return</span> <span class="n">p</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="An_unnamed_table_generated_on_the_fly" data-mw-thread-id="h-An_unnamed_table_generated_on_the_fly-Overall_structure"><span data-mw-comment-start="" id="h-An_unnamed_table_generated_on_the_fly-Overall_structure"></span>An unnamed table generated on the fly<span data-mw-comment-end="h-An_unnamed_table_generated_on_the_fly-Overall_structure"></span></h4><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=6" title="Edit section: An unnamed table generated on the fly" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr mw-highlight-lines" dir="ltr"><pre><span></span><span class="linenos" data-line="1"></span><span class="kr">return</span> <span class="p">{</span> <span class="linenos" data-line="2"></span> <span class="n">India</span> <span class="o">=</span> <span class="kr">function</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span> <span class="linenos" data-line="3"></span> <span class="kr">return</span> <span class="s2">"1,21,01,93,422 people at (nominally) 2011-03-01 00:00:00 +0530"</span> <span class="linenos" data-line="4"></span> <span class="kr">end</span> <span class="linenos" data-line="5"></span><span class="p">}</span> </pre></div> <div class="mw-heading mw-heading4"><h4 id="Execution" data-mw-thread-id="h-Execution-Overall_structure"><span data-mw-comment-start="" id="h-Execution-Overall_structure"></span>Execution<span data-mw-comment-end="h-Execution-Overall_structure"></span></h4><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=7" title="Edit section: Execution" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>The execution of a module by <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> is actually twofold: </p> <ol><li>The module is loaded and the entire script is run. This loads up any additional modules that the module needs (using the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">require</span><span class="p">()</span></code> function), builds the (invocable) functions that the module will provide to templates, and returns a table of them.</li> <li>The function named in <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> is picked out of the table built in phase 1 and called, with the arguments supplied to the template <i>and</i> the arguments supplied to <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> (more on which <a href="#Receiving_template_arguments">later</a>).</li></ol> <p>The first Lua script does phase 1 fairly explicitly. It creates a <i>local variable</i> named <code>p</code> on line 1, initialized to a table; builds and adds a function to it (lines 3–5), by giving the function the name <code>India</code> in the table named by <code>p</code> (<code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">function</span> <span class="nc">p</span><span class="p">.</span><span class="nf">India</span></code> being the same as saying <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">p</span><span class="p">[</span><span class="s2">"India"</span><span class="p">]</span> <span class="o">=</span> <span class="kr">function</span></code><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>d<span class="cite-bracket">]</span></a></sup>); and then returns (on line 7) the table as the last line of the script. To expand such a script with more (invocable) functions, one adds them between the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kd">local</span></code> statement at the top and the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">return</span></code> statement at the bottom. (Non-invocable <i>local</i> functions can be added <i>before</i> the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kd">local</span></code> statement.) The local variable doesn't have to be named <code>p</code>. It could be named any valid Lua variable name that you like. <code>p</code> is simply conventional for this purpose, and is also the name that you can use to test the script in the debug console of the Module editor. </p><p>The second Lua script does the same thing, but more "idiomatically". Instead of creating a named variable as a table, it creates an anonymous table on the fly, in the middle of the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">return</span></code> statement, which is the only (executed during the first phase) statement in the script. The <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">India</span> <span class="o">=</span> <span class="kr">function</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span> <span class="p">...</span> <span class="kr">end</span></code> on lines 2–4 creates an (also anonymous) function and inserts it into the table under the name <code>India</code>. To expand such a script with more (invocable) functions, one adds them as further fields in the table. (Non-invocable <i>local</i> functions can, again, be added <i>before</i> the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">return</span></code> statement.) </p><p>In both cases, the template code that one writes is <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:</span>Population<span class="p">|</span>India<span class="p">}}</span></code> to <i>invoke</i> the function named <code>India</code> from the module <a href="/w/index.php?title=Module:Population&action=edit&redlink=1" class="new" title="Module:Population (page does not exist)">Module:Population</a>. Also note that <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kr">function</span></code> <i>builds</i> a function, as an object, to be called. It doesn't <i>declare</i> it, as you might be used to from other programming languages, and the function isn't executed until it <i>is</i> called. </p><p>One can do more complex things than this, of course. For example: One can declare other local variables in addition to <code>p</code>, to hold tables of data (such as lists of Language or country names), that the module uses. But this is the <i>basic</i> structure of a module. You make a table full of stuff, and return it. </p> <div class="mw-heading mw-heading3"><h3 id="Receiving_template_arguments" data-mw-thread-id="h-Receiving_template_arguments-Module_basics"><span data-mw-comment-start="" id="h-Receiving_template_arguments-Module_basics"></span>Receiving template arguments<span data-mw-comment-end="h-Receiving_template_arguments-Module_basics"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=8" title="Edit section: Receiving template arguments" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div><p> An ordinary function in Lua can take an (effectively) arbitrary number of arguments. Witness this function from <a href="/w/index.php?title=Module:Wikitext&action=edit&redlink=1" class="new" title="Module:Wikitext (page does not exist)">Module:Wikitext</a> that can be called with anywhere between zero and three arguments: </p><div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">function</span> <span class="nc">z</span><span class="p">.</span><span class="nf">oxfordlist</span><span class="p">(</span><span class="n">args</span><span class="p">,</span><span class="n">separator</span><span class="p">,</span><span class="n">ampersand</span><span class="p">)</span> </pre></div> <p>Functions called by <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> are special. They expect to be passed exactly one argument, a table that is called a <i>frame</i> (and so is conventionally given the parameter name <code>frame</code> in the parameter list of the function). It's called a <i>frame</i> because, unfortunately, the developers chose to name it for their convenience. It's named after an internal structure within the code of MediaWiki itself, which it <i>sort of</i> represents.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>e<span class="cite-bracket">]</span></a></sup> </p><p>This frame has a (sub-)table within it, named <code>args</code>. It also has a means for accessing its <i>parent frame</i> (again, named after a thing in MediaWiki). The parent frame <i>also</i> has a (sub-)table within it, also named <code>args</code>. </p> <ul><li>The arguments in the (child, one supposes) frame — i.e. the value of the <code>frame</code> parameter to the function — are the arguments passed to <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:}}</span></code> <i>within the wikitext of your template</i>. So, for example, if you were to write <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:</span>Population<span class="p">|</span>India<span class="p">|</span>a<span class="p">|</span>b<span class="p">|</span><span class="nl">class</span><span class="o">=</span>"popdata"<span class="p">}}</span></code> in your template then the arguments sub-table of the child frame would be (as written in Lua form) <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="p">{</span> <span class="s2">"a"</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">,</span> <span class="n">class</span><span class="o">=</span><span class="s2">"popdata"</span> <span class="p">}</span></code>.</li> <li>The arguments in the parent frame are the arguments <i>passed to your template when it was transcluded</i>. So, for example, were the user of your template to write <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nt">Population of India</span><span class="p">|</span>c<span class="p">|</span>d<span class="p">|</span><span class="nl">language</span><span class="o">=</span>Hindi<span class="p">}}</span></code> then the arguments sub-table of the parent frame would be (as written in Lua form) <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="p">{</span> <span class="s2">"c"</span><span class="p">,</span> <span class="s2">"d"</span><span class="p">,</span> <span class="n">language</span><span class="o">=</span><span class="s2">"Hindi"</span> <span class="p">}</span></code>.</li></ul> <p>A handy programmers' idiom that you can use, to make this all a bit easier, is to have local variables named (say) <code>config</code> and <code>args</code> in your function, that point to these two argument tables. See this, from <a href="/wiki/Module:WikidataCheck" title="Module:WikidataCheck">Module:WikidataCheck</a>: </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kr">function</span> <span class="nc">p</span><span class="p">.</span><span class="nf">wikidatacheck</span><span class="p">(</span><span class="n">frame</span><span class="p">)</span> <span class="kd">local</span> <span class="n">pframe</span> <span class="o">=</span> <span class="n">frame</span><span class="p">:</span><span class="n">getParent</span><span class="p">()</span> <span class="kd">local</span> <span class="n">config</span> <span class="o">=</span> <span class="n">frame</span><span class="p">.</span><span class="n">args</span> <span class="c1">-- the arguments passed BY the template, in the wikitext of the template itself</span> <span class="kd">local</span> <span class="n">args</span> <span class="o">=</span> <span class="n">pframe</span><span class="p">.</span><span class="n">args</span> <span class="c1">-- the arguments passed TO the template, in the wikitext that transcludes the template</span> </pre></div> <p>Everything in <code>config</code> is thus an argument that <i>you</i> have specified, in your template, that you can reference with code such as <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">config</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span></code> and <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">config</span><span class="p">[</span><span class="s2">"class"</span><span class="p">]</span></code>. These will be things that tell your module function its "configuration" (e.g. a CSS class name that can vary according to what template is used). </p><p>Everything in <code>args</code> is thus an argument that <i>the user of the template</i> has specified, where it was transcluded, that you can reference with code such as <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span></code> and <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">[</span><span class="s2">"language"</span><span class="p">]</span></code>. These will be the normal template arguments, as documented on your template's <code>/doc</code> page. </p><p>See <span class="nowrap">{{</span><a href="/wiki/Template:Other_places" title="Template:Other places">other places</a><span class="nowrap">}}</span> and <span class="nowrap">{{</span><a href="/wiki/Template:Other_ships" title="Template:Other ships">other ships</a><span class="nowrap">}}</span> for two templates that both do <code class="mw-highlight mw-highlight-lang-wikitext mw-content-ltr" dir="ltr"><span class="p">{{</span><span class="nf">#invoke</span><span class="p">:</span>Other uses<span class="p">|</span>otherX<span class="p">|</span>x<span class="p">}}</span></code> but do so with different arguments in place of the <code>x</code>, thereby obtaining different results from one single common Lua function. </p><p>For both sets of arguments, the name and value of the argument are exactly as in the wikitext, except that leading and trailing whitespace in named parameters is discounted. This has an effect on your code if you decide to support or employ transclusion/invocation argument names that aren't valid Lua variable names. You cannot use the "dot" form of table lookup in such cases. For instance: <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">.</span><span class="n">author</span><span class="o">-</span><span class="n">first</span></code> is, as you can see from the syntax colourization here, not a reference to an <code>|author-first=</code> argument, but a reference to an <code>|author=</code> argument and a <code>first</code> variable with the subtraction operator in the middle. To access such an argument, use the "square bracket" form of table lookup: <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">[</span><span class="s2">"author-first"</span><span class="p">]</span></code>. </p><p>Named arguments are indexed in the <code>args</code> table by their name strings, of course. Positional arguments (whether as the result of an explicit <code>1=</code> or otherwise) are indexed in the <code>args</code> tables by number, not by string. <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span></code> is not the same as <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">[</span><span class="s2">"1"</span><span class="p">]</span></code>, and the latter is effectively unsettable from wikitext. </p><p>Finally, note that Lua modules can differentiate between arguments that have been used in the wikitext and simply set to an empty string, and arguments that aren't in the wikitext at all. The latter don't exist in the <code>args</code> table, and any attempt to index them will evaluate to <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">nil</span></code>. Whereas the former <i>do</i> exist in the table and evaluate to an empty string, <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="s2">""</span></code>. </p> <div class="mw-heading mw-heading3"><h3 id="Errors" data-mw-thread-id="h-Errors-Module_basics"><span data-mw-comment-start="" id="h-Errors-Module_basics"></span>Errors<span data-mw-comment-end="h-Errors-Module_basics"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=9" title="Edit section: Errors" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>Let's get one thing out of the way right at the start: <i><span style="color: red; bgcolor: white;"><b>Script error</b></span> is a hyperlink. You can put the mouse pointer on it and click.</i> </p><p>We've become so conditioned by our (non-Scribbled) templates putting out error messages in red that we think that the Scribunto "Script error" error message is nothing but more of the same. It isn't. If you have <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> enabled in your WWW browser, it will pop up a window giving the details of the error, a call backtrace, and even hyperlinks that will take you to the location of the code where the error happened in the relevant module. </p><p>You can cause an error to happen by calling the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">error</span><span class="p">()</span></code> function. </p> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(4)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Tips_and_tricks" data-mw-thread-id="h-Tips_and_tricks"><span data-mw-comment-start="" id="h-Tips_and_tricks"></span>Tips and tricks<span data-mw-comment-end="h-Tips_and_tricks"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=10" title="Edit section: Tips and tricks" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Tips_and_tricks","replies":["h-Arguments_tables_are_\"special\".-Tips_and_tricks","h-Copy_table_contents_into_local_variables.-Tips_and_tricks","h-Don't_expand_templates,_even_though_you_can.-Tips_and_tricks"]}}--></div><section class="mf-section-4 collapsible-block" id="mf-section-4"> <div class="mw-heading mw-heading3"><h3 id='Arguments_tables_are_"special".' data-mw-thread-id='h-Arguments_tables_are_"special".-Tips_and_tricks'><span id="Arguments_tables_are_.22special.22."></span><span data-mw-comment-start="" id='h-Arguments_tables_are_"special".-Tips_and_tricks'></span>Arguments tables are "special".<span data-mw-comment-end='h-Arguments_tables_are_"special".-Tips_and_tricks'></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=11" title='Edit section: Arguments tables are "special".' class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>For reasons that are out of the scope of this Guide,<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>f<span class="cite-bracket">]</span></a></sup> the <code>args</code> sub-table of a frame is not quite like an ordinary table. It starts out empty, and it is populated with arguments as and when you execute code that looks for them.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>g<span class="cite-bracket">]</span></a></sup> (It's possible to make tables that work like this in a Lua program, using things called <i>metatables</i>. That, too, is outwith the scope of this Guide.) </p><p>An unfortunate side-effect of this is that some of the normal Lua table operators don't work on an <code>args</code> table. The length operator, <code>#</code>, will not work, and neither will the functions in Lua's <code>table</code> library. These only work with standard tables, and fail when presented with the special <code>args</code> table. However, the <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">pairs</span><span class="p">()</span></code> and <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">ipairs</span><span class="p">()</span></code> functions will both work, as code to make their use possible has been added by the developers. </p> <div class="mw-heading mw-heading3"><h3 id="Copy_table_contents_into_local_variables." data-mw-thread-id="h-Copy_table_contents_into_local_variables.-Tips_and_tricks"><span data-mw-comment-start="" id="h-Copy_table_contents_into_local_variables.-Tips_and_tricks"></span>Copy table contents into local variables.<span data-mw-comment-end="h-Copy_table_contents_into_local_variables.-Tips_and_tricks"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=12" title="Edit section: Copy table contents into local variables." class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>A name in Lua is either an access of a local variable or a table lookup.<sup id="cite_ref-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;EVAL_AND_ENVIRONMENTS_10-0" class="reference"><a href="#cite_note-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;EVAL_AND_ENVIRONMENTS-10"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">math.floor</span></code> is a table lookup (of the string <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="s2">"floor"</span></code>) in the (global) <code>math</code> table, for example. Table lookups are slower, at runtime, than local variable lookups. Table lookups in tables such as the <code>args</code> table with <a href="#Arguments_tables_are_%22special%22.">its "specialness"</a> are a <i>lot</i> slower. </p><p>A function in Lua can have up to 250 local variables.<sup id="cite_ref-FOOTNOTEIerusalimschy200817_11-0" class="reference"><a href="#cite_note-FOOTNOTEIerusalimschy200817-11"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> So make liberal use of them: </p> <ul><li>If you call <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="nb">math.floor</span></code> many times, copy it into a local variable and use that instead:<sup id="cite_ref-FOOTNOTEIerusalimschy200817_11-1" class="reference"><a href="#cite_note-FOOTNOTEIerusalimschy200817-11"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span> <span class="n">floor</span> <span class="o">=</span> <span class="nb">math.floor</span> <span class="kd">local</span> <span class="n">a</span> <span class="o">=</span> <span class="n">floor</span><span class="p">((</span><span class="mi">14</span> <span class="o">-</span> <span class="n">date</span><span class="p">.</span><span class="n">mon</span><span class="p">)</span> <span class="o">/</span> <span class="mi">12</span><span class="p">)</span> <span class="kd">local</span> <span class="n">y</span> <span class="o">=</span> <span class="n">date</span><span class="p">.</span><span class="n">year</span> <span class="o">+</span> <span class="mi">4800</span> <span class="o">-</span> <span class="n">a</span> <span class="kd">local</span> <span class="n">m</span> <span class="o">=</span> <span class="n">date</span><span class="p">.</span><span class="n">mon</span> <span class="o">+</span> <span class="mi">12</span> <span class="o">*</span> <span class="n">a</span> <span class="o">-</span> <span class="mi">3</span> <span class="kr">return</span> <span class="n">date</span><span class="p">.</span><span class="n">day</span> <span class="o">+</span> <span class="n">floor</span><span class="p">((</span><span class="mi">153</span> <span class="o">*</span> <span class="n">m</span> <span class="o">+</span> <span class="mi">2</span><span class="p">)</span> <span class="o">/</span> <span class="mi">5</span><span class="p">)</span> <span class="o">+</span> <span class="mi">365</span> <span class="o">*</span> <span class="n">y</span> <span class="o">+</span> <span class="n">floor</span><span class="p">(</span><span class="n">y</span> <span class="o">/</span> <span class="mi">4</span><span class="p">)</span> <span class="o">-</span> <span class="n">floor</span><span class="p">(</span><span class="n">y</span> <span class="o">/</span> <span class="mi">100</span><span class="p">)</span> <span class="o">+</span> <span class="n">floor</span><span class="p">(</span><span class="n">y</span> <span class="o">/</span> <span class="mi">400</span><span class="p">)</span> <span class="o">-</span> <span class="mi">2432046</span> </pre></div></li> <li>Don't use <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">args</span><span class="p">.</span><span class="n">something</span></code> over and over. Copy it into a local variable and use that:<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span> <span class="n">Tab</span> <span class="o">=</span> <span class="n">args</span><span class="p">.</span><span class="n">tab</span> </pre></div>(Even the <code>args</code> variable itself is a way to avoid looking up <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="s2">"args"</span></code> in the <code>frame</code> table over and over.)</li></ul> <p>When copying arguments into local variables there are two useful things that you can do along the way: </p> <ul><li>The <i>alternative names for the same argument</i> trick. If a template argument can go by different names — such as uppercase and lowercase forms, or different English spellings — then you can use Lua's <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="ow">or</span></code> operator to pick the highest priority name that is actually supplied:<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span> <span class="n">Title</span> <span class="o">=</span> <span class="n">args</span><span class="p">.</span><span class="n">title</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">encyclopaedia</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">encyclopedia</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">dictionary</span> <span class="kd">local</span> <span class="n">ISBN</span> <span class="o">=</span> <span class="n">args</span><span class="p">.</span><span class="n">isbn13</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">isbn</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">ISBN</span> </pre></div></li></ul> <p>This works for two reasons: </p> <ul><li><ul><li><code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">nil</span></code> is the same as <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">false</span></code> as far as <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="ow">or</span></code> is concerned.</li> <li>Lua's <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="ow">or</span></code> operator has what are known as "shortcut" semantics. If the left-hand operand evaluates to something that isn't <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">false</span></code> or <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">nil</span></code>, it doesn't bother even working out the value of the right-hand operand. (So whilst that first example may at first glance look like it does four lookups, in the commonest case, where <code>|title=</code> is used with the template, it in fact only actually does one.)</li></ul></li> <li>The <i>default to empty string</i> trick. Sometimes the fact that an omitted template argument is <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="kc">nil</span></code> is useful. Other times, however, it isn't, and you want the behaviour of missing arguments being empty strings. A simple <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="ow">or</span> <span class="s2">""</span></code> at the end of an expression suffices:<div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">local</span> <span class="n">ID</span> <span class="o">=</span> <span class="n">args</span><span class="p">.</span><span class="n">id</span> <span class="ow">or</span> <span class="n">args</span><span class="p">.</span><span class="n">ID</span> <span class="ow">or</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">or</span> <span class="s2">""</span> </pre></div></li></ul> <div class="mw-heading mw-heading3"><h3 id="Don't_expand_templates,_even_though_you_can." data-mw-thread-id="h-Don't_expand_templates,_even_though_you_can.-Tips_and_tricks"><span id="Don.27t_expand_templates.2C_even_though_you_can."></span><span data-mw-comment-start="" id="h-Don't_expand_templates,_even_though_you_can.-Tips_and_tricks"></span>Don't expand templates, even though you can.<span data-mw-comment-end="h-Don't_expand_templates,_even_though_you_can.-Tips_and_tricks"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=13" title="Edit section: Don't expand templates, even though you can." class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <p>If local variables are cheap and table lookups are expensive, then template expansion is way above your price bracket. </p><p>Avoid <code class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><span class="n">frame</span><span class="p">:</span><span class="n">preprocess</span><span class="p">()</span></code> like the plague. Nested template expansion using MediaWiki's preprocessor is what we're trying to get away from, after all. Most things that you'd do with that are done more simply, more quickly, and more maintainably, with simple Lua functions. </p><p>Similarly, avoid things like using <a href="/w/index.php?title=Template:ISO_639_name_aze&action=edit&redlink=1" class="new" title="Template:ISO 639 name aze (page does not exist)">w:Template:ISO 639 name aze</a> (<i><a href="/wiki/Wikipedia:Templates_for_discussion/Log/2020_August_14#ISO_639_name_from_code_templates" title="Wikipedia:Templates for discussion/Log/2020 August 14">deleted August 2020</a></i>) to store what is effectively an entry in a database. Reading it would be a nested parser call with concomitant database queries, all to map a string onto another string. Put a simple straightforward data table in your module, like the ones in <a href="/wiki/Module:Wikt-lang" title="Module:Wikt-lang">Module:Wikt-lang</a>. </p> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(5)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Notes" data-mw-thread-id="h-Notes"><span data-mw-comment-start="" id="h-Notes"></span>Notes<span data-mw-comment-end="h-Notes"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=14" title="Edit section: Notes" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Notes","replies":[]}}--></div><section class="mf-section-5 collapsible-block" id="mf-section-5"> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width reflist-lower-alpha" style="column-width: 50em;"> <ol class="references"> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text">The name "Scribunto" is Latin. "<a href="https://en.wiktionary.org/wiki/scribunto#Latin" class="extiw" title="wikt:scribunto">scribunto</a>" is third person plural <a href="/wiki/Future_tense" title="Future tense">future</a> <a href="/wiki/Active_voice" title="Active voice">active</a> <a href="/wiki/Imperative_mood" title="Imperative mood">imperative</a> of "<a href="https://en.wiktionary.org/wiki/scribunto#Latin" class="extiw" title="wikt:scribunto">scribere</a>" and means "they shall write". "<a href="https://en.wiktionary.org/wiki/scribble#English" class="extiw" title="wikt:scribble">scribble</a>" is of course an English word derived from that Latin word, via <a href="/wiki/Mediaeval_Latin" class="mw-redirect" title="Mediaeval Latin">Mediaeval Latin</a> "<a href="https://en.wiktionary.org/wiki/scribillare#Latin" class="extiw" title="wikt:scribillare">scribillare</a>".<sup id="cite_ref-FOOTNOTEMW2003a1116_1-0" class="reference"><a href="#cite_note-FOOTNOTEMW2003a1116-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text">For an idea of what "bolted-on" connotes when it comes to software design, see the <i><a href="/wiki/The_Flintstones" title="The Flintstones">Flintstones</a></i> cartoons where the rack of ribs from the Drive-Thru is so heavy that it causes the Flintstones' car to fall on its side.</span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text">It may need, until such time as the whole of the specified API for Scribunto is available to modules, to transclude <i><a href="https://meta.wikimedia.org/wiki/Help:magic_words" class="extiw" title="m:Help:magic words">magic words</a></i>. See <a href="#Tips_and_tricks">the tips and tricks section</a>. Magic words are not templates, however.</span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text">The inventors of the language call this <a href="/wiki/Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a>.<sup id="cite_ref-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;DATA_5-0" class="reference"><a href="#cite_note-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;DATA-5"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text">In MediaWiki proper, there are more than two frames.</span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text">If you want to know, go and read about how MediaWiki, in part due to the burden laid upon it by the old templates-conditionally-transcluding-templates system, does <a href="/wiki/Lazy_evaluation" title="Lazy evaluation">lazy evaluation</a> of template arguments.</span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text">Don't be surprised, therefore, if you find a call backtrace showing a call to some other module in what you thought was an ordinary template argument reference. That will be because expansion of that argument involved expanding another Scribbled template.</span> </li> </ol></div> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(6)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="References" data-mw-thread-id="h-References"><span data-mw-comment-start="" id="h-References"></span>References<span data-mw-comment-end="h-References"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=15" title="Edit section: References" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-References","replies":["h-Cross-references-References","h-Citations-References"]}}--></div><section class="mf-section-6 collapsible-block" id="mf-section-6"> <div class="mw-heading mw-heading3"><h3 id="Cross-references" data-mw-thread-id="h-Cross-references-References"><span data-mw-comment-start="" id="h-Cross-references-References"></span>Cross-references<span data-mw-comment-end="h-Cross-references-References"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=16" title="Edit section: Cross-references" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239543626"><div class="reflist reflist-columns references-column-width" style="column-width: 30em;"> <ol class="references"> <li id="cite_note-FOOTNOTEMW2003a1116-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEMW2003a1116_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFMW2003a">MW 2003a</a>, p. 1116.</span> </li> <li id="cite_note-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;DATA-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;DATA_5-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFIerusalimschyde_FigueiredoCeles2011">Ierusalimschy, de Figueiredo & Celes 2011</a>, §DATA.</span> </li> <li id="cite_note-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;EVAL_AND_ENVIRONMENTS-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEIerusalimschyde_FigueiredoCeles2011&sect;EVAL_AND_ENVIRONMENTS_10-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFIerusalimschyde_FigueiredoCeles2011">Ierusalimschy, de Figueiredo & Celes 2011</a>, §EVAL AND ENVIRONMENTS.</span> </li> <li id="cite_note-FOOTNOTEIerusalimschy200817-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-FOOTNOTEIerusalimschy200817_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-FOOTNOTEIerusalimschy200817_11-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><a href="#CITEREFIerusalimschy2008">Ierusalimschy 2008</a>, p. 17.</span> </li> </ol></div> <div class="mw-heading mw-heading3"><h3 id="Citations" data-mw-thread-id="h-Citations-References"><span data-mw-comment-start="" id="h-Citations-References"></span>Citations<span data-mw-comment-end="h-Citations-References"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=17" title="Edit section: Citations" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <style data-mw-deduplicate="TemplateStyles:r1239549316">.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}</style><div class="refbegin" style=""> <ul><li><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFMW2003a" class="citation encyclopaedia cs1">"scribble". <i>Merriam-Webster's Collegiate Dictionary: Eleventh Edition</i>. <i>Merriam-Webster's Collegiate Dictionary</i> (11th ed.). Merriam-Webster. 2003. p. 1116. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/9780877798095" title="Special:BookSources/9780877798095"><bdi>9780877798095</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Merriam-Webster%27s+Collegiate+Dictionary%3A+Eleventh+Edition&rft.btitle=Merriam-Webster%27s+Collegiate+Dictionary&rft.pages=1116&rft.edition=11th&rft.pub=Merriam-Webster&rft.date=2003&rft.isbn=9780877798095&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyde_FigueiredoCeles2011" class="citation journal cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (12 May 2011). <a rel="nofollow" class="external text" href="http://queue.acm.org/detail.cfm?id=1983083">"Passing a Language through the Eye of a Needle"</a>. <i>Queue</i>. <b>9</b> (5). Association for Computing Machinery. ACM 1542-7730/11/0500.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Queue&rft.atitle=Passing+a+Language+through+the+Eye+of+a+Needle&rft.volume=9&rft.issue=5&rft.date=2011-05-12&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=http%3A%2F%2Fqueue.acm.org%2Fdetail.cfm%3Fid%3D1983083&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschy2008" class="citation book cs1">Ierusalimschy, Roberto (December 2008). <a rel="nofollow" class="external text" href="http://lua.org./gems/sample.pdf">"Lua Performance Tips"</a> <span class="cs1-format">(PDF)</span>. In de Figueiredo, Luiz Henrique; Celes, Waldemar; Ierusalimschy, Roberto (eds.). <i>Lua Programming Gems</i>. Lua.org. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-85-903798-4-3" title="Special:BookSources/978-85-903798-4-3"><bdi>978-85-903798-4-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Lua+Performance+Tips&rft.btitle=Lua+Programming+Gems&rft.pub=Lua.org&rft.date=2008-12&rft.isbn=978-85-903798-4-3&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft_id=http%3A%2F%2Flua.org.%2Fgems%2Fsample.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li></ul> </div> </section><div class="mw-heading mw-heading2 ext-discussiontools-init-section section-heading" onclick="mfTempOpenSection(7)"><span class="indicator mf-icon mf-icon-expand mf-icon--small"></span><h2 id="Further_reading" data-mw-thread-id="h-Further_reading"><span data-mw-comment-start="" id="h-Further_reading"></span>Further reading<span data-mw-comment-end="h-Further_reading"></span></h2><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=18" title="Edit section: Further reading" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> <!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Further_reading","replies":["h-Lua_2-Further_reading"]}}--></div><section class="mf-section-7 collapsible-block" id="mf-section-7"> <div class="mw-heading mw-heading3"><h3 id="Lua_2" data-mw-thread-id="h-Lua_2-Further_reading"><span data-mw-comment-start="" id="h-Lua_2-Further_reading"></span>Lua<span data-mw-comment-end="h-Lua_2-Further_reading"></span></h3><span class="mw-editsection"> <a role="button" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=edit&section=19" title="Edit section: Lua" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </div> <link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239549316"><div class="refbegin refbegin-hanging-indents" style=""> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschyde_FigueiredoCeles2006" class="citation book cs1">Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Celes, Waldemar (August 2006). <a rel="nofollow" class="external text" href="http://lua.org./manual/5.1/"><i>Lua 5.1 Reference Manual</i></a>. Lua.org. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/85-903798-3-3" title="Special:BookSources/85-903798-3-3"><bdi>85-903798-3-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Lua+5.1+Reference+Manual&rft.pub=Lua.org&rft.date=2006-08&rft.isbn=85-903798-3-3&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft.au=de+Figueiredo%2C+Luiz+Henrique&rft.au=Celes%2C+Waldemar&rft_id=http%3A%2F%2Flua.org.%2Fmanual%2F5.1%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschy2006" class="citation book cs1">Ierusalimschy, Roberto (March 2006). <i>Programming in Lua</i> (Second ed.). Lua.org. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/9788590379829" title="Special:BookSources/9788590379829"><bdi>9788590379829</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Programming+in+Lua&rft.edition=Second&rft.pub=Lua.org&rft.date=2006-03&rft.isbn=9788590379829&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFIerusalimschy2003" class="citation book cs1">Ierusalimschy, Roberto (December 2003). <a rel="nofollow" class="external text" href="http://lua.org./pil/#1ed"><i>Programming in Lua</i></a> (First ed.). Lua.org. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/85-903798-1-7" title="Special:BookSources/85-903798-1-7"><bdi>85-903798-1-7</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Programming+in+Lua&rft.edition=First&rft.pub=Lua.org&rft.date=2003-12&rft.isbn=85-903798-1-7&rft.aulast=Ierusalimschy&rft.aufirst=Roberto&rft_id=http%3A%2F%2Flua.org.%2Fpil%2F%231ed&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFJungBrown2007" class="citation book cs1">Jung, Kurt; Brown, Aaron (February 2007). <i>Beginning Lua Programming</i>. Wrox. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-0-470-06917-2" title="Special:BookSources/978-0-470-06917-2"><bdi>978-0-470-06917-2</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Beginning+Lua+Programming&rft.pub=Wrox&rft.date=2007-02&rft.isbn=978-0-470-06917-2&rft.aulast=Jung&rft.aufirst=Kurt&rft.au=Brown%2C+Aaron&rfr_id=info%3Asid%2Fen.wikipedia.org%3AWikipedia%3AGuide+to+Scribbling" class="Z3988"></span></li></ul> </div> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Wikipedia_technical_help" style="padding:3px"><table class="nowraplinks hlist mw-collapsible mw-collapsed navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2" style="text-align: center;"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Wikipedia_technical_help" title="Template:Wikipedia technical help"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Wikipedia_technical_help" title="Template talk:Wikipedia technical help"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Wikipedia_technical_help" title="Special:EditPage/Template:Wikipedia technical help"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Wikipedia_technical_help" style="font-size:114%;margin:0 4em"><a href="/wiki/Help:Directory#Technical_help" title="Help:Directory">Wikipedia technical help</a></div></th></tr><tr><td class="navbox-abovebelow" colspan="2" style="text-align: center;"><div><b>Get personal technical help at <a href="/wiki/Wikipedia:Teahouse" title="Wikipedia:Teahouse">the Teahouse</a>, <a href="/wiki/Wikipedia:Help_desk" title="Wikipedia:Help desk">help desk</a>, <a href="/wiki/Wikipedia:Village_pump_(technical)" title="Wikipedia:Village pump (technical)">village pump (technical)</a>, <a href="/wiki/Help:Introduction_to_talk_pages/1" title="Help:Introduction to talk pages/1">talk pages</a> or <a href="/wiki/Wikipedia:IRC" title="Wikipedia:IRC">IRC</a>.</b></div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Wikipedia:FAQ/Technical" title="Wikipedia:FAQ/Technical">General<br>technical help</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Wikipedia:Browser_notes" title="Wikipedia:Browser notes">Browser notes</a> <ul><li><a href="/wiki/Wikipedia:Bypass_your_cache" title="Wikipedia:Bypass your cache">Bypass cache</a></li> <li><a href="/wiki/Wikipedia:Keyboard_shortcuts" class="mw-redirect" title="Wikipedia:Keyboard shortcuts">Keyboard shortcuts</a></li></ul></li> <li><a href="/wiki/Help:Editing" title="Help:Editing">Editing</a> <ul><li><a href="/wiki/Help:CharInsert" title="Help:CharInsert">CharInsert</a></li> <li><a href="/wiki/Help:Edit_conflict" title="Help:Edit conflict">Edit conflict</a></li> <li><a href="/wiki/Help:Edit_toolbar" title="Help:Edit toolbar">Edit toolbar</a></li> <li><a href="/wiki/Help:Reverting" title="Help:Reverting">Reverting</a></li></ul></li> <li><a href="/wiki/Wikipedia:How_to_create_a_page" title="Wikipedia:How to create a page">How to create a page</a></li> <li><a href="/wiki/Wikipedia:IRC" title="Wikipedia:IRC">IRC</a> <ul><li><a href="/wiki/Wikipedia:IRC/Tutorial" title="Wikipedia:IRC/Tutorial">Tutorial</a></li></ul></li> <li><a href="/wiki/Help:Mobile_access" title="Help:Mobile access">Mobile access</a></li> <li><a href="/wiki/Help:Multilingual_support" title="Help:Multilingual support">Multilingual support</a></li> <li><a href="/wiki/Help:Page_history" title="Help:Page history">Page history</a></li> <li><a href="/wiki/Help:Page_information" title="Help:Page information">Page information</a></li> <li><a href="/wiki/Wikipedia:Page_name" title="Wikipedia:Page name">Page name</a> <ul><li><a href="/wiki/Help:Page_name" title="Help:Page name">Help</a></li></ul></li> <li><a href="/wiki/Help:Printing" title="Help:Printing">Printing</a></li> <li><a href="/wiki/Wikipedia:Software_notices" title="Wikipedia:Software notices">Software notices</a> <ul><li><a href="/wiki/Wikipedia:Editnotice" title="Wikipedia:Editnotice">Editnotice</a></li></ul></li> <li><a href="/wiki/Help:Special_characters" title="Help:Special characters">Special Characters</a> <ul><li><a href="/wiki/Help:Entering_special_characters" title="Help:Entering special characters">Entering</a></li></ul></li> <li><a href="/wiki/Wikipedia:User_access_levels" title="Wikipedia:User access levels">User access levels</a></li> <li><a href="/wiki/Wikipedia:VisualEditor" title="Wikipedia:VisualEditor">VisualEditor</a> <ul><li><a href="/wiki/Help:VisualEditor" title="Help:VisualEditor">Help</a></li></ul></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Special:SpecialPages" title="Special:SpecialPages">Special<br>page</a>-related</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Special_page" title="Help:Special page">Special page help</a></li> <li><a href="/wiki/Help:AllPages" title="Help:AllPages">AllPages</a></li> <li><a href="/wiki/Wikipedia:Edit_filter" title="Wikipedia:Edit filter">Edit filter</a></li> <li><a href="/wiki/Wikipedia:Emailing_users" title="Wikipedia:Emailing users">Emailing users</a></li> <li><a href="/wiki/Help:Logging_in" title="Help:Logging in">Logging in</a> <ul><li><a href="/wiki/Help:Reset_password" title="Help:Reset password">Reset passwords</a></li></ul></li> <li><a href="/wiki/Help:Log" title="Help:Log">Logs</a></li> <li><a href="/wiki/Wikipedia:Moving_a_page" title="Wikipedia:Moving a page">Moving a page</a> <ul><li><a href="/wiki/Wikipedia:History_merging" title="Wikipedia:History merging">History merging</a></li> <li><a href="/wiki/Help:When_to_place_technical_requests_in_%22Administrator_needed%22" title='Help:When to place technical requests in "Administrator needed"'>Non-admin and admin-only page moves</a></li></ul></li> <li><a href="/wiki/Help:Notifications" title="Help:Notifications">Notifications/Echo</a> <ul><li><a href="/wiki/Help:Notifications/FAQ" title="Help:Notifications/FAQ">FAQ</a></li></ul></li> <li><a href="/wiki/Wikipedia:Page_Curation/Help" title="Wikipedia:Page Curation/Help">Page Curation</a></li> <li><a href="/wiki/Help:Import" title="Help:Import">Page import</a></li> <li><a href="/wiki/Wikipedia:Pending_changes" title="Wikipedia:Pending changes">Pending changes</a></li> <li><a href="/wiki/Wikipedia:Random" title="Wikipedia:Random">Random pages</a></li> <li><a href="/wiki/Help:Recent_changes" title="Help:Recent changes">Recent changes</a></li> <li><a href="/wiki/Help:Related_changes" title="Help:Related changes">Related changes</a></li> <li><a href="/wiki/Help:Searching" title="Help:Searching">Searching</a> <ul><li><a href="/wiki/Help:Linksearch" title="Help:Linksearch">Linksearch</a></li></ul></li> <li><a href="/wiki/Wikipedia:Tags" title="Wikipedia:Tags">Tags</a></li> <li><a href="/wiki/Help:User_contributions" title="Help:User contributions">User contributions</a></li> <li><a href="/wiki/Help:Watchlist" title="Help:Watchlist">Watchlist</a></li> <li><a href="/wiki/Help:What_links_here" title="Help:What links here">What links here</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Help:Wikitext" title="Help:Wikitext">Wikitext</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Wikitext" title="Help:Wikitext">Wikitext</a> <ul><li><a href="/wiki/Help:Cheatsheet" title="Help:Cheatsheet">Cheatsheet</a></li></ul></li> <li><a href="/wiki/Help:Columns" title="Help:Columns">Columns</a></li> <li><a href="/wiki/Help:Line-break_handling" title="Help:Line-break handling">Line-break handling</a></li> <li><a href="/wiki/Help:List" title="Help:List">Lists</a></li> <li><a href="/wiki/Help:Magic_words" title="Help:Magic words">Magic words</a> <ul><li><a href="/wiki/Help:Magic_words_for_beginners" title="Help:Magic words for beginners">For beginners</a></li> <li><a href="/wiki/Help:Conditional_expressions" title="Help:Conditional expressions">Conditional expressions</a></li> <li><a href="/wiki/Help:Switch_parser_function" title="Help:Switch parser function">Switch parser function</a></li> <li><a href="/wiki/Help:Time_function" title="Help:Time function">Time function</a></li></ul></li> <li><a href="/wiki/Help:Redirect" title="Help:Redirect">Redirects</a></li> <li><a href="/wiki/Help:Section" title="Help:Section">Sections and TOCs</a></li> <li><a href="/wiki/Help:Table" title="Help:Table">Tables</a> <ul><li><a href="/wiki/Help:Introduction_to_tables_with_Wiki_Markup/1" title="Help:Introduction to tables with Wiki Markup/1">Introduction</a></li> <li><a href="/wiki/Help:Basic_table_markup" title="Help:Basic table markup">Basics</a></li> <li><a href="/wiki/Help:Advanced_table_formatting" title="Help:Advanced table formatting">Advanced table formatting</a></li> <li><a href="/wiki/Help:Collapsing" class="mw-redirect" title="Help:Collapsing">Collapsing</a></li> <li><a href="/wiki/Help:Conditional_tables" title="Help:Conditional tables">Conditional tables</a></li> <li><a href="/wiki/Help:Sortable_tables" title="Help:Sortable tables">Sortable tables</a></li></ul></li> <li><a href="/wiki/Help:Using_colours" title="Help:Using colours">Using colours</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Help:Link" title="Help:Link">Links</a> and <a href="/wiki/Help:Diff" title="Help:Diff">diffs</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Link" title="Help:Link">Links</a> <ul><li><a href="/wiki/Help:Interlanguage_links" title="Help:Interlanguage links">Interlanguage</a></li> <li><a href="/wiki/Help:Interwiki_linking" title="Help:Interwiki linking">Interwiki</a></li> <li><a href="/wiki/Help:Permanent_link" title="Help:Permanent link">Permanent</a></li></ul></li> <li><a href="/wiki/Help:Diff" title="Help:Diff">Diffs</a> <ul><li><a href="/wiki/Wikipedia:Simplest_diff_guide" title="Wikipedia:Simplest diff guide">Simplest diff guide</a></li> <li><a href="/wiki/Wikipedia:Simple_diff_and_link_guide" title="Wikipedia:Simple diff and link guide">Simple diff and link guide</a></li> <li><a href="/wiki/Wikipedia:Complete_diff_and_link_guide" title="Wikipedia:Complete diff and link guide">Complete diff and link guide</a></li></ul></li> <li><a href="/wiki/Help:Colon_trick" title="Help:Colon trick">Colon trick</a></li> <li><a href="/wiki/Help:Link_color" title="Help:Link color">Link color</a></li> <li><a href="/wiki/Help:Pipe_trick" title="Help:Pipe trick">Pipe trick</a></li> <li><a href="/wiki/Help:URL" title="Help:URL">URLs</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Wikipedia:Media" class="mw-disambig" title="Wikipedia:Media">Media</a> files: images,<br>videos and sounds</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Media" title="Help:Media">Media help</a></li> <li><a href="/wiki/Help:Files" title="Help:Files">Files</a> <ul><li><a href="/wiki/Help:Creation_and_usage_of_media_files" title="Help:Creation and usage of media files">Creation and usage</a></li> <li><a href="/wiki/Wikipedia:Moving_files_to_Commons" title="Wikipedia:Moving files to Commons">Moving files to Commons</a></li></ul></li> <li><a href="/wiki/Wikipedia:Images" title="Wikipedia:Images">Images</a> <ul><li><a href="/wiki/Help:Introduction_to_images_with_Wiki_Markup/1" title="Help:Introduction to images with Wiki Markup/1">Introduction to images</a></li> <li><a href="/wiki/Help:Pictures" title="Help:Pictures">Picture tutorial</a></li> <li><a href="/wiki/Wikipedia:Preparing_images_for_upload" title="Wikipedia:Preparing images for upload">Preparing images for upload</a></li> <li><a href="/wiki/Wikipedia:Uploading_images" title="Wikipedia:Uploading images">Uploading images</a></li> <li><a href="/wiki/Help:Options_to_hide_an_image" title="Help:Options to hide an image">Options to hide an image</a></li> <li><a href="/wiki/Wikipedia:Extended_image_syntax" title="Wikipedia:Extended image syntax">Extended image syntax</a></li> <li><a href="/wiki/Wikipedia:SVG_help" title="Wikipedia:SVG help">SVG help</a></li></ul></li> <li><a href="/wiki/Help:Gallery_tag" title="Help:Gallery tag">Gallery tag</a></li> <li><a href="/wiki/Wikipedia:Graphics_tutorials" title="Wikipedia:Graphics tutorials">Graphics tutorials</a> <ul><li><a href="/wiki/Wikipedia:Basic_bitmap_image_editing" title="Wikipedia:Basic bitmap image editing">Basic bitmap image editing</a></li> <li><a href="/wiki/Wikipedia:How_to_improve_image_quality" title="Wikipedia:How to improve image quality">How to improve image quality</a></li> <li><a href="/wiki/Wikipedia:Graphics_Lab/Resources" title="Wikipedia:Graphics Lab/Resources">Graphics Lab resources</a></li></ul></li> <li><a href="/wiki/Help:Sound_file_markup" title="Help:Sound file markup">Sound file markup</a></li> <li><a href="/wiki/Help:Visual_file_markup" title="Help:Visual file markup">Visual file markup</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%">Other graphics</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Family_trees" title="Help:Family trees">Family trees</a></li> <li><a href="/wiki/Wikipedia:Graphs_and_charts" title="Wikipedia:Graphs and charts">Graphs and charts</a> <ul><li><a href="/wiki/Wikipedia:How_to_create_charts_for_Wikipedia_articles" title="Wikipedia:How to create charts for Wikipedia articles">How to create</a></li> <li><a href="/wiki/Help:Barchart" title="Help:Barchart">Barcharts</a></li> <li><a href="/wiki/Wikipedia:To_scale_charts" title="Wikipedia:To scale charts">To scale charts</a></li></ul></li> <li><a href="/wiki/Help:Displaying_a_formula" title="Help:Displaying a formula">Math formulas</a> <ul><li><a href="/wiki/Help:Displaying_a_formula#Use_of_HTML_templates" title="Help:Displaying a formula">Math symbols</a></li></ul></li> <li><a href="/wiki/Help:Score" title="Help:Score">Musical scores</a> <ul><li><a href="/wiki/Help:Musical_symbols" title="Help:Musical symbols">Musical symbols</a></li></ul></li> <li><a href="/wiki/Wikipedia:Timeline" title="Wikipedia:Timeline">Timeline</a> <ul><li><a href="/wiki/Help:EasyTimeline_syntax" title="Help:EasyTimeline syntax">EasyTimeline syntax</a></li></ul></li> <li><a href="/wiki/Help:WikiHiero_syntax" title="Help:WikiHiero syntax">WikiHiero syntax</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Help:A_quick_guide_to_templates" title="Help:A quick guide to templates">Templates</a> and<br><a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a> modules</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Template" title="Help:Template">Templates</a></li> <li><a href="/wiki/Wikipedia:Advanced_template_coding" title="Wikipedia:Advanced template coding">Advanced template coding</a></li> <li><a href="/wiki/Wikipedia:Template_documentation" title="Wikipedia:Template documentation">Template documentation</a></li> <li><a href="/wiki/Wikipedia:Template_index" title="Wikipedia:Template index">Template index</a></li> <li><a href="/wiki/Help:Template_limits" title="Help:Template limits">Template limits</a></li> <li><a href="/wiki/Wikipedia:Template_sandbox_and_test_cases" title="Wikipedia:Template sandbox and test cases">Template sandbox and test cases</a></li> <li><a href="/wiki/Wikipedia:Citation_templates" title="Wikipedia:Citation templates">Citation templates</a></li> <li><a href="/wiki/Help:Lua" title="Help:Lua">Lua help</a></li> <li><a href="/wiki/Wikipedia:Lua" title="Wikipedia:Lua">Lua project</a> <ul><li><a href="/wiki/Wikipedia:Lua/Resources" title="Wikipedia:Lua/Resources">Resources</a></li> <li><a href="/wiki/Wikipedia:Lua/To_do" title="Wikipedia:Lua/To do">To do</a></li></ul></li> <li><a href="/wiki/Help:Substitution" title="Help:Substitution">Substitution</a></li> <li><a href="/wiki/Help:Purge" title="Help:Purge">Purge</a> <ul><li><a href="/wiki/Help:Job_queue" title="Help:Job queue">Job queue</a></li></ul></li> <li><a href="/wiki/Help:Transclusion" title="Help:Transclusion">Transclusion</a> <ul><li><a href="/wiki/Help:Labeled_section_transclusion" title="Help:Labeled section transclusion">Labeled section</a></li> <li><a href="/wiki/Wikipedia:Transclusion_costs_and_benefits" title="Wikipedia:Transclusion costs and benefits">Costs and benefits</a></li></ul></li> <li><a class="mw-selflink selflink">Guide to Scribbling</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Wikipedia:Administration#Data_structure_and_development" title="Wikipedia:Administration">Data structure</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Wikipedia:Namespace" title="Wikipedia:Namespace">Namespaces</a></li> <li><a href="/wiki/Wikipedia:What_is_an_article%3F" title="Wikipedia:What is an article?">Main/Article</a></li> <li><a href="/wiki/Help:Category" title="Help:Category">Category</a></li> <li><a href="/wiki/Wikipedia:Drafts" title="Wikipedia:Drafts">Draft</a></li> <li><a href="/wiki/Help:Files" title="Help:Files">File</a> <ul><li><a href="/wiki/Help:File_description_page" title="Help:File description page">File description page</a></li></ul></li> <li><a href="/wiki/Wikipedia:Help_namespace" title="Wikipedia:Help namespace">Help</a></li> <li><a href="/wiki/Wikipedia:Portal" title="Wikipedia:Portal">Portal</a></li> <li><a href="/wiki/Wikipedia:Project_namespace" title="Wikipedia:Project namespace">Project/Wikipedia</a></li> <li><a href="/wiki/Help:Talk_pages" title="Help:Talk pages">Talk</a> <ul><li><a href="/wiki/Help:Archiving_a_talk_page" title="Help:Archiving a talk page">Archiving</a> <ul><li><a href="/wiki/Help:Archiving_(plain_and_simple)" title="Help:Archiving (plain and simple)">Simple</a></li></ul></li></ul></li> <li><a href="/wiki/Wikipedia:Template_namespace" title="Wikipedia:Template namespace">Template</a></li> <li><a href="/wiki/Wikipedia:User_pages" title="Wikipedia:User pages">User</a> <ul><li><a href="/wiki/Wikipedia:User_page_design_guide" title="Wikipedia:User page design guide">User page design</a></li></ul></li> <li><a href="/wiki/Help:MediaWiki_namespace" title="Help:MediaWiki namespace">MediaWiki</a> <ul><li><a href="/wiki/Wikipedia:Bug_reports_and_feature_requests" title="Wikipedia:Bug reports and feature requests">Bug reports and feature requests</a></li> <li><a href="https://www.mediawiki.org/wiki/Extension:TimedMediaHandler" class="extiw" title="mw:Extension:TimedMediaHandler">TimedMediaHandler extension</a></li></ul></li> <li><a href="/wiki/Wikipedia:Lua" title="Wikipedia:Lua">Module</a></li> <li><a href="/wiki/Help:Special_page" title="Help:Special page">Special</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/HTML" title="HTML">HTML</a> and <a href="/wiki/CSS" title="CSS">CSS</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Cascading_Style_Sheets" title="Help:Cascading Style Sheets">Cascading Style Sheets</a></li> <li><a href="/wiki/Help:HTML_in_wikitext" title="Help:HTML in wikitext">HTML in wikitext</a></li> <li><a href="/wiki/Wikipedia:Catalogue_of_CSS_classes" title="Wikipedia:Catalogue of CSS classes">Catalogue of CSS classes</a></li> <li><a href="/wiki/Wikipedia:Common.js_and_common.css" title="Wikipedia:Common.js and common.css">Common.js and common.css</a></li> <li><a href="/wiki/Template:Mxt/User_CSS_for_a_monospaced_coding_font" title="Template:Mxt/User CSS for a monospaced coding font">User CSS for monospaced coding font</a></li> <li><a href="/wiki/Wikipedia:WikiProject_Microformats/classes" title="Wikipedia:WikiProject Microformats/classes">Classes in microformats</a></li> <li><a href="/wiki/Help:Markup_validation" title="Help:Markup validation">Markup validation</a></li> <li><a href="/wiki/Wikipedia:Span_tags" title="Wikipedia:Span tags">Span tags</a></li> <li><a href="/wiki/Help:Useful_styles" title="Help:Useful styles">Useful styles</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%"><a href="/wiki/Wikipedia:Customisation" title="Wikipedia:Customisation">Customisation</a><br>and tools</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Help:Preferences" title="Help:Preferences">Preferences</a></li> <li><a href="/wiki/Wikipedia:Gadget" title="Wikipedia:Gadget">Gadgets</a></li> <li><a href="/wiki/Wikipedia:Skin" title="Wikipedia:Skin">Skins</a></li> <li><a href="/wiki/Help:Citation_tools" title="Help:Citation tools">Citation tools</a></li> <li><a href="/wiki/Wikipedia:Cleaning_up_vandalism/Tools" title="Wikipedia:Cleaning up vandalism/Tools">Cleaning up vandalism tools</a></li> <li><a href="/wiki/Wikipedia:Customizing_watchlists" title="Wikipedia:Customizing watchlists">Customizing watchlists</a> <ul><li><a href="/wiki/Help:Hide_Pages_in_Watchlist" title="Help:Hide Pages in Watchlist">Hide pages</a></li></ul></li> <li><a href="/wiki/Wikipedia:Scripts" title="Wikipedia:Scripts">IRC Scripts</a></li> <li><a href="/wiki/Wikipedia:User_scripts" title="Wikipedia:User scripts">User scripts</a> <ul><li><a href="/wiki/Wikipedia:User_scripts/Guide" title="Wikipedia:User scripts/Guide">Guide</a></li> <li><a href="/wiki/Wikipedia:User_scripts/List" title="Wikipedia:User scripts/List">List</a></li> <li><a href="/wiki/Wikipedia:User_scripts/Techniques" title="Wikipedia:User scripts/Techniques">Techniques</a></li></ul></li> <li><a href="/wiki/Help:User_style" title="Help:User style">User style</a></li> <li><a href="/wiki/Wikipedia:Tools" title="Wikipedia:Tools">Tools</a> <ul><li><a href="/wiki/Wikipedia:Tools/Alternative_browsing" title="Wikipedia:Tools/Alternative browsing">Alternative browsing</a></li> <li><a href="/wiki/Wikipedia:Tools/Browser_tools" title="Wikipedia:Tools/Browser tools">Browser tools</a></li> <li><a href="/wiki/Wikipedia:Tools/Editing_tools" title="Wikipedia:Tools/Editing tools">Editing tools</a></li> <li><a href="/wiki/Wikipedia:Tools/Navigation_shortcuts" title="Wikipedia:Tools/Navigation shortcuts">Navigation shortcuts</a></li> <li><a href="/wiki/Wikipedia:Tools/Optimum_tool_set" title="Wikipedia:Tools/Optimum tool set">Optimum tool set</a></li></ul></li> <li><a href="/wiki/Wikipedia:Wikimedia_Cloud_Services" title="Wikipedia:Wikimedia Cloud Services">Wikimedia Cloud Services</a></li> <li><a href="https://www.mediawiki.org/wiki/Beta_Features" class="extiw" title="mw:Beta Features">Beta Features at MediaWiki</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="text-align: center;;width:1%">Automated editing</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Wikipedia:WikiProject_Articles_for_creation/Helper_script" title="Wikipedia:WikiProject Articles for creation/Helper script">AfC helper script</a></li> <li><a href="/wiki/Wikipedia:AntiVandal" title="Wikipedia:AntiVandal">AntiVandal</a></li> <li><a href="/wiki/Wikipedia:AutoWikiBrowser" title="Wikipedia:AutoWikiBrowser">AutoWikiBrowser</a></li> <li><a href="/wiki/Wikipedia:Bots" title="Wikipedia:Bots">Bots</a> <ul><li><a href="/wiki/Help:Creating_a_bot" title="Help:Creating a bot">Creating</a></li> <li><a href="/wiki/Wikipedia:History_of_Wikipedia_bots" title="Wikipedia:History of Wikipedia bots">history</a></li></ul></li> <li><a href="/wiki/Wikipedia:HotCat" title="Wikipedia:HotCat">HotCat</a></li> <li><a href="/wiki/Wikipedia:Huggle" title="Wikipedia:Huggle">Huggle</a></li> <li><a href="/wiki/Wikipedia:Tools/Navigation_popups" title="Wikipedia:Tools/Navigation popups">Navigation popups</a></li> <li><a href="/wiki/Wikipedia:RedWarn" title="Wikipedia:RedWarn">RedWarn</a></li> <li><a href="/wiki/Wikipedia:Twinkle" title="Wikipedia:Twinkle">Twinkle</a></li> <li><a href="/wiki/Wikipedia:Ultraviolet" title="Wikipedia:Ultraviolet">Ultraviolet</a></li> <li><a href="/wiki/Wikipedia:WPCleaner" title="Wikipedia:WPCleaner">WPCleaner</a></li> <li>Inactive <ul><li><a href="/wiki/Wikipedia:Igloo" title="Wikipedia:Igloo">igloo</a></li> <li><a href="/wiki/Wikipedia:STiki" title="Wikipedia:STiki">STiki</a></li></ul></li></ul> </div></td></tr><tr><td class="navbox-abovebelow" colspan="2" style="text-align: center;"><div> <ul><li>See also: <b><a href="/wiki/Category:Wikipedia_how-to" title="Category:Wikipedia how-to">Category:Wikipedia how-to</a></b></li> <li><b><a href="/wiki/Category:Wikipedia_information_pages" title="Category:Wikipedia information pages">Category:Wikipedia information pages</a></b><br>Further navigation at: <a href="/wiki/Template:Wikipedia_help_pages" title="Template:Wikipedia help pages">Help pages</a> <ul><li><a href="/wiki/Template:Administrators%27_guide" title="Template:Administrators' guide">Administrators</a></li></ul></li> <li><a href="/wiki/Wikipedia:WikiProject_Accessibility/Navigation_menu" title="Wikipedia:WikiProject Accessibility/Navigation menu">Accessibility</a></li> <li><a href="/wiki/Template:Wikipedia_accounts" title="Template:Wikipedia accounts">Accounts</a></li> <li><a href="/wiki/Template:Botnav" title="Template:Botnav">Bots</a></li> <li><a href="/wiki/Template:Wikipedia_referencing" title="Template:Wikipedia referencing">Referencing</a> <ul><li><a href="/wiki/Template:Citation_metadata_navbox" title="Template:Citation metadata navbox">Citation metadata</a></li></ul></li> <li><a href="/wiki/Template:Wikipedia_templates" title="Template:Wikipedia templates">Templates</a></li> <li><a href="/wiki/Wikipedia:User_scripts/Navbox" title="Wikipedia:User scripts/Navbox">User scripts</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐67876799fc‐gzh2j Cached time: 20241127200004 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] DiscussionTools time usage: 0.049 seconds CPU time usage: 0.479 seconds Real time usage: 2.122 seconds Preprocessor visited node count: 1875/1000000 Post‐expand include size: 46878/2097152 bytes Template argument size: 2818/2097152 bytes Highest expansion depth: 12/100 Expensive parser function count: 85/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 56278/5000000 bytes Lua time usage: 0.214/10.000 seconds Lua memory usage: 5181756/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 1950.924 1 -total 4.98% 97.249 1 Template:Cite_dictionary 4.47% 87.236 1 Template:Wikipedia_technical_help 2.33% 45.445 7 Template:Efn 2.24% 43.794 5 Template:Sfn 2.20% 42.939 1 Template:Nutshell 2.17% 42.322 9 Template:Main_other 2.01% 39.152 1 Template:Mbox 1.22% 23.823 5 Template:Cite_book 0.87% 17.014 1 Template:Further --> <!-- Saved in parser cache with key enwiki:pcache:idhash:39390288-0!canonical and timestamp 20241127200004 and revision id 1257544500. Rendering was triggered because: page-view --> </section></div> <!-- MobileFormatter took 0.011 seconds --><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&mobile=1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Wikipedia:Guide_to_Scribbling&oldid=1257544500">https://en.wikipedia.org/w/index.php?title=Wikipedia:Guide_to_Scribbling&oldid=1257544500</a>"</div></div> </div> <div class="post-content" id="page-secondary-actions"> </div> </main> <footer class="mw-footer minerva-footer" role="contentinfo"> <a class="last-modified-bar" href="/w/index.php?title=Wikipedia:Guide_to_Scribbling&action=history"> <div class="post-content last-modified-bar__content"> <span class="minerva-icon minerva-icon-size-medium minerva-icon--modified-history"></span> <span class="last-modified-bar__text modified-enhancement" data-user-name="Gonnym" data-user-gender="unknown" data-timestamp="1731677567"> <span>Last edited on 15 November 2024, at 13:32</span> </span> <span class="minerva-icon minerva-icon-size-small minerva-icon--expand"></span> </div> </a> <div class="post-content footer-content"> <div id="p-lang"> <h4>Languages</h4> <section> <ul id="p-variants" class="minerva-languages"></ul> <ul class="minerva-languages"><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Wikipedia:Panduan_Scribble" title="Wikipedia:Panduan Scribble – Malay" lang="ms" hreflang="ms" data-title="Wikipedia:Panduan Scribble" data-language-autonym="Bahasa Melayu" data-language-local-name="Malay" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5_Lua" title="Википедия:Использование Lua – Russian" lang="ru" hreflang="ru" data-title="Википедия:Использование Lua" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-si mw-list-item"><a href="https://si.wikipedia.org/wiki/%E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%92%E0%B6%B4%E0%B7%93%E0%B6%A9%E0%B7%92%E0%B6%BA%E0%B7%8F:Guide_to_Scribbling" title="විකිපීඩියා:Guide to Scribbling – Sinhala" lang="si" hreflang="si" data-title="විකිපීඩියා:Guide to Scribbling" data-language-autonym="සිංහල" data-language-local-name="Sinhala" class="interlanguage-link-target"><span>සිංහල</span></a></li></ul> </section> </div> <div class="minerva-footer-logo"><img src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" alt="Wikipedia" width="120" height="18" style="width: 7.5em; height: 1.125em;"/> </div> <ul id="footer-info" class="footer-info hlist hlist-separated"> <li id="footer-info-lastmod"> This page was last edited on 15 November 2024, at 13:32<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Content is available under <a class="external" rel="nofollow" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC BY-SA 4.0</a> unless otherwise noted.</li> </ul> <ul id="footer-places" class="footer-places hlist hlist-separated"> <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/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</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/#/en.wikipedia.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-terms-use"><a href="https://foundation.m.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">Terms of Use</a></li> <li id="footer-places-desktop-toggle"><a id="mw-mf-display-toggle" href="//en.wikipedia.org/w/index.php?title=Wikipedia:Guide_to_Scribbling&mobileaction=toggle_view_desktop" data-event-name="switch_to_desktop">Desktop</a></li> </ul> </div> </footer> </div> </div> <div class="mw-notification-area" data-mw="interface"></div> <!-- v:8.3.1 --> <script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-6b8d669998-94gf6","wgBackendResponseTime":151,"wgDiscussionToolsPageThreads":[{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Lua","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Template_structure","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Module_basics","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Overall_structure-Module_basics","replies":[{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-A_named_local_table-Overall_structure","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-An_unnamed_table_generated_on_the_fly-Overall_structure","replies":[]},{"headingLevel":4,"name":"h-","type":"heading","level":0,"id":"h-Execution-Overall_structure","replies":[]}]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Receiving_template_arguments-Module_basics","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Errors-Module_basics","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Tips_and_tricks","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Arguments_tables_are_\"special\".-Tips_and_tricks","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Copy_table_contents_into_local_variables.-Tips_and_tricks","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Don't_expand_templates,_even_though_you_can.-Tips_and_tricks","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Notes","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-References","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Cross-references-References","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Citations-References","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Further_reading","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Lua_2-Further_reading","replies":[]}]}],"wgPageParseReport":{"discussiontools":{"limitreport-timeusage":"0.049"},"limitreport":{"cputime":"0.479","walltime":"2.122","ppvisitednodes":{"value":1875,"limit":1000000},"postexpandincludesize":{"value":46878,"limit":2097152},"templateargumentsize":{"value":2818,"limit":2097152},"expansiondepth":{"value":12,"limit":100},"expensivefunctioncount":{"value":85,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":56278,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 1950.924 1 -total"," 4.98% 97.249 1 Template:Cite_dictionary"," 4.47% 87.236 1 Template:Wikipedia_technical_help"," 2.33% 45.445 7 Template:Efn"," 2.24% 43.794 5 Template:Sfn"," 2.20% 42.939 1 Template:Nutshell"," 2.17% 42.322 9 Template:Main_other"," 2.01% 39.152 1 Template:Mbox"," 1.22% 23.823 5 Template:Cite_book"," 0.87% 17.014 1 Template:Further"]},"scribunto":{"limitreport-timeusage":{"value":"0.214","limit":"10.000"},"limitreport-memusage":{"value":5181756,"limit":52428800},"limitreport-logs":"anchor_id_list = table#1 {\n [\"CITEREFIerusalimschy2003\"] = 1,\n [\"CITEREFIerusalimschy2006\"] = 1,\n [\"CITEREFIerusalimschy2008\"] = 1,\n [\"CITEREFIerusalimschyde_FigueiredoCeles2006\"] = 1,\n [\"CITEREFIerusalimschyde_FigueiredoCeles2011\"] = 1,\n [\"CITEREFJungBrown2007\"] = 1,\n [\"CITEREFMW2003a\"] = 1,\n}\ntemplate_list = table#1 {\n [\"Cite book\"] = 5,\n [\"Cite dictionary\"] = 1,\n [\"Cite journal\"] = 1,\n [\"Efn\"] = 7,\n [\"FULLPAGENAME\"] = 1,\n [\"Further\"] = 1,\n [\"Harvid\"] = 1,\n [\"Harvnb\"] = 4,\n [\"Notelist\"] = 1,\n [\"Nutshell\"] = 1,\n [\"Refbegin\"] = 2,\n [\"Refend\"] = 2,\n [\"Reflist\"] = 1,\n [\"Sfn\"] = 5,\n [\"Tl\"] = 3,\n [\"Tlc\"] = 4,\n [\"Toc right\"] = 1,\n [\"Wikipedia technical help\"] = 1,\n}\narticle_whitelist = table#1 {\n}\n"},"cachereport":{"origin":"mw-web.eqiad.main-67876799fc-gzh2j","timestamp":"20241127200004","ttl":2592000,"transientcontent":false}}});});</script> <script>(window.NORLQ=window.NORLQ||[]).push(function(){var ns,i,p,img;ns=document.getElementsByTagName('noscript');for(i=0;i<ns.length;i++){p=ns[i].nextSibling;if(p&&p.className&&p.className.indexOf('lazy-image-placeholder')>-1){img=document.createElement('img');img.setAttribute('src',p.getAttribute('data-src'));img.setAttribute('width',p.getAttribute('data-width'));img.setAttribute('height',p.getAttribute('data-height'));img.setAttribute('alt',p.getAttribute('data-alt'));p.parentNode.replaceChild(img,p);}}});</script> </body> </html>