{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

2
votes
3answers
136 views

Formatting an equation

\begin{align} \frac{1}{2} (1-\varepsilon^2)\left(\partial_\tau \phi\right)^2 = \frac{1}{2} \left(1-\epsilon ^2\right) \left( -\frac{S \epsilon \sin\tau }{\sqrt{\lambda }} -\frac{\text{g2} S^2 ...
2
votes
1answer
130 views

$\cos \tau$ need to write in a different way

$$\frac{S \epsilon \text{Cos}[\tau ]}{\sqrt{\lambda }}+\frac{\text{g2} S^2 \epsilon ^2 (-3+\text{Cos}[2 \tau ])}{6 \lambda }+\epsilon ^3 \left(\frac{\left(-\frac{1}{54} \text{g2}^2 S \left(32+19 ...
1
vote
0answers
37 views

Is there a way to draw a horizontal line, across a whole page, no matter which context I'm in? [duplicate]

I've been using \hline for my horizontal lines in tabular, and \line(1,0){250} elsewhere. I'm trying to automate some of the formatting for my tex documents, though, and it would be useful for me if ...
8
votes
1answer
261 views

texindy equivalence to makeindex settings

I'm currently using makeindex to generate an index and was advised by @egreg to use xindy instead to properly manage accents in French. However, I can't find how to reproduce my current settings: ...
2
votes
1answer
122 views

Modifying section, subsection based on scope?

Using MS Word 2013 I mocked up what I would like to create using LaTeX: I tried exporting it in LibreOffice using its writer2latex; but that didn't work. So starting from the sectionbox LaTeX ...
2
votes
1answer
109 views

inline listing (lstinline) behaves bad at line end

I have defined some small macro to markup function names: \lstdefinestyle{inline-funcname}{ columns=fullflexible, breaklines=false, %Note: \usefont{OML}{cmm}{m}{it} is exactly like ...
1
vote
0answers
56 views

LaTeX listings / email quoting [duplicate]

I've been trying to do someting with LaTeX. I have some emails that I want to insert in a document. I've searched all over the web but can't find a valid solution. What I want to do is to have those ...
11
votes
3answers
387 views

How to draw a border around character in a formula?

So far everything I found on the matter of borders only applies to the text mode. I want to be able to do something like $x_i = y$ so the result will be like the ordinary "xi = z" formula with the ...
4
votes
1answer
213 views

Vertical aligment of subfigure to the top edge

I have a small problem with vertical alignment in LaTeX. I have 3 figures with different height and I want to show them in one figure (side-by-side). Unfortunately, by default they are aligned to the ...
3
votes
2answers
179 views

How to do \newcommand{\filepath}[1]{\verb!#1!}?

I want to define a command \filepath so that I can use \filepath{foo_bar.cpp} and it is printed in monospaced font. Also, why does this not work? I get strange errors: ...
0
votes
1answer
114 views

No space after the word when I defined a macro, bug? [duplicate]

I defined a macro but I found the word spacing is gone. Am I missing something? \documentclass[11pt, oneside]{article} \newcommand{\abc}{$abc$} \newcommand{\abcSpace}{$abc$ } \begin{document} Word ...
4
votes
1answer
1k views

Beamer TOC: changing color and shape for subsection items in TOC

The default items for subsection in TOC are balls (no-nummered). I would like to use blue triangles, like the symbol \blacktriangleright but blue color. Any idea?
1
vote
1answer
95 views

Uncovering Formatting?

Is there any way to have a slide show a block of text, and then by some \uncover type command, bold or underline a certain part of that text?
3
votes
1answer
748 views

How to underline text in verbatim environment?

Am I missing something, or is it simply not possible to underline text within a verbatim environment? \begin{verbatim} I want to underline the following word: word \end{verbatim} I guess I could ...
0
votes
1answer
1k views

splitting by using & \qquad

\epsilon ^7 \left(g_7 \phi _1^7+6 g_6 \phi _1^5 \phi _2+10 g_5 \phi _1^3 \phi _2^2 + 4 g_4 \phi _1 \phi _2^3+5 g_5 \phi _1^4 \phi _3+12 g_4 \phi _1^2 \phi _2 \phi _3 + 3 g_3 \phi _2^2 \phi _3+3 g_3 ...
4
votes
2answers
220 views

Is there a quick way to split a (very) long equation?

I'm generating LaTeX code from Mathematica, which I must insert into my input .tex file. The problem is that equations are too long to fit on the page, and it takes a long time to split them up. Is ...
3
votes
1answer
147 views

Is there a website where I can paste RTF and get out LaTeX?

Yes, I know there are loads of plugins and all kinds of options for Oo, but I can't get them to work and I spend more time then I can to admit looking for things italicized in Word which should be ...
6
votes
2answers
383 views

Vectorization operator

How can I represent the vectorization of a matrix A (i.e, vec(A))? I am talking about this simple operator:
3
votes
1answer
247 views

How can I indent the second line of a linguistic gloss with gb4e.sty?

In accordance with the documentation, I've been happily plodding along making interlinear glosses. So far so good! But things get ugly when I make a longer gloss. Looking at example (5) on page (6) ...
2
votes
2answers
226 views

Chemfig - Name some compounds under a single label

I know within the chemfig package compounds can be named with the command \chemname. Is there a way to label some compounds under a single label? For example, put a label "Reactants" under the ...
5
votes
1answer
121 views

Formatting a comma separated list of values

I'm creating a set of mathematics worksheets, and I'd like to have an upside down "answer key" below a set of enumerated questions. Here is what I have at the moment: \usepackage{graphicx} Answers: ...
12
votes
1answer
410 views

How do I enter ὅπερ ἔδει δεῖξαι in TeX?

How do I typeset this statement if I'm using \usepackage[default]{frcursive} and \usepackage[T1]{fontenc} in my TEX file?
1
vote
0answers
63 views

My TeXworks platform is presenting me with \end{document} problems [closed]

\documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[american]{babel} \usepackage{geometry} \title{text} \author{text} \date{\today} ...
7
votes
1answer
209 views

Single/Double side environment with different backgrounds

I'm having trouble aligning some of the elements. I would like align Check Box and Cross Box to be same size so that they look nicer below is what i got so far. Also it would be great if they can ...
5
votes
2answers
164 views

Start next paragraph on this line

TL;DR: Can I convince LaTeX to start the next paragraph on the same line as the current one? The format I’ve chosen for my résumé looks something like this: EXPERIENCE Doctor Midos, Inc.   ...
1
vote
1answer
473 views

Chemfig - Proper Vertical Aligning in Chemical Reactions

I have the following chemical equation in Chemfigs: \documentclass{article} \usepackage{chemfig,chemmacros} \begin{document} \schemestart 2 \chemfig{-[:30](=[:90]O)-[:-30]OH} \arrow ...
3
votes
2answers
257 views

Insert a character in the beginning of each line in a special verbatim environment

How can I insert a special character or a symbol in the beginning of each line in a verbatim environment? In particular, there is a constraint that applies to the verbatim environment: it must be of a ...
17
votes
4answers
774 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. ...
3
votes
2answers
1k views

How to remove the self-reference of the ToC in Latex book class

I want to remove the self-reference of the ToC in Latex book class as in the picture below Can you help me?
1
vote
1answer
246 views

Chapter heading at the right-hand side

I want a specific chapter heading as in the picture below (Chapter heading at the right-hand side, but section heading at the left-hand side) Can you help me?
3
votes
3answers
7k views

How to include R output in LaTex? [duplicate]

I am not sure about how to include my r output in the best way in my latex document. Currently I saved my R output (NOT R CODE!) into a txt file: *---------------------------------* * GARCH ...
5
votes
1answer
156 views

Emphasizing some parts of string in lstlisting

I need to stress out some parts of string in lstlisting. I tried with \emph{}, but I got the verbatim result. Is there any way to that? \begin{lstlisting}[frame=single] Array1: 78 54 31 54 92 86 23 ...
4
votes
1answer
320 views

How do I get the table of contents, list of figures and list of tables to have the header I specify

I used \renewcommand\contentsname{\Large{TABLE OF CONTENTS}} (similar for list of figures and list of tables) to obtain headers that were centered at the top of the page, not bold and capitalized. ...
4
votes
1answer
70 views

Smaller font for < sign

I have a table where i report times. Some elements are very small and I would like to write $<1\mathrm{ms}$. However, if I do so, the < 1ms will occupy even more space than a three digit number ...
2
votes
1answer
138 views

How do I center my title (both horizontally and vertically)?

I'm trying to create a centred title, both horizontally and vertically on the page. I'm rather new to latex - so far, I've tried the code below without success: \begin{center} \title{Title} ...
0
votes
1answer
157 views

A seemingly canonical preprint style in mathematics

There seems to exist a style for preprints that is common on arxiv.org. A completely (!) random example which I have picked up just now illustrates that style. http://arxiv.org/pdf/1305.2775.pdf ...
5
votes
1answer
136 views

How do I prevent \cellcolor from over effect of \hline

I'm trying to add HTML code based color to my table, like so: \usepackage[table]{xcolor} \begin{tabular}{ |>{\columncolor[HTML]{F2FAF8}}c| p{11cm} |} \hline CELL 1 & CELL 2\\ \hline CELL ...
6
votes
1answer
1k views

Slashbox with tables: Adjusting the diagonal separator for multiple rows

I am using the slashbox package in a table as shown next. However as you can see, the diagonal line in the first cell is not the real diagonal of that cell. This is because of the existence of more ...
2
votes
1answer
118 views

Default Table Style [duplicate]

How can I create a default table style, which remains throughout the course of my document, lets say, for example, I want grid-lines and a gray shading behind the header-row, without having to ...
1
vote
1answer
70 views

transform text from one template to another

I use laTex for formatting my papers and I use GIT for version controlling the papers i write, once i have a final cut of the paper i go hunting for suitable conferences. most of these have their own ...
13
votes
2answers
933 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. ...
2
votes
2answers
510 views

Table doesn't fit to page width properly

The table produced by this code always goes out off the width of my page. I want the table to fit within the width of the page. I tried giving extra \\ in between but it made it worse only. ...
5
votes
1answer
146 views

Background color for inline math with linebreaks?

What's the simplest way to achieve coloured background for the inline equation in the following example: \documentclass{article} \begin{document} Completely unimportant text $ABC_{1234} = ABC_{1234} ...
5
votes
3answers
784 views

Use sans-serif in a verbatim environment?

What is the right way get fancyvrb’s verbatim environment (or any other variation) to use \textsf as the font? I can do it with: \begin{Verbatim}[commandchars=\\\{\}] \textsf{Here’s some textsf.} ...
4
votes
2answers
272 views

How can I avoid the gap between \cellcolor-colored cells created by \tabucline?

I'm trying to partially separate rows from one another using \tabucline. The line encompasses column 3-6. Since the line's width is neither part of the upper, nor the lower row, there is going to be ...
0
votes
1answer
172 views

Changing the format of figure, algorithm and equation numbering [duplicate]

This is a follow-up to this question. That allowed me to format references to an equation/figure/algorithm so that they started with an 'S'. What if I want to change the format in the original ...
7
votes
5answers
1k views

How to create following block diagram structure in LaTeX

How can i create this kind of connected and cascading block diagram in Latex?
7
votes
2answers
9k views

How to wrap a long equation in Latex

I have a very big equation and using split or multiline is not helping. How do i wrap it and how do i make sure thatRHS of the eqn is always on the right side of equal to ('=') even when line is ...
0
votes
0answers
13 views

How to get rid of italic in the table of contents? [duplicate]

I formatted the titles of section and subsections in italic, and it appears italic in the Table of Contents, I want no influence on the Table of Contents. For example \subsection{\textit{The RGE for ...
4
votes
0answers
377 views

Formatting of matrices [closed]

I have a document full of matrices, and many of them don't look very good, right now. Hunting for solutions, I found this post from two years ago. I have the same problems mentioned there, and I'd ...