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

3
votes
1answer
183 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
442 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
564 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
447 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
188 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
153 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
316 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
851 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
164 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
234 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
417 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 ...
6
votes
2answers
249 views

How to match left alignment of equations in math mode outside and inside an array?

My code is shown below, every equation is left aligned, my problem is that the equations inside the array enviroment seem to be indented. How can I align all the equations to the same vertical line? \...
6
votes
2answers
167 views

How can I automatically center all floats including subfloats?

This is a follow up to here. I am using this in my preamble: \makeatletter % inserts a "\centering" to every floatbox. \g@addto@macro\@floatboxreset\centering \makeatother I am having two ...
4
votes
1answer
949 views

Dotted line in ToC despite \cftsetpnumwidth

Using the package tocloft I have a problem with the dotted line in my ToC. For I'm using roman page numbering I have numbers of about XXVIII or something like that which is too wide for the obviously ...
6
votes
1answer
3k views

Left-Align Table in Beamer Presentation

I have a table within a frame in a presentation using the beamer package, and it's centered in the frame right now: \subsection{Results} \begin{frame}{Results} \begin{table} \begin{tabular}{l|l|l|l|...
3
votes
1answer
103 views

Hyphenation problem on very narrow column and \flushleft

I have a strange problem with hyphenations, when the column is very narrow. My text is finnish and I'm using lualatex. In my narrow column, I have words "Ympärileikkauksen liitto". It breaks up as ...
7
votes
1answer
743 views

TikZ graph not aligning

