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

11
votes
1answer
7k views

Vertical alignment of dots in equation

Consider the following example: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{alignat*}{6} 1 && 2 && ...
11
votes
1answer
572 views

Misaligned month label in TikZ calendar

I'm putting together a multi-month calendar in TikZ and am seeing some awkward and undesired alignment in the month labels despite using the month label above centered style. In particular, the month ...
11
votes
1answer
2k views

Having problems aligning in a table with siunitx when using uncertainties in some power of 10

I'm trying to have a table, with an S column (from the siunitx-package) where the numbers are aligned to the \pm signifying uncertainty. Some values have uncertainties like 1.00 x 10⁴ and that seems ...
11
votes
1answer
3k views

Align equals sign in table

I am trying to align an equals sign between two sets of cells. The first table here doesn't want to align, whilst the second table does. Is there a more elegant way of doing this? ...
10
votes
5answers
693 views

In LaTeX, make a box with the width of another text

I am looking for a command like \makebox{text to set width}[c]{new text} which would make a box with the width of text to set width containing ____new text____ centered.
10
votes
3answers
6k views

How to put two images side by side and put some symbol in the center?

I want to put two images side by side and put a comparison symbol in between them. Here is the tikz code : \documentclass{article} \usepackage{tikz} \usepackage[margin=15mm]{geometry} ...
10
votes
4answers
5k views

Left-aligning specific text in math-mode

I currently have via \documentclass{scrartcl} \KOMAoptions{ fontsize = 10pt , headings = normal , } \usepackage{amsmath} \usepackage{multicol} \usepackage{siunitx} \begin{document} ...
10
votes
3answers
26k views

How to center the minipage?

The left margin is too wide if I set 1.5\textwidth: \begin{document} \noindent\begin{minipage}{1.5\textwidth} test \end{minipage} \end{document}
10
votes
2answers
9k views

Numbers in tables: align by decimal point *and* flush right?

This is a followup question to siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers and Aligning numbers by decimal points in table columns. While ...
10
votes
3answers
259 views

Centering disregarding symbol ®

I have a titlepage for a report. This title is split into two lines with only the word "BRAND®" on the second. It should be centered, but should disregard the ® as it is placed in the third line ...
10
votes
4answers
266 views

putting two indices and exponents side to side

I did not find the answer to my following question on the web. I apologize in advance if this question has already been answered somewhere. I would like to write a matrix with the two subscripts and ...
10
votes
2answers
30k views

Shifting Figure to the Left in Beamer

I have a figure in a .pdf file that I'd like to shift to the left a little bit in how it appears in the slide. How may I do this? \frame { \frametitle{Slide Title} \vspace{-0.75cm} ...
10
votes
2answers
479 views

Selective alignment tabs in tabular/array?

For a while now I've been thinking about an array/tabular feature that would be quite nice to have. It doesn't seem to exist yet, as far as I can discover. And unfortunately, I can't spare the time ...
10
votes
3answers
1k views

TikZ: How to center captions below figures in matrix

I have three figures that I want to align in a matrix. Each figure is drawn in a different way and needs a caption that is centered below the corresponding figure. Here is what I currently have: ...
10
votes
3answers
4k views

Centered box, text inside it flushed right?

I have some text (like a title), that needs to be centered, and some notes to it (multiline - note 1 \\ note 2), which should be directly underneath it and on the left side of it: Some ...
10
votes
3answers
2k views

Centering table column titles above comma-aligned numbers

I am trying to make the following table look nice. With that I want the title to be centered horizontally, and the numbers to be alligned at comma. Here is how it looks now: And my code. ...
10
votes
2answers
345 views

Math Spacing in the presence of a trailing/non-trailing comma

I thought I knew how to use a \hphantom{} but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the X row. I added the appropriate \hphantom{{}+1} ...
10
votes
2answers
2k views

Properly align numbers with units in table

I need to typeset a table comparing, among other things, the temporal resolution of certain datasets. Ordinarily, I would put the common unit into the table header, and only list the values in the ...
10
votes
2answers
511 views

Infinitely shrinkable glue except if surrounded by text?

Say \a and \b are two macros that expand to some text and either one may be \empty but not both. I want to put \a and \b in a line, centered and separated by a \quad. \hfil\a\quad\b\hfil Problem: ...
10
votes
1answer
6k views

How do I set right alignment in a longtable column with a fixed width?

How do I set right alignment in a longtable column with a fixed width? I have \begin{longtable}{p{3cm}p{8cm}} and I'd like my first column to be aligned on the right.
10
votes
1answer
20k views

Left align (to the page) displayed math

How can I left align the display math environment (either $$ or \[)? I keep running into people asking about the align environment; but I just want to change displayed math from center to left align ...
10
votes
5answers
259 views

Uneven height when using superscript in frac

I want to fine tune some of mine equations, when I encountered this Notice, how the superscript in the derivative operator fits nicely and doesn't lower the symbols in the denominator, while the ...
10
votes
2answers
992 views

Center Aligning Labels in a enumerate environment

I am trying to get enumerate environment do the following: (subgroup) some description of a subgroup of a group G. (hello!) This subgroup is a hello subgroup of G and satisfies an ...
10
votes
2answers
225 views

\raggedyleft in memoir?

In memoir instead of \raggedright, you can use \raggedyright[<space>] which is much more beautiful in narrow columns. However what I also need is \raggedyleft which does not exist and I don't ...
10
votes
1answer
18k views

How do force center-alignment in a caption in a figure?

When I use the following code: \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure}[h!] \begin{center} \caption{test} ...
10
votes
1answer
7k views

