TeXnik - Tips TeX and LaTeX

Welcome to the TeXnik website (under construction)

TUG logo

Main page

Search CTAN:


Google c.t.t.

Google d.c.t.t.



Changing Font |  cm-super - Install |  cmssdc font | 
Demoprint of all Fonts  |  Documentwide fontsize other than 10,11,12pt  | 
extsizes package  | 
Frequently Asked Questions About Fonts  |  font cmssdc  |  Fontnames |  Fonts as gifs (for a view) |  Fontsize (Standard) in pt  |  Fontsize (nonstandard)  | 
Helvetica  | 
LaTeX-Symbols |  Latin Modern Fonts |  Lucida Type 1 font |  Luximono | 
Math-Alphabets |  MathFonts  |  MathFontSize  | 
Names of the Fonts |  \newfont |  Nonstandard fontsize | 
Print a Demo of all installed Fonts | 
Sans Serif  |  Symbols  |  stmaryrd  | 
textcomp |  Triple Integrals |  TrueType Fonts installer | 
wasysym | 

font cmssdc

Luximono font

\renewcommand\ttdefault{ul9}% luximono

Print a Demo of all installed Fonts
Create a new directory and run this one-liner, which creates for every installed font a dvi-demo file.

find `kpsewhich -expand-var='$TEXMFMAIN'`/fonts/tfm -name '*.tfm' -print | \
	sed 's@.*/@@; s@\.tfm$@@' | \
	xargs sh -c 'for i in "$@"; do (echo $i; echo \\\sample\\\bye) | \
	tex testfont; mv testfont.dvi $i.dvi; echo $i.dvi; done' sh
You'll get a lot of dvi-files!!!!!!

Another solution from Alexander Blüm, which needs less paper ...
first the list of files is generated
find /usr/share/texmf/fonts/tfm -name '*.tfm' -print |\
  sed 's@.*/@@; s@\.tfm$@@' > available_fonts.lst
then run the following script font_lister.pl
#!/usr/bin/perl -w
use strict;

my $i = 0;
my $lst = {};
my $couter_fonts = 0;
my $couter_files = 0;

open(F, "available_fonts.lst");
  $lst->{enc($i++)} = $_;
close F;

open (F, "+>lst_".$couter_files.".tex\n");
print F qq(\\documentclass{article}\n);
print F qq(\n\\begin{document}\n);
foreach(sort keys %{$lst}){
  if (!(++$couter_fonts % 100)){
    $couter_files ++;
    $couter_fonts = 0;
    print F "\\end{document}\n";
    close F;
    open (F, "+>lst_".$couter_files.".tex\n");
    print F qq(\\documentclass{article}\n);
    print F qq(\n\\begin{document}\n);
  print F "\\newfont{\\myFont$_}{ $lst->{$_} }\n";
  print F "\\myFont$_ $lst->{$_} : Sample Text \\\\ \n";
print F qq(\\end{document}\n);
close F;

sub enc{
  my $out = "";
  foreach(split //, shift){
    $out .= chr($_+65);
  return $out;
when this is done (real fast) and run this shell command in the same directory
for x in lst_?.tex; do latex $x; done
then you'll have less DVI files.. viewing them is the only slow process.

New documentwide Font
in the preamble. The family names are things like "ptm" for Adobe ("P"ostscript) Times... look at how your cryptic-short font names start. If you use any, you should specify the sans-serif and typewriter families as well. Setting up math fonts is much more difficult. You should use a package (like mathptmx) for selecting the whole lot.

Sans Serif Font
If you want sans serif as the default font, write in preamble:

it's part of the psfonts-package ftp://ftp.dante.de/tex-archive/macros/latex/required/psnfss/

  • download psfonts.ins
  • download psfonts.dtx
  • run latex psfonts.ins and than do a texhash when you moved all files to any valid tex-dir

    The Helvetica font together with the standard font looks better when you scale it a bit down:


    To get the TOC and other lists in Helvetica too, use package tilesec


    TrueType font installer for teTeX
    There are some docs for using TT-fonts with TeX/LaTeX:

  • Philipp Lehmann wrote his experience of installing the TrueType fonts for teTeX down. You can download it (docs and scripts): ftp://ftp.dante.de/tex-archive/support/ttf2tex/
  • A Online-doc Using TrueType fonts with TeX (LaTeX) and pdfTeX (pdfLaTeX)

    Nonstandard fontsizes
    There are different ways to get another fontsize for single characters:

    1. in latex preamble

    \newfont{\myFont}{cmr6}  %cmr6 is a given font
    for 6pt size or for a nonstandardsize
    \newfont{\myFont}{cmr10 at 30pt}  % expand cmr10 to 30pt
    it's a good thing when the basic font is a divisor of the choosen one, because latex has to build this font new.

    in your text anywhere:

    the font \myfont is valid until another font is chosen.

    2. in latex preamble

    \newfont{\scaledfont}{cmr12 scaled 7000}
    and in text for example: Scaled \scaledfont Fonts\rm and Standard again
    which looks in dvi:

    HUGE, huge, LARGE ... in relation to documentwide fontsize

    FontSize corrsponding to documentwide option 10,11,12
    FONT size baselineskip
    10pt 11pt 12pt 10pt 11pt 12pt
    \tiny 5pt 6pt 6pt 6pt 7pt 7pt
    \scriptsize 7pt 8pt 8pt 8pt 9.5pt 9.5pt
    \footnotesize 8pt 9pt 10pt 9.5pt 11pt 12pt
    \small 9pt 10pt 11pt 11pt 12pt 13.6pt
    \normalsize 10pt 11pt 12pt 12pt 13.6pt 14.5pt
    \large 12pt 12pt 14pt 14pt 14pt 18pt
    \Large 14pt 14pt 17pt 18pt 18pt 22pt
    \LARGE 17pt 17pt 20pt 22pt 22pt 25pt
    \huge 20pt 20pt 25pt 25pt 25pt 30pt
    \Huge 25pt 25pt 25pt 30pt 30pt 30pt

    Other sizes available with package moresize. The fontsize is changed for math-environments, too.
  • local time: Sat Jul 11 18:22:05 CEST 2020 ; file is: 379.169594907407 days old
    contact webmaster _at_ TeXnik.de