latex

Embedding multipage documents in LaTeX documents

I am writing my dissertation and need to reproduce different short booklets (2-7 pages) that I have used in my studies. Ideally, I would like to have each page of the booklet appear as a page in my dissertation, but enclosed within some frame and using my dissertation's page numbering, etc. I have the booklets in Word format but would...

In LaTeX, how can one add a header/footer in the document class Letter?

In LaTeX, how can one create a document using the Letter documentclass, but with customized headers and footers? Typically I would use: \usepackage{fancyhdr} \pagestyle{fancy} \lhead{\footnotesize \parbox{11cm}{Custom left-head-note} } \lfoot{\footnotesize \parbox{11cm}{\textit{#2}}} \rfoot{\footnotesize Page \thepage\ of \pageref{Las...

Ragged headlines within justified text

I am creating a pdf file with Latex via pdflatex and want to have have headlines with ragged text, while the rest of the document should use justified text. This gives me an error (! LaTeX Error: Something's wrong--perhaps a missing \item): \usepackage{ragged2e} .. \flushleft \chapter{Something} \justifying And this one messes up t...

How do you extend article document class in LaTeX?

I don't really need a lot of changes to the default article document class. All I want is: redefine page margins (I want them to be the same on all pages, but different from the default values); use title page; add more elements on the title page (title, author and date is not enough for me, I want company and company logo to be on the...

Make code in LaTeX look *nice*

I'm currently writing a project report, and to explain the slightly crazy un-intuitive code that I've used I need to put lots and lots of short excerpts of example code in. Does anyone know how I can get code into LaTeX that: A) Looks nice B) Doesn't go off the side of the page if the line's too long (list lstlisting or verbatim) ...

Is this a reasonable caching method?

I'm using PHP to render LaTeX to pngs as part of a CMS, I need some kind of simple caching mechanism because it takes the server about 2 seconds to render the png. I take the raw TeX and run it through the md5 function, then I insert the hash into the database along with the current timestamp, and use the <hash>.png as the filename. Ever...

Invalid characters in generated latex sources in Doxygen?

I'm running doxygen (1.5.8) on a C# project off of Visual Studio 2008 on a Windows machine running XP. While generating the latex code, some illegal sequences are included. It always involves the following sequence: "" (a latin-i with a dieresis, something like the binary shift operator, and a Spanish open-question-mark). I've seen it...

What formatting language should I use for project documentation

I'm planing to move project documentation for a fairly big software project from using Microsoft Word files with manual versioning in the filename to storing it in the source version control system. This would all be the type of documentation written by the developer team, release notes, upgrade instructions and administration guideline...

LaTex macro to make LaTex more human-friendly in Math?

How can I make a LaTex macro which replaces each \and by the word "and" \or by the word "or" so that the nouns are not in italics? ...

How to customize an existing LaTeX environment without interfering with other environments

I'm using Sphinx for documenting a project. It produces LaTeX files from restructured text. I would like to set a gray background color to the tips and notes, so I customized the notice environment after creating a graybox environment: \definecolor{MyGray}{rgb}{0.80,0.80,0.80} \makeatletter\newenvironment{graybox}{% \begin{lrbox}{\...

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

Adding MS-Word-like comments in LaTeX

I need a way to add text comments in "Word style" to a Latex document? I don't mean to comment the "source code" of the document. What I want is a way to add corrections, suggestions, etc. to the document, so that they don't interrupt the text flow, but still easy for everyone to know, which part of the sentence they are related to. They...

Looking for a self-contained equation rendering library

Is there such a thing as a small, self-contained library that will render an equation written in a text-based format (e.g. LaTeX or MathML) to an image (either vector or raster)? It would be preferable if it's in Python or Python-friendly. (One possibility that I've found: Matplotlib has Python code to parse and display LaTeX equation...

Math operator in specifying figure width in LaTeX

In LaTeX figures, one can use \textwidth and \columnwidth to specify sizes of the graphic relative to the size of surrounding text, e.g. \includegraphics[width=.5\textwidth]{myimage}. I would like to easily switch from onecolumn to twocolumn template (and back) without the figure growing too large for onecolumn template. For twocolumn t...

Can't get italics to display for Japanese font using xelatex

I can't get italics to display correctly with xelatex for Japanese or Latin text using Japanese fonts. Sample file: \documentclass{book} \usepackage{fontspec} \setromanfont{MS Mincho} \title{Test} \begin{document} regular テスト \emph{italics テスト} \end{document} It should show "italics テスト" or at the very least "italics テスト" but ...

How to ignore comments in the latex file with ispell (within emacs if possible)

I'm writing a text with Latex in English but written my comments in Finnish. When I'm running the spell checking with ispell, I got to run through all the comments. Is there a handy way to skip the comments with the ispell? If that could be done with emacs, that would be double handy =) One way would be to run the ispell within console ...

create pdf with long lines, fit to pagewidth without wordwrap

i'd like to create a large pdf (not typical page size) with long lines, max ~1000 characters / line, where the page size and font are such that no lines need to wrap. the intention is not for the text in this document to be readable when the full page is viewed on any reasonably-sized monitor -- instead the reader can zoom to individual...

Unable to make each sentence to start at a new line in LaTex by AWK/Python

I have a long document in LaTex, which contains paragraphs. The paragraphs contain sentences such that no subsequent sentence start at a new line. How can you make each subsequent sentence to start at a new line in my .tex file? My attempt to the problem We need to put \n to the end of Sentence B where Sentence B has Sentence A before...

Makefile for multi-file LaTeX document

I'm trying to simplify/improve the Makefile for compiling my thesis. The Makefile works nicely for compiling the whole thing; I've got something like this: show: thesis.pdf open thesis.pdf thesis.pdf: *.tex pdflatex --shell-escape thesis This allows me to type make and any changes are detected (if any) and it's recompiled bef...

Making LaTeX Beamer Black & White

Is there a way to make LaTeX Beamer output black & white? I need it for paper printing purposes. I'm using the default color theme, and for contrast reasons I need the title and everything to be black. If there is a black&white color scheme, I could use it, but otherwise I don't want other color schemes, with colored backgrounds. Maybe t...