{horizontal-alignment} is about aligning document elements horizontally, e.g. typesetting paragraphs using \centering or \raggedright or adjusting the horizontal position of several equation or table components. If your question is generally about (horizontal) white space, use {spacing} instead.

learn more… | top users | synonyms (6)

3
votes
4answers
89 views

Alignment of entries in matrix

I have this pmatrix (amsmath package): \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{pmatrix} \frac{a}{b} & \frac{a}{b} & 0 & ...
4
votes
3answers
71 views

How can I make a single-aligned row under two double-aligned rows in an equation?

I have an equation that I would like to align like this (the x is actually \times): A = BBBBB CCCCCCC x DDDDD = EEEEEEE FFFFF I have tried the align environment, align with nested ...
7
votes
1answer
159 views

Table not wider than text, same columns' width, decimal alignment

I'd like to get the same width of columns labeled 1-10 (all except the first one ~ Name of X) be able to adjust the position of "name of Y" (have it centered or on the left. Right now, it's ...
2
votes
1answer
52 views

How can I center Flashcards vertically, but not horizontally?

I'm currently experimenting with flashcards (the learning technique as well as the LaTeX document class) and flashcards seems to be pretty nice. But I could not find an option to center my ...
2
votes
2answers
52 views

Centering just one line in a multi-line caption

There are multiple questions already answered for centering an entire caption, but my problem is that I wish to just \centerline or \begin{center} ... \end{center} just one line in a multi-line ...
3
votes
3answers
145 views

How do I horizontally align equations with graphical calculus?

I have a graphical proof in category theory that I wrote with TikZ and the align environment (Thanks to Henri's answer in this question). The diagrams on each line have a recurring feature, a vertical ...
1
vote
0answers
24 views

Indentation in verse environment [duplicate]

I have to typeset a bit of verse in which certain lines are indented to approximately the length of the preceding line, as in these lines from Romeo and Juliet. I tried to use \phantom, like so: ...
2
votes
1answer
66 views

Problem with indentation and alignment [closed]

I am writing my thesis in book document class. The command \indent is not working. Also, the lines are not aligned on the right side. What could be the problem?
4
votes
2answers
186 views

Align an equation box found inside an algorithm

I'm writing an algorithm that has an \begin{equation} inside it. I want the whole equation to be aligned to the left, as any typical text block would be aligned if written inside the algorithm ...
9
votes
2answers
118 views

Preventing line shrinking with raggedright

Sometimes with \raggedright, if a line is too long, but only slighly so, it will be shrunk instead of broken up. Here is an example: \documentclass{article} \raggedright \begin{document} This is a ...
4
votes
1answer
158 views

How can I horizontally align checkmarks in a table column?

In my table I use different combinations of a checkmark standing alone, in parentheses, or with an asterisk. I would like to have a centered column in which the checkmarks align. By using the package ...
2
votes
1answer
235 views

How to center column values in a table?

How can I center the column values in this code? \documentclass[conference]{IEEEtran} \begin{document} \begin{table} \centering \begin{tabular}{|p{2.5cm}|p{2.5cm}|p{2.5cm}|} \hline ...
1
vote
0answers
57 views

Number-Alignment with siunitx in tables [closed]

Update... after a update to recent version of siunitx, everything is fine now. Thanks a lot @daleif and @crissov :-) \documentclass[ngerman,a4paper]{scrartcl} \usepackage[utf8]{inputenc} ...
3
votes
2answers
85 views

How to left align text in two column itemize

When I use following MWE for getting itemized text in two columns, the item in the list sometimes take a "justified" formatting and thus there is significant space in between two words. This produces ...
1
vote
1answer
50 views

subfloatrow: centering single subfigure

In the example below, how can I center the third figure (C)? \documentclass[a4paper,12pt]{article} \usepackage{tikz} \usepackage{floatrow} \usepackage{subfig} \begin{document} \begin{figure}[htbp] ...
3
votes
1answer
79 views

How do I centre my title properly

The title "NAME" seems to be shifted slightly to the right when I use this code, is there a fix to this? \documentclass[11pt]{res} %Sets the default text size to 11pt and class to article. ...
4
votes
1answer
471 views

Putting Figures Side-By-Side Using Minipage

