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

8
votes
2answers
21k views

center and \centering both add space above; \centerline does not

The nag package suggests I use the center environment in LaTeX, rather than the TeX \centerline command. When I do that, however, I find that the former inserts a blank line above the line (in my ...
4
votes
1answer
676 views

Alignment horizontal subcaption and TikZ

I have a problem with the alignment of 2 plots. The Problem is I want the captions to be horizontal aligned. Also the x-axis should be horizontal aligned! Is there a way to do that? ...
5
votes
3answers
205 views

Aligning items inside a list

I'm trying to recreate a list in some work I'm doing and struggling to get all of the component parts to align. The list in the middle there is what I'm trying to replicate. Does anyone have any ...
2
votes
2answers
218 views

Table alignment

I'm not an expert with the tabular environment...I have some problems: I got an error "Extra alignment tab has been changed to \cr." I would like to have the professor name completely to the ...
1
vote
1answer
412 views

Problem with side by side figures and captions

I want to have 4 figures side by side and centered in my paper. I am using this code. The problem is that captions and figures are not aligned. It seems captions are in correct position, but figures ...
19
votes
1answer
9k views

Center-align the verbatim environment

I am trying to center align the content of a figure that has verbatim text in it. But the verbatim text is always right-aligned: \begin{figure} \centering \begin{verbatim} some text here ...
6
votes
2answers
909 views

Disable indentation in enumerate temporarily

I would like to place an unindented \fbox inside an enumerate environment. \begin{enumerate} \item Some text. \par\fbox{a} \item Some more text. \end{enumerate} The above code produces: ...
6
votes
1answer
689 views

How to get a properly indented custom enumerate list (with checklist-style blanks)?

I'm trying to make an enumerated checklist that looks like this: Paragraph text here that says really cool stuff. Notice how the list after is properly indented ___ 1. Thing 1 ___ ...
3
votes
1answer
429 views

Special chapter title formatting

Using the book class. I would like to have chapter titles that look like this: | CHAPTER ## | | Chapter Title (italic) | Can titlesec do this?
1
vote
0answers
317 views

How to specify the the column width but also keep the cell content center horizontally? [duplicate]

I want to specify the width of the column but also keep the content centered. How can I do that? Here is my code \begin{tabular}{p{6cm} c c p{2cm} p{3cm}} \Xhline{3\arrayrulewidth}\hline ...
25
votes
4answers
878 views

unexpected interaction between \raggedright and \parshape

While answering Random start of line, I came upon a strange interaction between \raggedright and \parshape. If a ragged-right paragraph ends in a short line, this line will be "the most ragged". ...
5
votes
1answer
4k views

Combining leftskip, rightskip and raggedright

For some text (\blindtext below), I would like to add 20pt to the left and right page margin, and I would like the text to be raggedright (no hyphenation). The first try below does not add 20pt to ...
0
votes
2answers
16k views

Caption of an image doesn't follow flushleft

Hello I want to place a photograph in a page so i write: \begin{figure}[h] \caption{H Feistel Function } \begin{flushleft} \includegraphics[scale=0.7]{func} \end{flushleft} \end{figure} I face 2 ...
1
vote
1answer
94 views

how to create a two column table for differentiating?

I want to compare two types of networks. I have 4 comparison points. How should I create a 2 column table where every of those 4 points for both networks is aligned?
1
vote
2answers
147 views

How to display formulas?

I am using the following format for all \begin{math} newP = p + vt + 0.5a(t square) \end{math} How do I from left justified to centrally justified leave one blank line before and after the ...
0
votes
1answer
157 views

LaTeX commands for centering the equations without numbering them [duplicate]

What LaTeX commands should I use to center the equations on the page, but without numbering them?
4
votes
1answer
497 views

Center subfigures; fix TikZ error

I am trying to center some figures produced by TikZ. In my example, I have three large Tikz pictures that are separate figures. I also have the same three pictures, but this time as subfigures. All ...
2
votes
1answer
149 views

Issues centering table headers [duplicate]

I already asked how to best align header rows in a table especially in a tabu environment. Align (center) header row in table The two identical solutions worked great for one table but I am having ...
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,}\\ ...
4
votes
1answer
309 views

floatrow and dirtree clash

I am using dirtree to visualize a directory structure. It needs to be embedded into a float as to avoid problems when a pagebreak occours. This works fine except when loading floatrow which i use to ...
1
vote
1answer
154 views

Alignment for equations with numbering in enumeration environment and in environment of cases

I have problem of alignment in the following, please check and suggest solution: \begin{enumerate} \item \begin{equation} \kappa_{a,b}(t)=\begin{cases} e^{at}, & 0\leq ...
4
votes
2answers
2k views

How to anchor labels in tikz for baseline alignment

LaTeX handles subscripts and superscripts nicely, automatically correcting for various sizing and placement issues. I am trying to build a function that works like subscripts and superscripts, but ...
4
votes
1answer
6k views

How to get column alignment in tabularx? [duplicate]

When I put X in column specifier, how can I define column formatting? How can I get center alignment? Currently I am putting \centering, but that is not a proper solution. This is my code: ...
3
votes
2answers
1k 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
2answers
2k views

Horizontal alignment of multiple glossaries

I utilize the glossariespackage with acronym option as well as an self-defined symbols list. Unfortunately, each glossary aligns different horizontally. Is it possible to make them aligned? Otherwise, ...
6
votes
1answer
140 views

