Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LaTeX command to split on the current size

23 views
Skip to first unread message

jaakov

unread,
May 18, 2015, 6:52:47 AM5/18/15
to
Dear all:

There is some command XXX that in a macro does different stuff dependent
of the current size. E.g:

Definition:

\newcommand{\MyCommand}{
\XXX%
{this text is printed in a normal-size context}%
{this text is printed in a script-size context}%
{this text is printed in a script-script-size context}%
...
}

Usage:

\scriptsize\MyCommand
results in
this text is printed in a script-size context.

Question: What's the right name of XXX?

Thanks a lot in advance

Jaakov.

Ronnie Marksch

unread,
May 18, 2015, 1:24:37 PM5/18/15
to

Ulrike Fischer

unread,
May 18, 2015, 1:34:20 PM5/18/15
to
Am Mon, 18 May 2015 12:52:42 +0200 schrieb jaakov:

> Dear all:
>
> There is some command XXX that in a macro does different stuff dependent
> of the current size. E.g:

> Question: What's the right name of XXX?

\mathchoice

--
Ulrike Fischer
http://www.troubleshooting-tex.de/

Jaakov

unread,
May 18, 2015, 3:02:02 PM5/18/15
to
Am 18.05.2015 um 19:34 schrieb Ulrike Fischer:
> Am Mon, 18 May 2015 12:52:42 +0200 schrieb jaakov:
>
>> Dear all:
>>
>> There is some command XXX that in a macro does different stuff dependent
>> of the current size. E.g:
>
>> Question: What's the right name of XXX?
>
> \mathchoice
>
Thanks, Ulrike; \mathchoice is exactly what I was looking for!

Best,

Jaakov

Axel Romihsita

unread,
May 24, 2015, 9:07:58 PM5/24/15
to
By the way, is there a similar command for the text mode (not for the
math mode)? In my case, I have to ensure correct line breaking of the
text being the argument of the macro.

Axel.
0 new messages