{formatting} is for general questions about formatting document elements. Use this tag in addition to other tags specifying what should be formatted. For questions about font attributes (e.g., {bold}, {italic}, {small-caps}, {sans-serif}, {typewriter}), use the appropriate tag instead.

learn more… | top users | synonyms

148
votes
4answers
7k views

Pretty Table of Contents

I would like to know if it's possible to have a Table of Contents looking like the following, where the number of the page is the big number on the left. The sections could look like in the ...
115
votes
6answers
40k views

What's the quickest way to write “2nd” “3rd” etc in LaTeX?

If I want to use abbreviations for second, third and so on in my LaTeX documents, I am currently doing this: 2$^{nd}$ which seems unsatisfactory. Is there a macro I'm missing? I'm sure I could define ...
102
votes
5answers
5k views

Consistent typography

When working with large documents, or even across multiple (smaller) documents, I often find that I forget which typographical consistencies I should stick to. With TeX being inherently consistent in ...
98
votes
8answers
18k views

Compile a LaTeX document into a PNG image that's as short as possible

I need to convert my LaTeX documents into PNG. The problem is, I also need the resulting image to be as short as possible (height-wise). I've tried latex followed by dvipng, but the result is always ...
76
votes
6answers
9k views

Prettiest way to typeset “C++” (cplusplus)?

Writing "C++" in plain text results in an ugly setting, as the '+' signs are too big and too spaced: I've seen around the web several marcos for typesetting the "C++" symbol, ranging from mild ...
76
votes
1answer
52k views

What's the correct use of \author when multiple authors?

Working on a project, the article we are writing is written by me and someone else. How should I fill the \author? What about \author{LASTNAME1, FIRSTNAME1 \& LASTNAME2, FIRSTNAME2}? It doesn't ...
67
votes
3answers
13k views

Does it matter if I use \textit or \it, \bfseries or \bf, etc

I typically use \textit{Some italicized text} while some of my colleagues use {\it Some other text} Should I bother changing one or the other, or does it matter?
60
votes
12answers
88k views

Make MS Word document look like it has been typeset in LaTeX

A few years back, I used to use LaTeX for writing reports and such, and I really liked the look of them. However, nowadays I am forced to use MS Word to write my reports, but that does not hinder me ...
56
votes
4answers
2k views

underline omitting the descenders

I'm very well aware that it is considered best practice not to use underlining other than on typewriters and in handwriting. But sometimes it is needed nonetheless. In my opinion the typographically ...
55
votes
7answers
5k views

How to add some visual style and pizzazz to course notes?

LaTeX is wonderful for writing mathematical papers, but while the output is perfectly typeset it is not visually very exciting. And although it may just be "familiarity breeds contempt", I am ...
51
votes
7answers
24k views

Long underscore in LaTeX

In LaTeX, how would I make a long underscore? For example, Name _______ Signature _______
46
votes
2answers
9k views

Creating Kindle-friendly versions of existing LaTeX documents

So let's say I have a large amount of documents (from ArXiv.org, suppose) that I have the LaTeX source for, and for which I would like to compile particularly Kindle-friendly versions. In particular, ...
43
votes
4answers
19k views

Make first row of table all bold

I'm trying to do something that I thought would be relatively simple but seems to be quite hard. I have a table with a number of columns, and I'd like to make all of the titles appear in bold text. ...
42
votes
3answers
9k views

When to use bold, italics, small caps, typewriter etc.?

I'm a little confused on the purposes of each kind of text in LaTeX. I know the function of some of them, but sometimes people use each for different reasons. For example: \texttt is for code (no ...
41
votes
4answers
14k views

Multiple footnotes at one point

I'm trying to create multiple footnotes referencing from one point, that look like this: lorem1,2 Searching for "multiple footnotes" shows up almost exclusively solutions for multiple references ...
41
votes
3answers
80k views

How can I underline a single word with LaTeX?

