Posts in the “latex” category

LaTeX PDF document size/length example

In the example below I'm showing how you can change a bunch of LaTeX document length parameters. The values don't really make any sense -- I've just thrown some numbers in there. I just want to remember how to do this for the next time I need to create a LaTeX PDF document.

(For what I'm trying to achieve today my goal was to get rid of all the margins on the left side of the page. Then I decided to throw in a few other values.)

I found some of these LaTeX examples on pp. 84-89 of The LaTeX Companion.

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 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 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}

 

LaTeX box - how to create a box

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. :)