{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

9
votes
2answers
4k views

Add text to TOC without dotted-lines and line number

Despite following many suggestions on the net, I have the following issue. I am using TeXnicCenter and MiKTeX. [I have posted the same on Latex Community Forum]. I have not used/tried the tocloft ...
6
votes
2answers
953 views

“Pretty-printing” numbers with significant figures

I like to use LaTeX to display data in figures and tables. I've used arrayjobx.sty and fp.sty to extremely good effect to handle data that comes out of, e.g., Excel or other Windoze-world data ...
2
votes
1answer
278 views

what are the ways to align conditions in cases

For example, the following is not very nice: [f(x)]_N=\begin{cases} f(x) \text{ if } f(x) \le N, \\ \newline N \text{ if } f(x) \gt N. \end{cases} How can I make it nicer?
34
votes
3answers
3k 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?
7
votes
2answers
652 views

Formatting crystallographic indices

I would like to make a command in LaTeX that can be used like this: \zoneaxis{1 2 -3} \zoneaxis{2 -1 -1 10} and would produce this: $[1\,2\,\overline{3}]$ $[2\,\overline{1}\,\overline{1}\,10]$ ...
8
votes
2answers
815 views

How to get two column references with author-year style

Is there a way to get a two column layout for author-year-citations with a label of "(Wolfram 2002)" in the first column and "Wolfram, S. 2002. A new kind of science. Wolfram Media, Champaign, Ill." ...
11
votes
2answers
2k views

Options and suggestions for hyperref font?

Background I am interested in finding and implementing a more aesthetically pleasing style for the hyperlinks in my document. I have read through the documentation, but I find both the colored text ...
7
votes
1answer
2k views

Line of dots in Table of Contents?

In my ToC, the "Bibliography" entry is treated as a chapter heading, so has no line of dots to the page number. However, as it has no sections, my publishers would like the line of dots. Same for ...
1
vote
1answer
857 views

Change BibTeX output formatting?

I am using the bibliography style "plain", which in a Technical Report, formats "Technical report" in roman font. However, my publishers want "Technical Report" to be capitalised, and in italics. ...
5
votes
1answer
710 views

How to typeset dimensional tolerances (mechanical engineering) with LaTeX?

Is there a package which allows to typeset dimensional tolerances as used in mechanical engineering like: ? I have to use them in the text and wonder how to do that best. So I'm searching for a ...
5
votes
2answers
2k views

Maintaining table format with space between rows

I want to put spaces between rows in a table however my current implementation cuts off the vertical lines. I know I can replace \\with {} \ {} \ {} ..., but is there a more elegant solution? ...
5
votes
2answers
690 views

Line wrapping on narrow pages

I'm trying to format a long paper of mine for the kindle. The following works, but there's a problem. \usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.1cm, left=0.1cm, right=0.1cm, ...
39
votes
4answers
6k 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 ...
4
votes
1answer
82 views

Command for formatting a special term

How can write a new command which formats a certain 2-word-term always in a special font, all uppercase, with the line-height of the uppercase characters being the same as the line-height of down-case ...
2
votes
1answer
873 views

Change the equation number in alignat

I have the following equations with-in alignat environment $\begin{alignat}{4} &p^0\colon\od{u_0(x)}{x} = 0 \quad &\text{with} \quad u_0(0) = 1, \\ &p^1\colon \od{u_1(x)}{x} -u_{{0}} ...
2
votes
1answer
572 views

Caption Formation for Figure

I use the caption package. Somehow I got a period between the type (Figure) and the separator (:) When I wrote listformat=empty, for the Table of Figures, I just got the period and then the ...
20
votes
1answer
615 views

Elisions in mathematics

Knuth incorporated many of the typographical rules for mathematics in the TeX engine. However some rules were left out. One such case is the use of elisions in equations. Sometimes \cdots are used and ...
8
votes
5answers
931 views

Wrap text round brackets

I want to accomplish this effect with LaTeX: I have a slight idea of how to do that using \left{ and \right} on math mode but I’m not sure. If there’s a package that helps to do that, coding would ...
7
votes
2answers
959 views

Spaces behind \textgreater not working as expected

I have the following code: \textit{WMC \textgreater average} But the text looks like this: WMC >average It does not even change if I add even more spaces. So what am I doing wrong?
4
votes
1answer
4k views

Complex Table Layout

I'm trying to display a fairly complex table using Latex. Here is what I want it to look like (formatting, alignment, borders, columnspan, and rowspan). I would also like the columns to be fixed width ...
4
votes
2answers
350 views

Position line in a resume

I am new to LaTeX, and I want to create a command that will display my previous positions formatted appropriately in a resume. The format I am looking for is this: 02.07.2009 - 02.07.2010 ...
12
votes
4answers
1k views

Replace . (period) by , (comma) in numbers

I pass a bunch of numbers into a custom command defined via \newcommand{\mycmd}[1]{...}: \mycmd{1.12} \mycmd{5.32} \mycmd uses the number to draw a certain figure. On top of that, I would like to ...
26
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 ...
2
votes
1answer
952 views

Is italic + less-space formatting of \subparagraph typographically sensible?

As discussed in Difference between \paragraph and \subparagraph in scrreprt?, my formatting does not make a difference between \paragraph, as the proposed workaround does have no effect, if the option ...
12
votes
2answers
2k views

How to insert code and graphic in textbox

I want to put a graphic and a little linux bash code in a textbox, like the picture blow... with the follow in problem: all in a textbox with yellow backgroud left part is a graphic (a finger)... ...
4
votes
1answer
980 views

Difference between \paragraph and \subparagraph in scrreprt?

I'm using scrreprt for writing and (at least for me without any typographic education) I don't see any difference between a section typed as \paragraph or \subparagraph. My questions: Is there a ...
8
votes
2answers
6k views

Changing the TOC style of an Article document-class

When typesetting an article documentclass, the sections appear as bold in the table of contents, with no leading dots. I would like to change these to non-bold, and insert some leading dots. I tried ...
44
votes
3answers
91k 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 ...
5
votes
1answer
898 views

How to show glossary entry name in bold when using long style?

I am using the glossaries package in order to create a glossary. If I use: \printglossary[type=main,style=list] I get entry names in bold, but the layout won't be the one I wish. If I use: ...
5
votes
1answer
3k views

How to change the way theorems are displayed with LyX?

The theorems are currently all displayed in bold, but I would like to display them in small-caps. My question is much like this one. However, I am using LyX with an AMS style document class, and was ...
25
votes
3answers
19k views

How can I make a horizontal dashed line?

How can I make a horizontal dashed line in LaTeX? Just writing lots of single dashes results in a continuous horizontal line.
6
votes
2answers
2k views

Formatting each part/section/subsection

Are there some magic lines to be placed in the preamble that would, like in CSS, specify how each generic section or subsection in the whole document should be formatted?
10
votes
1answer
870 views

Overriding italicized list counters in plain theoremstyles

Using a list environment inside of any theorem defined with \theoremstyle{plain} results in italicized counters. That is, the following example \usepackage{amsthm} \usepackage{enumerate} ...
41
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 ...
113
votes
10answers
25k 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 ...
6
votes
1answer
8k views

Formating captions in longtable tables

I'm typesetting my dissertation using Springer's svmono class. The class defines its own formatting of table and figure captions. I have a couple of multipage tables which I typesetted using longtable ...
16
votes
3answers
19k views

How to format the chapter heading?

How can I change the chapter heading of the book class to typeset centered chapter names as shown in the image above?
34
votes
2answers
3k 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 ...
3
votes
1answer
496 views

makeindex page entries are all underlined

Set up an index for a book and everything works well, except the page numbers listed for the words in the Index are all underlined---EXCEPT when I add bold face, then they look fine. Any ideas what ...
27
votes
3answers
43k 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 ...
4
votes
1answer
315 views

Adding a label on a margin (instead of line number) in latex algorithmic package

I would like to mark (e.g. with a *) a line in a pseudo-code typeset with the algorithmic package. I would like the label to appear on the left margin, instead of the line number. Is that possible? I ...
14
votes
4answers
1k views

Nice formatting for theorems

I'm writing an article with some theorems and I would like to use special formatting for the theorems - my idea is putting a grey line in the side of the theorem. Can you please show me how to do this ...
3
votes
1answer
778 views

Dynamic “expansion” of tikz calendar's cells?

Please, is that possible. Having started with this latex source, i would like to have calendar's cells "expandable" vertically -- please see the picture below. \documentclass{article} ...
6
votes
1answer
1k views

Inlining circuit symbols

in a prevois question i asked if there was a good way to display electronics symbols in TeX, i was pointed towards circuitikz (which is awsome), but is there a way to inline a symbol in text? eg. ...
5
votes
1answer
2k views

floatrow: Changing the formatting of table footnotes

The floatrow package, which is useful for customizing the layout of floats, also allows to add footnotes as well as additional explanations (besides the caption) to tables. (The main commands are ...
5
votes
4answers
7k views

Centering split equation

I am quite new to TeX. I want that each line in the following equation be centered, but I cannot find how to do it. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...
3
votes
1answer
1k views

Where should I setup the markup of header/footer? In \fancyxxx or in redefinition of \xxxmark?

\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}} \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}} \fancyhead[RO,LE]{\small\sf\color{black}\rightmark} ...
7
votes
2answers
10k views

Should Greek letters inserted in text (using math mode, mostly) always be italic?

The least painful way I know of inserting a Greek letter in a text is to use the math mode and the corresponding command. This will produce an alpha letter : $\alpha$ But this always produces an ...
7
votes
2answers
474 views

Looking for a specific BibTeX style

I am brand new to BibTeX, so I apologize if this question is painfully naive. Up until now, I have been manually creating my bibliography for each paper using the environment thebibliography. I'm ...
10
votes
1answer
695 views

How to mark book paragraphs as note, warning, tip etc.?

In my text I have some paragraphs that should be denoted as "note", "caution", "tip", "story". These paragraphs should be rendered with darker background and an icon on the left side. I was not able ...