<span class="mw-page-title-main">MediaWiki templates</span>
Fabrice P. Laussđ•Ș’s â„€enzic Web
(Redirected from Template)

Templates used on this site

This is a list of templates I use for MediaWiki powering laussy.org. They can generally be accessed through this website (http://laussy.org) by entering Template:NameOfTemplate as the last part of the URL.

Arguments are passed to template with {{{1}}} (2, 3, etc. for several arguments).

List

af

An Anno Fabri tag, shown as the tag itself, with the moment it stands for in a tooltip:

{{af|00Yps}} 00Yps (af)

See {{afh}} for the same moment written out instead.

afh

The same tag read out loud, its date written through {{thisday}} and so linked to the day, the month and the year it fell on:

{{afh|00Yps}} Tuesday 18 August (2026), 11:11:01 CEST

{{afh|00Yps|time=no}} Tuesday 18 August (2026)

{{afh|00Yps|wd=no}} 18 August (2026), 11:11:01 CEST

{{afh|00Yps|wd=no|time=no}} 18 August (2026)

See {{af}} for the tag itself; Module:AF decodes it for both.

AI

{{#vardefine:HumanUserIs|Someone curious}}
{{AI|AI=Claude|v=Opus 4.8|q=What do you make of this?|a=...
}}

AI can be Grok.

If the text contains weird characters breaking the pre-processors, such as {{ or |, then create the page, e.g., AI/dumps/2026-07-04 and specify src=AI/dumps/2026-07-04.

See source.

alphabet

The letters. {{alphabet}} is simply

anchor

{{anchor|anchorforanchor}} Puts an anchor to refer to this spot. One can then refer to [[#anchorforanchor|the anchor]] the anchor like this within the same page or [[Blog:Sandbox/buggy#anchorforanchor|for another page]] for another page.

arXiv

arXiv:2402.14010 {{arXiv|2402.14010}} gives a link to an arXiv reference. Ideally it should retrieve meta-data, but that is for later.

cite

A cite template to quote in a way similar as you would do with $\mathrm{\TeX}$ and bibTeX is described in this blog post. Can also be done inline with {{onlinecite|delvalle12a}}.

Several references go in one pair of brackets, as a physics paper cites them: {{cite|delvalle12a,laussy04a}} gives[[1],[2]] and the keys can also be given as separate parameters, {{cite|delvalle12a|laussy04a|kavokin07a}} giving[[1],[2],[3]], each number keeping its own footnote link and tooltip. The same goes for {{onlinecite}}, {{citer}} and {{citet}} below.

citer

The reference with its word in front, {{citer|delvalle12a}} giving Ref. [1] and {{citer|delvalle12a,laussy04a}} giving Refs. [[1],[2]], the plural coming by itself. Logic in Module:Citer.

citet

The sentence-style citation, by the first author's name: {{citet|delvalle12a}} gives del Valle et al.[1] (five authors), {{citet|cook85a}} gives Cook and Kimble[4] (two) and {{citet|deveaud12a}} gives Deveaud-PlĂ©dran[5] (one). Several keys name them all: {{citet|nagourney86a,sauter86a,bergquist86a}} gives Nagourney et al.[6], Sauter et al.[7] and Bergquist et al.[8]. Logic in Module:Citer, which reads the authors out of the citation templates.

contactme

Puts whatever should read when I need someone to contact me:

{{contactme}}

crossed

signals something not done or not working, maybe with a reason why {{crossed|needs a better image}}needs a better image

See also {{done}}.

CustomHeader

Replaces the header picture with one of your own, with a title and a blurb laid over it — the banners on Microcavities, Trip to Algarve (May 2017) and the other trips. image is the name of an uploaded file, not a path: the wiki rendering the page works out the address, so the banner appears here and on laussy.org alike.

{{CustomHeader
|image=Roof-of-Faro.jpg
|title=Trip to the Algarve (May 2017)
|blurb=The ''Algarve'', from Arabic al-Gharb, «the West»...
|titlestyle=top:5px;left:10px;font-size:32px;color:white;background-color:rgba(54, 25, 25, 0.5)
|blurbstyle=bottom:20px;right:20px;font-size:large;width:66%;text-align:right;color:white;background-color:rgba(54, 25, 25, 0.5)}}

The title and the blurb are ordinary wikitext, italics and links included. titlestyle and blurbstyle are ordinary CSS, in any order: top/bottom and left/right against the corners of the picture, then whatever else you want. Everything is optional. See Template:CustomHeader for the older parameter names, which still work.

doi

{{doi}} displays the DOI passed as an argument with a link to the resource itself, e.g., {{doi|10.1002/pssc.200304064}} produces [DOI: 10.1002/pssc.200304064].

done

{{done}} puts a little "checked" marker, like this, while {{done|that was great!}} adds a wz-tooltipthat was great!. Or severalreally great!and as many as we wantquite cool. See also {{crossed}}

download

Puts a logo

eq

A reference to an equation, by the Anno Fabri tag in its \label{eq:
}, and it finds it wherever it is—this page, the month page the tag belongs to, â„€ as well as 𝕐, or whatever in= names:

{{eq|05hUD}} gives Eq. (1) and {{eq|0AwdV|0AgJI}} gives Eqs. (2) and (3), up to four tags with the plural written for you. On the page holding the equation it is MathJax's own \eqref; from any other page Module:Eq counts the number out of that page's wikitext while this one is parsed, so it is a link that lands on the post holding the equation and follows it through every renumbering. {{eqref|05hUD}} gives the number alone, (1), for a sentence that supplies its own wording. Given no argument at all, {{eq}} is still the equals sign it always was, the one character a template call cannot hold.

Only what MathJax numbers can be pointed at by number: a \label inside an unstarred AMS environment (equation, align, gather, multline
), never one inside $$
$$. The label is written for you. The Eq button of the edit toolbar turns a $$
$$ into a numbered equation named after the second it is pressed, and while reading, Ctrl-click an equation (MediaWiki:Gadget-eq.js): a numbered one puts its reference in the clipboard at once; one without a number is offered one, in a little box saying what the edit would be—$$
$$ made an equation, a star taken off, the \label put at the end of the line clicked in an align—and Number it saves the page and copies the reference. A label already there is never replaced. The new number shows at the next reload.

See Template:Eq for the details, and {{fig}} below for its twin, which points at pictures.

fig

A reference to a picture, by the Anno Fabri tag it was uploaded under, and it finds it wherever it is—this page, the month page the tag belongs to, â„€ as well as 𝕐, or whatever in= names:

{{fig|07tuF}} gives Fig. (07tuF) and {{fig|07qeV|07t3b}} gives Figs. (07qeV) and (07t3b), up to four tags with the plural written for you. It is {{eq}}'s twin and works the same way, Module:Fig counting on Module:Eq for both the page it guesses and the spot it lands on.

The tag is the picture's own name: every image the composer uploads is called lw-tag.png after the second it arrived, so a figure of any post can be pointed at with nothing written into the page first. Ctrl-click a picture (MediaWiki:Gadget-fig.js) and the reference is in the clipboard—and the picture is given, once and after a confirmation, an {{anchor}} to land on and a Fig. (tag) caption to say its name on hover.

Not to be confused with {{figlabel}} and {{figref}}, which number the figures of one page in order of appearance: those are for an article that says Figure 3, this one for pointing at a picture across the wiki by the name it has always had.

fr

Garamond

Switches text to EB Garamond, the self-hosted 08 cut also used by {{quote}}. {{garamond|text}} wraps a run of text inline, e.g. {{garamond|u ''&'' i}} gives u & i. {{garamond-on}} is a sibling marker with no closing tag that switches everything after it, for the rest of the page. See Template:Garamond for documentation.

gpx

Offers to "Download the gpx file for this track." {{gpx|Media:AbedularCanencia-27Oct2013.gpx}}

Grok

This is obsolete, use Template:AI instead (done with Claude :)

This one is funny as it's one I made with Grok itself (although it couldn't do it wholly by itself):

{{#vardefine:HumanUserIs|Fabrice}}

Pass a custom user input (parameter 1) and Grok's response (parameter 2):
{{Grok|Question|Answer}}

Fabrice: Question

Grok:

Answer

Note that if HumanUserIs not defined, then the interaction is with "Human".

hour

Gives the local hour (shortcut for {{LOCALTIME}} or {{CURRENTIME}}; still have to fix timezone issue), e.g.,

{{hour}}

gives {{subst:LOCALTIME}}.

indent

* This is an example with bullet lists:
{{indent}}
Hi.
{{indent-end}}
* And another one:
{{indent}}
Hi there!
{{indent}}
Hello.
{{indent-end}}
{{indent-end}}
  • This is an example with bullet lists:

Hi.

  • And another one:

Hi there!

Hello.

* This is an example with bullet lists:
{{indent}}Hi.{{indent-end}}
* And another one:
{{indent}}Hi there!{{indent}}Hello.{{indent-end}}{{indent-end}}
  • This is an example with bullet lists:
Hi.
  • And another one:
Hi there!
Hello.

ISBN

{{ISBN|978-0691145075}} [ISBN: 978-0691145075]

marginalia

{{marginalium}} tags a page as a marginalium — a short personal note on a film — for the Marginalia series (singular entry Marginalium). Floats a đŸŽ„ icon to the right, aligned with the page's own = Title = heading; place it as the very first line of the page. A bare tag just files the page in Category:Marginalia:

{{marginalium}}

Add diary= to also announce it, once, on the year diary page (e.g. 2026), same one-time-arm rule as {{wtps}}:

{{marginalium|diary=2026-07-14}}

The diary line links to the film via film= (defaults to the page's own title) and, optionally, a shorter display text via as=:

{{marginalium|film=Incendies (2010)|as=Incendies|diary=2026-07-14}}

Replaces the older, invisible {{#marginalium:}} parser function as the normal way to tag a film page (the low-level form still works, same as {{#gloss:}} still works under {{wtps}}).

multicol

From Wikipedia's multicol. Use as:

{{multicol}}
This text appears in the first column.
{{multicol-break}}
This text appears in the second column.
{{multicol-break}}
This text appears in the third column.
{{multicol-end}}

to read:

This text appears in the first column.

This text appears in the second column.

This text appears in the third column.

<nowiki>
You need to create the three corresponding pages<wz tip="Template:Multicol, Template:Multicol-break and Template:Multicol-end.">$^*$</wz>, which are shortcuts for divivision of the page with floats.
<nowiki>

now

To capture the time at which the edit is made. It must be substituted:

{{subst:now}} 15:16 on 4 September (2024)

nowline

The rule that divides a chronological list into what has already happened and what has not — see News. You are not meant to place it by hand: Module:Nowline puts it where it belongs on every render, so the list needs no upkeep as time passes. Wrap the list:

{{#invoke:Nowline|split|today={{LOCALYEAR}}-{{LOCALMONTH}}-{{LOCALDAY2}}|1=
* {{thisday|14|August|2026}}: something that happened.
* {{thesedays|16|18|October|2026}}: something that will.
}}

Add an item anywhere, remove one, reorder them: the rule follows. It takes two shapes, decided by the list itself:

quiet
nothing falls on today, so one hairline divides the item before from the item after — past ↑ ——— ↓ future.
hot
an item's dates straddle today, so it is bracketed instead — a hot rule above, a hot rule below, and đŸ”„ Happening now! in the margin beside it. Overlapping events are enclosed together, and only what is actually running wears the đŸ”„.

Dates are read from the links {{thisday}} and {{thesedays}} build, so an item written some other way is carried through untouched and simply does not count. A range counts from the day it starts: a conference you are at today sits above the line, not below.

Calling {{nowline}} by hand still draws the quiet rule wherever you put it, and {{nowline|top}}, |bottom, |now draw the hot pieces. The styling lives in Template:Nowline/styles.css.

onlinecite

This makes an inline reference as Ref. [1] with {{onlinecite|delvalle12a}}, or Refs. [[1],[2]] with {{onlinecite|delvalle12a,laussy04a}}; {{citer}} writes the Ref./Refs. for you.

onlineref

This makes an inline reference which does not have to be a bibTeX key, such as Ref. {{onlineref|This does not have to be a [[bibTeX]] key, e.g., {{delvalle12a}}.}} [9]

pdf

{{pdf}} puts an icon like this and {{pdf|File:myfile.pdf}} links to it .

pright

Inserts a right-aligned paragraph. This is a weak counterpart to quote but is not a float, so is less fragile.

{{pright|This text.}}

reads

This text.

QED

Ends a proof with a Halmos tombstone—the black square—flush against the right margin, as $\mathrm{\TeX}$ does at the end of a proof environment, with a wz-tooltip saying Quod erat demonstrandum. Write it at the end of the last line of the proof, not on a line of its own, since the square floats out to the right of the line it lands in:

...and this completes the proof. {{QED}}

...and this completes the proof.

{{QED|Rather longer than it should be.}} adds a sentence of one's own to the tooltip, after the Latin. Lower-case {{qed}} works too. See Template:QED.

quote

Inserts a quotation. See Template:Quote for documentation.

Quotemail

Encloses quoted email or letter text in a centered, reduced-width pane bounded by dotted horizontal rules top and bottom, as a pair of templates (there is no {{quotemail}}):

{{Quotemail top}}
Dear so-and-so,

...quoted text...

Best wishes,
{{Quotemail bottom}}

width= sets the pane's width (default 75%); pass the same value to both halves, since the closing rule sits outside the div and needs to match. See August (2026)#Y-02JCA for the original use and Template:Quotemail top for documentation.

see

☞ {{see|Fabrice}} is pointing on Fabrice (used with pages shortcuts).

Show

A collapsible box, as a pair of templates (there is no {{show}}):

{{Show top|label=Optional Show-what label}}
whatever
{{Show bottom}}

label= is the text of the collapsed button (default Show). wyg=—what you got—parks a little Cromulon head to the left of the button, hovering which says Show me what you got (the Rick and Morty gag); it is off unless asked for, wyg=0 and an empty wyg= counting as off too:

{{Show top|wyg=1|label=Show me what you got}}
whatever
{{Show bottom}}

The showbox and showbox-wyg classes that lay this out live in MediaWiki:Common.css. Long code listings belong inside such a box; short usage snippets do not. See Template:Show top for documentation.

Example Code in my $\mu$-blog.

sic

[sic] {{sic}} points at (but does not correct) an error.

err [sic] {{sic|err}} points at (but does not correct) the error.

err [sic]should be 'error'! {{sic|err|should be 'error'!}} points at and correct the error in tooltip.

[sic]only correction {{sic||only correction}} only correct correct the error in tooltip.

since

{{since|now}}
{{since|10:52 8 June 2026}}

just now

Sleep

{{sleep}} marks a sleeping night in a campervan trip as follows:  .

stretch

Give the distance and/or time between two localizations, such as [[Tres Cantos]]{{stretch|20min (22.3km)}}[[Soto del Real]]Tres Cantosâź°20min (22.3km)âź±Soto del Real. It can also take two arguments, in which case it separates them with a comma. We use it to plan trips.

stub

Warns of pages that are still so much in construction, they're not really nice to visit.

{{stub}}

This page is still largely in progress.

TeX

$\mathrm{\TeX}$

thesedays

This can take 4 or 5 arguments, and the final argument (year) can be left empty in which case it is not displayed:

{{thesedays|15|June|15|July|2024}} 15 June–15 July (2024)

{{thesedays|15|June|15|July|}} 15 June–15 July

{{thesedays|15|17|July|2024}} 15–17 July (2024)

{{thesedays|15|17|July|}} 15–17 July

If the years are different, then two {{thisday}} calls should be made (and maybe a † has to be featured somewhere?!)

thisday

Provides the clickable date of a given day, e.g.,

{{thisday|30|September|1977}} 30 September (1977)

See also {{thesedays}}, and {{afh}} which builds one of these out of an Anno Fabri tag.

today

To be used with "subst:" to provide the clickable date of today, e.g.,

{{subst:today}}

gives 31 December (2023).

tomorrow

The companion of {{today}}, for the day after, with an optional argument to jump further along the calendar:

{{subst:tomorrow}}
{{subst:tomorrow|5}}

give 12 August (2026) and 16 August (2026) respectively. {{subst:tomorrow|0}} is today again and a negative argument goes back in time.

update

Indicates an {{update}} possibly with a date 16 July 2023 {{update|16 July 2023}}.

wl1, wl2, wl3

For featured articles.

  1. {{wl1}}
    is to be put on stubby articles in progress (all of them).
  2. {{wl2}}
    is to be put on good & interesting articles that could/should be improved but remain okay in their present state.
  3. {{wl3}}
    is to identify great content, that we are proud of.

wtps

{{wtps}} tags a page as a gloss — a short personal review of a paper — for the What the paper says!? series. A bare tag just files the page in Category:Glosses:

{{wtps}}

renders as  What the paper says!? on the page.

Add diary= to also announce the gloss, once, on the year diary page (e.g. 2026). The date convention is the page's own creation date, not the day the tag happens to be added:

{{wtps|diary=2026-07-16}}

When the gloss is written the day the page itself is made — the usual case — the date need not be typed at all. diary=today stands for it, and so does the bare word gloss:

{{wtps|gloss}}

Neither shorthand survives the save: the tag is rewritten on the spot to the real calendar date, so the wikitext never keeps a word that would mean a different day tomorrow. Type the date out whenever the page is older than the gloss.

The diary line cites the paper through a citation template named after the page itself (page cook85a ↔ template {{Cook85a}}); override it with ref=:

{{wtps|ref=delvalle12a|diary=2026-07-16}}

Both series (marginalia and wtps) are sub-streams of the same engine (Nota Bene, in the BlogTitles extension) that also drives blog-post diary announcements: the diary line is inserted exactly once, on the transition from untagged/unarmed to armed — later edits to an already-armed tag don't re-fire it, and a hand-deleted diary line stays deleted.

Ym

The title of 𝕐's month page, counting backwards, as a bare title:

  • {{Ym|0}} → September (2026)
  • {{Ym|3}} → June (2026)

Anchored to the 15th internally, so "one month ago" does not misfire on the 31st. Template:Zm is the same thing for â„€, being this with Z/ on the front.

Ynow

A link to 𝕐's current month page, with an optional label:

It does not simply name this month. If that page has not been started yet it walks backwards a month at a time, up to a year, and links the most recent one that exists — so the link is never red, and on the 1st of a month it still points at something worth reading. Template:Ym does the counting.

Before 14 August (2026) this returned a bare title and was written [[{{Ynow}}|label]]. That form now nests brackets: say {{Ynow|label}}, or {{Ym|0}} for a bare title.

yt

To embed YouTube videos:

{{#tag:youtube
|{{{1}}}
|width={{{2|760}}}
|height={{#expr: {{{2|760}}} * {{#switch:{{{format|16:9}}}
  |4:3     = 3/4
  |1:1     = 1
  |9:16    = 16/9
  |21:9    = 9/21
  |#default = 9/16
}} round 0}}
}}

So that:

{{yt|stCAaH9hp0M}}             → 16:9, 760×428
{{yt|oldclip|format=4:3}}      → 760×570
{{yt|someShort|format=9:16}}   → vertical

Zm

The title of â„€'s month page, counting backwards, as a bare title — Template:Ym with â„€'s prefix on the front:

  • {{Zm|0}} → Z/September (2026)
  • {{Zm|8}} → Z/January (2026)

â„€ keeps its months at Z/August (2026) where 𝕐 keeps them at August (2026); that prefix is the whole difference between the two.

Znow

A link to â„€'s current month page, the twin of Template:Ynow:

Same walk backwards through the months to the newest page that exists, which matters more here than for 𝕐: 𝕐 has a page for every month, â„€ does not.

Modules

Two things on this wiki are computed by Lua rather than by wikitext, because wikitext cannot count:

Module:Nowline
places the past/future rule in a chronological list. See {{nowline}} above.
Module:CV
counts the entries in a section of Fabrice's CV — {{#invoke:CV|conferences}} and {{#invoke:CV|invited}}, the latter taking window=5 with year= for "in the past five years". It reads the list as it is written, so adding a talk stays a matter of adding a line.

Both read the page's own wikitext. They are given the date from wikitext ({{CURRENTYEAR}} and friends) rather than reading the clock in Lua, so that MediaWiki knows the page depends on it and expires the cache; otherwise the figures would freeze on whichever day the page happened to be parsed.

References