-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Context from #1787:
-
\raisebox
and now\fbox
want their argument formatted with\hbox
, and now do so usinghbox
argument type. -
As mentioned,
\verb
has code to\hbox
ify its argument, which could be simplified with the newhbox
argument type (though is admittedly pretty simple):// \verb enters text mode and therefore is sized like \textstyle const newOptions = options.havingStyle(options.style.text());
As mentioned here, it would be nice to define everything using a new function \hbox
that does the hbox
argument type reformatting, but with the current setup, it's messy/ugly currently because macros and functions are annoying to mix. We'd have to define \fbox
and \raisebox
as macros that call a function \hbox
to do the reformatting and an auxiliary function like \@fbox
and \@raisebox
that do the actual rendering, as in \def\fbox#1{\@fbox{hbox{#1}}}
.
Instead, I propose defining a new defineFunction
mechanism for preprocessing arguments according to macros, like argMap: ["\hbox{#1}"]
meaning "for my first argument, please give me \hbox{#1}
instead of #1
". This would be a lot more general than the current hbox
arg type, and would keep function definitions very convenient, without having to define macros and intermediate functions like \@fbox
, and separating out the functionality of hbox
-style "argument reformattings" from other argument types' "argument parsing". This would then offer a drop-in replacement for hbox
argument type.
As a plus, we'd also then support \hbox
(and maybe \mbox
).