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

Small caps in section titles

779 views
Skip to first unread message

chri_s...@yahoo.com

unread,
Jul 31, 2005, 12:53:10 PM7/31/05
to

In order to have all abbreviations in the same style, I
have changed the latex file to include macros like

"Quantum electrodynamics is usally abbreviated \pac{QED}."

\section{Adavnced \pac{QED} and more}

etc.

I thought the following definition would do:

\def\pac#1{{\expandafter\scshape\lowercase{#1}}}

But this only works in the text. In the section title, this
really bombs latex. How can one improve this?

Thank you in advance,

Christoph

Morten Høgholm

unread,
Jul 31, 2005, 1:30:08 PM7/31/05
to

Bombs in what way? Usually one would define this as
\newcommand*\pac[1]{\MakeLowercase{\scshape#1}}
rather than using the TeX primitive lowercase. I'm not surprised you don't
see what you like in section headers since very few fonts have boldface
small caps, so naturally it doesn't work. I would probably try something
like

\usepackage{relsize}
\makeatletter
\DeclareRobustCommand*\pac[1]{%
\if b\expandafter\@car\f@series\@nil
% we're using a bold font
\textscale{.75}{\MakeUppercase{#1}}%
\else
\MakeLowercase{\scshape #1}%
\fi}
\makeatother

assuming that you're using a scalable font of course.
--
Morten

Donald Arseneau

unread,
Jul 31, 2005, 2:40:56 PM7/31/05
to
chri_s...@yahoo.com writes:

> \section{Adavnced \pac{QED} and more}

That must be very advanced.

> \def\pac#1{{\expandafter\scshape\lowercase{#1}}}

The \expandafter does nothing. Get rid of it.

Fragile command (\scschape) in a moving argument, so declare
\protect\scshape or use \textsc instead or define \pac with
\DeclareRobustCommand.

In LaTeX you should use \MakeLowercase instead of \lowercase
(unless you are sure of strictly simple ascii letters.)

I find small-caps too small for acronyms.

--
Donald Arseneau as...@triumf.ca

Morten Høgholm

unread,
Jul 31, 2005, 2:34:51 PM7/31/05
to
On Sun, 31 Jul 2005 20:40:56 +0200, Donald Arseneau <as...@triumf.ca> wrote:

> Fragile command (\scschape) in a moving argument, so declare
> \protect\scshape or use \textsc instead or define \pac with
> \DeclareRobustCommand.

The font changing commands are not fragile - I think the only problem was
that these acronum thingies weren't in small caps in the section headings.
--
Morten

Malte Rosenau

unread,
Jul 31, 2005, 4:00:03 PM7/31/05
to
chri_s...@yahoo.com schrieb:

The most elegant solution would be to include lowercase small caps in
LaTeX's font selection scheme...


Robin Fairbairns

unread,
Jul 31, 2005, 4:23:51 PM7/31/05
to
Malte Rosenau <mro...@gwdg.de> writes:
>chri_s...@yahoo.com schrieb:
>> In order to have all abbreviations in the same style, I
>> have changed the latex file to include macros like
>>
>> "Quantum electrodynamics is usally abbreviated \pac{QED}."
>>
>> \section{Adavnced \pac{QED} and more}
>>
>> etc.
>>
>> I thought the following definition would do:
>>
>> \def\pac#1{{\expandafter\scshape\lowercase{#1}}}

there's been plenty of discussion of this macro. i find that cm alone
(of the font families i use from time to time) needs acronyms in any
other than full-size caps.

>> But this only works in the text. In the section title, this
>> really bombs latex. How can one improve this?
>
>The most elegant solution would be to include lowercase small caps in
>LaTeX's font selection scheme...

what exactly do you mean? there already is a small caps shape; it's
accepted that (at least) the shape and weight (or something) axis
ought to have been separated -- is that what you're worried about?

in fact, a different sort of font selection is probably needed, if
we're going to change it at all; merely tacking another axis what we
have at present is likely to satisfy no more than those who are
shouting the loudest just now.
--
Robin (http://www.tex.ac.uk/faq) Fairbairns, Cambridge

Malte Rosenau

unread,
Aug 1, 2005, 3:30:22 AM8/1/05
to
Robin Fairbairns schrieb:

> Malte Rosenau <mro...@gwdg.de> writes:
>
>>chri_s...@yahoo.com schrieb:
>>
>>>In order to have all abbreviations in the same style, I
>>>have changed the latex file to include macros like
>>>
>>>"Quantum electrodynamics is usally abbreviated \pac{QED}."
>>>
>>>\section{Adavnced \pac{QED} and more}
>>>
>>>etc.
>>>
>>>I thought the following definition would do:
>>>
>>>\def\pac#1{{\expandafter\scshape\lowercase{#1}}}
>
>
> there's been plenty of discussion of this macro. i find that cm alone
> (of the font families i use from time to time) needs acronyms in any
> other than full-size caps.
>
>
>>>But this only works in the text. In the section title, this
>>>really bombs latex. How can one improve this?
>>
>>The most elegant solution would be to include lowercase small caps in
>>LaTeX's font selection scheme...
>
>
> what exactly do you mean? there already is a small caps shape; it's
> accepted that (at least) the shape and weight (or something) axis
> ought to have been separated -- is that what you're worried about?

No, I'm not worried about that. I'm not a big fan of bold and italic
small caps anyway. What I need is a new set of font metrics for 'all
lowercase small caps' (for an example see the chapter headings in
Bringhurst's 'Elements'). With Koma classes I can do something like

\addtokomafont{sectioning}{\scshape}

but I can't put \MakeLowercase in that definition (for obvious reasons).

Malte

Jellby

unread,
Aug 1, 2005, 9:25:58 AM8/1/05
to
Among other things, chri_s...@yahoo.com saw fit to write:

> I thought the following definition would do:
>
> \def\pac#1{{\expandafter\scshape\lowercase{#1}}}
>
> But this only works in the text. In the section title, this
> really bombs latex. How can one improve this?

I did a similar thing. The problem I found was that finding a font with true
italic and bold smallcaps was not that easy. Finding a serif and a
sans-serif font with matching math symbols was even harder. At the end, I
resorted to the "relsize" package and I just defined:

\usepackage{relsize}
\newcommand{\acro}[1]{\ifmmode\mathsmaller{#1}\else\textsmaller{#1}\fi}

The \acro{QM/MM} term is $\hat{H}_{\text{\acro{QM/MM}}}$.

which doesn't give the best result, but it was better than anything I could
get with \scshape or with full-size caps (it looked better to me, anyway).

--
Ignacio __ Fernández Galván
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com

0 new messages