LaTeX

From MukeWiki
tlmgr install environ trimspaces comment # SUJV sprava


  • Disable the automatic line break at 79 characters in the output of pdflatex [1].
$ export max_print_line=$(expr $(tput cols) - 1)   # or max_print_line=999
$ pdflatex file.tex
  • The command \RequirePackage is very similar to the well-known \usepackage, adding optional parameters within brackets will also work. The only difference is that the \usepackage can not be used before \documentclass command. It's strongly recommended to use \RequirePackage when writing new packages or classes [2]. \RequirePackage is equivalent to \usepackage [3].

LaTeX fonts

Kapitola Text font attributes

  • kazdy font v LaTeX pouziva 5 attributes: encoding, family, series, shape, size
    • encoding
      • OT1 TEX text
      • T1 TEX extended text
      • OML TEX math italic
      • OMS TEX math symbols
      • OMX TEX math large symbols
      • U Unknown
      • L<xx> A local encoding
    • family
      • cmr Computer Modern Roman
      • cmss Computer Modern Sans
      • cmtt Computer Modern Typewriter
      • cmm Computer Modern Math Itali
      • ccmsy Computer Modern Math Symbols
      • cmex Computer Modern Math Extensions
      • ptm Adobe Times
      • phv Adobe Helvetica
      • pcr Adobe Courier

Tak ako teda LaTeX urci, najde aky font pouzit ?

V dokumentacii LATEX font selection v kapitole Font definition files je uvedeny detailny postup.

The description of how LATEX font attributes are turned into TEX fonts is usually kept in a font definition file (.fd). The file for family〈family〉in encoding〈ENC〉must be called〈enc〉〈family〉.fd: for example, ot1cmr.fd for Computer Modern Roman with encoding OT1 or t1ptm.fd for Adobe Times with encoding T1. Note that encoding names are converted to lowercase when used as part offile names.

\documentclass{article}

\begin{document}
simple text
\end{document}

Default LaTeX pouziva OT1 kodovanie a cmr (Computer Modern Roman) font

$ kpsewhich ot1cmr.fd
/opt/texlive/2020/texmf-dist/tex/latex/base/ot1cmr.fd

$ cat $(kpsewhich ot1cmr.fd)
\DeclareFontShape{OT1}{cmr}{m}{n}%
    {<5><6><7><8><9><10><12>gen*cmr%
     <10.95>cmr10%
     <14.4>cmr12%
     <17.28><20.74><24.88>cmr17}{}

$ grep cmr10 $(kpsewhich pdftex.map)
cmr10 CMR10 <cmr10.pfb

$ kpsewhich cmr10.pfb
/opt/texlive/2020/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb


POZOR latex output v terminale a v log subore sa mierne lisia, v log subore je viac informacii.


% http://mirrors.mi.ras.ru/CTAN/macros/latex/base/fntguide.pdf
% font definition file

% /opt/texlive/2020/texmf-dist/tex/latex/base
% $ cat $(kpsewhich ot1cmr.fd)              $ cat $(kpsewhich t1cmr.fd)
% $ grep cmr10 $(kpsewhich pdftex.map)      $ grep ecrm $(kpsewhich pdftex.map)
% $ kpsewhich cmr10.pfb                     $ kpsewhich sfrm1000.pfb

%\pdftracingfonts