OurBigBook logoOurBigBook Docs OurBigBook logoOurBigBook.comSite Source code
This argument makes writing many internal links more convenient, and it was notably introduced because it serves as the sane version of insane internal links.
If given e.g. as in:
= Internal reference

\x[Internal references]{magic}
the link treated magically as follows:
  • content capitalization and pluralization are detected from the string, and implicitly set the \x c argument and \x p argument. In the example:
    • {c} capitalization is set because Internal references starts with an upper case character I
    • {p} pluralization is set because Internal references ends in a plural word
    In this simple example, the content therefore will be exactly Internal references as in the source. But note that this does not necessarily need to be the case, e.g. if we had done:
    \x[Internal Reference]{magic}
    then the content would be:
    Internal reference
    without capital R, i.e. everything except capitalization and pluralization is ignored. This forgiving way of doing things means that writers don't need to remember the exact ideal capitalization of everything, which is very hard to remember.
    It also means that any more complex elements will be automatically rendered as usual, e.g. if we had:
    = \i[Internal] reference
    
    \x[internal reference]{magic}
    then the output would still contain the <i> italic tag.
    If we had a scope as in \x[my scope/Internal references], then each scope part is checked separately. E.g. in this case we would have upper case Internal references, even though my scope is lowercase, and so {c} would be set.
  • the ID is calculated as follows:
    • automatic ID from title conversion is performed, with you exception: forwards slashs / are kept, in order to make scopes work.
      In our case, there aren't any slashes /, so it just gives internal-references. But if instead we had e.g.: \x[my scope/internal reference]{magic}, then we would reach my-scope/internal-reference and not my-scope-internal-reference.
    • if there is a match to an existing ID use it. internal-references in the plural does not match, so go to the next step
    • if the above failed, try singularizing the last word as in the \x p argument with p=0 before doing automatic ID from title conversion. This gives internal-reference, which does exist, and so we use that.
There may be some cases where you might still want to use internal link title inflection however, see: Section "Inflection vs magic".

Ancestors (5)

  1. \x arguments
  2. Internal link
  3. Macro
  4. OurBigBook Markup
  5. Home

Synonyms (1)