{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)

10
votes
2answers
10k views

tikzpicture alignment and centering

I have several very similar images except some have some extra graphics that enlarge them slightly. This causes some pictures to be offset and not aligned visually when it's clear they should be. How ...
22
votes
3answers
13k views

How do I left-align entries in a matrix with \begin{matrix}?

I'd like to left align the -1 entry in the following matrix so that the 1s line up. Is there a way to get matrices to ignore signs in that way? \begin{matrix} 1 & 1 \ 1 & -1 \ ...
13
votes
2answers
6k views

How can I center text/math inside a list environment?

When using math (display) mode in conjunction with a list environment, the displayed material is not truly centered on the page; it is only centered with respect to the indentation of the item. ...
2
votes
2answers
734 views

How to center a verse horizontally

I have a Sanskrit Verse that I want to appear at the center of the page. I am using verse environment as shown below. \begin{verse} तपः स्वाध्याय निरतम् तपस्वी वाग्विदाम् वरम् | \\ नारदम् परिपप्रच्छ ...
8
votes
1answer
345 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 ...
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
1k views

Displaying an equation in a list

How could one get a displayed equation inside a list environment, say itemize, so that the equation is both centered horizontally and on the same line as the bullet, but with the bullet still on the ...
5
votes
1answer
480 views

How to ensure that 2 couples of figures are on 2 facing pages?

I would like to reproduce the following layout with two figures on one page and two others on the facing pages. I would like the first couple to be on an even-numbered page and the second on an ...
27
votes
2answers
13k views

Changing left margin in itemize environment of beamer class

I can't figure out how to line up the symbols of an itemize environment in beamer with the left part of the main text. In other words, I would like to supress the left margin in beamer itemize lists. ...
21
votes
1answer
13k views

Fixed column-width table with text left-aligned in cells

\section{Section Title} %label{8.4.47} \subsection*{Some note on Section} \begin{footnotesize} \begin{tabular}{p{2cm}|p{4cm}|p{3cm}|p{3cm}} Heading 1 & Heading 2 & Heading 3 & Heading 4 ...
19
votes
6answers
4k views

Skip to absolute position on line

Is there a way to skip to a fixed position on a line? (a specific tab position) Example: The quick \skiptoposition{1.5cm} brown \skiptoposition{2.5cm}fox which would put "brown" 1.5cm and "fox" ...
14
votes
3answers
20k views

side by side minipage figures

I have this code where the part marked A is the same as the part marked B except that .4 in A is .45 in B. Even though they are so similar the first one puts the images side by side with the ...
12
votes
5answers
8k views

Align Note below table

My question concerns the "Note" below the table. This is my code: \begin{table} \begin{center} \caption{ Descriptive statistics of total sample based on modified data set}\label{table:descrtotal} ...
5
votes
2answers
10k views

Align multiline equation with expression after equal sign

I am trying to align a multiline equation using array within the equation but it turns out it doesn't do very well. The code I am using is as follows: \begin{equation}\ \begin{array}{lcl} ...
9
votes
1answer
427 views

Alignments by means of the tikzmark macro

This is a follow up of my previous question Issues and potentiality of the tikzmark macro: dynamic box adaptation. I thought should have been better to ask two questions although they are related to ...
2
votes
3answers
190 views

align separate equations [duplicate]

I have the following structure in my tex Part of this paper has this structure where there are many short one-two line explanations cut by one line equations \begin{equation}\label{s1} y=z+r+c ...
10
votes
2answers
711 views

Custom alignment of columns in align environment

I need to typeset two columns of equations, each row typeset with an equation number to the right as with an ordinary equation. The first column must be centered, and the second column must be ...
7
votes
2answers
3k views

Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns

I want to arrange four algorithms set with the algorithm2e package in two rows and two columns, as shown in the figure below. I've tried the subfigure package and have also read several related ...
7
votes
1answer
3k views

Center wide longtable (not tabular or tabularx)

I have a long and wide table that does fit on A4 format, but is too wide for the text margins. I want that table to be able to spread over multiple pages, but I also want it to be centered on the ...
5
votes
1answer
1k views

`\hfill`-like spacing in math mode without using `align`