I am having two issues with TikZ pictures. I have three graphs side by side, and I am having issues, but only with some of them, which is very odd. First the x-axis is going out of alignment (some ...
2
votes
1answer
480 views

TikZ table text alignment

I'm having trouble aligning text inside a TikZ table. It currently just centres the middle letter, despite the align=left. I also tried using: row 1/.style={nodes={align=left}} (as suggested in ...
37
votes
2answers
873 views

Does combining microtype with ragged right make any sense?

My impression when using microtype in a document that used \RaggedRight (everything said is probably true for \raggedright as well but who cares really ...) always was that all lines just get ...
5
votes
1answer
952 views

How to automatically align subfloat captions to xlabel of PGFplots?

Subfloat captions are not usually aligned with their corresponding xlable in PGFplots. One way is to manually move the captions horizontally to align them. For example, (copied from here) \...
14
votes
1answer
456 views

align* environment left-aligned with LuaTeX and RTL math direction

When using LuaLaTeX, with the math direction set right-to-left, the contents of an align* environment is left-aligned instead of centered. Why does this happens? How can I fix it? \documentclass{...
6
votes
3answers
3k views

Left-align all equations in a block

align environment without any explicit alignments points (given by &) right justifies the equations in the block. They can be left justified by putting & at the beginning of each equation. Is ...
5
votes
1answer
329 views

Centering commutative diagram (using diagrams package)

When one has long text in a centered commutative diagram, apparently the diagram is centered as if the long text wasn't there. The result is that the diagram does not appear to be centered. I would ...
3
votes
1answer
256 views

Aligning two captions in tables

I would like to have two captions for some tables and figures, where the first caption describes the general content and the second caption provides some additional information. The idea is to have ...
2
votes
1answer
1k views

How to change table row heights and center their contents?

How can I decrease(or increase) the row height of a specific row in a table and center its content both horizontally and vertically? A related answer discusses how to decrease the height of a row, ...
0
votes
0answers
22 views

LaTeX, formatting entries in tables [duplicate]

I've seen plenty of problems with making tables in LaTeX formatted the way the programmer would prefer. And some of those have helped me fix my own doument to the point I am not at I am creating a "...
2
votes
1answer
279 views

nomencl formatting issue. How to have the description right aligned?

I'm using Nomencl package and is working fine. What I do not know how to do is to have the description part starting from the right margin of the page and the symbol part starting from the left margin....
1
vote
1answer
478 views

Using lstlistings in two columns

My goal is to display source code (awk, Python, R and SAS) and text (their output) side-by-side. Both are loaded from external files, and can be pretty long sometimes (pagebreaking is inevitable), the ...
1
vote
1answer
498 views

How to shift a large graph to the left

Basically, I have a large graph, which take almost half a page. Right now, when I compile the tex file, the graph shifts to the right on the pdf. I have label and caption on this graph. How can I ...
1
vote
1answer
104 views

Table lines and alignment problem

I'm using sidewaystable environment with the following configuration: \documentclass[a4paper,oneside,12pt,openright,final,oldfontcommands]{memoir} \usepackage{multirow} \usepackage{booktabs} \...
2
votes
1answer
216 views

How to align a node's text RIGHT, i.e. at the end of the line?

I'm drawing a diagram with nodes and I have to have the inner text of one node at the END of the line, i.e. at the right side, not left, not centered. Unfortunately I didn't find a way nor information ...
2
votes
1answer
924 views

Align tikz node labels

I have created the following picture using tikz: \tikzset{ graphnode/.style={ draw,fill, circle, minimum size=0.7mm, inner sep=0 }, } \begin{tikzpicture}[every node/....
8
votes
1answer
539 views

What is the purpose of \crcr in an \halign preamble?

I know that the point of \crcr is to be a kind of "backup \cr" in \halign/\valign, in that it only adds a \cr if it wouldn't result in two in a row. Nonetheless it seems to find its way into the \...
1
vote
1answer
461 views

Right aligning pagenumbers in index with imakeindex

I am trying to right align the pagenumbers in my index. I use imakeidx and tried to use a custome index style file (.ist). I would like to keep the two column layout of imakeidx. I tried using \hfill ...
1
vote
1answer
767 views

chemfig chemname alignment

I wish to have a reaction in \chemfig and write some details under each molecule so am using the \chemname command. It puts the text under the molecule. However, as I have arrows in the reaction ...
10
votes
2answers
9k views

Center text in a single table cell

Suppose I have simple table. While I want the columns in general to be flush both right and left, there are certain cells that I want to be centered. \documentclass[12pt,a4paper]{book} \def\x{This ...
4
votes
2answers
1k views

description begins on a new line without indent

I am using this method to write description in a new line in beamer, But how can I remove the indent at the new line so it aligns with the \item[]? This is what I have right now. \pdfminorversion=...
3
votes
1answer
365 views

How to center Display equations on ClassicalThesis

While using ClassicalThesis package with scrbook document, I noticed that the display equations defined with \[...\] aren't centered in the page as with scrbook without the ClassicalThesis package and ...
0
votes
0answers
29 views

URLs and justification [duplicate]

I am having difficulties in keeping long URLs inside the correct margins in LyX. I can understand why there are difficulties in hyphenating URLs at a point that will ensure the average reader will ...
3
votes
0answers
516 views

Evenly split the columns of a multirow table in lyx

I would like to have a table like this: % Preview source code %% LyX 2.0.6 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \...
4
votes
1answer
1k views

Changing the table of contents width

In setting up a table of contents, by default the TOC spans the entire width of the page, regardless of the length of the section titles. I would like to have the entire TOC be only as wide as it ...
1
vote
0answers
228 views

Chapter-dependent even header does not flush left [closed]

[EDIT: Editing this post to comply with observations in comments] I am editing a conference proceedings and can't get the author names in the left (even) header to flush left (close to the page ...
4
votes
2answers
421 views

Horizontal alignment of text blocks

I want two text blocks in a horizontal row. In the middle between them, there should be an arrow pointing from left to right. This is what I currently have: As you see, the arrow is not in the ...
6
votes
1answer
309 views

Termcal calendar not centered

For some reason, my termcal calendar is not being properly centered by being placed within a center environment. The MWE is: \documentclass{article} \usepackage{termcal} \begin{document} \begin{...