LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
David Carlisle <[log in to unmask]>
Date:
Tue, 16 Sep 1997 17:49:04 +0100
In-Reply-To:
<[log in to unmask]> (message from Adrian Liviu LUDOSAN on Tue, 16 Sep 1997 17:18:06 +0300)
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (55 lines)
>  Because I want to do something portable I don't want to change the
>  fonts. I've tried something like (thanks to Ed Sznyter [log in to unmask]):
> ...
> but this is not working all the fonts and for all the styles.

That solution always pulls the `,' from math mode, so it comes from
the same (roman) font, even if the current font is sans serif or
whatever.

>        Is there a way to take the current font (without naming it explicitly)
> and to scale it (decreasing)?

yes, you just go \fontsize{something}{0pt}\selectfont. The question is
what value to put for `something'. The suggestion below (\commaB) uses
the value \ssf@size which is the internal comand NFSS uses to store
the scriptscriptfont size for the current font. This value is not
initialised until the first time math mode is used at a current size,
so there is an empty math list first.

Apart from the change in font the code is identical to the original,
which centers the comma under the letter, I can not judge whether that
is a good position, not knowing Romanian...

As J"org mentioned in his reply, any such constructions will break
hyphenation. To get hyphenation correct then you need to construct
a (real or virtual) font.

David


\documentclass{article}
\makeatletter

\begin{document}

\def\commaA#1{#1\vbox to 0pt{\vskip .15ex\hbox to
0pt{\setbox0=\hbox{#1}\kern -\wd0\hss$\scriptscriptstyle ,$\hss}\vss}}


\def\commaB#1{#1\vbox to 0pt{\vskip .15ex\hbox to
0pt{\setbox0=\hbox{#1}\kern -\wd0\hss
     $\m@th$\fontsize\ssf@size\z@\selectfont,\hss}\vss}}

\commaA{t} \commaB{t}

\sffamily

\commaA{t} \commaB{t}

\ttfamily

\commaA{t} \commaB{t}

\end{document}

ATOM RSS1 RSS2