latex

linenumbering with listings package in latex

Hi, I am trying to insert a code snippet with the listingspackage, and want the lines numbered. However I would like only every 5th line and the first to be numbered (numbers beeing(1,5,10,15,...)) according to the manual: stepnumber=5 should do the trick, however using my minimal example (see bottom), I get the line numbers 1,6,11,1...

Change \parskip only inside enumerate & itemize environment

Is there any way that I can change \parskip to a different value inside certain environments, namely enumerate and itemize. I want to have space between paragraphs (\setlength{\parskip}{1em plus 1pt minus 1pt}), but not inside itemize or enumerate. ...

SVN post commit hook: record number of pages in LaTeX document?

I would like to record how the number of pages of my LaTeX document grows over time. I store the foo.tex file in my SVN repository, so I'm thinking I can use a post-commit script for that, which runs LaTeX automatically (whenever changes to foo.tex are committed), extracts the number of pages and writes it into the log file. Is that ...

LaTeX porting *.eps images with eps2pdf and german umlauts (mutated vowel)

Hello, I draw a use case diagram with MagicDraw and save it as EPS file. Now I want to integrated it into my TeX file by using eps2pdf. It works so far, but the picture includes german umlauts like ä,ö or ü and they will be shown as "?" (question marks). What could I do to solve this problem? Greetings, Lony Important packages: \use...

How can I mix LaTeX in with Markdown?

I've been using Markdown for class notes, and it's great. I even do some preprocessing on the Markdown so I can do things like tables. But this term I'm teaching a class with a lot of math, and I'd love to be able to put LaTeX formulas with Markdown, something like this: The refinement relation is written $a \sqsubseteq b$, which can ...

how to get latex to hyphenate a word that contains a dash ?

In a latex document I'm writing, I get an overfull hbox warning because of the word "multi-disciplinary", which happens to be rendered at the end of a line. I can get rid of this particular warning by changing it into multi-discipli\-nary, but the same problem will happen elsewhere, since this word is used a lot in the paper. I'd like...

Latex Multiple Linebreaks

I use LaTeX to type up programming homeworks for classes. I need to do this: my line of text blah blah blah new line of text with blank line between I know I can use double slash to break lines \\, but LaTeX will only take the first line break (complains about more) and starts a new line, it produces this : my line of text blah bla...

Convert xypic matrix to eps. (LaTeX)

I have a lot of BIG xypic-matrices in my LaTeX file for one of my papers, and it takes long/infinite time to compile. Is there a way to convert just the separate xypic-pieces to eps files, that I include in my main document? I suppose I use LaTeX to compile the xypic part, but then I will get an entire document, right? (Can someone add...

how can I make equations smaller in TeX?

how can I make equations smaller in TeX? For example, I want to use the equation environment as follows: \begin{equation} long equation here \end{equation} but then it's displayed in a way that's too large to fit in the margin. I get around this by using: $ long equation here $ but then I don't get the automatic numbering and all ...

Emacs/AUCTex: run command on file that is not currently open

I edit my LaTeX files in Emacs using AUCTeX. To compile, I press C-c C-c, which will run pdflatex root, if root.tex is the file in the current buffer. But what if I want it to run pdflatex on a file that is not in the current buffer? For example, I am editing an included .tex file chapter2.tex and press C-c C-c. The command I want it ...

How to call latexmk in emacs, and jump to next-error

I would like to use latexmk to compile my LaTeX documents in Emacs. Especially I need the Emacs functionality next-error, which is typically called with C-x `, and jumps to the next LaTeX error in the document. I would like to call latexmk either using C-x compile or the AUCTeX C-c C-c. First, I set latexmk to use $pdflatex = 'pdflat...

LaTeX equations in Ruby on Rails

Hi, How can I render LaTeX stuff like \frac{1}{2} in a Ruby on Rails application? I mean to get an image? Thanks! ...

centering only header of LaTeX table

I'd like to center just the header, but not the body of particular columns in a table. For example: \begin{table}[!t] \centering \caption{ \bf{My table}} \begin{tabular}{l|c|} ... \end{tabular} \end{table} will make a left-aligned column, and a center-aligned column. I'd like the headers to all be centered, but the body of the table t...

What language should we use for creating print material with lots of tables, colors and images?

We are looking for a good way to produce documents for print like the one below, which have content in them that is shared with other pages (the scanned document below is one page in a 102-page booklet). For example, the "Desired Outcome(s)" section is restated on several other pages. When we want to tweak or add to it, we currently have...

LaTeX suppress page break

I'm trying to create a LaTex document which has a "testday" and a verse full of "testItemToDo" and I want any page break to occur before the "testday" but never between a "testday" and the verse of "testItemToDo". How can I modify my LaTex file \documentclass{article} \begin{document} \LARGE {*}{*}to do\\ \begin{verse} {*}today\nopageb...

LaTeX - Adding a varying amount of horizontal spacing to the beginning of each new line in a sequence

I'm using LaTeX for an algorithms assignment and I need to show the steps for Horspool's algorithm for string matching similar to what is shown in the textbook. The way it demonstrates the algorithm is showing how the pattern shifts along the text for each failed comparison, with each shift on a new line. The pattern is shown below the...

LaTeX Page Size --- how do I produce a page that is "just big enough"?

Hi, I was learning about using the command line version of latex today, and I was experimenting with outputting .tex to .dvi, and then .dvi to .png. The problem is, I have a simple .tex document which contains some math. The goal is to eventually produce a png form of the equation. But when I run: $ latex -output-format=dvi test.tex $...

Making Latex typeset given text on two facing pages

How do I encourage/make Latex typeset some portion of text so that it will all appear on a consecutive even-page, odd-page pair of pages? With trial and error, \nopagebreak can be coaxed into doing this, but is there a strategy that Just Works? Something like a samepage environment would be ideal, but one that: Will force a pagebreak...

How to have superscript content "overflow" in overbrace in LaTeX

Hello everyone, I'm trying to overbrace a short equation (or part thereof) with a long superscript. This expands the overbrace to both fit content and superscript, which takes up a lot of space and looks ugly. There is a way to have the content "overflow" the brace, so it will only expand to fit its contents, but I have been unable to fi...

English words hyphenation in Russian text.

I have multi-lingual TeX document mostly in Russian but I also include some terms in English in brackets too to make the reader familiar with international terminology. For example the phrase Два неотъемлемых свойства языка программирования - синтаксис (syntax) и семантика (semantics). which simply means Two attributes of...