tex

How to create a timeline with LaTeX?

In history-books you often have timeline, where events and periods are marked on a line in the correct relative distance to each other. How is it possible to create something similar in LaTeX? ...

How to create a background-image on titlepage with LaTeX?

I want to put a background-image on a titlepage of a document. Is it possible and dows it work? EDIT: The answer from Presidenten using the eso-pic-package and my answer found after some research using the wallpaper-package are both working. ...

How to create automatic a list of items used in a LaTeX-document?

I want to add items in a LaTeX-document. Say for example, that I want add hints to the document. I create a command, so I can call something similar to this: \hint{foocareful}{Be careful with foo!}{foo is a very precious item and can easily be broken. Be careful, especially don't throw foo.} This will be formatted in special way, to m...

Is a successor for TeX/LaTeX in sight?

TeX/LaTeX is great, I use it in many ways. Some of its advantages are: it uses text files, this way the input-files can be diffed and many tools exist to work with text it is very flexible it has a stable layout: if I change something at the start of the document, it doesn't affect other things at the end of the document it has many ex...

What are the relative merits of pdflatex?

Not sure this is a programming question, but we use LaTeX for all our API documentation and user documentation, so I hope it will go through. Can someone please explain what are the relative merits of using pdflatex as opposed to the "classic" technique of latex foo dvips -Ppdf foo ps2pdf foo.ps From time to time I run into people wh...

How to define output depending on an variable with an status in LaTeX?

I have some standard-texts, but some portion of it is different. But of these different parts only a few exists. For instance I want: \mytext{...}{a} \mytext{...}{b} That produces: \section{Item: ...}\label{item...} This is a standard item. Items of type a are very precious. \section{Item: ...}\label{item...} This is a standard it...

How to mix single and double columns in one document in latex?

I have a document and want to create it as a twocolumn-document. That works fine with the twocolumn-option at the documentclass-command. But I have some tables and images, that are too big and should be included using both columns. These tables and images should be mostly on the same page, so \onecolumn and \twocolumn is no option (with ...

How can I combine cells in a row in a latex-table?

In a table I want to combine some of the columns, but not in all rows. How can I realize this with LaTeX? ...

How to modify the paper dimensions in plain TeX?

I mean the whole paper, not only the text zone in it. I want the dvi output to look 1 centimetre x 10 metres in the viewer if I set these dimensions in the tex file. And I don't want to go through LaTeX for it. ...

Can TeX code be safely executed from untrusted sources?

MediaWiki allows one to embed TeX math code that is rendered into images and posted into the Wiki pages. Is this safe? If one allows untrusted users to input TeX programs to be executed by an interpreter running in a web server, does it open the server up to being hacked by using the TeX interpreter to read files from the server's disk...

Where can I find the graph of TeX's error log?

In Donald Knuth's Literate Programming, there was if I remember correctly a graph showing the evolution of TeX's number of bugs over time. This graph has remained flat for the past decade or so, suggesting that TeX might now be bug-free. I would like to use this graph to illustrate the importance of bug-tracking software. Is it download...

Redefining Commands in a New Environment

Two questions: 1) Does LaTeX allow one to (re)define commands within a \newenvironment? I've tried using \renewcommand, \newcommand and \def in the before declaration but to no avail. 2)How would one redefine \item when creating a new list environment? I've created a new type of list environment from scratch using \newenvironment whil...

Redefining Commands with Parameters using \newenvironment

Pursuant to this question: Redefining Commands in a New Environment How does one redefine (or define using \def) a macro that uses parameters? I keep getting an illegal parameter definition in \foo error. Since I require custom delimiters, I can't use \newcommand or \renewcommand. A general form of my code looks like this: \new...

How can one put a "[" after "\item" in LaTeX?

The following latex does not compile because of the "[" after the "\item". I presume it is because LaTeX expects a "]" as per the "\item[option]" syntax. However, I just want to insert the "[" character into the text as the first character of the enumerated item. \documentclass[oneside,12pt]{article} \begin{document} \begin{enumerate}...

Totally Sweet Horizontal Rules in LaTeX

I have been trying to find a way to easily drop a nice horizontal rule into a LaTeX document. \hline just makes a line across the page. It would seem that some package must provide something that is maybe half a page wide, with little bedknobs on the ends or something to act as a nice section marker for paragraphs. Any ideas? Or am I...

Escaping a character in TeX equation?

I want to use a variable name containing dash in TeX equation. However, dash gets interpreted as minus sign. Anyone any idea of how to escape the character? ...

Source code of books made with TeX/LaTeX to learn

Some time ago, reading this entry I found a nice image and a pointer to a better book entitled "Thinking Forth". To my surprise, the LaTeX sources of the book were ready to download, with pearls like: %% There's no bold typewriter in Computer Modern. %% Emulate with printing several times, slightly moving \newdimen\poormove \poormove0....

Disabling underscore-to-subscript in Emacs Org-Mode export

When I export to PDF via org-mode (C-c C-e d), any words with underscores end up being partially converted to subscript. How can I prevent this from happening? I found this article on the subject: Disabling Underscore subscript in Emacs Tex Mode However, I either wasn't able to figure out the correct elisp or it simply didn't work. No...

LaTeX: how to use a required arg as the default for an optional one?

I'm trying to create a LaTeX command with two arguments, one of them optional. Normally I'd do this as \newcommand{\whatever}[2][default]{first #1 second #2} where default is the default value for the first argument. But for this command I want the value of the second argument to be used as the default value for the first argument - t...

How to I get scons to invoke an external script?

I'm trying to use scons to build a latex document. In particular, I want to get scons to invoke a python program that generates a file containing a table that is \input{} into the main document. I've looked over the scons documentation but it is not immediately clear to me what I need to do. What I wish to achieve is essentially what yo...