{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

20
votes
5answers
940 views

typesetting different characters with different colors in a DNA sequence

I have created a macro which I used to format DNA sequences, as they should be in the monospaced font and uppercased: \newcommand{\DNA}[1]{\texttt{\uppercase{#1}}} Now I have a column with some ...
12
votes
6answers
2k views

Formatting arrows between rows of corresponding matrices

Some material I'm creating requires output that looks like this: (note the position of the arrows). I'm using the following code (with the AMS macros) to generate this, and I'm looking for ...
18
votes
4answers
842 views

What measure can we use by LaTeX to control the print budget

I found there are so much excellent answer to questions about how to product high quality typesetting output. But I wonder how to save ink with LaTeX. What we need to think about to manage cost. page ...
11
votes
2answers
3k views

KOMA-Script: change font of sectioning headings to serif

How to change the default KOMA-Script font that is used for chapter/section headings etc. to the Computer Modern font that is used in text body?
10
votes
2answers
1k views

Footnotes layout in multicols environment

I am using the package multicol to typeset a one-column (spanning the entire text width) heading and a two-column main text block. In order to do so, I begin the multicols environment along with the ...
10
votes
3answers
9k views

Multiple authors in one row with refmark, multiple affiliations in separated columns in another row

I wonder how we can list author names in the following format in LaTeX. I have 5 authors with 3 different affiliations. I am trying to list all author names with refmark in one row, and 3 ...
8
votes
3answers
6k views

Formatting the title of the TOC

I would like for example to have a bold Arial like font and a red color for the title of the table of contents, and also I would like to change this title to for example "Another title for the table ...
9
votes
1answer
746 views

mdframed-Put something on the start of one vertical left rule

I would like to obtain something like in the following picture (I've put Z! instead of the danger symbol). In the following code, I would like to put the danger symbol on the vertical rule. I ...
6
votes
2answers
676 views

Listings language definition keyword suffixes

I'm trying to create a listings language definition for ARM assembly and many of the instructions have prefixes/suffixes (i.e. BGT, BLE, BNE, BEQ branch instructions). Is there a way to define B with ...
4
votes
2answers
384 views

An improved \rowstyle that takes the cell contents as an argument

It is possible to format the column entries of a tabular in an argument-style fashion using the lrbox environment to store the column cell in a box (say) \mybox; and supply \mybox as an argument to ...
16
votes
2answers
5k views

How to style text in hyperref \url?

I want to set color, font and similar style attributes for the text in a \url from the hyperref package. How do I go about doing it? All I have found are comments saying that I probably don't want to ...
11
votes
1answer
5k views

How can I get \maketitle to create a separate title page with the article class?

I am working on a maths assignment and new to using LaTeX. I have written the assignment up but I would like the title page to be its own page. Currently my title page is a few lines generated by ...
8
votes
2answers
3k 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]} ...
6
votes
1answer
6k 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 ...
4
votes
1answer
606 views

How to color digits with the listings package

For my project, I've been using the listings package in order to color the keywords, comments, strings, and digits in the code. The thing is, I've managed to color the keywords, comments and strings, ...
22
votes
1answer
368 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 ...
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 ...
12
votes
2answers
4k views

How do I get “et al.” to appear in italics when using \textcite or \citeauthor with biblatex

I'm using biblatex with the chem-rsc package option. I sometimes make use of the \textcite{<key>} or \citeauthor{<key>} commands to put the authors' name into text. When there are many, ...
11
votes
1answer
3k views

Formatting back references in bibliography

I would like to change the way the back references are shown in the bibliography, such that they are all shown within parentheses. So I would like to see (page x, y, z) after my bibitems. This ...
35
votes
4answers
12k 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 ...
18
votes
1answer
12k views

Formatting section titles

Forgive the stupid simplicity of this question, and please feel free to refer me to an older answer. I'm not quite familiar enough with LaTeX terminology to have found it. All I want to do is set a ...
16
votes
4answers
684 views

Calculate prices

I want to calculate prices in a LaTex file. This means I want to add two numbers with exactly 2 decimal places and I want to multiply these values by an integer. An other thing is the output format. ...
13
votes
2answers
769 views

Format a verbatim paragraph

How can I format a verbatim paragraph? I.e. break, fill and join input lines to produce globally balanced output with the lengths of each line approaching the target \textwidth as closely as possible. ...
21
votes
4answers
3k 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, ...
14
votes
4answers
623 views

Create fill-in-the-blank version of a document with ability to toggle blanks on and off

I am preparing some lecture notes/slides and would like to efficiently create two versions of the output: a complete version for myself, and a version for my students with certain text replaced with ...
13
votes
1answer
213 views

Formatting floats differently based on placement

I'm interested in changing how floats are formatted depending on whether they are placed at the top, bottom, or middle of a page, or on a float page. One package I am aware of that does something like ...
8
votes
4answers
1k views

How can I automatically abbreviate page ranges in citations (biblatex)

I am using biblatex for my citations, and I was wondering if there was a way to automatically abbreviate the page ranges in citations. (The reason I ask is because I have them all in long-style, and I ...
13
votes
2answers
2k views

Define an “escape underscore” environment

I am writing a text document in LaTeX where I need a lot a words with underscores: foo_bar_1, more_bar_2_long_expression_3. I know about the underscore package, but for some reason the [strings] ...
11
votes
4answers
398 views

Is there a ready solution to typeset a diff file?

In a text about Git I want to typeset diffs similar to this visualization: Commit details on GitHub. Is there any ready-made solution to that, especially the coloring of the diff lines? (In other ...
9
votes
4answers
986 views

Addition and subtraction of chemical equations

Is there a package that supports the addition or subtraction of chemical equations, perhaps with automatic tabbing and a alignment. Whilst it is obvious I could set up tables or use mathmode's align ...
3
votes
1answer
2k views

Italic citation reference for author name using natbib

I'm trying to get italics for the author name within the citation using natbib with agsm style. My MWE: \RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @BOOK{Smith2011, author = ...
9
votes
1answer
610 views

Subsubsection: remove the newline (like paragraph)

Using the article document class, how can one remove the newline at the end of a subsubsection title? I am using \documentclass{article}; I do not currently use titlesec or any of the alternatives; I ...
8
votes
1answer
2k views

Layouting the index-page

I'm using \printindex for my index and I wonder how to have bold page numbers ordering by first character of the indexed word and have dots in between the name and page number like A Apple ...
8
votes
1answer
464 views

Cursive text after _

I would like to write H2O with a small 2 below the H. H_2 O (water) However, all text after _2 becomes cursive. It appear that something obvious is wrong but, I cant find what it is. Anyone how ...
6
votes
2answers
1k views

Modify default memoir chapter style

I'm using memoir and using its default chapter style. what I'm looking to do is to change the format from chapter 1 chapter title to something like this: chapter 1: chapter title I'm ...
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?
4
votes
3answers
615 views

Bold one cell in table using CSV reader

Is it possible to bold a single desired cell (or number of cells) using csvreader (besides the head)? Here is an example of making the table. \documentclass{article} \usepackage{csvsimple} % Make ...
3
votes
2answers
1k views

Bibliography with biblatex: how to achieve bold labels using the authoryear-style?

I am currently writing my thesis with LaTeX using biblatex for citations and bibliography. I try to match a formal request regarding the first part of the bibliographic entries which have to look like ...
3
votes
2answers
394 views

Adding extra lines/spaces in source, *not* affecting semantics

I'm editing a file with quite huge interleaves of text and formulas like this lorem ipsums \begin{align} foo & bar\\ qux & rofl\\ & toto \end{align} lorem ipsums … And I face ...
1
vote
1answer
408 views

Thesis running problem in KILE

I'm using KILE editor. There is no problem when I run others .tex article in Kile. But problem is when I run a thesis article in KILE. This thesis article is running fine in WinEdt. ...
1
vote
1answer
1k views

Non superscript citations for figures

Is it possible to reference figures like so taken from \emph{ref. \cite{reference}} with non superscript numbers, while leaving the rest of the references in the bulk of the document untouched? ...
68
votes
1answer
43k 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 ...
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 ...
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 ...
14
votes
5answers
2k views

How can i add a “field” for handwritten text?

I need to add a bunch of fields for a handwritten text to my document that look like this: Your Name ___________ Your Age ___________ As an example, I can show you the form that I have to ...
14
votes
2answers
1k views

Pretty formattings for warning and info blocks

I'm looking for pretty formatting for warnings, and others for some info or tips. For the moment, I use the following formatting but maybe someone has one better idea. To obtain this, I use the ...
22
votes
1answer
19k 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 ...
34
votes
3answers
544 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 ...
16
votes
2answers
25k views

How do you get \mathbb{1} to work (characteristic function of a set)?

I am trying to get the digit one printed the \mathbb{} font in math mode, however the command \mathbb{1} outputs some rubbish. I certainly saw the character I am after in some pdf's generated from ...
22
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: ...