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

2
votes
1answer
1k views

Define a custom align, and align* environment

I would like to redefine both the align and \align* environments such that the first line is shifted up to line up with the list identifier. I attempted to adapt the solution provided at Starred ...
26
votes
2answers
10k 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} \usepackage[...
7
votes
2answers
1k views

Remove additional space around \underbrace{…}

How do I remove the additional space that is added when using \underbrace{...}, to get the same width in both lines: \documentclass{scrreprt} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \...
6
votes
5answers
4k views

Align numbers with numbers and asterisks in table by decimal point

I have created the following table with numbers and asterisks in it. Now I would like to align the numbers by decimal points. I included the package dcolumn and defined a new column type: \...
0
votes
2answers
241 views

\center is centering, but only at the top of the page

For an article, I'm trying to center my name and address, but \center is putting the relevant info at the very top of the page before the title instead of where I want it, after the title. How can get ...
1
vote
2answers
347 views

How to add a sequential number on the right hand of a mathematical formula?

I often use $$...$$ to write mathematical formulae. I would like to know how to add a sequential number on the right hand of the formulae. I want them to be right adjusted at the right edge of the ...
2
votes
1answer
1k views

Why does \setlength using tocloft causes strange alignment in TOC?

The problem I'm having is to align the number and text in the TOC. I searched and found one solution is to use package tocloft, like proposed in TOC Text - numbers alignment. Then I tried to apply it ...
3
votes
1answer
639 views

Standard math environment for equally-spaced columns of expressions?

I often need a display environment which would let me easily present equally-spaced expressions in the same line, with content on successive lines appearing centred at the same x-coordinate as content ...
5
votes
1answer
1k views

Controlling cell width and height simultaneously in a table

I'm trying to create a multi-page table with all cells having the same height (as well as certain fixed widths) so that certain manual cut-and-paste operations are a lot easier. One issue is that one ...
3
votes
1answer
994 views

Caption in subfloat shifted to the right

I'm seeing strange behavior when using subfloat. I have 6 figures that I want to display as 2 by 3 (2 lines, 3 columns). The caption (a, b, c etc.) is shifted to the right which means figure b) is ...
5
votes
2answers
1k views

Estout and dcolumn: Overriding decimal alignment

I'm using estout (esttab actually) to produce a table in Latex from Stata. I'm using the dcolumn package to align the decimal places in my table. I want to override the alignment for a single row; ...
2
votes
1answer
159 views

How to align text corresponds to text within the above line?

My attempt was to use tabular: \begin{tabular}{cccc} Let & $M_1$ recognize $A_1$, where $M_1 = (Q_1, \Sigma, \delta_1, q_1, F_1)$, & \\ & $M_2$ recognize $A_2$, where $M_1 = (Q_2, \...
55
votes
4answers
149k views

How to center text without adding space AND not altering alignment of surrounding text?

In normal text, how do I center part of a sentence (it happens to be the end of a sentence) but leave the text in the rest of the paragraph unaltered? Also, no vertical space should be added before or ...
19
votes
2answers
17k views

LaTeX equivalent of     in HTML?

In HTML, to get extra horizontal spacing all I would have to do is: This is textual phrase A   This is textual phrase B to get the following output: This is textual ...
2
votes
1answer
2k views

How to left justify equations in IEEEeqnarray environment?

I have an document that use both IEEEeqnarray and normal equation environment. The equation is set to be left justified with \usepackage[fleqn]{amsmath} However IEEEeqnarray is centered. How to ...
8
votes
2answers
934 views

How to add some text to every page of the TOC?

I'm finalizing my dissertation, and they require that the "Table of Contents - Continued" heading in the ToC (that shows if it flows onto a second page) be centered. I thought I could find the code ...
3
votes
3answers
12k views

Inserting not centered image in Latex

I do not have any problem inserting images on LaTex, but As I have a big image when inserting It with: \includegraphics[height=0.8\textheight]{image.png}\\ It appears centered, as it is a little ...
7
votes
1answer
5k views

Center \chapter (book class)

Using the document class book, chapters headings (Chaper 1) are aligned on the left. How to center them?
3
votes
2answers
915 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 ...
2
votes
1answer
978 views

Center subfloat above extended subcaption in subfig package

In the subfig package, the command \captionsetup[subfigure]{width=<length>} extends the width of a subcaption. Now how can the subfloats be centered above their enlarged subcaptions? The ...
119
votes
2answers
141k views

When should we use \begin{center} instead of \centering?

After reading this question Should I use center or centering for figures?, I want to know the answer of the following. When should we use \begin{center} instead of \centering? For example, should we ...
2
votes
1answer
437 views

Oddly wide spaces in subsection title

I have a problem, this is what it looks like: And this is the code: \subsection{Bakterienst\"amme und Anzuchtbedingungen} Where does the huge whitespace come from?
4
votes
3answers
3k views

Tabs in a Beamer Presentation

I am putting together a beamer presentation with some programming code. However, the verbatim package by default places the code on the left most fringe of the slide. I want the slide to be a little ...
1
vote
1answer
11k views

How can I fix image positioning? [duplicate]

Possible Duplicate: Keeping tables/figures close to where they are mentioned \usepackage{amsfonts} \usepackage{pdfpages} \usepackage[hidelinks,unicode]{hyperref} %- to zeby byly polskie znaki ...
23
votes
5answers
16k views

How can I automatically center an image?

I use: \documentclss{mwrep} ... \begin{figure} \includegraphics{a.jpg} \caption[Long caption]{Caption} \label{pic-a} \end{figure} How can I make images to be always visible on the center of page? ...
4
votes
1answer
556 views

Empty caption of subfigure in memoir slightly misaligned

Consider the following minimal example meant to illustrate a single figure with a subfigure using the memoir documentclass: \documentclass{memoir} \newsubfloat{figure}% Allow for subfloats (...
1
vote
1answer
1k views

How to align long labels in a list to the left margin?

I would like to create a list in LaTeX in which: 1. the longest label is aligned to the left margin, 2. the labels can be composite and look like "(1)(a)", 3. the labels, which can be of varying ...
3
votes
3answers
1k views

Right justify inline

I am trying to right justify some code as a text wrap for a memo on the C language and I encountered some issues... In the following exemple I'm trying to right justify the "const struct tm *ptm);" ...
3
votes
2answers
173 views

Word-for-word center-aligning of parellel lines of text in LaTeX?

I'd like to prepare a LaTeX document using a common format of displaying both Chinese characters and the corresponding romanization (pinyin) above each word. For an example, please refer to this page ...
2
votes
2answers
4k views

Latex multicol + itemize

I'm using the pdflatex interpreter and trying to get the following behavior using an itemized list in a multicolumn environment: [space]* item1 *item2 [space]* item3 *item3 I can get somewhat ...
5
votes
2answers
1k views

Alignment in multiline sections

I have some long section names that span more than one line, so I break them into two lines with \\ (I am using fancyhdr for that to work). The result is not very aesthetic. What I would like to ...
2
votes
2answers
1k views

How to vary alignment in document?

I wanted to left align my document in such a way that some pages...e.g. Abstract to remain justified, but the rest of the document left aligned. Anyway to do that?
2
votes
3answers
644 views

displaymath/split environment with three columns

I am writing the following equation: \begin{displaymath} \begin{split} MA &= MAAMB + MACAMB\\ \Leftrightarrow MA &= (MAAM + MACAM)B\\ \Leftrightarrow (MAAM + MACAM)^{-1}MA &= B \end{...
2
votes
2answers
456 views

Paragraph column in tabular working only in the first column

I have a two-column tabular environment and I'd like for both of these columns to have the text aligned at its middle (both vertically and horizontally), along with increased row height: But with the ...
4
votes
1answer
777 views

How to center numbers in a table column with the siunitx package?

I've been trying and searching for quite some time, but I don't see what I'm doing wrong: I want to create several table columns with decimal numbers (some in the format "1,25" and some like "3,156" ...
3
votes
1answer
872 views

How to make a graphic fill the rest of a given space?

Sometimes I use a figure numbering style in which each number is placed to the left of a figure. When using this formatting, I try to make sure that the space occupied by a given number and figure is ...
5
votes
1answer
175 views

Tabular: l{unit}?

I would like to define a few table columns with fixed width, just like p{2cm}, but I prefer the text to be flushed left, instead of justified. So basically something like l{2cm}. Is there a way to ...
5
votes
1answer
12k views

Centering images and overprint in Beamer

I'm trying to create a beamer presentation with several images replacing each other on consecutive slides. I've gotten it to work with overprint and \onslide, but cannot get the images centered on the ...
4
votes
1answer
2k views

TikZ: Background rectangles with equal width but 'fitting' height

I'm trying to make sort of a flow chart for a series of steps, but these steps are also grouped, and I'd like my diagram to reflect that. So I'm using the pgfonlayer/background environment to draw ...
3
votes
1answer
593 views

Placing a list of nodes in TikZ

I would like to define a macro, which would take a list of node definitions, like this \mymacro[boxes={{\node[rectangle] {foo};}, {\node[rectangle] {bar};}, {\node[...
3
votes
2answers
5k 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 ...
3
votes
4answers
26k views

Cannot align to right or left

I have this LaTeX code which should place this two images on the left and the right of the page: \begin{flushright} \begin{figure}[H] \includegraphics[width=107px , height=134px]{t1.jpg} \end{figure} ...
5
votes
4answers
704 views

left, right, and center alignment with hfill

this problem is driving me nuts. I need a line of text formatted as follows: Avian Influenza Tamiflu Jan 2, 2011 * This is a random description, note that it spans mult. cols. * ...
67
votes
4answers
12k views

What is the difference between 'fil' and 'fill'?

TeX provides the commands \vfil and \vfill (and their corresponding horizontal versions \hfil and \hfill). These commands are actually defined as: \vskip 0cm plus 1fil \vskip 0cm plus 1fill where '...
4
votes
2answers
6k views

Left-aligning authors section in an article

I want to align the authors section of my article to the left. If there are more than one authors, each author should be aligned left in its own cell. I am using memoir's article class. This is what ...
7
votes
1answer
949 views

Alignment within enumerate

I'm looking for a way to sort of combine the features of enumerate (and other list-like environments) with features of tabular environments. Specifically, what I like about enumerate is that it ...
5
votes
3answers
788 views

Right-aligned constraints for equation

I'm looking to write an equation (using gather), with some constraints on the right-hand side. Ideally, I'd like the equations to be horizontally-aligned with one another (i.e. have centers line-up ...
5
votes
2answers
586 views

Centered, wide float [duplicate]

Possible Duplicate: Balancing figure that is wider than document's width I have a table which is just too wide for the page. I'd like to be able to float it, centered across the text, but ...
1
vote
1answer
1k views

Split node padding when using `align` in TikZ

Consider the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} \begin{tikzpicture} \node[draw, rectangle split, rectangle split ...
2
votes
2answers
2k views

Table of contents: section number and title overlapping

I have problem with creation of table contents. A part of my code: \documentclass[a4paper]{amsbook} \usepackage[cp1250]{inputenc} \usepackage{polski} \makeatletter \renewcommand*\@seccntformat[1]{\...