{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

14
votes
3answers
4k views

Footnote number in braces / parentheses

I have written my dissertation with LaTeX, but my teacher has suggested to put the number of footnotes in braces / parentheses. I thought it would be easy, but I haven't found the answer anywhere! I ...
4
votes
1answer
2k views

Edit page headers

I am trying to edit my page titles with fancyhdr package. I want the top left of the page to present [section number]. [section name] in boldface and small caps. for example: 3.2. PYTHAGORAS THEOREM ...
5
votes
3answers
3k views

A step by step environment

I would like to obtain the following output : Bla, bla, here are the actions to do. Action 1 Bla, bla, bla... Action 2 Bla, bla, bla... Action 3 Bla, bla, ...
8
votes
2answers
752 views

Change the behavior of carriage return

Define an enhance verse environment, where stroke Carriage return key once make a \\, twice make a \par, three times make a \medskip, four times and more make a \bigskip. An example would be: ...
9
votes
3answers
3k views

Print integer without fraction part

In a Tikz Figure, I'm doing some computation and want to print results as label of nodes. The problem is that I only need the integer part of the number to print. I tried with round() function. It ...
10
votes
2answers
3k views

Equivalent of CSS “float:left;” for images

What I am try here is have the image on the left side and it should be surrounded by text on the right and bottom side. For example how can below image_3.png float to left? \usepackage{lipsum} ...
9
votes
1answer
1k views

Independent left and right columns

I'm trying to write something with two columns that spans multiple pages. I want to put one thing in the left side and one in the right side. Is there ``proper'' way of doing this, or should I just ...
4
votes
1answer
298 views

Distribute evenly some formula or text randomly on a page

Suppose you have n variations of a small text or a formula like this: % Formula 1 \begin{align} v(t_o) = \lim_{h \to 0} \frac{v(t_0 + h) - v(t_0)}{h} \end{align} % Formula 2 \begin{align} ...
3
votes
1answer
2k views

Change Text Colour in LyX

I am using LyX (module: report). I would like to change the colour of my title from black (wich is default) to another colour but I don't know how. From what I saw from LyX's menu, colours are ...
2
votes
2answers
141 views

Need to change how \pagenote typesets the note number

I'm trying to get the pagenote package to display the note numbers as \textbf{ \blue{ \big[ \roman{ notenum } \big] } } I've redefined the \notenumintext as follows: ...
32
votes
1answer
2k 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 ...
1
vote
0answers
6k views

LyX — how to insert a dummy newline? [closed]

I have some Algorithmic sections, which are written externally in LaTeX and included as file includes in my LyX document. The algorithmic section renders with line breaks before and after, but appears ...
1
vote
1answer
259 views

What is the best way to setup this statblock as a macro?

I'd like to get a macro setup for this statblock format. Basically, I will be converting an XML document containing the data for the instances within the document. This is a sample of the format I am ...
3
votes
1answer
153 views

Show text exactly how it is displayed in the text document

I have the following bit of text that I want to show : A = 9 -8 7 6 -5 -4 3 -2 1 I want to show it exactly as it is, i.e. no formatting. Currently it shows : I ...
30
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 ...
8
votes
2answers
4k views

siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers

This is a follow-up question for Aligning numbers by decimal points in table columns. User lockstep provided this solution: \usepackage{siunitx} \begin{document} \begin{tabular}{S[table-format=3.2]} ...
7
votes
1answer
244 views

How to put one cartoon in the background of one book

I would like to add one cartoon in the right margin of odd pages in one book. More precisely, ... ... the page #1 must contain the picture #1, ... the page #3 must contain the picture #2, ... the ...
0
votes
1answer
919 views

Changing the chapter style [duplicate]

Possible Duplicate: How to format the chapter heading? How do you change the style and margins of the chapter title in latex? I'm looking through the style file and can't find anything.
8
votes
2answers
595 views

Solid black boxes in multiline chaper titles

Me again... very close to the layout I'm looking for already, but not quite there yet. ;-) For chapter headers, I am trying to get this look for chapter headings: I.e., \thechapter centered, ...
4
votes
1answer
304 views

figure/table caption formatting without packages

I am writing a document which needs to have tables and figures. Normally for formatting the caption of figures/tables I use \renewcommand{\@makecaption} But it affects both tables and figures ...
9
votes
1answer
627 views

How to create a good document structure in advance for a book to be typeset using sanskrit fonts

I am taking up a task for typing an old text which is over 1200 pages. I am attaching a sample page. I am new to TeX, I still did not get the hang to create a good structure so that it will give me ...
4
votes
2answers
3k views

Switching between single- and multi-column format

I'm trying to create a pdf for a journal where the authors are in multiple column format but the rest of the document/text is not. How can I get this to work? It auto formats the rest of my document ...
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 ...
2
votes
1answer
2k views

How do I add parfor in algorithmic environment?

I want to have a parfor loop in my algorithm listing (it should work exactly as standard for loop works). How to either change the displayed name of for loop or add my own loop which will keep the ...
8
votes
2answers
173 views

mhchem formatting interrupted

\documentclass[12pt,a4paper]{article} \usepackage[version=3]{mhchem} \begin{document} \ce{K_a \times K_b = K_w} \end{document} In \ce{} all text is supposed to be regularized. See how the K_a is ...
4
votes
2answers
3k views

enumitem: How to change label on enumerate* when inline option is enabled?

I'm using an inline enumerate list in my document, and I want to make that label slightly different (prepend with a () compared to the normal enumerate environment. However, since enumerate* share ...
2
votes
1answer
403 views

Writing a software book with LaTex - General Advise

I am a so new to Tex and I am trying to learn now. I decided to write a so simple software (ASP.NET 4.0) book for myself to learn it with a real example. So, I have the following structure for now : ...
6
votes
1answer
3k views

Header problem with book class

It seems I have a problem with the headers using the book class. On every chapter when the text is too long the chapter text and the section text merge. Also I don't know how I could make them lower ...
5
votes
1answer
2k views

Font style for page number for chapter in ToC

The page numbers in the ToC appear in different styles. For sections and subsections in normalsize and for the chapter in bold and slightly larger (I think). How can one change the fontsize/fonttype ...
7
votes
2answers
461 views

Is it possible to customize only the section and subsection numbers or titles in memoir?

Like the question title says, is it possible to customize only the section and subsection numbers or titles in memoir? I know how to change the font for the entire block, but I would like to make the ...
9
votes
2answers
8k views

Title of the theorem

in my paper the text inside theorem is italic while the word Theorem 1 is bold and not italic. I would like to have a title of the theorem also not italic. The example is here: Theorem 1. (The title) ...
5
votes
2answers
1k views

Environment with first paragraph in bold and no pagebreaks

I would like to setup a new environment which typesets the first paragraph in boldface, the following paragraphs in normal text, and with (possibly) no pagebreaks between the first paragraph and the ...
2
votes
1answer
4k views

A package for formatting Linux terminal excerpts?

I know about minted and listings, but either of those are intended for formatting of programming languages excerpts. Is there a package that would do the same for Linux terminal excerpts? Such as: ...
5
votes
4answers
348 views

Need help with an equation

I have little trouble with my TeX course. I've already completed all the assignments except one. Yesterday I was up until 4AM and still didn't get it right. Maybe someone could give me some ...
7
votes
1answer
4k views

How to suppress typesetting of section title?

I would like to suppress the typesetting of the section title in the document altogether, but still setting it for purposes of subsections, section mark / header, and table of contents. What I tried ...
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 ...
19
votes
1answer
2k views

Changing the apperance of equation numbers with amsmath

For equations in my document, I use the facilities of the amsmath package. In order to make the equation numbers more eye-catching, I want them to be in boldface and a little bit indented to the ...
8
votes
1answer
677 views

Changing the format of ordinal numbers (\the…) and related strings

I develop a package that improves LaTeX support for the Latvian language. One of the things I have here is different style used for things like Chapter 1, Theorem 1.1 etc. First, the phrase is written ...
11
votes
5answers
1k views

Formatting Decimals

Suppose I have a long decimal (assume it is ~6 inches long when written out in 12 point font in LaTeX when I center it, so something like ...
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 ...
4
votes
1answer
230 views

How to change appearance of a particular line when using \lstincludelisting?

I'm using the listings package and include code into my document through \lstincludelistings. The problem is that I want to set some code lines to bold to indicate changes from previous code segments. ...
10
votes
3answers
342 views

“Escaping” Linux kernel version in latex

I'm trying to include a kernel version info (i.e. \texttt{2.6.40.4-5.fc15.x86_64}) in my LaTeX document. However, LaTeX keeps trying to put it into "math-text" ("Missing $ inserted" and so on). How ...
3
votes
1answer
355 views

Horizontal lines are showing up as low-resolution images

I'm trying to prepare a print-ready pdf file for a book. The publisher is complaining that horizontal lines (in particular, the lines separating headers and footers from the body, but I think it also ...
10
votes
1answer
891 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} ...
5
votes
2answers
2k views

\bgroup and \egroup?

So I've been looking to expand on the following bit of code (a hack to not screw up the margins when using oversized figures): \noindent\makebox[\textwidth]{% \begin{tabularx}{1.5\textwidth}{XX} ...
0
votes
1answer
1k views

Acronym - Bold abbreviation without bold citation number

I am using the acronym package and let it create a footnote with the explanation on the first use of my abbreviation. However, at some parts I am using \textbf{\ac{ISO-TP}} which also makes the ...
4
votes
1answer
3k views

algorithm2e with 'ruled' but with caption underneath?

I would like to present an algorithm in my article. For that I am using the algorithm2e package (and I have used it for many years). I want to use the ruled option, i.e., I load the package like ...
1
vote
1answer
1k views

sig-alternate class, and twocolumn unbalanced bottom alignment problem

EDIT: turns out the below is not really a requirement for ACM - but still a good Latex exercise, I reckon :) I have bumped into a problem with the Alternate ACM LaTeX2e Style File V2.4 (APRIL 2009 ...
3
votes
1answer
564 views

Footnote with right parenthesis

I want to put a closing round parenthesis next to a footnote. I use \footnotemark and \footnotetext, since the footnote is part of a caption. \begin{center} ...
1
vote
2answers
2k views

How to create better dots in continued fraction

Consider $$\left( a_1, a_2, \cdots a_m \right) \mapsto a_1 + \frac{1}{a_2 + \frac{1}{\cdots + \frac{1}{a_m}}}$$ I want to change the cdots into three dots like the following dot space dot ...