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

7
votes
2answers
178 views

\RaggedRight makes document longer

I have a document carefully written to fit in 4 pages; but when I added a \raggedright (or \RaggedRight with use of the ragged2e package) the length gets longer. Furthermore, suddenly the output ...
7
votes
1answer
3k views

side by side minipage figures

I have this code where the part marked A is the same as the part marked B except that .4 in A is .45 in B. Even though they are so similar the first one puts the images side by side with the ...
7
votes
3answers
4k views

How to center blocks and columns in beamer

On a slide with two blocks aligned using columns, the spacing on the left and the right is not equal, ie the pair of columns in not centered on the page as in this example. I've tried enclosing the ...
7
votes
1answer
10k views

Change align of a single cell in tabular [duplicate]

Possible Duplicate: Aligning inside tabular environment, specific cell I have a simple table with a given align. I want to know if there is a way to specify a different align for a cell. ...
7
votes
2answers
433 views

Subfloat indexes misaligned when using setcaptionwidth

I have the following document: \documentclass{article} \usepackage{subfig} \usepackage{graphicx} \usepackage{geometry} \setcaptionwidth{12cm} \begin{document} \begin{figure}[t] \centering% ...
7
votes
2answers
5k views

Text wrap in tables (multirow package loaded)

I searched a bit, but I could not find a reliable way to wrap text in tables with columns spanning more than one row. Any ideas on how to fit this table in the page?: ...
7
votes
3answers
8k 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} ...
7
votes
2answers
106 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?. ...
7
votes
1answer
145 views

How to change the alignment of a tabularx within an easylist?

I'm probably missing something super obvious, but my searching has turned up nothing. I want to put a table in the middle of an outline that I'm making with the easylist package. The table is coming ...
7
votes
1answer
2k 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} ...
7
votes
1answer
353 views

Describing steps in an equation

I am always describing the steps on how a formula is achieved or describing the underlying Mathematical principles taken to solve a problem in the align environment. But the descriptions are not ...
7
votes
2answers
1k views

How to flush right but align left?

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 ...
7
votes
2answers
180 views

Why does 65* become 65∗ when using dcolumn package to align digits?

I am using dcolumn package to align some numbers after the decimal point. However, some of this numbers have "*** signs" in order to relate them to additional information at the end of the table. ...
7
votes
1answer
464 views

How to right align a table in a tikz picture

I currently have set up a command that draws a box with a shadow and some text inside that box. I want it to have a minimum-width, but when I set it, the table is now aligned in the center of the box ...
7
votes
2answers
458 views

\raggedouter to typeset marginal text in twoside book

We used the following code fragment \newcommand{\raggedouter}{% \checkoddpage% \ifoddpage% \RaggedRight% \else% \RaggedLeft% \fi% } to provide a ...
7
votes
6answers
2k views

Nested indentation of text blocks

How can I doubly indent some lines of text? The general idea is... Normal Once indented Once indented Twice indented Once indented ... The following is my attempt but it only indents once. ...
7
votes
1answer
570 views

How to centre my display math overfull hboxes?

I have an overfull hbox which I've decided to live with. Actually, several. However, since they're in \[…\], it would look better if they could remain centered, i.e. overflowing the margins equally ...
7
votes
1answer
69 views

Make numbers in table bold w/o changing width

I want to highlight some numbers in a table using \bf{}. However, the bold numbers also get wider but I want them to neatly line up with the rest. How can I avoid this?
7
votes
1answer
310 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. ...
7
votes
1answer
465 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.
7
votes
2answers
77 views

is it posible to make a multiline itemize justifying the text inside

I am writing technical specs of a programming API. I am using itemize to highlight the method signature as it follows: \begin{itemize} \item[\texttt{packeteer.send(message)}] \hfill \\ is ...
7
votes
1answer
243 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
126 views

Unindent section headings

In attempting to answer Indent all the normal text, I had to resort to using the titlesec package to unindent the section headings. With \let\OldSection\section, I was sure that either ...
7
votes
1answer
245 views

“Nice” way to list pro and contra aspects

I am currently evaluating different alternatives and would like to present a few pro and contra arguments for each possibility. My first thought was to present these arguments side-by-side using two ...
7
votes
2answers
2k views

Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns

I want to arrange four algorithms set with the algorithm2e package in two rows and two columns, as shown in the figure below. I've tried the subfigure package and have also read several related ...
7
votes
1answer
501 views

Align siunitx numbers in a tabu table

