Tagged Questions
5
votes
2answers
303 views
String test, with complicated arguments
I have a command \mycom{} which takes 1 argument. The command should perform a test on the argument and do something accordingly. For simple arguments, I can use \ifthenelse, but I need to consider ...
6
votes
1answer
122 views
Is testing f@shape considered best practice method for reliably detecting italic and slant modes?
Subject says it all.
Is testing f@shape the cleanest, clearest, simplest, most reliable way to check for italic and slant modes? e.g.:
\ifthenelse{\equal{\f@shape}{sl}}{italic}{not italic}
...
5
votes
2answers
136 views
Check if mathversion (font) is defined
One can define a new mathversion using \DeclareMathVersion{sans}.
I wonder if I can test the existence of such a font definition, for example with
\IfMathVersionDefined{sansmath}
{math font is ...
12
votes
3answers
350 views
Detect which text “mode” (normal, italic, bold, etc.) is currently in use?
In my document, I'm often setting upper case words and abbreviations in small caps because it avoids breaking the flow (which upper case words does). Also, many words (like CUDA, for instance) are ...
4
votes
1answer
152 views
Defining a command that distinguishes between greek and roman letters?
I'm using pdftex and I want to define a command for the typesetting of quantum mechanical operators that produces upright letters with a \hat accent. The problem is that the obvious solution
...
12
votes
2answers
687 views
How can I test for the current font?
The situation is the following, I have one font a with one feature and another font b with another feature and I am writing a command that if the current font is a need to switch to font b but if the ...