In my document using \documentclass[12pt]{report}
, I have tables containing an index and a inequality in each line. As it's a long list, it's a supertabular
with columns c|rcr
. Sample data of one line is 1 & x_{i,j} & \leq & 0 \\
.
Now, in this specific table, I prefer typewriter style. Additionally, the length of these inequalities is too high to fit with normal text size, therefore, I also reduce the font size. To have this in every math environment without repetition of commands I've declared a specific environment:
\newenvironment {specialMath} [0] {} {}
\AtBeginEnvironment{specialMath}
{
\everymath{\scriptstyle\mathtt{\xdef\tmp{\fam\the\fam\relax}\aftergroup\tmp}}
\everydisplay{\scriptstyle\mathtt{\xdef\tmp{\fam\the\fam\relax}\aftergroup\tmp}}
}
It works, in the sense that everything is displayed at the size of subscripts. However, printed on A4, this is a bit too small.
In summary, \textstyle
is too large, \scriptstyle
too small, but I do not want to adjust all font sizes (that can be done with \DeclareMathSizes{...
in the preamble, afaik).
How do I fine tune the font size locally, not globally, in a set of math environments?
A minimal compilable example (pdflatex), without the table:
\documentclass[12pt]{report}
\usepackage{amsmath} % math environment
\usepackage{etoolbox} % environment customization
\usepackage{supertabular} % multi-page tables
\newenvironment {specialMath} [0] {} {}
\AtBeginEnvironment{specialMath}
{
\everymath{\scriptstyle\mathtt{\xdef\tmp{\fam\the\fam\relax}\aftergroup\tmp}}
\everydisplay{\scriptstyle\mathtt{\xdef\tmp{\fam\the\fam\relax}\aftergroup\tmp}}
}
\begin{document}
$x_{i,j} \leq 0$ % normal style
\begin{specialMath}
\begin{supertabular}{r}
$x_{i,j} \leq 0$\\ % typewriter, slightly smaller
\end{supertabular}
\end{specialMath}
$x_{i,j} \leq 0$ % normal style again
\end{document}
Without the supertabular, somehow it's not typewriter font. It will be used in a tabular anyway, but you can ignore that fact.
\scalebox{0.9}{$x_{i,j} \leq 0$}
with\usepackage{graphicx}
?