Brett Hutley's Blog

Home on the Digital Range

TeX, LaTeX and Texinfo Notes

I've recently started to use LaTeX and Texinfo to write up my documents. I love LaTeX because it looks great when you print it out. Writing math formulas in LaTeX is much faster than using a GUI tool as well, and you get much prettier output.

There is a TeX user group and also a list of TeX-related documentation.

Texinfo Notes

The default is for texinfo to indent paragraphs. I prefer to have my paragraphs unindented, so I specify "@paragraphindent none" near the top of my texinfo file.

I prefer to use san serif fonts in my documents, but I couldn't figure out how to get them. Finally after reading through the texinfo.tex file I've mostly worked it out. Include the following before the @titlepage:


@sf

@setfont@secrm@sfbshape{12}{@magstep1}
@setfont@chaprm@sfbshape{12}{@magstep2}
@setfont@titlerm@sfbshape{12}{@magstep3}
@setfont@ssecrm@sfbshape{12}{@magstephalf}

TeX Notes

To get san serif fonts in plain TeX do the following:

font\helv=phvr at 12pt
\helv This is a test

The first line loads the font given by the name phvr (helvetica) and assigns it to the command "\helv". The second line switches to using that font.

This page lists filenames for TeX fonts.

LaTeX Notes

There is a great WikiBook on LaTeX available.

I usually start my LaTeX documents with


documentclass[12pt,a4paper,titlepage,openany]{book}
\renewcommand\sfdefault{phv}%               use helvetica for sans serif
\renewcommand\familydefault{\sfdefault}%    use sans serif by default
\setlength{\parindent}{0em}
\setlength{\parskip}{1.5ex}
 
\usepackage{fancyhdr,lastpage}
\usepackage{longtable}
\pagestyle{fancy}
\lhead{My Title}
\rhead{Page \thepage}
 
JADB | Sans-Serif Fonts in Texinfo at 14:06 on 25 June 2010
[...] Huntly, in a post on TeX, LaTeX and Texinfo mentioned that he likes setting his documents in a Sans-serif font in [...]