I am trying to put two figures next to each other. However, it is not working. Here is my code: \begin{figure}[h] \centering \begin{minipage}{1.0\textwidth} \centering ...
2
votes
2answers
40 views

Trouble aligning partial header in table

I want the "n" to be centered over the 50? How can I achieve this? \begin{tabular}{lccc} \hline \multicolumn{4}{c}{Condition Numbers} \\ \multicolumn{3}{r}{n} \\ Correlation ...
7
votes
4answers
308 views

left position math formula

I try to write down the following equation: \begin{equation} \begin{flalign*} \left \| \vec{r}_1 - \vec{r}_2 \right \| = \\ \sqrt{( r_{1,x}-r_{2,x} )^2 + ( r_{1,y} - r_{2,y} )^2 } = \\ \sqrt{( ...
2
votes
1answer
62 views

Center narrow columns under wider caption in ctable

I have a narrow table but a long-ish caption. Rather than run the caption to several lines, I have set the ctable width to 0.5\textwidth. However, the two narrow table columns are now set to the ...
4
votes
1answer
76 views

Centering numbers in table

I would like to generate table which looks approximately (not necessarily) like If you have any suggestion for this sort of data representation, don't hesitate to tell. So far I have come up with ...
7
votes
1answer
140 views

Center over-long equations between both margins

I understand the reasoning behind the fairly narrow textwidth in a default LaTeX article. 60-80 characters per line and all that. However, I am preparing a document that features many lengthy ...
7
votes
2answers
198 views

Number alignment in tables with some values in partial boldface (all but the decimal point)

I want to align decimal values in a table with some values printed in bold. Just by itself, this is no problem. We can use the siunitx package and \robustify\bfseries to do the trick as described, ...
2
votes
2answers
202 views

Horizontal text alignment in captions for subfigures

Captions in subfigures are justified by default, which does not always look pretty: \documentclass[]{tGIS2e} % http://www.tandf.co.uk/journals/authors/tgislatex.zip \begin{document} ...
3
votes
3answers
81 views

Fixing alignment in equations

I wish to get a more typical alignment (I hope this obvious) than what I am getting with the following code: \[ ...
1
vote
1answer
101 views

Align table side by side with graph

I'm trying to get my csv table aligned to the left of my graph. The graph is appearing below (and indented) the table. Any ideas? \begin{minipage}{0.5\textwidth} \pgfplotstabletypeset[col sep=comma, ...
2
votes
1answer
121 views

Split lines, keep a table/aligned text within textwidth and span several pages

I have a very long table that I use to align some text, therefore I don't need it to be (specifically) a table (please consider that in the answers). I am using supertabular for the table to span ...
15
votes
2answers
862 views

Placing TikZ drawings in a minipage side by side

I've some problems with aligning some drawings I made with TikZ: I want these two TikZ pictured below to be displayed side by side with the two captions being on the same horizontal level. ...
5
votes
2answers
99 views

Align glosses in more than one language with gb4e

I'm using the package gb4e to gloss my linguistic examples. It nicely aligns the words in the original language with its glosses. But this alignment does not extend beyond the first line of glosses. ...
2
votes
1answer
205 views

Text section in right bottom of side

How can I write a text section in latex in the right bottom side of the page with a nice font ? It is for some thanks text. Now I have: \vfill {\sffamily \begin{flushright} ...
5
votes
2answers
79 views

Two lines ending where the longest one ends

I would like to have two consecutive lines of text where the shortest line is justified so that it ends at the end of the other, i.e. both lines should end at the end of the longest one. How can I do ...
4
votes
3answers
89 views

How do I center and scale vertical harpoons?

I need to create something very much like this: However, I'm having trouble scaling the vertical harpoons to make them look right with the rates on either side. For the horizontal harpoons I'm ...
4
votes
1answer
60 views

Centering is not working

The below piece of code is not getting center aligned. Kindly help in finding out the solution for the same \begin{table}[!ht] \begin{tabular}{|c||c|c|c|c|c|} \hline \centering AE mode & 512 ...
4
votes
1answer
102 views

Multipage tables - vertical centering in cells

I know there were many topics like this but I read a lot of them and it is impossible to understand them for me or they just dont work. I want ALL cells to be centered vertically. I would also like to ...
3
votes
1answer
71 views

Transparent and centered image into a frame formed for two bars (head and side)

I tried to center a transparent image into a beamer slide and it worked perfectly (code is shown below), but now I have a beamer presentation with two bars: one on the head (2.5cm) and one on the left ...
3
votes
1answer
300 views

“Something's wrong - perhaps a missing \item” after second instance of centering section

I have been receiving this error on multiple documents recently. The first and third section headers render correctly, but the second produces an error. \documentclass{report} \begin{document} ...
3
votes
1answer
67 views

Howto center images in a size defined table?

I have the problem that I have a table which includes two images next to each other and below in the next line there is the caption of the image. The problem is that the images are not shown next to ...
1
vote
1answer
47 views

Strange alignment of scaled greek letters in fractions (XeTeX or pdfTeX)

The following code: \documentclass[a4paper]{report} \usepackage{amsmath,amsfonts,amssymb,multirow,mathptmx} \usepackage{graphicx} \begin{document} $$\frac{\scalebox{0.7}[0.7]{$\mu$}}{2\lambda x}$$ ...
3
votes
3answers
98 views

Centering two images but aligning them left

How would I place two images below each other so that their left sides are aligned and the whole construction is centered? I tried like this: ...
4
votes
2answers
70 views

clean, breakable left-aligned array-like environment

The centered, yet left-aligned aspect of \begin{array}{lll} ... \end{array} is what I usually go with to give a list of conditions. My only problem with it, is that it is not breakable, so I try to ...
7
votes
1answer
79 views

Aligning itemize elements both from left and right

I do this \documentclass[12pt]{article} \usepackage{enumitem} \setlist[enumerate]{labelwidth=3cm,labelsep=0.5cm,leftmargin=4cm,align=left} \begin{document} \begin{enumerate}[label= Example ...
7
votes
2answers
102 views

Creating Horizontal Lines With A Specific Distance

I'm relatively new at LaTeX. I've read material online and have been practicing. However, I have not been able to find a solution to two of my questions. I'm hoping someone may be of assistance. This ...
6
votes
1answer
65 views

How can I fill a line from the left?

I am fiddling with various ways of filling a line with a vertically centered line and experimenting with the answers here: http://stackoverflow.com/questions/2553392/latex-rule-filling-the-line and ...
1
vote
1answer
26 views

Incorrect alignment when using aligned

I'm trying to TeX some nice equations but there is a strange behaviour when I use an aligned-environment in an align*-environment. I think one little example makes my problem clear: \begin{align*} ...
12
votes
2answers
221 views

How to properly align three-level enumerate 1. 1.1. 1.1.1

I've created my environment, and modified the enumerate command: \renewcommand{\labelenumi}{\arabic{enumi}.} \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.} ...
1
vote
0answers
31 views

How to change default alignment for table environment in report class [duplicate]

I am using the table environment in report class. Here is the MWE: \documentclass{report} \begin{document} \begin{table} \begin{tabular}{cc} \hline a&b\\ c&d\\ \hline \end{tabular} ...
1
vote
2answers
54 views

aligning an equation to the left [duplicate]

I have the following equation: \begin{align} \frac{1}{4}\left[\frac{\partial{(u^n+u^*)(u^n+u^*)}}{\partial{x}}\right]_p &=\nonumber\\ \dfrac{u_{fe}\dfrac{\dfrac{u_{i,j,k}^n+u_{i,j,k}^{*}}{2}+ ...
12
votes
3answers
310 views

Displaymath environment that can align equations and squeezes math

I have a long equation to align. Without squeezing the math, it is just barely longer than \textwidth. However, the align environment doesn't squeeze the math at all, which results in a badbox. ...
2
votes
2answers
120 views

Align text in \hfill environment

How can I arrange the text lines in the \hfill ? Is using a tabular environment the only way around this ? \documentclass{letter} % Uses 10pt \usepackage{marvosym} % add the symbols for email and ...
1
vote
0answers
54 views

How can I change the side of all (or single) pages of a twoside book?

My book's first page is righthanded the second page is lefthanded the third righthanded and so on but I want it of the form: first page to be lefthanded the second page to be righthanded the third ...