Debian Codegraph @

texmf-dist/doc/latex/moresize/msizetst.tex

raw
1 %%
2 %% This is file `msizetst.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% moresize.dtx (with options: `testfile')
8 %%
9 %% Version: v1.9 [1999/07/26]
10 %% Author : Christian Cornelssen <[email protected]>
11 %%
12 %% Copyright 1997,1998,1999 Christian Cornelssen
13 %% This program can be redistributed and/or modified under the terms
14 %% of the LaTeX Project Public License Distributed from CTAN
15 %% archives in directory macros/latex/base/lppl.txt; either
16 %% version 1 of the License, or any later version.
17 %%
18 %% This is a test file for text and math size settings.
19 %% You might want to test several configurations. Therefore,
20 %% it might be a good idea to save different versions of this file
21 %% under different names.
22 \documentclass[11pt,a4paper]{article}
23 \usepackage{exscale} %% for scaled \sum, \int etc.
24
25 %% Available options for the `moresize' package:
26 %% 10pt, 11pt, 12pt (in \documentclass) determines font sizes
27 %% normalscripts avoid script size explosion in huge writings
28 %% smallscripts smaller, more appropriate script sizes
29 %% ecpatch tell NFSS that huge EC fonts are available
30 \usepackage[smallscripts]{moresize}
31
32 %% Use the `t1enc' package for testing with DC/EC fonts
33 \usepackage{t1enc}
34
35 %% Consider a paragraph with a text line of depth d (below the baseline),
36 %% followed by a line with an inline formula,
37 %% followed by a text line with height h (above the baseline).
38 %% Then the formula's height may not exceed \baselineskip - d,
39 %% and its depth may not exceed \baselineskip - h,
40 %% or the baseline skips will be stretched.
41 %% The roman-text brackets `[' and `]' are used for estimating d and h.
42 %% Note that the space for the formula seems to get larger if NFSS
43 %% substitutes a smaller font, because \baselineskip does not shrink
44 %% accordingly!
45 \newlength\mathht %% height available for an inline formula
46 \newlength\mathdp %% depth available for an inline formula
47 \newcommand\calcmathspace{%
48 \settodepth\mathht{\textrm{[}}%
49 \setlength\mathht{-\mathht}%
50 \addtolength\mathht{\baselineskip}%
51 \settoheight\mathdp{\textrm{]}}%
52 \setlength\mathdp{-\mathdp}%
53 \addtolength\mathdp{\baselineskip}}
54
55 %% The following command shows its argument, typeset in text style,
56 %% between two horizontal lines showing the available space in a text line.
57 %% If the argument overprints the lines, it would stretch
58 %% the baseline skip in a paragraph.
59 \newcommand\linebox[1]{\calcmathspace\begin{tabular}{@{}l@{}}\hline
60 \raisebox{0pt}[\mathht][\mathdp]{#1}\\\hline\end{tabular}}
61
62 %% A macro for sample math expressions.
63 %% The original definition gives expressions which should fit into
64 %% paragraphs without enlarging the baseline skip.
65 %% For variable-sized \sum or \int symbols, \usepackage{exscale} is needed.
66 %% Caution: Main (i.e. non-script) symbols are 24.88pt maximum
67 %% with CM math fonts. You may try using text fonts instead,
68 %% but some vertical positionings and spacings still go wrong then.
69 \newcommand\msample{\ensuremath{
70 \frac{X}{Y}
71 \, g^{i_1\ldots i_n}_{j_1\ldots j_n}
72 \, \frac{t^2}{2!}
73 \, e^{-\frac{t}{\tau}}
74 }}
75
76 %% None of the size options 10pt, 11pt, and 12pt offers the entire spectrum
77 %% of available font sizes.
78 %% For example, the 10pt option offers no command for selecting 10.95pt,
79 %% and the 12pt option does not provide a command for 9pt.
80 %% The 11pt option fills both gaps, but misses the extremes 35.83pt and 5pt.
81 %% Therefore, a shorthand for lower-level size switches is provided.
82 %% E.g. \Size{20.74}{25} selects a 20.74pt font size with 25pt baselineskip.
83 \newcommand\Size[2]{\fontsize{#1}{#2}\selectfont}
84
85 \begin{document}
86 \parindent0pt
87
88 %% The test output should fit onto one page
89 \pagestyle{empty}
90 \enlargethispage{1in}
91
92 %% Don't forget to list the moresize options in the test output!
93 \textsf{moresize} options:
94 %%[10pt]
95 [11pt]
96 %%[12pt]
97 %%[normalscripts]
98 [smallscripts]
99 %%[ecpatch]
100
101 %% Are you using HUGE fonts?
102 %%Using CM fonts only.
103 %%Using DC fonts for text, CM fonts for math.
104 Using EC fonts for text, CM fonts for math.
105
106 \begin{center}
107 \newcommand\n{\\\\[-1ex]} %% for separating the tabular lines
108 \begin{tabular}{@{}ll@{}}
109 \Size{35.83}{43}\linebox{36pt}
110 & \Size{35.83}{43}\linebox{\msample}
111 \n \HUGE\linebox{HUGE} & \HUGE\linebox{\msample}
112 \n \Huge\linebox{Huge} & \Huge\linebox{\msample}
113 \n \huge\linebox{huge} & \huge\linebox{\msample}
114 \n \LARGE\linebox{LARGE} & \LARGE\linebox{\msample}
115 \n \Large\linebox{Large} & \Large\linebox{\msample}
116 \n \large\linebox{large} & \large\linebox{\msample}
117 \n \normalsize\linebox{normalsize}
118 & \normalsize\linebox{\msample}
119 \n \small\linebox{small} & \small\linebox{\msample}
120 \n \footnotesize\linebox{footnotesize}
121 & \footnotesize\linebox{\msample}
122 \n \scriptsize\linebox{scriptsize}
123 & \scriptsize\linebox{\msample}
124 \n \ssmall\linebox{ssmall} & \ssmall\linebox{\msample}
125 \n \tiny\linebox{tiny} & \tiny\linebox{\msample}
126 \n \Size{5}{6}\linebox{5pt}
127 & \Size{5}{6}\linebox{\msample}
128 \end{tabular}
129 \end{center}
130 \end{document}
131 %%
132 %%
133 %% End of file `msizetst.tex'.