4

Reading this page about the differences between LaTeX and ConTeXt, I came across the following snippet:

\definesystemvariable {dt} % DocumentTitle

\def\setuptitle
  {\dodoubleempty\dosetuptitle}

\def\dosetuptitle[#1][#2]%
  {\ifsecondargument
     \dodosetuptitle[#1][#2]%
   \else
     \dodosetuptitle[\v!content][#1]%
   \fi}

\def\dodosetuptitle[#1][#2]%
  {\def\dododosetuptitle##1%
     {\getparameters[\??dt##1][#2]}%
   \processcommalist[#1]\dododosetuptitle}

I've worked out most of what this means, but I don't understand what \??dt##1 is? What's the meaning of the double question marks? Similarly, what is the meaning of \v!content ?

egreg
  • 1,121,712
Roxy
  • 809
  • By default \? has no meaning in TeX, nor ! is special in any way. Those constructs are ConTeXt specific. – egreg Nov 22 '18 at 15:41
  • \??dt could be a macro defined by \definesystemvariable{dt}. ##1 is the argument to \dododosetuptitle. – John Kormylo Nov 22 '18 at 15:49

1 Answers1

3

As detailed on the corresponding wiki page (https://www.contextgarden.net/System_Macros/Scratch_Variables):

  • \s!: These are macros holding system constants, i.e. values that never change
  • \c!: These are macros holding constant keys in key-value pairs. The actual definitions depend on the multi-lingual interface that is currently being used
  • \v!: These are macros holding names of variable values in key-value pairs. The actual definitions depend on the multi-lingual interface that is currently being used
  • \??: These are multi-lingual interface constant calls.
  • \@@: These are results of a multi-lingual interface constant expansion.

As the title of this wiki page indicates these are prefixes for scratch variables, so macros that start with one of them contain various kinds of data.

And of course, as you asked for \??dt##1: This simply recalls the internal name of the system variable as you may see in the corresponding definition of \definesystemvariable:

\unexpanded\def\definesystemvariable#1{\expandafter\edef\csname\??prefix#1\endcsname{\@@prefix#1}}
TeXnician
  • 33,589