{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
2k 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
852 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 ...
10
votes
1answer
762 views

Customize endnotes

For customizing footnotes in LaTeX, I use the footmisc package. Specifically, to remove indentation and text justification in footnotes, I add the following to my preamble: \usepackage[hang, ...
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
6k 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
1answer
889 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
4k views

LaTeX Centering newline in subfloat caption

I have these images with their title beneath: I want to add some information below, like this: The good news is, I'm able to do it. The last screenshot is from my pdf previewer. ...
10
votes
2answers
777 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
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 ...
10
votes
2answers
2k views

How do I center the table of contents title using tocloft?

I'm getting odd behavior using package tocloft to format my table of contents and center the titles "Contents", "List of Figures", and "List of Tables". Using the code suggested in the tocloft ...
10
votes
1answer
321 views

Right aligned text in picture environment slightly off

I'm making some placecards and using the picture environment to try to control exactly where everything goes. My problem is that, in the example below, the two lines are not exactly right-aligned. Any ...
10
votes
1answer
509 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 ...
10
votes
1answer
3k views

Vertical alignment of dots in equation

Consider the following example: \documentclass{article} \usepackage{mathtools} \begin{document} \begin{alignat*}{6} 1 && 2 && ...
10
votes
1answer
1k 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 ...
9
votes
3answers
358 views

Nicer alignment of x^*/2

I'm trying to typeset $\frac{x^*}{2}$, but I can't find a (simple) way to make the alignment look nice. So far, I've tried the following: \documentclass{article} \begin{document} \begin{equation} ...
9
votes
3answers
4k views

Underline and center headings

For a paper I have to make my LaTeX document guideline conforming. Many of you will already guess now that this means dirty work by violating virtually all possible typography standards. My biggest ...
9
votes
4answers
374 views

Aligning mathematical inequalities

I want to align the following at the inequality signs, however it becomes very ugly: \begin{alignat*}{2} ...
9
votes
6answers
325 views

Center hyphen between words

I have to center '-' mark in each line and it should be in the same location of each line. How would I do that? \begin{flushleft} $I(b)$ - interrogating signal\\ $h_n$ -forward ross ...
9
votes
4answers
310 views

How to start a new line in \boxed{}?

I have: \documentclass[12pt,a4paper]{article} \newcounter{conto} \setcounter{conto}{\time} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{dsfont} ...
9
votes
3answers
5k 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} ...
9
votes
4answers
204 views

Align text to right-hand edge of centered image?

I am including an image in a beamer presentation, centred, and want to give an unintrusive attribution link, just under the picture, right-aligned to the right-hand edge of the image. In other words, ...
9
votes
4answers
341 views

Center table by end of cell

I want to be able to center my table, but align the center by the end of the first cell. Currently just using the \begin{center} command i am able to center the table but i would rather the table be ...
9
votes
2answers
221 views

Multiple equations with a large “{” in front: alignment and labelling

I'm trying to get the equation shown in the picture. But i only manage to get the following coding. Can anyone help me to label it with numbering like the picture? I tried with \begin{eqnarray} or ...
9
votes
5answers
609 views

centering a part of an equation

I am using \vdots in my equation, and I need it to be centered. As shown in the figure it is automatically left indented. I am not able to bring the dots to the center. I am providing MWE also. ...
9
votes
2answers
18k views

Align left and right same line

I have this problem: Basically on the second line "Matricola: XXXXXX" isn't right aligned. My latex is: \begin{minipage}[t]{7cm} \textsc{Relator} Prof. NameName\\ \end{minipage} \hfill ...
9
votes
2answers
924 views

Alignment of page numbers in table of contents

Consider the following example: \documentclass[a4paper,12pt]{article} \begin{document} \tableofcontents \newpage \section{test} \newpage \setcounter{page}{22} \section{introduction} \newpage ...
9
votes
3answers
3k 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 ...
9
votes
3answers
3k views

horizontal alignment of dot over hat over bold greek letter!

For some strange reason, this: \hat{\dot{\bm{\phi}}} prints the dot and the hat slightly off the left of the phi letter. Any ideas if this can be fixed? thanks. Using bm package for bold symbols.
9
votes
2answers
396 views

Adjusting the gb4e {exe} environment locally

In my thesis I make extensive use of the exe environment of the gb4epackage and I love it. However, three of my approximately 100 examples need to have an alternative layout. Instead of the usual ...
9
votes
3answers
254 views

How To Make a Special Position Environment in LaTeX?

So I must admit I am way out of my depth and have no idea what I'm doing. I apologize in advance for a long and complicated question. I'm trying to build this output: Which I have successfully ...
9
votes
3answers
3k views

Justify a text inside a figure environment

I insert several figures in my document, but I am unable so far to fully justify the text just below the caption: "BLA BLA BLA" \begin{figure} \centering \caption{NICE TITLE}\label{graph:p} ...
9
votes
1answer
7k views

Center a single chapter heading

I want to have a single chapter heading centered. The other chapter headings should not be centered. I tried the following: \documentclass[12pt]{scrbook} \usepackage{lipsum} % for filler text ...
9
votes
1answer
14k 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 ...
9
votes
2answers
518 views

How to horizontally align headers and decimal centered cells

I use this code to produce a table and to align the column with the dot of the numerical values. \documentclass{article} \usepackage{dcolumn} \begin{document} \begin{tabular}{l D{.}{.}{3} ...
9
votes
1answer
6k 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.
9
votes
2answers
301 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?
9
votes
1answer
1k views

List of abbreviation

I want to display a list of abbreviation in two columns and list each abbreviation preceded by the corresponding letter. for example : A AAR .... AG .... i use the package nomencl : below the ...
9
votes
3answers
204 views

How can you change the alignment of calstable?

calstable is always left aligned. \documentclass{article} \usepackage{cals} \begin{document} \begin{center} \begin{calstable} \colwidths{{1.5cm}{1.5cm}{1.5cm}} ...
9
votes
2answers
176 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 ...
9
votes
1answer
4k 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.
9
votes
5answers
3k views

Using \label with amsmath nested environments

First of all, I'm not sure these environments are supposed to be nested, but the fact is the alignment comes out exactly how I wanted, and no errors are issued. \documentclass[a5paper]{article} ...
9
votes
2answers
533 views

Align position of decimal point within table of numbers, text and percentage values

I have asked sthg similar with a MWE today answered by David C., but this is a more difficult follow-up question. Also I have just made a new account :) The Question is simple: I want the numbers to ...
9
votes
2answers
2k views

Table of contents: section titles ragged right

In the standard book class, if there are very long section titles, \tableofcontents tries to produce justified text. How can I produce a table of contents so that the section titles are typeset flush ...
9
votes
2answers
587 views

Why are my Images not correctly centered?

First of all this is my first posting here on tex.stackexchange.com. I'm new to the tex world and I need a little bit of your help. I am trying to align text relative to a figure. How it should look ...
9
votes
1answer
431 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} ...
9
votes
2answers
3k 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 ...
9
votes
1answer
413 views

In align environment, put word at left margin and still align equations with &?

In an align environment, how can I put a word such as "Now" or "And" at the left margin and still align equations on that line and subsequent lines with &?
9
votes
3answers
17k 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} ...
9
votes
3answers
2k 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?
9
votes
1answer
283 views

Using discretionary linebreaks in centering environment

I am having trouble with the interaction between discretionary line breaks and centering. I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline ...