{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

10
votes
2answers
3k views

How to define inparaenum in the preamble

I'm using both \inparaenum and \enumerate in my thesis and I would like them to set them in the preamble so that each item is set off with a). I used \setenumerate[0]{\itshape a\upshape)} in the ...
0
votes
1answer
46 views

How to underline the section to the end of line?

I am using the following code taken from online to underline the section title \makeatletter \sectionfont{\ulemheading{\uuline}} \let\oldsection\section \def\section{\@ifstar\s@section\@section} ...
2
votes
1answer
26 views

How can I change the layout of comment in a pseudocode?

I'm writing a pseudocode with algorithm package. Now algorithmicx package produce a comment with the triangle on the right of the line which is referred (this is the default layout). I need to change ...
4
votes
1answer
67 views

Table formatting issues

I am new to LaTeX and I am having trouble formatting my table to fit nicely onto the page. It does not have to all fit onto one page length wise just width wise. Thank you for the help! ...
1
vote
1answer
31 views

Indented math definition?

How can I format a math equation for a graph definition so that it has an intended "body" as in the following example? graph2 = ( {c1, c2, ..., c8}, {e1, e2, ..., e12} ) I tried using the ...
2
votes
0answers
19 views

\mintinline expands to a single newline

I'm using Minted 2.1, that I have installed through tlmgr, and Texmaker 4.1. Compiling the following piece of code (straight from the documentation) : \documentclass{report} ...
6
votes
1answer
5k views

How can very long algorithms be automatically split over multiple pages?

I have a very long algorithm than spans several pages. I can not get Latex to make it span across several pages. I know that several questions similar to this one have already been asked, but I ...
2
votes
1answer
50 views

Why CAPS LOCK in AMS mode in LyX?

I am trying to use the AMS article in LyX. I want my output to look like the following (note margins are the same for the entire paragraph and not all letters are capitalized): Here is my source ...
42
votes
2answers
4k 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 ...
1
vote
1answer
55 views

numerating chapters in book- format

I would like to have the following formatting in the table of contents: 1. Chapter 1 1.1 Section 1 1.2 Section 2 And also I want to use \chapter but instead of appearing. Chapter 1 Chapter 1 I ...
1
vote
0answers
41 views

Formatting latex code in lyx

I have been using lyx and have run into text formatting issues when using math inline formulas. For example, the code bellow: is converted to: How can I make the formula fit the numbered list?
1
vote
1answer
26 views

Style surname according to keywords field

How do I make surnames in a bibliography small caps, except for 'author' when the keyword is 'primary'? Yes, I know I could just \textsc{…} them all, but I'd like this to be automated. I suppose the ...
5
votes
2answers
86 views

Formatting longitude with siunitx

My question follows this one about formatting coordinate using \ang{} command of the siunitx package. When listing coordinate on a map, it is required to use two digits for minutes and seconds. As ...
1
vote
2answers
52 views

In a multi-column table, is there a way to change only SOME text in a specific column (and not the entire column) to be bold or italic?

Consider the following table. Some of the text in the second column is italic and also the text is broken in order to fit the column width. When the following code is used, it generates a table ...
2
votes
1answer
41 views

Is there a way to change only SOME text in a specific column (and not the entire column) to be bold or italic in a table? [closed]

Consider the following table. Some of the text in the second column is italic and also the text is broken in order to fit the column width. I used the following tex code but it generates a table ...
3
votes
1answer
169 views

How to change Figure 1: to bold Fig.1. in latex

I am using default setting in LaTeX that show Figure 1: Caption.... Now, I am following the format of Magnetic Resonance Imaging journal that require Fig. 1. Caption I tried to add the below ...
1
vote
1answer
43 views

Command to Strikeout text and citation?

I am making major edits (a hack and slash) to a big document, want to do a word count on what's there (hence texcount), and, while I'm editing and we are reviewing, I want to retain what I'm removing ...
8
votes
2answers
8k views

How do I keep a string of text together without it doing a line break?

I'm writing up a long paper, in which in prose I have various equations. However, I do not want a line break to occur within the equation - I want the equation to stick together. I want to do this ...
1
vote
1answer
37 views

Chapter header spacing, spacing after sections

I am trying to create double spacing throughout this document - after "Chapter 1" and "after Dimension Reduction in Symmetric Spaces", etc. I also want a top margin of an 1 inch. Can anyone tell me ...
1
vote
0answers
39 views

Set a \mbox to pagewidth [closed]

I am doing a major edit on a document and want to use a new macro to comment out lines, strikethrough them and remove them from a word count but I am having trouble with citations so I am trying to ...
2
votes
1answer
38 views

Appendix Numbering Format: Dash instead of Dot after (alphabetic) number of appendix

How can I change the dot after appendix's numbering (A.) to dash (A -)? MWE \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{standalone} \usepackage{wallpaper} ...
1
vote
1answer
71 views

Typesetting Hermann-Mauguin notation correctly

Hermann--Mauguin notation is used to define a naming scheme for three-dimensional space groups (aka crystallographic groups). A list of these groups together with their names can be found here. I ...
0
votes
0answers
49 views

Astronomy and Astrophysics Class Modifications

I'm using the Astronomy and Astrophysics class file (class file link here, page which class file comes from and shows an example here) to write a report and there are some modifications to the class ...
4
votes
2answers
351 views

Nomenclature, acronym or glossary?

This isn't a technical or LaTeX code question, but more of a "what should I be using for X?" question. I am writing up my PhD. It is an Engineering PhD and I have mostly abbreviations (i.e. ...
1
vote
0answers
67 views

natbib: custom biblabel ignores leftmargin

Main question; left margin: This answer provides the code to style the bibliography label in a desired fashion. However, the new biblabel ignores the left margin of the page. Since I do not really ...
2
votes
0answers
58 views

thesis formatting

I have a thesis template using the fancyhdr package in which the chapters and titles are written bold and have large margins. Since I am doing my thesis, my school formatting requires center page ...
4
votes
1answer
64 views

Why is it impossible to format items of a LaTeX3 comma list?

Trying to adapt the 1st code of this answer in order to format (say in bold) items of a LaTeX3 comma list, I stumbled upon an unexpected error: the following MWE works like a charm: ...
1
vote
1answer
36 views

How to avoid italicised text following \sigma?

I am trying to include the symbol \sigma into a document of mine but I find that every time I use it, the text following it is in italics, e.g. \sigma{\textsubscript{\emph{x}}} is used to Produces: ...
14
votes
3answers
840 views

Making large numbers readable by inserting thinspaces for visual grouping

I prefer a large number be shown in three digit groups. For example 1234567 be shown like 1 234 567. Is there a way to make this automatic in LaTeX such that wherever I insert 1234567, it is ...
2
votes
1answer
34 views

Adjust variable height in formula

I want to write the following expression \documentclass[12pt, a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,ngerman]{babel} ...
1
vote
0answers
57 views

HZ typesetting system in plain TeX

How can I use the hz typesetting engine with plain TeX and pdfTeX? I read about it in TUG Vol 36 no.2, Peter Karow article, link: TUG Vol 36 no.2, Peter Karow.
3
votes
1answer
89 views

Automatically add \noindent for short paragraphs

Is there a way to activate \noindent to each line which is so small that there is no line break in the paragraph? An example: The code This is a long paragraph: Lorem ipsum dolor sit amet, ...
2
votes
0answers
46 views

Table of Contents entry width [closed]

I am trying to break entries before the text runs into the page number column, right now I get this: Right now I have the following from a .cls file: \renewenvironment{thebibliography}[1] ...
1
vote
1answer
56 views

Condensed bibliography with runin title as in titlesec

Here is an MWE for a document I'm working on, based on code from here, modified with some titlesec options. My goal is to get the references title to appear as a runin title as in all the other ...
28
votes
5answers
15k 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?
3
votes
2answers
48 views

Minipage side-by-side formatting

I have tried a couple of different commands to display my mini-pages side by side. but i can't figure out what the right syntax for it should be.. \documentclass{article} \usepackage[utf8]{inputenc} ...
0
votes
1answer
39 views

How to get consistent rule lengths for algorithmicx and listings floats?

In the following MWE, I would like the rules (the gray lines above and below the floats) of both environments (listings and algorithmicx, resp. algpseudocode style) to have visually (I'm not aiming ...
2
votes
2answers
101 views

Format question in examclass

I want to format all the questions and subquestions in bold. \qformat only affects what's in front of the real text. MWE: \documentclass[answers]{exam} \begin{document} This should not be in ...
1
vote
2answers
76 views

How to justify one part of a line left and the other on the right hand side

I was wondering if it was possible to have two sections of text, on the same line be both left justified and right justified. For example doing this: {\itshape{\begin{flushleft}I'm on the ...
0
votes
1answer
134 views

Listing authors sequentially with affiliations without 'and' operator

I'm having problems listing authors in a way that doesn't cause a strange 'and' operator to appear between names, as well as names to appear on completely different lines. Sometimes it goes away and ...
1
vote
1answer
26 views

Formatting text to the title's style

Is there a way to format a sentence to the title's style? I mean that if the input is a sentence, then the output is this sentence with all letters made uppercase while the original uppercase letters ...
4
votes
2answers
58 views

List/Itemize with image bullets

I want to have something like bullets but with images, I found an example but it doesn't align quite well. The text should be aligned to the center of the image and the image (preferably it's center) ...
5
votes
3answers
673 views

How to suppress the final period (“.”) in paragraph titles?

When I run the following code, I get the paragraph title "Some title.". How do I get the compiler to suppress the period (".") in the paragraph title? \documentclass[3p,12pt,authoryear]{elsarticle} ...
0
votes
1answer
31 views

Biblatex Display the Review Section

For assignment I am writing I need to write a brief review of each reference and have it in the references section (indented by one tab on left hand side and blank line to next reference} after the ...
0
votes
1answer
60 views

setspace and parskip induced symmetry problems in custom chapter title

The MWE below demonstrates that I have a distinct lack of symmetry in the space between the horizontal lines and chapter title text despite employing the solution in Consistent Line Spacing in ...
4
votes
2answers
64 views

Italic font for the entire verbatim section

How can I change the font format to italic within the verbatim environment ? \documentclass[a4paper]{article} \begin{document} \begin{Verbatim} @book{book; title = {title}; author = {author}; ...
8
votes
2answers
472 views

Distinguish \nameref references in print version

I used the \nameref command to reference to names of captions etc. I also used the option colorlinks=true so I have colored references which can be distinguished form "normal" text. In my print ...
22
votes
2answers
1k views

How to make these boxes?

I don't know how exactly to call what I want to implement. It's like a box surrounded with a line and, depending on the context, I want to place a graphic on the right corner e.g. a light bulb or a ...
5
votes
1answer
87 views

Formatting answer boxes

I am still very new to LaTeX and was drawn to its chemistry packages. Since this is my first semester using LaTeX for reports, however this class requires pre-lab reports to be submitted as well. ...
0
votes
0answers
31 views

How to compress the bibliography of LNCS template without changing the source bib file?

I am using the Lecture Note in Computer Science (LNCS) LATEX template, and want to compress the bibliography to a shorter form. Given bibliographystyle is: \bibliographystyle{splncs03} I want to ...