latex

recent posts related to LaTeX

LaTeX - underline text (font) in a LaTeX document

LaTeX font question: How do I underline text in a LaTeX document?

This actually ends up being one of the easiest things to accomplish related to LaTeX font formatting. Its a little inconsistent from the LaTeX tags you use to create bold and italicized text, all you have to do is use the LaTeX \underline tag:

LaTeX if then examples (LaTeX ifthen package)

Here is a LaTeX example file where I'm experimenting with the LaTeX "ifthen" package (ifthen.sty).

These are simple examples, where I'm playing with the if/then decision making capability with the LaTeX "ifthen" package. These two examples are pretty easy, but make a nice introduction to the "ifthen" package.

Without any further ado, here are my LaTeX if/then examples:

LaTeX example: How to create your own commands with ‘newcommand’

LaTeX question: Can you show a simple example of creating your own LaTeX command?

Here is an example LaTeX file where I'm experimenting with various newcommand and renewcommand capabilities. The file actually contains six LaTeX examples, and in each step I add one more LaTeX feature that is a little harder than the previous step.

LaTeX HTML package - control your output

The LaTeX "html" package (html.sty) can be very useful for the times that you want to conditionally controlling the output in LaTeX documents, but very specifically, when you want one set of output for normal Latex processing (LaTeX PDF output), and another set of output for LaTeX HTML processing.

Here's a very simple example of how you can use this LaTeX HTML package to conditionally control what is output by the LaTeX processor:

LaTeX versions - conditionally control your output

The "versions" package (versions.sty) can be very useful in conditionally controlling your output in LaTeX PDF and HTML documents.

LaTeX conditional output

Here's a very simple example of how you can use this package to conditionally control what is output by the LaTeX processor:

LaTeX multiline comments

I often have a need to create LaTeX comments that span multiple lines. Of course you can create single line comments in LaTeX using the percent character like this:

% this is a comment

But I want to be able to create LaTeX comments that go on for multiple lines. Fortunately, if you know that you're supposed to include the verbatim package, this is pretty easy.

LaTeX multiline comments example

The first step is to include the verbatim package, like this:

A crazy sed script to convert HTML code to LaTeX

The crazy sed script below is my first attempt at a script that will convert as much HTML as possible to LaTeX. For my purposes I'm mostly interested in tables, lists, buttons, and comboboxes, but I included a few other things as well.

This is in an extremely experimental state, and is included here as much for backup purposes and sharing as anything else.

Here's how you run the sed script on an HTML file named test.html:

sed -f html2latex.sed test.html > test.tex

That being said, here's the current source code for the html2latex.sed file:

LaTeX box - how to create a box alvin June 10, 2004 - 8:32am

Okay, now I'm getting into the crazy LaTeX code. I'm converting HTML UI prototype images into LaTeX so I can include the prototypes in my Requirements Specification docs.

So, that being my motivation, here's some LaTeX example code that shows how to display the equivalent of a textfield inside of a table. At the very least, this demonstrates how to use the LaTeX fbox command. :)

LaTeX command references and examples alvin June 2, 2004 - 3:39pm

I'm not sure this is *the* reference, but here's a Latex help file that helps:

There's also a Postscript version available on the site for easier printing.

Here are a few others with different formatting styles, including some duplicates:

LaTeX example - Print a chapter or section without a corresponding sectioning number?

LaTeX FAQ: How can I print a chapter or section without a corresponding sectioning number?

Use the * version of the chapter and section commands, like this:

% a sample chapter
\chapter*{Latex FAQs}

% a sample section
\section*{Latex FAQs}

Note that the "normal" way of doing a chapter or section, which would include the correspond chapter or section number, is like this:

% a sample chapter
\chapter{Latex FAQs}

% a sample section
\section{Latex FAQs}