[Tugindia] [texhax] A macro needed for small italics shape relative to the main bodu text size
Radhakrishnan CV
cvr at river-valley.org
Sun Apr 19 07:34:25 CEST 2009
On Sun, Apr 19, 2009 at 6:41 AM, E. Krishnan <ekmath at asianetindia.com> wrote:
> On Sat, 18 Apr 2009, swami at mun.ca wrote:
>
>> I need to write a macro, say \sit (for small italic size)
>> so that \sit{xxxx} should put the "xxxx" in a smaller italic
>> shape "relative to" the body text font size (and not an absolute small italics
>> size). If I write the macro as follows
[...]
> Please have a look at the "relsize" package. The documentation is in the
> style file itself, at the beginning and the end.
Here is a trivial macro that can reduce the font size to 85% of
current font size. If the requirements are not so complex,
\reducefontsize macro might be of help.
\documentclass[12pt]{article}
\usepackage{times}
\makeatletter
\def\reducefontsize{%
\@tempdima\f at size pt
\@tempdimb\@tempdima
\multiply\@tempdimb by 85
\divide\@tempdimb by 100
\@tempdimc\@tempdimb
\multiply\@tempdimc by 12
\divide\@tempdimc by 10
\fontsize{\the\@tempdimb}{\the\@tempdimc}\selectfont
}
\makeatother
\begin{document}
\parindent=0pt
\parskip=10pt
\Huge This is text set in \verb+\Huge+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\LARGE This is a text set in \verb+\LARGE+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\Large This is text set in \verb+\Large+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\large This is text set in \verb+\large+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\normalsize This is text set in \verb+\normalsize+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\small This is text set in \verb+\small+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\footnotesize This is text set in \verb+\footnotesize+ font size.
\bgroup\reducefontsize This is reduced font size\egroup.
\end{document}
Best regards
--
Radhakrishnan
More information about the tugindia
mailing list