latex

Stripes in background color drawn by listings package

I'm trying to create a verbatim environment with a colored background and which can span across pages (so using a colorbox is not an option). It seemed that the listings package was a good way towards it, but the background is drawn one line at a time, such that, when I view the PDF, I see annoying white-ish "stripes" between the lines a...

Including graphics in latex classfile

I have some class files in latex with a company logo on the titlepage. I have now stored all templates for this company in one folder and added this path to miketex. I have placed the logo in a child folder of the templates named "graphics". In the class files I then import the logo with \includegraphics{./graphics/logo}. This gives a fi...

Usage of table/figures shown in caption

Hi, is there a way to add the usage of a table/reference in the caption of the reference/table in latex? For example: \begin{table} \begin{tabular}{ll} \textbf{Name} & \textbf{Description} \\ Foo & bar \\ Foo & bar \end{tabular} \caption{Nice Table. Used on pages [2,3,4].} \label{tab:table} \end{tab...

Setting pdftitle and pdfauthor automatically in a LaTeX stylesheet

I use the code below to set the title and author in the pdf document properties. \usepackage[pdftex]{hyperref} \hypersetup{ pdftitle = {The documents title}, pdfauthor = {me} } I would like to automate this by putting it in a stylesheet (.sty) Below is my attempt, but it is not working. The pdf is compiled (pdflatex) with erro...

How to make the grayed-round box using tiks.

This is a follow-up question asked here. I need to make a round-grayed box as is shown. Based on the answers, I tried something, but not so fruitful. So, another questions coming. I came up with the following command, but it doesn't work. The verbatim inside the minipage doesn't compile. \newcommand{\graybox}[1]{% \noindent\begin...

Renumbering figure in LaTeX?

How can I make figures be renumbered in a TeX document? I want the main figures to be 1, 2, 3, ...etc. But then I want a section to have supplementary figures, S1, S2, S3, S4. The "S" does not have to appear in the figure name, but I do want to reset the counter. ...

Objective C code in LATEX listings

Hi everybody, I'am searching for a way to use objective C in LATEX. I want to display the same syntax highlighting in LATEX as it is in XCode. I tried it this way: \lstset{language=[Objective]C,label=code:MyCodeLabel,caption=A small caption,name=code:MyCode, breakindent=40pt, breaklines} \begin{lstlisting} NSLog(@"Test it: %@",[[[[...

How can I get page numbers to link to the table of contents in latex?

I've seen a pdf latex document where the page numbers at the bottom of the page are hyperref links, and clicking them causes you to jump to the contents table. I don't have the tex file and couldn't work out how it's done from the hyperref package. Can anyone help? ...

Compact Matrix in Latex

For a summary I want to display a latex matrix in an as compact as possible way. How can I do that? ...

How to create an index entry for "|| operator" in LaTeX?

Following the \index quoting rules (prepend a reserved character with a double-quote), I do \index{"|"| operator} but the entry never shows up in the index. Doing these (similar) things does work as expected: \index{"!"! operator} \index{"| operator} So what is special about ||? Needless to say, it also doesn't work without double-...

How to use Sweave (R) code inside a fancyhdr ?

Dear all, I am generating an automatically generated periodical report with Sweave. In order to create a nice header I use the fancyhdr package which works really well so far. Now, since my report is periodical I want to change the header dynamically without passing an argument to the function. That's why I wrote a little R function th...

How to create product catalogue in pdf

In this case I have XML data source and external images files whole together representing products catalogue. The basic structure of XML document is following: categories subcategories products I'm looking for a tool to convert described data source to pdf document, preferably with basic navigation functionality and hierarchical stru...

Adding the abstract to the front page in Latex

Hi, Included below is my LaTeX code. By default the abstract is on the first page following the title page. But the title page has lots of space below, and my abstract will be short, so is there anyway to include it below the title page components? Thanks, A code: \documentclass[12pt,reqno,a4paper,titlepage]{article} \usepackage{a...

latex change heading text

Hi, I want to change the text for certain headings in sections of my latex document. Specifically, I'm using the book document class, and I want to change the 'Chapter #' heading to some custom text... Once I've done it by tweaking the included files for latex and the book doc class, but I guess there's a better solution... any ideas? ...

LaTeX generated results

Say I'm writing a Java program with a GUI, and I'd like to generate nicely formated pdf results. I'm quite familiar with both LaTeX and Java, what is the best way to include the necessary LaTeX files to generate reports with my program when distributing it on windows, and then compile them with java calling the necessary programs? Edit ...

PHP - LaTeX rendering

I am in the design stages of a new project which will take a data set and load it into a document, then render the document around a template. The rendered file could be a data set of CSV, a PDF marketing letter, an email, ... a lot of things. The data will not be math equations, I'm simply looking at an elegant way of connecting many da...

Insert code into a latex doc. without leading tabs

When I write latex I usually indent my sections like this (it allows easier folding in vim, is like reading code, etc). section{section} bla bla bla bla bla subsection{a} bla bla bla bla bla subsection{b} bla bla bla bla bla The problem is when I insert code (see below) into my document if I indent t...

Latex: Any way to have a caption on the table that won't show up in the list of tables?

What I'm trying to do is this: table caption text. Adapted from (source, year) In the list of tables, I'd like the "caption text" to show up, but not the source. However, if I put it all in the caption{}, they do. Ooooooooh, I just realized that if I put the "Adapted from \cite{source}" inside the \begin{table} and \end{table} but aft...

What toolkit can I use to convert PDF (forms) into TEX forms?

I have some forms that were created with Acrobat, they are fillable PDF files (they contain named fields). Is there a toolkit that will reformat them into TEX/LaTEX files and leave all the fields intact? With Acrobat, I can export the forms to Word format (haven't tried it yet), so that might be another path I can take as well. So may...

Multiline brace in eqnarray

I have an eqnarray that consists of 3 lines. I would like to have a right brace } that spans the last two lines and some brief text explaining these two parts of the equation. Something like foo = bar = baz } } explain = etc } but using one large brace, obviously. Is this possible? ...