wml::std::tags(3)

πŸ“¦
version 2.32.0 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing

πŸ’– wml::std::tags β€” Standard Support Tags πŸ’–

okay bestie, so this is wml::std::tags(3) from the EN Tools manual, and it's literally the little grab-bag of support tags you're gonna reach for constantly. Let's get into it 🫢


✨ SYNOPSIS ✨

#use wml::std::tags

#   Pass 2: advanced if constructs
<ifdef varname thenval elseval>

#   Pass 3: support tag
<perl> ... </perl>
<say> ... </say>

#   Pass 4: support tag
<m4> ... </m4>

#   Pass 4: symbols
<symbol name value>
<symbol name undef>

#   Pass 5: diversions
<dump NAME>
<enter NAME> ... <leave>
<divert NAME> ... </divert>

#   Pass 6: support tag
<asubst ...> ... </asubst>

#   Client-Side JavaScript: support tag
<javascript [version=..] [language=..]
            [type=..] [src=...] [defer] [nohead] [nolang]>
...
</javascript>

#   Resynchronize line numbers for more accurate pass 3 warnings
<sync-lines>

🌸 DESCRIPTION 🌸

So this include file defines a bunch of standard support tags that you need all the time. All of them are pretty much self-explanatory and they get a quick shoutout in wml_intro(1) β€” except the last two, which are the ones we're actually going to explain down here. πŸ‘‘

πŸ¦‹ <javascript> πŸ¦‹

This tag started life as basically a shorthand for <script type="text/javascript" language="JavaScript">, but bestie it has evolved. ✨

Here's the tea: if the <head> tag is defined and it's a complex macro β€” like, say, when you're calling wml::std::page β€” then the Javascript code gets automatically passed to that macro, and it should be diverted to the HEAD section of your HTML documents. And the way it does that? It preserves lang slices in multi-lingual documents. πŸ’…

If you don't want those features, you can turn them off with the nohead and nolang attributes. Periodt.

🧚 <sync-lines> 🧚

WML tries to print info about the input file and line numbers whenever warnings or errors get reported in passes 2 and 3. During pass 1, it sneaks in some special sentences containing file names and line numbers, so pass 2 has accurate knowledge of where the warnings actually appear in the input file. 🎯

But β€” and this is the annoying part 😭 β€” pass 2 also filters that info without preserving lines, so after pass 2 the info is basically unusable. Rude.

By putting <sync-lines> in your input file, you force pass 2 to resynchronize the information on line numbers. So if you're debugging pass 3, it can be of some help to insert <sync-lines> before ePerl code. iykyk πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

  • Ralf S. Engelschall β€” rse@engelschall.com, www.engelschall.com
  • Denis Barbier β€” barbier@engelschall.com

πŸŽ€ REQUIRES πŸŽ€

  • Internal: P1, P2, P3, P4, P6
  • External: --

🌈 SEE ALSO 🌈


and that's the whole page, bestie! no cap. this gem is from EN Tools, dated 2020-11-29, and it lives at wml::std::tags(3) β€” go forth and slay your passes πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from