<span class="mw-page-title-main">MediaWiki templates</span>
Fabrice P. Lauss𝕪s onsensus 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

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 {{onelinecite|delvalle12a}}.

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

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={{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY2}}|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}}

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}}.}} [2]

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 Cantos20min (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 June15 July (2024)

{{thesedays|15|June|15|July|}} 15 June15 July

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

{{thesedays|15|17|July|}} 1517 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}}.

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}} → August (2026)
  • {{Ym|3}} → May (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/August (2026)
  • {{Zm|8}} → Z/December (2025)

ℤ 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