# All Questions

170,150 questions
9k views

### How can I have two or more distinct indexes?

I often want to have more than one index in a longer LaTeX document. For instance, I might want a general concept index, an index of named persons, and an index of symbolism. How can I have two or ...
14k views

### What is the best package out there to typeset proof trees?

So, I want to typeset some proof trees, i.e. trees of inference rules like those in natural deduction (see diagram below). Which are the best packages that you have found that allow you to do this, ...
229 views

### Aligning marginal notes with center of line rather than baseline

I would like to have all references in my document (to equations, figures, lemmas, random locations in text, etc.) be numbered in the same series, and I would like these numbers to appear in the ...
3k views

### Graphing sine function in MetaPost

I'm trying to reconstruct this picture in MetaPost: So far came up with this: draw (-1cm,0)--(3cm,0); draw (0,1cm)--(0,-1cm); draw fullcircle scaled 1.8cm; label(btex $y$ etex,(0,1.2cm)); label(btex ...
24k views

### How can I create a pdf document exactly as big as my tikz picture?

I often create pictures in tikz that I want to either send to someone, or include in an email. The problem with that is that there is a big white space around and and especially below my pictures. To ...
41k views

### When to use \edef, \noexpand, and \expandafter?

I'm quite happy hacking TeX macros and cobbling together bits and pieces from different style files to suit my own ends, but I have a suspicion that my resulting hacks are not quite as elegant as they ...
8k views

### How can I change the colour of my document's section numbering?

I know how to change the colour of a section name using for example \section{\color{Red} Foobar} but that still leaves the section number in black. Is there any way to change the colour of the ...
13k views

### How to automatically resize the vertical bar in a set comprehension?