Centered frame title in beamer

How to set up beamer in a document so that frame titles are centered? Most of the themes seem to use left aligned frame titles.
10
votes
1answer
5k 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 ...
10
votes
3answers
6k views

How to left align the section title in latex?

I am using the \documentclass{ctexart}, and this document class centers the section title by default. How could I left align the section title?
10
votes
2answers
323 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 ...
10
votes
2answers
612 views

Purpose of “control space”

I could not find enough information on Google about control space (\). What is the purpose of it? Where should it be used?
10
votes
1answer
146 views

Is this a known issue with the centering of eqnarray?

In this example, \documentclass{article} \begin{document} \begin{eqnarray*} A&=&B,\\ C&=&D,\\ E&=&F, \end{eqnarray*} \begin{eqnarray*} A&=&\mathord{B,}\\ ...
10
votes
3answers
18k views

Alignment of horizontal subfigures

I have three images as subfigures. Two images are aligned happily, the first one doesn't line up. All images are the same size (519x346 pixels). This is what it looks like: I'd like to line up ...
10
votes
2answers
11k views

How to align image

If i have in my beamer presentation some list of items and on that slide i wanna add a picture, which i want to be aligned e.g. to right top corner. \begin{frame}[fragile]{III. Override pages} ...
10
votes
3answers
20k views

How to Center a BeamerColorBox

The question is, how to horizontally center a beamercolorbox on the page? I put it in the center environment, but that doesn't work. \setbeamercolor{bgcolor}{fg=black,bg=blue} \begin{center} ...
10
votes
1answer
585 views

How to split and align equations when they are inside an enumerate environment?

How to make the first line of aligned equations sit in the same baseline as the bullet and make the equation left justified? \documentclass{article} \usepackage{amsmath} \begin{document} ...
10
votes
1answer
411 views

Using \vtop affects indentation of \intertext

I am using the \iteminput macro from the solution at How to adjust macro to respect current \linewidth? to import content from other TeX files. However, this appears to be effecting the indentation ...
10
votes
2answers
3k views

alignment of multicolumn cell

Consider this table \begin{tabular}{lr@{}l} Bla & \multicolumn{2}{c}{A $\to$ B} \\ \hline X & 23.1&* \\ Y & 7.5& \end{tabular} which produces The second column ...
10
votes
2answers
4k views

How to flush right but align left? [duplicate]

I am writing an introduction, and I need to put my name at the end of it at the right side of the page, but it should be aligned left: Lorem Ipsum is simply dummy text of the printing and typesetting ...
10
votes
1answer
5k views

How can I align the full names in a list of acronyms?

I am using latex to write my thesis report and would like to generate list of abbreviation for same. I use the acrnonyms package to generate it. Following is my minimal code: ...
10
votes
1answer
7k views

tikz nodes: centering with small font

I am trying to create tikz nodes with centered text, but changing fontsize. Unfortunately, while normally-sized text is nicely centered inside the nodes, the smaller text is not centered, but shifted ...
10
votes
2answers
7k views

How to align source code produced by listings package with main paragraph text

I'm using the latex listings package for the first time to format some HTML. I'm noticing that by default, the html code is being pushed further left than the main paragraph text of my document. Is ...
10
votes
2answers
140 views

Alignment of environment inside enumeration

I defined an environment to add notes, i.e. pieces of text that are not strictly relevant to the question at hand but perhaps still interesting to read, via \usepackage[framemethod=tikz]{mdframed} ...
10
votes
3answers
269 views

Aligning matrices

Sorry if this might be a very banal question. I am fairly new to LaTeX and I am having issues with matrices alignment. I am trying to achieve pretty much what is shown in this picture, I have tried ...
10
votes
1answer
1k views

Correct alignment of multiple-line inequality

I want to display a set of inequalities to look like the code below this is the lower bound ≤ this is the thing to be bounded ≤ this is the upper bound My attempt to do this is the following: ...
10
votes
1answer
6k views

How to center a lstlisting

I have the following problem. I want to center a listing, I tried this approach: How to center a listing? It works but when I try to set frame or numbers specifically for each listing I get errors. ...
10
votes
2answers
843 views

Horizontal alignment within an equation using Tikz

I am trying to center horizontally the first terms of a system of equations inside the alignat environment. I don't know if Tikz is the right way to go, but as I might have to add some other ...
10
votes
1answer
178 views

Why is this lettrine being bumped into the margin?

Consider the MWE from an earlier question: \documentclass{article} \usepackage{lettrine} %\usepackage{fontspec} %\defaultfontfeatures{Ligatures={Historical}} ...
10
votes
1answer
8k views

Centering a \framebox

Before asking, I have checked Centered box, text inside it flushed right?, Questions about \fbox, and Any way to center text within a \parbox?. Here I have tested various centering methods (my ...
10
votes
2answers
742 views

KOMA-Script scrbook: width of chapter and section number

I'm using KOMA-Script’s scrbook class and have problems with the Table of Contents. When the chapter number is too large, the chapter number is glued to the chapter heading. The chapter-section ...
10
votes
3answers
1k views

Leftalign labels with enumitem

I'm using the enumitem package to define a legal list: \usepackage{enumitem} \newlist{legal}{enumerate}{10} \setlist[legal]{label*=\arabic*.} The output for a list looks like this: 1. foo 1.1 ...