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

1
vote
3answers
1k views

Tikz Axis with colormap bounding box does not align with other bounding boxes

My last question here was concerning tikz-axis aligned with centered other pictures. I received a very good answer. This question is similar but extends the question by a colormap as in the given ...
5
votes
2answers
3k views

How can I put three pictures with sub-captions in two rows using subfig package?

I would like to put three pictures with sub-captions in two rows using the subfig package. I want to center the single picture in the second row. I use the following code : ...
3
votes
1answer
587 views

Center ConTeXt table horizontally

Although my table is only so wide and inside a alignment[middle] environment, it doesn’t get centered and stays left aligned. (For ConTeXtians: right aligned :)) I tried a hack and add an empty ...
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 ...
11
votes
1answer
7k views

Beamer background image centered

I'm trying to use an image as a background for Beamer presentation according to this post. However, I do not want the image spanning the entire background. Thus, I'm doing something like: ...
8
votes
1answer
384 views

Execute token after \halign

I like to create a macro which processes a following brace group as "argument" using \halign. After it has been processed a token (a macro) should be executed. With an \hbox I can use ...
2
votes
1answer
1k views

Tikz Axis bounding box does not align with other bounding boxes. What can I do?

I want to place a lot of pictures and plots in a long document. By now, I am using figure-environment with center-environment, but the tikz-axis-plots didn't align well with included eps-pictures or ...
2
votes
2answers
484 views

How to change ERT alignment in LyX to “left” instead of “block”?

LyX displays text in ERT layouts block aligned, and there is no "align" parameter for the inset layouts (such parameter exists for styles, and may take values such as Left, Block...). I don't find it ...
2
votes
2answers
776 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} तपः स्वाध्याय निरतम् तपस्वी वाग्विदाम् वरम् | \\ नारदम् परिपप्रच्छ ...
5
votes
2answers
357 views

How do you align \@hangfrom paragraphs?

I'm trying to write up an interview with numbered questions to look something like this: Q1. What is your name? A. My name is Sir Lancelot of Camelot. Q2. What is your quest? A. To seek ...
2
votes
2answers
601 views

Multi horizontal alignment in mathmode

I would like to realize an alignment like the following: formulaformula1 formulaformulaformula2 formula3 formula4 So I would like formulaformula1 and formulaformulaformula2 to ...
5
votes
1answer
684 views

TIKZ: writing text top downwards

My simple question is how to set some text using tikz in a column e.g. +---+ | A | | B | | C | +---+ I do not want to rotate the text so I can not use the rotate option or the set text along path ...
3
votes
2answers
288 views

How to align a long math line without centering text?

This is not an equation, it's just a long math line. I want to break it into lines with right alignment. I tried several solutions including align, multline, but somehow I can't get it to work ...
4
votes
2answers
8k views

Centering left justified text

I need to define a new environment that contains a minipage centered on the current page and with text left-justified. Something like: \newenvironment{texto}{ \begin{center} % so the minipage is ...
1
vote
1answer
3k views

Centering contents of table cells horizontally and vertically

I'd appreciate help centering the contents of the topmost row vertically and horizontally in their cells(?). I've tried using \multicolumn without luck. \documentclass[10pt,a4paper]{scrreprt} ...
2
votes
1answer
2k views

pgfplots and figure centering

I'm wondering about a way to exclude the axis labels and axis graduation from how latex will center the figure with respect to the caption. Labels and graduation along the y-axis (assuming it lies on ...
7
votes
2answers
675 views

Centering the align environment on the middle column

I have a set of aligned equations that I would like to provide an \implies for down the left hand side. I used this originally: \begin{align} (x-1)^2 &= -1 \\ x-1 &= \pm i \\ ...
2
votes
5answers
308 views

Mixed vertical alignments under math-mode

I would like to present something as follows which is mainly under math-mode: Label1... name1 ::= choice11... comment11. | choice12.. comment12.. | chocie13. ...
4
votes
3answers
135 views

2 left alignments under cases

I would like to align something under cases as follows: value1 if condition value2 line1ofvalue2... otherwise line2ofvalue2.. line3ofvalue2. First, there are ...
7
votes
2answers
5k views

Left-align entire document

I'd like to left align my entire document (latex default seems to be center justified). Is there a simple way to do this? I'm trying to use \begin{flushleft} ... \end{flushleft} but really don't ...
4
votes
1answer
1k views

Quote environment with long reference at the end right – without widows

I need a quote-environment to end with source-references in a new line, flush right. Simply using \begin{quote} QUOTED TEXT \begin{flushright} SOURCE \end{flushright} \end{quote} ...
3
votes
1answer
556 views

Aligning twice in eqnarray

I do have the following equations wich are aligned on the equal sign. Would it be possible to also align them on the R? \begin{eqnarray} \delta O_{1x} &=& R \, ^E\omega_x \, \delta t ...
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 ...
22
votes
2answers
7k 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} ...
5
votes
2answers
996 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} ...
4
votes
5answers
3k 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
233 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
282 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
973 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 ...
2
votes
1answer
487 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
885 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
711 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 ...
4
votes
2answers
903 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
152 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, ...
35
votes
4answers
95k 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 ...
13
votes
3answers
9k 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 ...
6
votes
1answer
552 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
9k 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 ...
6
votes
1answer
3k 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
798 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
894 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 ...
70
votes
2answers
63k 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
352 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
2k 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
8k 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 ...
23
votes
5answers
13k 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
476 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
914 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);" ...