I have a simple command which I use to write set comprehensions so that the braces automatically resize with respect to size of the enclosed arguments, e.g. \usepackage{amsmath} \newcommand{\set}[1]{\...
2k views

### How to “stamp” the same text on each page of a document

I want to have drafting information appear on each page of document. I have seen something similar in the Kluwer document class where it defines \@oddfoot and \@evenfoot for a lot of possibilities. ...
722 views

### How to test whether next token on input stream is catcode 10

Why doesn't the following code work? From a failed, now fixed, SO answer of mine: \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \newcommand\latinabbrev[1]{ \peek_meaning:NTF . {% Same ...
18k views

### Line breaking (or hyphenation?) of references in apalike

This is a problem I encountered some time ago and I never could solve it: how can you achieve correct line-breaking or hyphenation when citing references with the apalike style? Here is an example: \...
14k views

### Vertically center text and image in one line

I need to place an icon and text behind each other on one line. The icon is higher than a single text line, and would like to have the icon and text center aligned. How do I do that?
262 views

### Can super/sub-scripts bind more tightly than macro expansion?

By "bind more tightly" I refer to the order in which operations are carried out by default. Experimenting shows that if \ab is ab and \cd is cd then \ab^\cd is ab^cd. I would like it to be {ab}^{...
62k views

I sometimes have to present on other people's equipment, such as machines running stripped down Linux distributions, presentation servers with a bare-bones PDF viewer running in a virtual machine, or ...
22k views

### How do I repeat a theorem number?

Often in my papers I want to mention theorems in the introduction that are introduced in more detail and proved in a later section. I'd like to include the statement of these theorems twice over, ...
3k views

### What's the absolute largest paper size permissible with pdflatex?

I've had occasion to typeset extraordinarily large matrices, which I didn't seriously expect anyone to expect in detail (without a computer) or print, but I needed it to be obvious that they were ...
16k views

### How to set up inverse search with Okular and Kile

The title pretty much sums it up. I use the package srcltx in my documents. I am running Ubuntu with Kile 2.1 and Okular 0.8.2 as a viewer. I am pretty sure that inverse search should work, but I ...
7k views

### How to split all BibTeX referenced entries from a big BibTeX database to a copy?

I have a BibTeX database with some big number of references which I use for work. When I need to send a document prepared using that database to somone I have two options: either send a full copy of ...
8k views

### What is a good way to draw Dynkin diagrams in LaTeX?

I'm about to start writing something up which includes a fair number of Dynkin diagrams, and I can think of several ways of going about it: Just draw the darn things in, e.g., InkScape, and include ...
621 views

### What are some of the less-well-known TeX-like formats?

ConTeXt and LaTeX are well-known and I'm aware of different engines to process those, e.g., XeTeX, pdfTeX, or LuaTeX. But on this meta question discussion came up about TeX, plain-TeX, initex. Can ...
5k views

### What new bits have already been implemented in LaTeX3? Will my current documents (with many packages) still compile with LaTeX3?

I do know that LaTeX3 is a long term project, but I'm interested to find out what's new in LaTeX3 and have there already been any big advancements and backwards incompatible changes.
596 views

### Does LaTeX support the sarcmark?

Does LaTeX have an escape sequence for the open source sarcmark?
6k views

### Best documentclass for class notes

Is there a documentclass specificaly for taking notes in a class? If not, what does the community see as things which should be included in such a class (which I'd be happy to write)? Edit: This was ...
12k views

### How to perform advanced spell checking of latex documents?

I'm looking for a way to integrate something like After the Deadline or a similarly sophisticated spell checking tool into writing LaTeX documents. I don't mind it hitting the network each time. I ...
119k views

### Why can't pdflatex print EPS figures?

The images in my paper are in EPS format. If I execute pdflatex to get a PDF version of my paper, the figures won't appear. I have to typeset using the latex command, and then convert the DVI file to ...
30k views

### How can I import an exam or assignment from Word into LaTeX?

This is a counterpart to "How can I typeset an exam or assignment paper in LaTeX?", which was from a teacher looking for a template to compose assignments and exams. I'm a student, and I'd like to ...
10k views

### How do I change my margins and spacing to fit the PhD thesis requirements of University XYZ?

Even-odd pages, inner edge 2.5cm, outer edge 1.5cm top and bottom 2cm. 1.5 spacing between the lines, double between paragraphs, no indent. A general solution for other requirements would be best.
2k views

### How to painlessly create a custom layout for the title page for pdflatex?

For my thesis my university has only a Word template with font sizes and "window" specifications to position title, name, date, etc. What is the easiest way to layout such thing, if I'm not an expert ...
4k views

### IDE / Best known method for writing Hebrew documents with LaTeX

I usually use LyX to prepare lecture notes, course summaries, etc. The reason I use LyX and not LaTex directly is twofold - I usually need to type in real time - summing a lecture. I think for this ...
1k views

### What is the best way to scan over a list of somethings?

It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in ...
4k views

### Multiple Tables Sweave/Latex

I am very new to LaTeX and Sweave but am excited that it may make my life much simpler when combined with R. What I am looking to do: Create multiple crosstabs, most likely in a loop. As a result, ...
4k views

### Syntax of TeX/LaTeX

{} and [] do some kind of grouping, and comma seems to be special as well. Being a programmer I find it frustrating to use Latex on incantation-only basis. I would like to know how does it exactly ...
30k views

### What is the practical difference between latex and pdflatex?

I understand that some packages (like PSTricks) can't be used with pdflatex. Are there any other differences between these tools? Can we say that pdflatex is better if we don't care about ps?
15k views

### How to draw a torus

Is there an easy way to draw a contour image of torus below with tikz? Or for that matter with any other graphics package.
164k views

### How to create posters using LaTeX

I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?
506k views

### LaTeX Editors/IDEs

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc. ...
324k views

### How to change certain pages into landscape/portrait mode

How can I change some pages into document into landscape mode, while leaving the others in portrait mode (or vice versa)?
320 views

### Is there a way to stop the vertical spread of multiple super- and sub-scripts?

I'd like to be able to place multiple sub and superscripts (in maths mode) on an element without having them expand vertically. That is, so that in the output of ${x^2_4}^6_8$, the 2 and 6 were ...
3k views

### Can I change the font and colour of a letter permanently?

For my lectures, I like to colour the symbols in the equations to make it easier to follow what's going on - a bit like syntax highlighting. So all vector spaces are one colour, all sets another, e ...
8k views

### non-kludgey left subscripts

I was taught to make a left subscript as a right subscript to {}. For example, I would use f: {}_RA \rightarrow {}_RB to typeset this: If you instead use f: _RA \rightarrow _RB the left ...
864 views

### Is there a '\ReallyDontExpandUntilTheLastMinute' command?

There's a couple of things I want to be able to do that are quite similar and basically involve keeping back a macro expansion until the last minute. Possibly the simplest example is that I have a ...
136k views

### How to change font size for bibliography?

I want to use a smaller font size for the bibliography, e.g., \footnotesize. What is the easiest way to achieve this? I currently do \renewenvironment{thebibliography}... and copy the definition from ...
2k views

### Solfa style music notation (Carnatic)

I'm looking for a way to typeset Carnatic (Indian) music. The notation system is textual, similar to solfa, with some symbols like comma, semi-colon and | for durations, and bar lines. Fine control ...
56k views

### LaTeX templates for writing a thesis

Aside from CTAN, what are good resources/repositories for Latex templates? In particular, I'm looking for some pretty Thesis templates (I'm familiar with classicthesis)
374 views

### What macros are defined in a Web2c format file?

Web2c defines its format style using Pascal strings, so there are no separator characters between csnames. Is there a straightforward way of listing all csnames bound in a .fmt file?
42k views

### align vs equation

I always use align in my documents, and avoid equation. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?
6k views

### LaTeX/XeTeX setup Tamil/Indic languages

I use TexMaker and LyX in Ubuntu. I'd like to typeset Tamil/Telugu/Hindi text, and so far I've been unsuccessful. Please suggest me a working TeX/LaTeX/variants setup for Indic languages, especially ...
87k views

### Correctly typesetting a tilde

How do I set the tilde (~) character correctly in LaTeX? There’s a question discussing that on Stack Overflow, with a lot of answers. But dare I say it? They all suck: \textasciitilde is too high, \...