A while ago I mentioned I was planning to write an introduction to LaTeX. Since then I have, while not actually finished that document, at least produced the skeleton and included all of the topics covered in my original notes-to-myself as well as some useful fundamentals. I don't recommend using it as your sole source of information, and it will probably make LaTeX purists wince in some places, but it admits where it's incomplete or doubtful.

An Idiosyncratic Guide to LaTeX

(Append .pdf or .tex to that URL to specifically get the rendered or source formats.)

As you can see, I decided to write the guide itself in LaTeX, primarily for the sake of including examples (not that I've done much of that yet), but also so that it is self-demonstrating. I considered changing the page size so that it has no page breaks at all, for better on-screen reading, but that would prohibit the use of footnotes. I've considered using margin notes instead, but they would require a large margin which can also be annoying on-screen. Please let me know what you'd like to see for such formatting.

HTML or PDF?

Thursday, October 21st, 2010 12:00

I'm planning to write a short introduction/quick reference to LaTeX (with a particular emphasis on “what corresponds to this HTML element?”, and actually explaining the core syntax rather than just examples of particular cases), as another page on my web site. Should I write it as HTML or LaTeX (rendered to PDF)? Using LaTeX means I can embed rendered examples without each one being an image (which I don't really want to deal with), but the result being a PDF rather than HTML means that the document would have a fixed line width, and possibly require download/be unviewable depending on the particular browser/platform/installed plugins. (It could still have hyperlinks.)

(In case you're wondering, there are several LaTeX-to-HTML conversion tools, and the last time I looked they all either didn't run, accepted a far-too-small subset of LaTeX, or produced too-low-quality or obviously broken output. I used one of them for this post and had to hand-edit black bars out of every image and trim the margins, and the antialiasing is poor.)

What would you prefer?

 +----------------------------------------------------------------------------+
 |                                                                            |
 |                                 A thought                                  |
 |                                 ---------                                  |
 |                                                                            |
 |  |\  /|onospaced text  documents were the first  WYSIWYG-edited documents. |
 |  | \/ | One can create paragraph formatting and headings, special layouts, |
 |  |    | integrated diagrams, decorations --  all interactively with exact  |
 |  immediate feedback  upon just how it  will appear (outside of  choice of  |
 |  font) on screen, paper printout, someone else's email client -- anything  |
 |  whatsoever that displays this medium.  Though,  font characteristics can  |
 |  affect the quality of diagrams and decoration; for example, how high the  |
 |  “~” or “^” symbol is,  and how much of a character cell is filled by the  |
 |  character shape.                                                          |
 |      This, however, is a minor disadvantage,  and I have even today found  |
 |  uses for this style of document preparation;  for example, certain class  |
 |  assignment submissions.  The usual tool is Microsoft Word documents; but  |
 |  I do not own a copy of Word,  and while OpenOffice (dot org) is adequate  |
 |  for reading, its rendering is often different from Word's  -- and I have  |
 |  even encountered data loss bugs: “Hey! Where'd my table go?”  After that  |
 |  incident, I resorted to plain text for the assignment (which was essenti- |
 |  ally tabular in structure) and have used such formatting since for those  |
 |  things which are amenable to the format.  I could have used HTML, or sub- |
 |  mitted a PDF rendered from OpenOffice-on-my-computer or a LaTeX document, |
 |  but I wanted to choose a format  which I was confident would seem a reas- |
 |  onable type of document to the recipient,  and plain monospaced text fit  |
 |  that role well.                                                           |
 |      It can even be fun  to lay out your document  completely by hand, if  |
 |  it is not too long  -- and rather than fiddling with margins,  tab stops, |
 |  table editing tools, etc.,  you can just  *write what you want* directly, |
 |  just as much as if you were writing on paper, with all the advantages of  |
 |  an electronic document. Unless you want graphics that are no bigger than  |
 |  a character.                                                              |
 |                                                                            |
 |   |/    .    /)  . /                                                       |
 |  /\_Ø\///\  /\_Ø/(/.                                                       |
 |                                                                            |
 |  P.S. If you want to reply in like style,  use the <pre>...</pre> element  |
 |  and click the “More Options...” button to get to the “Don't auto-format”  |
 |  option.                                                                   |
 |                                                                            |
 +----------------------------------------------------------------------------+

Normal People Things:

  • Gone to a party unrelated to my family.

Never thought I'd do:

  • Worn a t-shirt with text on it.
  • Written an essay structured using a gratuitous extended metaphor.

Extra nerd points:

  • Programmed a number type which carries units and error values, to reduce the tedium of lab reports.
  • Learned to write all my assignments in LATEX.
\documentclass{article}
\usepackage{verbatim}
\begin{document}
  \verbatiminput{\jobname.tex}
\end{document}