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

Some help on LaTeX commands

I find that the default LaTeX styles need to be customized quite a bit to suit my tastes. Here is some example customizations, and some LaTeX Tips and Tricks is a reference that I’ve found handy.

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}