Given a simple paragraph, how do I underline a word in that paragraph? (Note: I post this here because it wasn't really obvious using google or this site and my TexNicCenter is somehow missing this ...
39
votes
4answers
3k views

What is the Necessity of $…$ Around Numbers?

I typed up an assignment with a lot of numbers in LaTeX and turned it in to my adviser. When he returned it to me with some corrections, one of which was a lot of $ around my numbers. I understand ...
38
votes
2answers
3k views

Styleguide for LaTeX similar to the Google styleguides?

Even though I don't work at Google, the Google Styleguides have been very helpful for me in adopting consistent, readable style conventions for my code. Unfortunately, there is no Google Styleguide ...
38
votes
4answers
5k views

Make one author's name bold every time it shows up in the bibliography

I'm working on a CV. I'd like to highlight my name in every entry in the bibliography. I've tried simply replacing {myname} with {\bf myname} or {{\bf myname}}, but they fail with various errors, ...
36
votes
3answers
4k views

Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?

I understand that \bf and \it are now obsolete in LaTeX and that \textbf and \textit are proper, as they produce more sophisticated (in particular, cumulative and properly kerned) changes to font ...
36
votes
2answers
36k views

Change caption name of figures

How can I modify the caption name of a figure? For example I have \caption{This is a figure.} and by default the caption appears as Figure 1: This is a figure. However I want Fig.1 - This ...
35
votes
3answers
559 views

Strategies for corrections in book typeset with TeX

I have typeset a long book using TeX and now it is time to re-print it. This is an opportunity to incorporate corrections to the errata discovered in the initial printing. Unfortunately TeX may ...
32
votes
2answers
19k views

\bfseries is to \textbf as WHAT is to \textsf

Neither of \sfseries nor \sfshape seem to work. So what is the command I'm looking for to change the current group to sans serif? \bfseries, \scshape and \itshape work, but I can't find the sans serif ...
32
votes
2answers
21k views

Footnote without a marker

I am new to LaTeX. I am trying to write a paper using latex. I want a footnote about the funding source of my work in the first page without marker. I tried below approaches: \footnotetext{text ...
32
votes
3answers
2k views

How to typeset large numbers

I need to typeset some very large numbers that span a number of lines, is there a way in LaTeX to do this?
32
votes
1answer
1k views

Adding a per-chapter image along with group of entries in ToC

Friends, I have an old analytic geometry book with an unusual table of contents: for every group of entries based on the current chapter, there is an image along with it. Well, let me show some actual ...
30
votes
3answers
7k views

Date format: YYYY-MM-DD

Currently I put the date in my document using: \date{\today} How do I display the date in the YYYY-MM-DD format?
29
votes
2answers
10k views

number format in pgfplots axis

How can I change the type of the decimal/thousand separator from the american one to the european one? More precisely, I want: "1000" to be written as is, instead of "1,000" "0,1" instead of "0.1" ...
29
votes
2answers
3k views

What is the canonical way to redefine the \emph command

Question says it all. What is the best way to redefine the \emph command to be bold font and upright?
29
votes
1answer
2k views

Why Different Commands for Seemingly Similar Tasks?

Take a look at the following list: \textit, \it, \emph, \itshape, \mathit \textbf, \bf, \bfseries, \mathbf ... One might say, for instance, that: \mathbf and \mathit are for math mode, while the ...
28
votes
5answers
4k views

How to output a counter with leading zeros?

I can output the value of a counter in a LaTeX document via: \setcounter{mycounter}{1} \arabic{mycounter} Which inserts a 1. But how do I format the output by, for example, adding a leading zero if ...
28
votes
6answers
1k views

How do I typeset morse code with LaTeX

I am writing an article regarding the history of the Morse code and I am having difficulties printing the dots and dashed (they get combined when the document is printed). Is it also possible to ...
28
votes
1answer
21k views

Can a table include a horizontal dashed line?

In a normal table, you can use the \hline command to draw a horizontal line. I am trying to make this line a dashed horizontal line. I have found the package dashrule via this answer, but this only ...
26
votes
4answers
2k views

Stickers on Thesis paper

I want to put a sticker "Examiners Copy" on the the front page of the thesis. How to do this?
26
votes
7answers
1k views

How long does it take to format a book in LaTeX?

I am new to this website and I hope this is not considered off topic but how long does it take to format a book in LaTeX? I understand this is a subjective question but maybe the "specs" of the book ...
26
votes
5answers
10k views

How to display numbers using comma as a thousands separator?

I want numbers like 5.5 million to be displayed using a comma as a thousands separator as "5,500,000". Is there a way to do this automatically, without having to manually put commas?
25
votes
3answers
4k views

German language: use of comma in numbers

In German the comma rather than the period is used as a decimal separator and the dot is used as a thousands separator: 12.345,67. The comma creates some unwanted space when used as in $12.345,67$. Is ...
25
votes
4answers
3k views

How to separate table content and table style

I want to know if there is a way to separate table / content for table style (think CSS). Like to have only data specification \begin{tabular} H1 & H2 & H3 & h4 \\ V1 & V2 & V3 ...
24
votes
1answer
2k views

Book layout Contents, Chapter, Section,

my goal is to get new style of Table of Contents, new style of Chapter and new style of section. I there is one more: how to change itemize native symbol for a black square? Table of Contents: text ...
23
votes
3answers
36k views

Change bullet style / formatting in Beamer

I like the Boadilla layout for Beamer presentations, but I find its enumerate bullet points illegible, as illustrated below (from the Beamer Theme Matrix). How can I change the formatting of the ...
23
votes
1answer
2k views

How to place a shaded box around a section label and name

In working with a publisher, I need to format section headings like this (using ASCII art): +-----+-------------------------------------+ | 1.2 | Section name | ...
23
votes
2answers
805 views

Add a rule underneath “Figure 1”

I want to add a line beneath the figure caption such as Figure 1 Figure caption text here.... I managed to include a newline, change the color and look of the caption via caption package: ...
23
votes
1answer
385 views

Sloppy \left and \right?

The \left and \right commands often produce improvidently large delimiters. It almost always looks better to use delimiters that are just slightly too small than delimiters that are too large. With ...
23
votes
1answer
2k views

CSS based LaTeX formatting?

I've done ab bit of web-searching and found nothing. Are there any attempts on using CSS for LaTeX formatting? For example: body { font-family: Helvetica,Arial,sans-serif; } section { font-size: ...
22
votes
2answers
2k views

Chapter Title in rotated vertical box at the margin

I am using the book document class. I would like to have Chapter name (Interduction, Results, Discussion, ...conclusion...) to appear in every page, in the right side small vertical (color filled) box ...
22
votes
4answers
4k views

How to make the optional title of a theorem bold with amsthm?

I use the code mentioned in Title of the theorem: \begin{theorem}[The title] Some statement \end{theorem} However with amsthm the optional title -- above: "The title" -- is neither bold nor italic, ...
22
votes
1answer
4k views

Closer underline

I am currently using \underline{...} to underline text. However, I want the underline to be closer to the letters (as of now, there's too much whitespace between the letters and the line). Is there ...
22
votes
6answers
2k views

Paragraph breaks with asterisks

In many books—mostly novels—often some paragraphs will have a blank line between them to indicate a sort of 'pause' in the narration. If one of these blank lines appears at the top or bottom of the ...
22
votes
1answer
266 views

Two Columns whose content is positioned relative to each other

In theatre (and film) there's a tendency for actors to let each other finish what they're saying, possibly even making a small pause before starting their turn. But that is not how real life ...
22
votes
2answers
5k views

How to type a Backus-Naur form in LaTeX

I need to type Backus-Naur form in LaTeX document. I found several packages on CTAN: ebnf seems to not work with TeXLive 2009 latex-bnf does not align the declaration, etc. There is a module for ...