In question 83509, a way of getting \hfill-like behaviour in the align environment is described, but for my purposes, I need one that works in the equation environment. (I want to display some ...
13
votes
2answers
7k views

Raggedleft paragraph in a table

I am trying to typeset a table of two columns, where each column consists of paragraphs and the paragraphs in the right hand column are set raggedleft. Here is a minimal example of the code I thought ...
10
votes
2answers
288 views

Accessing side-bearings in LuaTeX

This question has been solved, in XeTeX, by this code: \def\kright#1{\leavevmode #1\kern-\XeTeXglyphbounds3 \the\XeTeXcharglyph`#1 } \def\kleft#1{\leavevmode \kern-\XeTeXglyphbounds1 ...
6
votes
3answers
2k views

Left-aligned text inside an equation

Inside an equation-like environment, I'd like to have some text that is aligned to the left margin of the text block, something like \intertext, but in the same line as the equation Something like ...
5
votes
3answers
219 views

Troubles with column width in the tables headings

Well, we all know that compose tables in LaTeX is not easy, however, despite the large number of existing packages and options to facilitate this, I still have some problems I could not solve, and I ...
5
votes
2answers
303 views

multiple pairs of columns

Consider this example code which creates a 2x6 table where the 6 columns are formed from three name/value pairs: \documentclass{article} \usepackage[svgnames,table]{xcolor} \usepackage{tabu} ...
5
votes
1answer
2k views

How to vertically and horizontally centre text and images in (different) table cells?

I have a table which contains images in one column. I would like the first column to have text centred vertically and horizontally. I would like the second column to have text left justified and ...
3
votes
1answer
3k views

Centre an image, ignoring margins

I have a document with .5cm margins; I want to include a long image which will span the width of the page, ignoring margins. I don't care about the whole image being visible (or which part of the ...
3
votes
2answers
754 views

Align (center) header row in table

I use @{\hskip 50pt} to separate columns in my table. The problem which arises is that I add this extra space after a multicolumn. This also moves the header row so that it is no longer centred. Is ...
3
votes
3answers
3k views

Numbering side-by-side equations or inline equations

I am trying to produce a two-column table of math equations, where each cell contains its own left-justified, numbered equation. I tried using \begin{equation} \end{equation} inside the tabular ...
3
votes
2answers
766 views

Centering contents after \unvbox

Trying to build a complex macro, I managed to compute what I need in a vbox. Now, I want to \unvbox this box to allow page breaks, and would like each element it contains to be centered. I can't find ...
3
votes
2answers
4k views

Vertical alignment with subfig and pstricks

I'm working with pstricks to add illustrations to a paper, as I found that it allows me to save much time compared to editing files with dia/xfig/visio/etc. and including pngs. But I'm having a few ...
2
votes
2answers
3k views

Left-aligning LaTeX Bibliography Display

I have problem on how to make the bibliography item left-aligned. My current bibliography output is below. As you can see, the reference item code is currently right-aligned, and I need it to be ...
46
votes
6answers
1k views

Starting a line where the previous line finishes

I have been using LaTeX for standard things like letters and scientific reports. I recently came to visit my grandmother who writes some poetry and told her I could make a nice pdf from her ...
12
votes
1answer
8k views

Multiline item indent

I am currently writing a set of steps for my lecture notes on circles but when the description of the step is too long, becomes multiline, the enumerated environment does not left indents properly as ...
21
votes
2answers
6k views

What is \null and when do we need to use it?

Up to now I don't understand well what \null actually is and when we need it. I have only known that it can be used to create hypothetical anchors as follows. \documentclass{article} ...
20
votes
5answers
500 views

“Q” and “A” in margin - out of alignment

I have defined a command for a letter in the margin as follows (using marginnote because marginpar did not work at all): \newcommand{\sideletter}[1]{\marginnote{\Huge\bf\sffamily\color{orange} #1}} ...
18
votes
2answers
6k views

Alignment of equals sign in multiple align environments

I have multiple align environments in my document, separated by a small paragraph of text: \begin{align*} foo &= something very very long compared to the other align \end{align*} explanation ...
11
votes
7answers
310 views

Alignment in cases

I have this text in LaTeX: $$ sgn(x)= \begin{cases} -1 & \mbox{za podmínky } x>0\\ 0 & \mbox{za podmínky } x=0\\ 1 & \mbox{za podmínky } x>0 \end{cases} $$ But I ...
8
votes
2answers
9k views

Table rowspan and colspan

I need to create similar table using LaTeX: I have tried to use \tabular and \multicolumn, but every time I get something wrong. I want: Fixed width columns and fixed height rows; Centered cells ...
19
votes
2answers
220 views

What's a quick way to align text?

I am often writing quick statements in which I would like the following lines to continue underneath the end of the first. Is there a quick way to do this (requires arrays?) this is the first ...
17
votes
1answer
4k views

How to prevent automatic justification of references?

I have a reference entry in the bibliography that appears as follows: [50] AB MySQL. MySQL: The world's most popular open source database, http://www.mysql.com/, 2005. How to prevent ...
15
votes
1answer
753 views

How to fix the math-spacing when a lot of \phantom, \mathrlap, etc. are used?

This question led to a new package: underoverlap Introduction Based on this question and then this question, I'm trying to perfect the \overunderbrace macro. Right now, I'm trying to get the ...
14
votes
3answers
22k views

Indent an entire paragraph / section?

I am writing a document with some odd spacing. I am copying another document, and therefrore the layout must be almost exact. I have sections divided by letters below, and some paragraphs in each ...
12
votes
4answers
489 views

How do I get this strange alignment?

I would like to get a nonstandard alignment in the following code: \begin{align} \text{First left hand side} & = \text{First right hand side} \\ \text{Second left hand side} & = ...
11
votes
1answer
221 views

Alignment rules

I find myself quite frequently in the need to check whether some elements on my page are aligned exactly as intended. As a result, I usually end up magnifying the output 400% and using a rule over my ...
6
votes
1answer
5k views

How to put two minipages side-by-side, which use 100 % of the text width?

In draft-mode a black marker indicates that the reserved space is too low. This also appears in the following example, but it shouldn't. How can I put two minipages exactly side-by-side? ...
19
votes
2answers
2k views

Aligning inside tabular environment, specific cell

I'm trying to align a specific content of a single cell. For example, \begin{tabular}{|r|r|} \hline 1 & 2 \hline right & to_the_left \hline 1 & 2 \hline ...
18
votes
3answers
9k views

Aligning Decimal Points in Table

I want to align two numbers in two different rows the decimal point. I do see a link for that here: Aligning numbers by decimal points in table columns However, I don't understand how to ...
15
votes
3answers
7k views

\hfill in math mode

Is there any easy way of declaring a new command which emulates \hfill in math mode. I don't want flalign or something similar. I want to use the command in the same way (and with the same freedom) I ...
13
votes
4answers
2k views

Best Pattern For Adding Commentary in align Environment? [duplicate]

I've been using the align environment to line up equations in proofs/explanations/etc and I like to place parenthetical commentary for each step, similar to the code below: \documentclass{article} ...