The minimal example below gives me a strange offset in numbers with exponential numbers. I think tabu and siunitx are getting in each others way. Is anyone aware of a workaround? ...
7
votes
1answer
91 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 ...
7
votes
1answer
484 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. ...
7
votes
2answers
143 views

Method for aligning nodes of different sizes at specified sections

I'm trying to make a tikz diagram in which I can place nodes with long pieces of text, one above the other, such that I can specify sections which are to be centered (things outside these sections are ...
7
votes
2answers
1k views

Centering a TikZ picture around an area

I often find myself in the following situation: A tikzpicture of mine consists of a main area and some outer material like text labels which are hardly symmetric around the main area. If such a ...
7
votes
1answer
336 views

Align number ranges in table

I have a table column that contains ranges of numbers (e.g. 7--12) as well as numbers that are formatted differently (e.g. < 4). These numbers don't align vertically, no matter what kind of ...
7
votes
1answer
79 views

How to add horizontal whitespace in my text?

I have the following problem: Is there an easy and quick way to change the upper part to the lower? I tried using \hspace, but it had no effect. I'm new to TeX so bear with me ;D
7
votes
1answer
165 views

Bad width of head of longtable

Here is an MWE: \documentclass[a4paper,11pt]{article} \usepackage{soul} \usepackage{amsmath} \usepackage{amssymb} \usepackage{longtable} \usepackage{booktabs} \usepackage{multirow} ...
7
votes
1answer
306 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 ...
7
votes
2answers
323 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 \\ ...
7
votes
1answer
199 views

Aligning on plus sign (as well as decimal sign) in tabular environments using numprint

Is it a bug in the numprint package .. or maybe a missing feature? I can't align on the plus/minus sign in tabular environments, padding numbers with spaces. \documentclass{article} ...
6
votes
5answers
2k views

fully stretch text horizontally on page

Is there a way to fully stretch one line of text on the full width of the page, without manually setting the letter spacing, no matter how many characters on the line?
6
votes
3answers
3k views

LaTeX equivalent of &nbsp;&nbsp;&nbsp; in HTML?

In HTML, to get extra horizontal spacing all I would have to do is: This is textual phrase A&nbsp;&nbsp;&nbsp;This is textual phrase B to get the following output: This is textual ...
6
votes
2answers
213 views

Keeping the distance between mathematical symbols consistent?

In order to make text flushed both left and right, latex adjusts the distance between words, and to a lesser extent, the distance between characters within a word. This is good, however it also ...
6
votes
2answers
110 views

How to move an enumerate environment to the right? [duplicate]

How can I horizontally align \begin{enumerate} more to the right? At the moment I'm using the code below: \begin{enumerate} \item sometext \item sometext \item sometext \end{enumerate} But it goes ...
6
votes
4answers
2k views

Table caption align top-right

How I can align caption for table like this? Current code: \begin{table}[h] \caption{} \centering \begin{tabular}{|l|r|r|l|} \hline № & X & Y & Время ...
6
votes
3answers
558 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} ...
6
votes
3answers
100 views

How can I set a list inside a definition in latex?

I need to write a definition that has a list of items. What is science : Lorem ipsum dolor sit amet, consectetur adipiscing elit. - List item 1 - List ...
6
votes
6answers
991 views

An enumeration of equations with aligned equal signs

I'd like to have something like the following: \begin{enumerate} \item $1 + 1 = 2$ \item $1 = 2 - 1$ \end{enumerate} The thing is, I'd also like the equals signs to be aligned. But I'd like the ...
6
votes
2answers
124 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) &= ...
6
votes
2answers
55 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. ...
6
votes
3answers
148 views

Centering in tabularx and X columns

How can I center the column when using X in tabularx environment like in this example? \begin{tabularx}{\textwidth}{@{}lXXXXX@{}} 1 & 2 & 3 & 4 & 5 \\ \end{tabularx}
6
votes
2answers
235 views

Widths of digits and letters

Within a minipage environment (of a fixed length) I have a list; each list item consists of a phrase followed by an equal sign followed by a percent. The first percent is 60%. I want (1) each ...
6
votes
2answers
2k 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 ...
6
votes
2answers
546 views

How can I have images that are side-by-side and have numbers attached to each one?

For example: *Image 1* *Image 2* *Image 3* (i) (ii) (iii) Figure n. Multiple images. (i) image at time n. (ii) Image at time n+1. (iii) Image at time n+2

1 3 4 5 6 7 23