{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

34
votes
7answers
4k views

Fit text into given box by adjusting the fontsize

I would like to fit text (potentially several paragraphs) into a box of given size. This should be done by adjusting the fontsize of the contained text. Clarification edit: The given dimensions are ...
3
votes
1answer
1k views

quotchap: Changing formatting and number size

I am using the quotchap package to format chapter headings in a document. I know how to change the default font size for the chapter headings, but I don't know how to make it bold. I would like also ...
14
votes
2answers
5k 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?
2
votes
2answers
425 views

Change subsubsection to medium series

I am using Lyx on Windows. How do I get the formatting of the whole document to look like: \subsubsection{\textmd{Blah blah blah}} without manually setting it for each line?
2
votes
2answers
194 views

Modifing bibliography and citation display

I put all my references in a file PaperBib.bib, and call \bibliography{PaperBib} in the end. I have several questions: For the references part, is it possible to make my own style? For instance, I ...
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
1k views

Custom “online” entry formatting with biblatex+biber: use organisation in place of author when author is missing

I am using the superb biblatex package (with biber as backend) to typeset the bibliography of my thesis (compiled with pdflatex). I would like to customise the formatting of @ONLINE type entries. By ...
4
votes
3answers
6k views

Using \MakeUppercase in \@startsection

I was toying a bit with the \@startsection command to change the layout of chapter / section headings. More specifically, I wanted my headers to be converted to uppercase. I was following an example ...
4
votes
2answers
2k views

Sectioning paragraphs, such as for different cases inside a proof

I'd like to have offset paragraphs inside a proof, say to delineate one case from another. I've been using \newtheoremstyle{component}{}{}{}{}{\itshape}{.}{.5em}{\thmnote{#3}#1} ...
3
votes
2answers
442 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 ...
63
votes
7answers
32k views

Long underscore in LaTeX

In LaTeX, how would I make a long underscore? For example, Name _______ Signature _______
1
vote
2answers
779 views

How to squeeze white spaces between sections and figures?

I am using a multicolumns article template for some kind of CV profile. I have all working as intended except of 1 small problem. In my first column, I have quite some high amount of white space ...
5
votes
2answers
318 views

Floating point formatting in TeX

After long I was exposed to TeX and to a problem that seems to be so simple in traditional languages but surprisingly hard to solve in TeX. We have system out of our scope of control that provides us ...
4
votes
2answers
212 views

How can I reformat the lists throughout a document?

Forgive me for asking what I'm sure is such a simple question, but I haven't been able to dredge up an answer off Google. I'm working on a document which contains a series of topic descriptions ...
1
vote
1answer
136 views

Making custom currency

I've been using Prawn (Ruby) to make signs for beer distributors. Working great except that making currency look how I want is becoming extremely cumbersome and I'm afraid of inflexibility (and head ...
1
vote
1answer
799 views

Sphinx in-line math equation alignment

As suggested by the answer to my question here, I am using the Sphinx tool in order to multi-target PDF and HTML output. For HTML, I'm using the pngmath extension. The vertical alignment of inline ...
10
votes
1answer
2k views

What are the standard styles to format LaTeX source code?

In any other programming languages, we have several ways to format our source code. For example, some of the standard styles are: Allman(ANSI) K&R GNU .... Within LaTeX, I couldn't find a neat ...
16
votes
4answers
2k views

Writing a negative number in text mode: $-$9 or $-9$?

If we want to produce -9, typing -9 in an input file is not correct because - is intentionally designed for hyphenation so its glyph is bad to represent the minus sign. To produce the minus sign, we ...
0
votes
1answer
1k views

Caption does not work with wrapfig

The following code does not output the caption correctly, font appears in normal size, and "Figure" is not boldfaced. \begin{wrapfigure}{r}{0.5\textwidth} \vspace{-50pt} \begin{center} ...
19
votes
2answers
3k views

How typeset a numeric table from a CSV file

I have a CSV file (db.txt)like this: 30.0, 0.0, 0.0 60.0, 1.9098, 5.8779 90.0, 6.9098, 9.5106 120.0, 13.09, 9.5106 150.0, 18.09, 5.8779 180.0, 20.0, 0.0 I need to typeset it. My ...
5
votes
1answer
246 views

Shortened page-ranges from \pageref

In some typographic conventions page-ranges are shortened to save space, e.g. writing "1234-35" or even "1234-5" instead of "1234-1235". I would like to have a \pageref{foo}--\pageref{bar} ...
1
vote
1answer
454 views

Enlarge list of listings

I'm using \cleardoublepage \renewcommand{\lstlistlistingname}{Quellcodeverzeichnis} \enlargethispage{\baselineskip} %EITHER \lstlistoflistings \enlargethispage{\baselineskip} %OR THIS ...
5
votes
2answers
3k views

Grey box code and lists

I've got that code from a website to make grey areas in my LaTeX document. % http://www.alfredklomp.com/programming/tex/macros/ \long\def\greybox#1{% \newbox\contentbox% \newbox\bkgdbox% ...
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
736 views

Enclosing Page Numbers using the `Backref=Pages` Extension of `Hyperref`

I'm using the backref=pages extension of the hyperref package, as I'd like to have a list of back-reference pages after my bibliographic items. Is there a way to enclose these page numbers in brackets ...
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 ...
0
votes
3answers
827 views

Equation formatting: spacing between characters

I have the following variable: $\omega_{fo}$ which gives [;\omega_{fo};] . The problem with the output is that there is a quite big separation between the letters f and o. Is there a way to make ...
9
votes
4answers
4k views

Word-wrapping page-long polynomials in latex

I know that you can enter multiline equations using the align environment and line breaks (\\). I want to LaTeX multiple polynomials that are very long (up to a page in length, single-spaced and 12 ...
10
votes
1answer
630 views

Styling very long index entries to look more aesthetic

I wrote the following style for makeindex: headings_flag 1 heading_prefix "{\\bfseries " heading_suffix "}\\nopagebreak\n" delim_0 " \\dotfill " delim_1 " \\dotfill " delim_2 " \\dotfill " which ...
5
votes
1answer
1k views

Bold citation number

Is there a straightforward way to produce bold citation numbers with the \cite command (I'm using amsplain bibliography style)? Essentially I want something like this: [1] rather than [1].
3
votes
1answer
292 views

Formatting the index from the songs package

I've been using the songs package to generate songbooks. I've been tweaking the package for my needs, but one of the remaining issues is the \showindex command. Consider the following code: ...
3
votes
1answer
796 views

How to constrain text to a rectangle in tikzpicture?

I have a list of rectangular blocks that have a text, color, and size (y start, y size, x start, and x size). I want the text to be in the center of the rectangle, such that it does not go outside of ...
8
votes
1answer
673 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 ...
4
votes
1answer
920 views

table of contents entries and formating

I am working on a thesis and I am having some problems with the table of contents. I have tried to make a minimal example and the LaTeX files are given at the end of this post. The main tex file is ...
3
votes
2answers
456 views

Is there a way to leave the even pages blank within one chapter only?

I'm writing a thesis and would like the contents to be printed on odd pages only (when using a duplex printer, the rest of the thesis should be printed double-sided). I would also like to have this ...
5
votes
2answers
2k views

Strikethrough in Section Title

I am currently using ulem and \sout to do strikethroughs, but what if I want to strikethrough in a section title? I'm using hyperref and receive the following error when I use \section{\sout{..}}: ...
3
votes
3answers
1k views

How to box every digit of an integer ?

What is the LaTeX command for boxing a number like for example 123 as: |1|2|3| I have seen it in a book but can't find it anywhere in TeXnicCenter, which I use.
6
votes
1answer
202 views

Uneven subscripts. [duplicate]

Possible Duplicate: Supremum of the infimum Is there a way to make the subscripts appear evenly in the following code: \sup_{a\in A}\inf_{b\in B}? That is, so that a\in A doesn't appear ...
2
votes
1answer
601 views

siunitx S-column in table: can I combine scientific notation and decimal numbers in one column?

I have a table with values exported from a statistics software, where the values are formatted like this (see example below): Some (very small ones) are in scientific notation, some are in "normal" ...
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
3answers
1k views

Glossaries: Make a glossary entry recognizable in printing

How do you make it visible to the reader that the printed word/term is an entry in the glossary? In my PDF on the computer, I just see it because I use the hyperref package and there's a red box ...
10
votes
1answer
388 views

Is there a package for automatically managing table headers and formatting?

Is there a package for automatically managing table headers and formatting? For example I don't want to have to manually embolden every header entry individually, not to mention the extra clutter ...
1
vote
1answer
2k views

How do I convince tocloft to put the word 'Figura' ahead of entries in my List of Figures?

How to customize list of figures, adding word FIGURA to appears in the table of contents? I changed \newcommand{\cftfigfont}{Figura }, but in the summary, it's not linked (hyperref). How to solve it? ...
14
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] ...
3
votes
1answer
3k views

appendix formatting: section number before \appendixname

Here is my situation: Source code in preamble: \usepackage[title,titletoc]{appendix} \renewcommand{\appendixname}{priedas} in document: \begin{appendices} \section{Tekstai} Nemo enim ipsam ...
3
votes
2answers
306 views

“Problem description” to look like abstract

I would like to have my "Problem Description" to have the same look/layout as abstract. Any way I can "clone" the the abstract command? preamble: \documentclass[pdftex,10pt,b5paper,twoside]{report} ...
5
votes
1answer
377 views

biblatex: What's the first character of a field?

I would like to know, what's the first character of the value of the editor field. If the character is a curly bracket "{" the value should be printed for example bold, if the first character is ...
7
votes
2answers
484 views

How to show a placeholder instead of an equation?

I am looking for functionality similar to the endfloat package but for equations. Instead of displaying an equation I would like to display a placeholder such as [equation 1 here] Does anyone know ...
32
votes
1answer
28k 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 ...
2
votes
1answer
1k 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 ...