Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
% gettingstarted.tex
\hoffset=-72.27pt
\voffset=-72.27pt
\hsize=72.27pt
\vsize=72.27pt
\special{papersize=\the\hsize,\the\vsize}

\parindent=0pt
\nopagenumbers

\input pstricks

\def\tiny{\fontsize{10pt}{12pt}\selectfont}

\pspicture(\hsize,\vsize)
\psframe(\hsize,\vsize)
\rput{45}(0.5\hsize,0.5\vsize){\bf\tiny xport}
\endpspicture

\bye

How to define font size in plain TeX such that it works as font size defined in article?

share|improve this question
7  
Please read up carefully on how plain TeX works, rather than bombarding us with questions. This is where some research by you is needed. –  Joseph Wright Jul 18 '11 at 10:18
    
Why do you want to use plain tex? It is outdated and lacks a lot of features. You can implement all the missing bits but why don't you simply use a modern system like latex or context instead? –  Ulrike Fischer Jul 18 '11 at 10:43
    
@Ulrike: Compiling a single graphics on TeX directly might run faster than on LaTeX. I am preparing the input files for both cases now. Since font size is need in the LaTeX version, so I have to find the equivalent in TeX. No time to read the TeXBook just for knowing the font size. :-) –  xport Jul 18 '11 at 10:48
2  
Using a specific font at a specific size is easy: \font\myfont=cmr10 at 8pt. But if you want font switches and things like \bfseries: The font selection system of LaTeX is a quite sophisticated code. I think there exist on CTAN somewhere a simple version for plain, but I don't remember the name. –  Ulrike Fischer Jul 18 '11 at 10:58

2 Answers 2

up vote 5 down vote accepted

There's no font selection scheme in Plain TeX. There are some packages that provide an infrastructure:

  • fontch
  • plnfss
  • ofs

If you need to match fonts used in LaTeX, use LaTeX.

One should also keep in mind that scaling the Computer Modern fonts is not a good practice.

Here are two samples; the first has "A test" printed with

  • cmr10 scaled 250
  • cmr10 scaled 500
  • cmr5

enter image description here

The second sample is of "A test" printed with \tiny from LaTeX (class article at 10pt size):

enter image description here

It's clear that the third option in the first sample corresponds to \tiny.

share|improve this answer

The speed difference between doing this in plain TeX and LaTeX will not reasonably be measurable.

In any case, 10 on 12 pt is the default in plain TeX, so you don't need to change the font size.

Fonts are not commutative in plain TeX, so each one must be separately defined, eg \font\tiny=cmb10 at10pt -- that means you can get rid of the \bf as well.

Better, use LaTeX.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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