3

The code

nonlinear {PDE} system in \scalebox{0.9}[0.9]{FDM} and \scalebox{0.9}[0.9]{FEM}.

generates text below:

see picture.

The text {PDE} has the size by default, while the texts {FDM} and {FEM} are shrunk to 90%. Personally, I feel the default uppercase letter size is visually too large and some size reduction is needed.

Is there any method to adjust the size of all the capital letters (at least vertically) in the whole document at once without using \scalebox one by one?

2
  • Welcome to TeX.SX! Can you please expand the code snippet that you have posted to a full minimal working example. In this instance, it is helpful to know that you the graphicx package. A MWE should compile and be as small as possible to demonstrate your problem. it's much easier to help you if we have full working code to start from.
    – user30471
    Sep 25, 2018 at 2:45
  • 1
    There is \textsc{...}, but that turns lower case into small caps. Upper case letters are unchanged. Sep 25, 2018 at 3:55

4 Answers 4

4

You are essentially saying that you don't like the size of the capital letters in the font that you are using. This is really a question for font designers so I doubt that it is possible to change this from inside LaTeX. Your best bet might be to find another another a font in which you find the capital letters more visually appealing.

Failing finding a font that you like better, here is a work around that might be of interest because it allows you to type "FDM" instead of \scalebox{0.9}[0.9]{FDM}.

\documentclass{article}
\usepackage{graphicx}
\catcode`\"=13
\def"#1"{\scalebox{0.9}[0.9]{#1}}
\begin{document}

    ...nonlinear PDE or "PDE" system in "FDM" and "FEM".

\end{document}

For completeness, here is the output:

enter image description here

The downside is that this code "disables" the double quote character, but I feel that this is OK because in LaTeX you would normally use ``....''. If this is an issue then you can always define a command like \DQ to give the double quote character back to you.

3

Here I choose the integral font size nearer to 80% the current font size; the examples show a comparison with normal capitals and small caps.

\RequirePackage{fix-cm} % not needed if you use a scalable font

\documentclass{article}
\usepackage{xparse,xfp}

\makeatletter % we need to access @-commands
\NewDocumentCommand{\acr}{m}{{%
  \fontsize{\fpeval{round(0.8*\f@size,0)}}{\f@baselineskip}\selectfont
  #1%
}}
\makeatother

\begin{document}

nonlinear PDE system in \acr{FDM} or \textsc{fdm}

{\footnotesize nonlinear PDE system in \acr{FDM} or \textsc{fdm}}

\bigskip

{\LARGE nonlinear PDE system in \acr{FDM} or \textsc{fdm}}

\end{document}

enter image description here

If you change \fpeval{round(0.8*\f@size,0)} into \fpeval{0.8*\f@size}, to get 80% without rounding, you get

enter image description here

If you end up choosing small caps, you can avoid the burden of typing the acronym in lowercase letters:

\documentclass{article}
\usepackage{xparse}

\ExplSyntaxOn
\NewDocumentCommand{\acr}{m}
 {
  \textsc{ \tl_lower_case:n { #1 } }
 }
\ExplSyntaxOff

\begin{document}

nonlinear PDE system in \acr{FDM} or \textsc{fdm}

{\footnotesize nonlinear PDE system in \acr{FDM} or \textsc{fdm}}

\bigskip

{\LARGE nonlinear PDE system in \acr{FDM} or \textsc{fdm}}

\end{document}

enter image description here

2

Building on John Kormylo's comment: use \textsc but convert to lower-case before.

\documentclass{article}
\newcommand{\SmallUpperCase}[1]{\textsc{\MakeLowercase{#1}}}    
\begin{document}

\dots nonlinear PDE or \SmallUpperCase{PDE} system in \SmallUpperCase{FDM} and 
\SmallUpperCase{FEM}.

\end{document}

enter image description here

1
  • @Thérèse Thanks! I do not know all these things. Would you mind posting your own answer? (I won't be able to answer follow-up questions on this, and I will be happy to remove mine then.)
    – user121799
    Sep 25, 2018 at 13:08
2

If you are using an OpenType font which has the c2sc feature, you can type uppercase letters and get small caps in the output:

% compile with luatex or xetex:
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Alegreya}
\def\ucsc#1{{\addfontfeature{Letters=UppercaseSmallCaps}#1}}
\begin{document}
nonlinear PDE or \ucsc{PDE} system in \ucsc{FDM} and \ucsc{FEM}.
\end{document}

output

Depending on how the font’s designer defined c2sc, the small caps will copy and paste either as lowercase letters or as uppercase letters. (Brill and Minion Pro are examples of fonts whose uppercase small caps copy/paste as capital letters.)

I know of one OpenType font, a commercial font, which has not only caps and small caps, but also medium caps: Verdigris MVB Pro Text.

\documentclass{article}
\usepackage{fontspec}
\setmainfont{VerdigrisMVBProText-Rg}
\newfontface\mcaps{VerdigrisMVBProText-RgCaps}
\begin{document}
nonlinear PDE or \textsc{pde} system in {\mcaps FDM} and {\mcaps FEM.}
\end{document}

output of second example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.