{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
389 views

Chess Opening Document

I am trying to make a PDF with Chess Openings. Before I used skak but now I am converting it to texmate. I want to put the mainline in bold as centered text. I also want the diagrams centered. At this ...
2
votes
2answers
96 views

Align equations: What is wrong here?

\begin{align*} \text{Mean: }\\ E[Y] & = f(y) \cdot 0 + \sum_{y=1}^{\infty} f(y)\cdot y\\ & = [p_i + (1-p_i)e^{-\lambda_i}] \cdot 0 + \sum_{y=1}^{\infty} (1-p_i)\frac{e^{-\lambda_i}\lambda_i^y}{...
2
votes
2answers
2k views

Align position of decimal point within tabularx

I have made a table with 5 columns, of which I'd like the last 4 to be of the same width. Therefore I was told I should use tabluarx. Using this package my output looks fine, but I have also numbers ...
6
votes
2answers
1k views

Left-aligned display math mode

How could one achieve, as primitively as possible, left-aligned display math so that \abovedisplayshortskip would still work as intended? It is my understanding that one can achieve left-alignment ...
5
votes
1answer
11k views

Centre an image, ignoring margins

I have a document with .5cm margins; I want to include a long image which will span the width of the page, ignoring margins. I don't care about the whole image being visible (or which part of the ...
0
votes
1answer
128 views

How to justify a very long ciphertext and corresponding plaintext in Latex? [duplicate]

I have a very long ciphertext and corresponding plaintext both are of 680 alphabets without space to print in a latex document. I have not found any way to make justify it in internet. Any Ideas ...
6
votes
2answers
629 views

Horizontal alignment argument for 'subscript' of \underbrace

The picture below shows what I'm able to produce, but what I'd really like is to have the "coefficient" text aligned to the right (meaning that the tip of the \underbrace points to the 't') and the "...
5
votes
1answer
91 views

Trouble getting table centered

I'm using the aastex document class (trying to get a table done in the Astrophysical Journal format) and I have this table I'm trying to produce but it keeps getting right justified almost to the ...
3
votes
1answer
71 views

Alignment of the titles in a ToC and \Roman{section}

There is a problem with the alignment of the numbering of the ToC: When we use \renewcommand{\thesection}{\Roman{section}} the numbers encroach on the titles. When the command is commented out, ...
26
votes
7answers
978 views

Writing a table with equally spaced columns, based on the widest column

Friends, I'm trying to generate a table in which I have all columns equally spaced (same width). In my case, the width for all columns would be the width of the widest column of the table: \...
3
votes
2answers
806 views

Alignment of items inside and outside Beamer {columns} environment

I've noticed that items inside and outside Beamer's columns environment are not aligned horizontally. Is there a way to fix this? Code \documentclass{beamer} \begin{document} \begin{frame}[t]{...
1
vote
1answer
122 views

Very wide equation ruins consecutive side edges

I've just created a set of equations in matrix form which looks fine. It also seems to fit in the space of my document, but in the following space after the equation, the side edge is suddenly gone, i....
5
votes
3answers
1k views

Noindent in \thanks, left align

I am using the following command in WinEdt to have the corresponding author contact info at the footnote. I used \\ to have a new line since it was long. I have two problems. First I need to left ...
0
votes
0answers
38 views

Remove extra space to the left of aligned environment [duplicate]

To typeset a collection of equations with alignment, I am using align* from amsmath. Some of these equations have right-hand sides that have multiple lines that should be indented. So far I am using ...
5
votes
3answers
1k views

Change enumerate label alignment in Beamer

I would like to add enumerated lists to a Beamer presentation. Here is a minimal example: \documentclass{beamer} \setbeamertemplate{enumerate subitem}{\Alph{enumii}} \setbeamerfont{itemize/enumerate ...
10
votes
1answer
1k 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: \...
2
votes
1answer
148 views

Overriding default column alignment for headings - can you explain this behaviour?

Thanks to various threads on this site I have almost managed to construct a readable table! In particular I have added \newcolumntype to allow me to insert \newline into my tables, and I have ...
5
votes
1answer
948 views

Multi-line and centered title and content in longtables

I have a longtable setup where to save space, I have to make a column title multi-line and its contents centered while being applied with custom width. Out of the three I have only successfully ...
4
votes
1answer
160 views

flacards package: how to disable centering?

I want to create flashcards with the flacards package. However, this package automatically centers everything you write on the cards. Is there an easy way to disable that? I want to write cards that ...
7
votes
2answers
89 views

Whitespace around characters

I need to wrap some of the characters with whitespace so that the terms align correctly $\begin{align*} x = 1 + 2 + 3 + 4 + \cdots + n \\ x = n + (n-1) + (n-2) + (n-3)+\cdots+ 1\\ \cline{1-2} 2x = (1+...
5
votes
1answer
188 views

Left align title with blue background, matching a style

I'm trying to replicate a journal's titling style in LaTeX specifically one that looks like this: So far I've got this: \documentclass[11pt,a4paper,twoside, twocolumn]{article} \usepackage[utf8]{...
6
votes
3answers
231 views

alignat inside align environment?

Why can't I nest an alignat environment in an align environment? \begin{equation} \label{eq:115} \left\{ \begin{aligned} \begin{alignat*}{2} &U(x,y,z,t)=\int\frac{x'-x}{r^3}[...
4
votes
2answers
208 views

Show stretch/shrink of whitespace in the line

Is there an option or package, to show the amount of stretching or shrinking TeX has done to justify each line? If there is none, how could this be implemented? It should look like the black bars the ...
4
votes
1answer
442 views

Justified Itemized List

i would like to have a justified list, so that each item in the list is justified within a specified column. For example, if i had the list 1. Lorem ipsum dolor sit amet 2. cu sed laoreet debitis ...
5
votes
2answers
2k views

LaTeX moderncv classic: Change the width of the title

I'm looking to change the width of the \title environment in the moderncv template. As it is now, the maximum width of the title under my name goes all the way to the "address"/information box on the ...
3
votes
1answer
103 views

Aligning text inside tabular

I have a table with one column being dates, then other column something about the dates: \documentclass[margin,line,pifont,palatino,courier]{res} \usepackage{pifont} \usepackage[latin1] { inputenc} \...
8
votes
2answers
239 views

Align position of a table exactly to another one

I have a problem. I just made a table which was very wide, so I decided to split it into two smaller ones. Turned out the 2nd half is a little bit smaller in width than the first one. Now I want these ...
8
votes
2answers
137 views

How to align only some equations in an align environment?

Here's what I got: \begin{align*} P[E_{m}] &= P[m] + P[2m] + P[3m] + \dots \\ &= \frac{1}{\varsigma(s)} \langle m^{-s} + (2m)^{-s} + (3m)^{-s} + \dots \rangle \\ &= \frac{1}{\varsigma(s)} ...
6
votes
1answer
200 views

Column alignment in ltablex

I tried to apply the method proposed in How to get column alignment in tabularx? to right align cells in a ltablex. However I have a problem when the size of the table is just enough for my columns: ...
4
votes
3answers
2k views

Center subequation of multiple lines

I would like to keep my style of subequations but I also would like to center these subequation, which is on multiple lines (because it's length). So that means, the second part/line of the ...
2
votes
1answer
332 views

Left aligning cell contents in a table

If you compile the code given below, then the row which states "Average Pre-Authentication Response Time" is justified with a lot of spacing between the words. I want it to be left-aligned. Also, if a ...
4
votes
2answers
167 views

How to make this equations aligned

I have an equation as below, I want text1 and text2, text3 are aligned as well. \begin{equation} \begin{aligned} A &= B \quad \text{text1}\\ C &= \begin{cases} 1 & ...
9
votes
1answer
19k views

How to align caption with table? [duplicate]

\documentclass[letterpaper,12pt]{article} \begin{document} \begin{table} \caption{Test test test test test} \begin{tabular}{c c c c} \hline\noalign{\smallskip} $V_{a}$ & $B$ & $r$ & $e/m$...
3
votes
1answer
184 views

Vertical space in interaction with figure/center environment

I misused the figure environment to insert some vertical space and now try to replace it by center. However, the two environments behave differently when I use a scaled box as content of the figure/...
3
votes
1answer
1k views

Place the sender address on the left side in moderncv cover letter

In Germany it's common to place both the sender and recipient on the left side of a letter and the date on the right side. Is there a possibility that I can change the cover letter layout accordingly?...
4
votes
1answer
454 views

Centering column in alignat environment?

How do I center the contents of each cell in the middle column? I am approximating it with \phantom, but there's got to be a better way. \begin{alignat*}{3} &E&\quad&\mathrm{par}&&...
3
votes
2answers
576 views

Can't break a line in \maketitle with \raggedright

(This is, in a sense, a follow-up to Insert text between title and author). When using \raggedright in the preamble, LaTeX throws an error when I use a linebreak command \\ in \maketitle. How can I ...
3
votes
2answers
457 views

Multi-line indentation using description [duplicate]

I'm having trouble using description. I would like the separation between my label and my description to be the same distance for each item, and have each additional line also be properly indented to ...
4
votes
0answers
40 views

I want to align two consecutive align environments [duplicate]

Here is what I have: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &f(x) = y \\ &f(g(x)) = g(y) \\ &15 \end{align*} Here is some text commenting on the ...
2
votes
1answer
189 views

$$, \[ \] and equation environment alignment

I'm using scrreprt class and I'm having troubles with different behavior of $$ and \[ \]-written equations and equation environment. The problem is that alignment is not the same: $$ equations are ...
0
votes
0answers
25 views

In-line comments in align? [duplicate]

Is there a way to insert comments at the end of a line, within a block of TeX? For example, something like the following $$\begin{align} &(B \cap A) = (C \cap A) \\ 'given &(B \cap A) \...
3
votes
2answers
1k views

Different caption styles for figures and for tables

I need to have different caption format for figures and for tables. Captions for figures have to be centered and captions for tables - left aligned. How to define this?
6
votes
3answers
155 views

How do I center this wide table in LaTeX?

I have a very wide table (wider than textwidth) generated with Hmisc. The table is so wide that when centering is used it is automatically left aligned. However, everything that I have tried gives an ...
3
votes
2answers
326 views

Align part questions in the exam class

I wonder how I can align the part questions in the exam class. MWE: \documentclass[12pt, norsk,a4paper]{exam} \usepackage{babel} \usepackage[utf8]{inputenc} \usepackage{fouriernc} \usepackage{...
7
votes
2answers
866 views

How to horizontally align all characters like a typewriter

I want to make a document that looks like an old top secret file written on a typewriter. The problem is that when I want to use a center environment, the alignment of the characters is off. Is there ...
6
votes
2answers
2k views

Text alignment using fix anchor positions in TikZ

I created some biological drawings using Dia and exported them as TikZ TeX code. I want to define some commands that insert these drawings and add some text to them. As there is a lot of text and ...
5
votes
2answers
171 views

Aligned Environment Not Aligning a Single Operator

So, I'm typesetting a solution to a Quiz I gave, and the aligned environment (inside of my equation environment) is giving me an incorrect alignment on only one of my operators. Here's the batch of ...
5
votes
2answers
118 views

Align: one line centered and the next right-justified

Consider the following code: \documentclass{amsart} \usepackage{amsthm, amssymb, amsfonts} \begin{align*} F_{X^2}(x) = P(X^2 \leq x) = P(X \leq \sqrt{x}) = F_{X}(\sqrt{x}) = \sqrt{x} \\ F_{Y^2}(...
5
votes
1answer
236 views

Align \itemize and \tabular horizontally

I have an \itemize list and a \tabular table, how do I get them to align horizontally on the the same line? This is what I have so far: \documentclass[8pt, a4paper,twoside]{article} \usepackage{...
8
votes
3answers
419 views

box the size of A containing B

A thing I'd often like to do is put in my document a box the size of some text A and containing some other text B. For instance, I have two tikz nodes, one containing $n$ and one containing $n+1$, and ...