Conditional centering if single line

I would like to define a new environment that centers its contents if it can be typeset on a single line, but justifies the contents if it requires multiple lines. \documentclass{article} ...
4
votes
1answer
653 views

Latex leaves blank space in references

I am using the official IEEE template for writing a paper in latex. The references are not stored in a separate file, but are appended at the end of the main .tex file in the \begin{thebibliography} ...
1
vote
1answer
520 views

Right aligned text in minipage vs. longtabu

After some brute-force attempts I found out that I could right-align two lines in a longtabu cell as follows: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} ...
5
votes
2answers
2k views

\raggedright behavior with minipage and tabbing

In the following 3 examples a minipage with a nested tabbing environment is used to show several aligned lines of text. (This is part of a larger example.) Output of pdflatex : The first example ...
6
votes
1answer
223 views

Align math contents in a table

While trying to display some data in a table, I use tabu and siunitx. I want the content to be centered by the dot. However, the cell at last column, first row is not centered. ...
9
votes
1answer
432 views

Replacing Leading Minus Signs in Environment

In this question concerning negative signs and the alignment of entries in matrix environments, Heiko Oberdiek gave a great answer in which he uses a user-defined command called \matminus instead of ...
8
votes
3answers
5k views

How can I align multiple cases environment simultaneously?

In one big align environment, I want to put some cases environments. I would like the alignment of the cases environments to be the same. For example, if I write: \begin{align} f(x) &= ...
5
votes
1answer
378 views

LaTeX align/distribute objects à la InDesign?

I'm trying to replicate, in LaTeX, InDesign's align and distribute tools. This is a snapshot of ID's toolbar: Say I want first to align vertically two objects (texts, graphics, boxes,...), and ...
7
votes
1answer
2k views

Text alignment issue in custom Table of Contents

As you can see from the image below, I have an issue with the text alignment of extra long chapter names. How can I fix it so that the text will not go further left than the start of the chapter name? ...
7
votes
1answer
393 views

labelsep in enumitem: stretch ignored

As the title says: labelsep setting in the enumitem package ignores the stretch part. I would be happy to have a stretch there (in the end actually the current font's interword stretch achieved by ...
2
votes
1answer
183 views

IEEEqnarray specific aligning

Is it possible to align the second row as to where it is, and align the third row with = sign? I'm new to LaTeX, so I only know basic stuff. This is my code: \begin{IEEEeqnarray}{rCl} ...
2
votes
3answers
256 views

Centering figure consisting of subfigures

I currently have a graph that uses subfigures as follows: \begin{figure}[!htbp] \centering \begin{subfigure}[b]{0.3\textwidth} \centering ...
5
votes
2answers
322 views

Centering long sentence causes strange vertical spacing

In the following MWE I have a centred piece of unbreakable text. Problem is that this causes an extra bit of vertical space, so that visually the centred text is not vertically centred between the two ...
3
votes
3answers
392 views

aligning numbers with brackets in tables

I am attempting to use Latex to present financial statements. The majority of the work involves the tabular environment with numbers presented in columns which I have set as ragged right. My problem ...
11
votes
2answers
277 views

Centering all tables in a document with etoolbox

(I know there are already other questions about centering tables such as this. This question is specific to etoolbox.) How do I center all tables using etoolbox? I can do ...
1
vote
1answer
422 views

Centering Math Formulas

I am using LaTeXila in Ubuntu and I want to center my math equation so I have this written: $\[ 2^{10} \]$ But when I try to compile into PDF, it outputs the error: Bad math environment delimeter ...
7
votes
2answers
172 views

How to align terms in separate lines in this case?

I want to get another variant for the alignment points in my question answered by Hendrik Vogt, see How to construct a long equation that is split in LHS and RHS to occupy a narrow column?. ...
16
votes
1answer
3k views

right description list LaTeX beamer

How to do right align a description list using beamer? Name | Joel Spolsky Address | Some address Using the enumitem package as suggested in Description list with right alignment of ...
6
votes
2answers
264 views

Alignment between material inside and outside a cases environment

In the code below, I'd like to make the i=0,\ldots,n. line up, in the output, with the cases in the first part of the definition. Ideally, the full-stop would align with the semicolons and comma. ...
16
votes
1answer
1k 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 ...
5
votes
1answer
70 views

Table of numbers adaptable to various widths

It's been a while since I asked an embarrassing question, so here is one for your amusement: I want to print a table of numbers that is able to adapt to various column sizes so can't use a tabular ...
1
vote
0answers
266 views

Custom quote formatting [closed]

I have a .cls in which I have quite a bit of formatting... I'm trying to make a way of making my own "quote" formatting. I need to format my quotes centered, with a limited width for each line, and ...
3
votes
1answer
3k views

Alignment near left margin in beamer

I'm trying to get beamer to have the same left margin for itemize environments and normal text (and for the symbols in the itemize environment to be aligned with the slide title). That is, I want a ...
2
votes
1answer
1k views

How to left align footnotes under tabularx in a minipage

I am new to LaTeX, trying to create a table using a tabularx in a two column format. I am creating the table in a minipage so that footnotes can appear at the bottom. Everything works out fine, but ...
1
vote
0answers
45 views

Alternating equation numbers [duplicate]

Possible Duplicate: Equation numbers in outer margins Is there a way to put equation numbers to the outer edge of a two-sided document? Some kind of mixture of leqno and reqno which puts ...