{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
2answers
918 views

Alignment of columns of nested tables (tabularx)

I want to nest 2 tabularx tables: the columns of the "inside" table belong to a column of the "outside" table and therefore shall be indented and have a vertical line on their side. I tried to do ...
2
votes
3answers
2k views

Align Quote to right

I want to align \begin{quote} Text Author (\cite{Source}) \end{quote} to the right side of the paper. How can I do this?
5
votes
1answer
5k views

How can I use an align environment flush right?

Is there an option analogous within the align environment to the left align for right align, i.e. fralign. MWE: \documentclass{article} \usepackage[fleqn]{amsmath} % Instead have [freqn]. ...
17
votes
2answers
423 views

Why do I have to put the center environment in a group for \@afterindentfalse\@afterheading to suppress indentation?

Consider the following two macros, the only difference being that one has the environment inside a group: \documentclass{article} \makeatletter \newcommand\thisworks{% {\begin{center} $\ast$ ...
16
votes
2answers
9k views

Dynamically size arrow \mapsto in function definition

I have the following diagram: However, this looks a bit ugly, I would like a version that looks a little bit better. For example, size the last arrow such that the T_\phi is moved to the right. ...
2
votes
1answer
222 views

New command for inline text

As I did not get an answer I was fully satisfied with in my last thread, although there were many great suggestions. I will therefore try to rephrase my question here. I also have some new inputs, ...
18
votes
2answers
12k views

\flushleft with p{} option in tabular

If I have defined tabular alignment with the p{} option, \begin{tabular}{p{.3\textwidth}p{.7\textwidth}} ...(contents)... \end{tabular} Is there a way to specify that I want it \flushleft without ...
4
votes
2answers
4k views

Multiple Tab stops in Math Split?

I am using mathmode with split. How can you use multiple tab stops. I want to span an equation across multiple lines, but then the last few I want to indent even more. \[ \begin{split} some& ...
11
votes
2answers
2k views

How to align comments with lstlistings?

I am using listings with these settings: \lstset{language=C++,basicstyle=\small\sffamily, numbers=none, frame=tb, columns=fullflexible, showstringspaces=false } I like the proportionally ...
7
votes
1answer
2k views

Table of contents (minitoc, parttoc) and line breaks

I have to make a table of contents for each part of a book document. I use minitoc package, and \parttoc command. I have line breaks (\\) in the chapters and sections titles in both [] and {} ...
2
votes
1answer
745 views

Text justification in mla-paper package

What command should I use to justify the entire text, both right and left, in mla-paper style package.
6
votes
6answers
2k 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 ...
4
votes
2answers
1k views

How can I insert address blocks on the left and right side of the page?

I want to insert my local address on the left side of the page and my permanent address on the right side of the page. However, I want both address blocks to be left-aligned. Basically, I want ...
22
votes
3answers
36k views

Indent an entire paragraph / section?

I am writing a document with some odd spacing. I am copying another document, and therefore the layout must be almost exact. I have sections divided by letters below, and some paragraphs in each ...
1
vote
2answers
840 views

Matrix gauss package problem with alignment

So far I am using the gauss document package, because it offers to show row operations. Now If i try to add fractions inside the matricies, or - signs things gets messy... The text will not align ...
14
votes
2answers
5k views

Array with labeling columns

Is there an intelligent way to label (or name) columns in a matrix? I would like to have something like \[M=\left[\begin{array}{c|cc} 1 & 2 & 3\\ 4 & 5 & 6 ...
6
votes
2answers
153 views

How can I float some text to the right of the first line of a paragraph?

I'd like to put some right-aligned text on the first line of my paragraph, and have the rest of the text wrap around it, like this: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed ...
2
votes
5answers
5k views

Centering tabular array of images

I have a tabular array of four images and I am not able to center it. My images are pushed towards the right edge of the sheet. The centering looks fine for single images , so I am guessing this issue ...
7
votes
2answers
2k views

Equations in the margin: automatic flush right or left?

How can I automatically have equations in a \marginnote aligned flush left or right in a two-sided document? A previous question suggested to make equations flush left by using flalign* and extra ...
16
votes
5answers
7k views

How can I properly align the line numbers of a source code listing with the margin?

I want to include a code snippet in a document using the listings package. In my document, I have the following: \begin{figure}[!htbp] \setlength{\fboxsep}{0pt}% \setlength{\fboxrule}{0pt}% ...
8
votes
3answers
4k views

Aligning text off-center

I am wondering if there is a recommended way of centering text at a certain point in a line of text? When trying to align monospace characters on multiple consecutive lines, alignment is fine with ...
7
votes
2answers
435 views

Tab not as extra alignment tab

Is there a way to have LaTeX render the tabs in a tabular environment to determine the columns so that there is no further need for the ampersands & ? Most of the time the columns only contain a ...
1
vote
1answer
545 views

tabular align with irregular number of rows

I am trying to set up a tabular system like the one below, but latex does not seem to want to work with different number of elements in each row. Any way to fix this ? |Prime numbers| | Integers | ...
4
votes
3answers
473 views

Dual table alignment and lines

I have a table that is to big to fit in the page width, thus it is separated into two tables. The truth is that I only use one table but insert an empty row in the middle so that the columns stay ...
5
votes
2answers
3k views

Center text node

I currently have the following TikZ code: \documentclass{scrbook} \usepackage{tikz} \begin{document} \tikzset{ tlstartyear/.style={ name=tlstartyear, above=5pt, ...
5
votes
4answers
706 views

Problem with the alignment of characters

I am having some trouble in displaying characters in LaTeX. Here is what I am doing. I am performing a binary addition and would like to have all the characters aligned one below the other. Here ...
2
votes
1answer
731 views

Tikz and alignment with two nodes on the same line

Another minimal example: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw=black,% rounded corners=2pt,% rectangle,% bottom color=black!80!white] (A) {node ...
2
votes
1answer
723 views

Flow chart nodes misaligned

I would like to do a flow chart with the first row width the same as that of the second row but just below the first row. I can not do it and actually I don't know how to fix the problem. If anyone ...
2
votes
1answer
379 views

TikZ and different alignments on the same line

This is my minimal example: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw=black, rounded corners=2pt, rectangle, bottom color=black!80!white, text ...
6
votes
2answers
2k views

Positioning of text (box) relative to other text

I'm looking at the first, 'letter class' example in LaTeX/Letters - Wikibooks, open books for an open world. What I'd like to do is to use a \newcommand - say, \insertbox - which would be inserted ...
4
votes
3answers
312 views

Format math definition

$$ A = \{ x_{1}y_{1}z_{1}...x_{k}y_{k}z_{k} : x_{i}, y_{i}, z_{i} \in \{0, 1\}, k \geq 1, \text{ and } x < y < z \text{ where } x = x_{1}...x_{k}, y = y_{1}...y_{k}, \text{ and } z = ...
16
votes
7answers
2k views

Aligning polynomial terms

In LaTeX align, I'm struggling to align polynomial terms and assume there's an easy way to do it. But I cannot find the simple/elegant solution. What I would like is something like this: x1 + x2 ...
6
votes
3answers
4k views

How do I right align certain cells in a (booktabs) table?

I'm very new to LaTeX, and I'm currently waist deep in my first project using it. I'm trying to right align some text in cells in a table. I am using booktabs, not sure if that changes anything (I'm ...
5
votes
1answer
952 views

How to center text between two rectangles in TiKZ?

I have the following TiKZ code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \newcommand{\delim}[1]{\draw(#1,-0.2) -- (#1,-0.5);} \draw (0,0) rectangle (1,1); ...
16
votes
3answers
33k views

How to make enumerate items align at left margin?

I would like to have my lists to have no indent for the top level, i.e. having the same left margin as the surrounding paragraph, with just enough space for the widest label to fit: Paragraph text ...
1
vote
1answer
889 views

How to lower the bibliography's title by 3.3cm? And change its alignment?

I'm running a pretty hacked-up template for my thesis, and the bibliography chapter's title is now too high. (This is due to various changes to the 'normal' chapter titles and their alignment/spacing, ...
15
votes
3answers
43k views

How can I use an align environment flush left?

Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page? MWE: \documentclass{article} ...
1
vote
1answer
488 views

minipage breaking, or some other route to layout

I'm trying to make a resume with a 2 column layout, where I'll have something like [SECTION NAME] * space * [DETAILS] For example: Work experience[spaaaaaaaaaaaaaace]Some location, 2 years, etc ...
3
votes
1answer
1k views

Proper space between hyperref textfield name and text box

I use LaTeX occassionally, but not sure how to get the hypperref text fields to tab up properly. I got sick of using OpenOffice/LibreOffice to convert out PDF's that suck and have poorly done text ...
2
votes
1answer
1k views

How to align the captions in the list of figures?

How to align the captions in the list of figures ? I have the following code: \usepackage[subfigure]{tocloft} \renewcommand*\cftfigpresnum{Figure~} \settowidth{\cftfignumwidth}{\cftfigpresnum} ...
2
votes
1answer
2k views

How to add author an affiliation and their email address and all left aligned

How to add author an affiliation and their email address and all left aligned? title author 1, author 2, author 3 Authors affiliation author1 's email address abstract I'm using a single column ...
3
votes
2answers
20k views

Table caption should be left aligned

How to make table caption left-aligned. I tried \usepackage[singlelinecheck=off]{caption} but it did not work out. In other words it gives an error: \DeclareFloatFont ...
5
votes
3answers
194 views

What's wrong with my file? Equations aligning right, symbols not showing half way through

OK, this is my first attempt at writing my homework in LaTex, and it's frustrating as hell. First, I defined unit vectors "uv" and bold vectors "bv" like so: \newcommand{\bv}{\mathbf} ...
4
votes
2answers
561 views

Align words in cells of a table

Consider a table like this: | text1 | text2 | |------------|--------------| | a b c | AAA BBB CCC | |------------|--------------| | | aa bb cc | ...
3
votes
1answer
2k views

fleqn and \eqno together?

It seems that I can not use together fleqn option [to move the equations to the left] and \leqno [to give a hand-made label to equations]. Any suggestions?
2
votes
1answer
2k views

How to apply \raggedright to my table headings?

Can somebody show me how to apply \raggedright to my table headings in this example? \documentclass[a4paper,12pt]{article} \usepackage{tabularx} \usepackage{booktabs} \usepackage{siunitx} ...
9
votes
3answers
307 views

Remember position of equal sign from one align environment to the next

As you know, the align-environment puts all positions marked with & (normally the equals sign) exactly beneath each other. I now want to save the position LaTeX calculates for & and use it ...
9
votes
4answers
2k views

Centered but left-aligned paragraph

I want to have a paragraph, that is centered but in itself left-aligned. Does somebody of you know how to achieve this? (I have text in a paragraph, on each line the text is shorter than the width, ...
5
votes
2answers
3k views

\bgroup and \egroup?

So I've been looking to expand on the following bit of code (a hack to not screw up the margins when using oversized figures): \noindent\makebox[\textwidth]{% \begin{tabularx}{1.5\textwidth}{XX} ...
14
votes
2answers
6k views

Tables with multiple panels in LaTeX, R and Sweave

I would like to know what the accepted Sweave/R/LaTeX solution is for producing tables with "panels": multiple parts, which may or may not contain the same columns, combined into one table. The ...