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

How may I write 'and generally' and the second equation on one line?

Please note that the two equations ought to be aligned; the text and generally should be flush left, but the second equation should be centred. \documentclass{article} \usepackage{mathtools} ...
4
votes
2answers
41 views

Compensating for multispan boxes wider than spanned columns

The code below produces a horizontal alignment with two columns and three lines (see first image below). The first column has its elements flush right and the second column has its elements flush ...
1
vote
1answer
35 views

Boxed equation on the right and its verbatim on the left

How to write a verbatim form of an equation on the left and its output form on the right inside a box?
4
votes
4answers
114 views

A command like `\hspace` calculating the distance from the beginning of the line

I would like to place several blocks of text in one line, but fixing their positions by distances from the beginning of the line. For example (1.2pt from beginning) cat (2.1pt from beginning) dog ...
3
votes
1answer
861 views

Shrinking large matrices by preventing column alignment

I have a relatively large but sparse matrix (say 20x20). Maple has no problem displaying it on a screen because maple does not force the columns to be aligned when the matrix is large enough : element ...
6
votes
1answer
764 views

Nested columns in beamer

I would like to make an A0 poster using the beamerposter package. The poster content should appear in block environments, for which I need a flexible and clean layout handling. In particular, I need ...
5
votes
3answers
93 views

Tricky alignment within an equation with a case environment

I couldn't figure out how to do the following alignment: \begin{equation} \begin{aligned} \textrm{Row I:} \qquad & A = 1, \quad j = 1, 2, \ldots, N \\ \textrm{Row II:} \qquad & A = ...
4
votes
1answer
81 views

Auto-numbering table environment with aligned numbers

I'm trying to create a table environment with: A header row that spans an arbitrary number of columns, aligned, automatically numbered cells with aligned numbers uniform spacing between the all ...
50
votes
2answers
14k views

Aligning numbers by decimal points in table columns

Let me begin by stating that I did google the answers (and I'll reference to them soon). Yet each of the resources I found discussed one particular method, I'm interested in a comparison of the ...
4
votes
1answer
86 views

Shifting graph in TikZ: centre not working

I am having trouble making a diagram align in tikzpicture. At the moment if I use '\centering', my network graph moves to the right of the pdf. If I don't, it is in the left of the pdf. How do I make ...
5
votes
2answers
343 views

Creating a table that uses all available space

Is there a way to use tabular or some other method to create a table that expands to use the entire available space? So if I created a table with 4 rows, each row would use 25% of the space. Thanks! ...
2
votes
1answer
43 views

How to center text in a cell of a longtabu (horizontal and vertical)

I have a long tabu like the one defined last in this question and online here. It looks like this when compiled: As you can see the "point" and "score" text is placed in the buttom right corner. ...
3
votes
1answer
9k views

Left align abstract, title and authors

I would like to re-align my title, authors and abstract to the left of the document. The example in this question is basically the output I want, but I do not want to use the memoir environment. MWE: ...
1
vote
1answer
58 views

Bibliography heading left alignment

I am having following code, due to which the heading of bibliograpy/references is center align, if \titleformat{\chapter}[display] is removed then it is left justified but all the chapter heading is ...
2
votes
2answers
59 views

Center content of a minipage inside of a longtabu

How do you center the content of a minipage that is placed inside of a longtabu? My minipage looks like this and can be found online here: ...
3
votes
2answers
90 views

Vertically center text or math in a framebox

I have the following commands in my code (taken from Creating uniformly sized boxes around text) to manually adjust the height of frameboxes (the reason is that I often put several in a row with ...
2
votes
1answer
41 views

Add right flushed verse number to last line of verse

I'm using the custom Verse environment provided in this answer for producing horizontally centered verses. I would like to add a verse number to the last line of a verse and I would like just the ...
2
votes
1answer
19 views

How can I align the footer so it is generally centered at the bottom of the page?

I am completely new to using Latex and I am trying to set up the basic layout of a document. I want to have a footer that has my name in the left part of the footer, some text in the center of the ...
1
vote
0answers
16 views

Horizontally align \vdots with equal signs in aligned environment [duplicate]

I have a number of equations aligned at the equal sign. I insert a line containing just \vdots to indicate a bunch of steps and then equations again. How I can make the \vdots align with the equal ...
2
votes
2answers
48 views

LaTeX weird alignment

I'm new with stackexchange and I'm not sure if I post this question the right way, please let me know if I need to provide additional information. I can't identify the source of this alignment ...
2
votes
1answer
39 views

Horizontally aligning equations with overset text

Say that for example I have the following set of equations for which I want to use overset to clarify what equations are used: \documentclass{article} \usepackage{amsmath} \begin{document} ...
3
votes
2answers
40 views

How to align text to right without adding additional vertical spacing?

I am trying to simply align one paragraph to the right. However, when I try to use flushright environment, additional vertical space is added above that environment: \documentclass[final]{book} ...
5
votes
2answers
121 views

Create longer arrows

I currently use two relation symbols as shown below. However, as I need to put in quite a bit of information above and, in the first case, also below the arrow, I'd like to have longer arrows. In my ...
4
votes
1answer
58 views

\halign does not affect \prevdepth?

What is the purpose of restoring the initial value of \prevdepth at the end of a horizontal alignment: \prevdepth=.1234pt \everycr{\noalign{\dimen0=\prevdepth prevdepth in noalign: \the\dimen0}} ...
27
votes
4answers
9k views

Justify text in moderncv cover letter

I am writing a cover letter and CV using moderncv. Everything works fine so far, but the text in the cover letter is not justified. I think it is good that it is not hyphenated, but it would look much ...
1
vote
3answers
102 views

How can I fit my table in the text block?

I want to make my table fit in the text block. At the minute, a large part of my table is being cut off at the right-hand edge the page. My code is: \documentclass{article} \usepackage{graphicx} % ...
3
votes
1answer
45 views

Bad alignment in table cell using siunitx table type S

I have a problem with number alignment using the S table type from siunitx package. The numbers are not centered and especially on the right side the number falls out of the table. The ...
3
votes
3answers
74 views

Multiple columns in table, problem with alignment

The following code generates a table: \begin{table}[!t] % increase table row spacing, adjust to taste \renewcommand{\arraystretch}{1.3} \caption{An Example of a Table} \label{table_example} ...
2
votes
1answer
25 views

Header does not align with text frame

I have noticed that my header not is aligning with my text boarder, which I would like. The problem only occurs when I have the part where I adjust the spacing above and below equations. Can anybody ...
4
votes
3answers
73 views

Right align address

I am pretty new to LaTeX and I'm having some issues for creating a motivation letter. I have a nice structure in my mind, but I can't complete it fully. Here's a live example: click. Everything looks ...
3
votes
1answer
116 views

Figure not centered properly in LaTeX, kindly help!

I am making a figure in LaTeX of which the code is given below. In the end result, the figure is not centered in the page, the page offset from the left is more than the page offset from the right. ...
4
votes
1answer
49 views

Simultaneous left and right justification in TOC with tcolorbox

A tcolorbox can have a title and an after title. Is it possible to put them simultaneously in the TOC, the title being left aligned and the after title right aligned ? \documentclass[11pt]{book} ...
1
vote
2answers
79 views

Centering content of table cell in LaTeX

\documentclass{article} \usepackage[a4paper,left=3cm,right=3cm,top=2cm,bottom=2cm]{geometry} % to fit both tables \usepackage{caption} \usepackage{array} ...
6
votes
3answers
14k views

Aligning text in LyX: left/center/right

How can I center/right/left align text in LyX? In Microsoft Word, I can just click the 3 buttons on the toolbar.
2
votes
3answers
155 views

How may I align a mathematical statement and a few words straight of the following?

I would like to have the words 'to mean' and the following mathematical statement to be on the same straight line. Thank you very much! \documentclass[11pt,a4paper]{article} ...
3
votes
1answer
74 views

How to center subfigures in a 2 by 2 subfigmatrix

I have a figure with 4 subfigures displayed in a 2 by 2 matrix \begin{figure}[h] \begin{subfigmatrix}{2} \subfigure[ALS1]{\includegraphics[height=2.5cm,keepaspectratio]{fig1.png}} ...
10
votes
3answers
223 views

Centering disregarding symbol ®

I have a titlepage for a report. This title is split into two lines with only the word "BRAND®" on the second. It should be centered, but should disregard the ® as it is placed in the third line ...
7
votes
2answers
135 views

How to align the last column to the right in tabular?

This is my code: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{p{10em}>{\raggedleft\arraybackslash}p{10em}} First\newline Second & Alpha\newline Beta ...
2
votes
2answers
124 views

How to center an ellipse into a frame?

How to center an ellipse into a frame ? I've tried this but it wouldn't work : \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{frame} \begin{tikzpicture} ...
1
vote
2answers
109 views

Typesetting Multipart Exercises

When I typeset exercises, I sometimes like to provide the exercise number in the left margin rather than as part of the paragraph describing the exercise. This poses a problem when I need typeset ...
4
votes
4answers
141 views

Align multiple graphics at different indentation levels

I want to include centered graphics with items at different levels in an enumerate environment, such that the images line up with each other horizontally. I currently have \documentclass{article} ...
8
votes
1answer
64 views

Adding color package destroys listing centering

I am using @egreg's answer to make listings centered: \documentclass[a4paper]{book} \usepackage[T1]{fontenc} \usepackage[ hang, small, it, hypcap=true ]{caption} \usepackage{fancyvrb} ...
1
vote
0answers
51 views

Justification isn't done in this part of my document

\documentclass{article} \usepackage{amsmath} \usepackage[spanish]{babel} \usepackage{graphicx} \usepackage{graphics} \usepackage{times} \usepackage{color} \usepackage{float} \usepackage{multicol} ...
3
votes
1answer
43 views

Strange line space behavior with vspace

I noticed an unexpected different line spacing of the titlepage what drives me crazy. The left page is the MWE, the right page without the \\ in front of Name. \documentclass{scrartcl} ...
1
vote
2answers
97 views

How to set horizontal space for tabular

Below is item in tabular. Using tabular text gets out of the page. In-order to get rid of this. I tried with \\. But doesn't help. It's not aligned. Can anyone help me to get the below Below ...
1
vote
1answer
34 views

cellcolor affects horizontal alignment in table

I have a table and I want to highlight some cells with color with \cellcolor. However the horizontal alignment is distorted, as you can see in the image. Can this be corrected with the current ...
4
votes
1answer
37 views

Keeping compactenum counters right-aligned

I'm using the compactenum environment (in the paralist package). I'd like to customize the font of the number counter, but when I do so the list ceases to be right-aligned. In the example below, the ...
0
votes
1answer
52 views

Useasboudingbox and measuredfigure to align caption

I use useasboundingbox in my tikz pictures to make them optically centred. I want the caption to be aligned with the left edge of the bounding box. Normally this can be done with the measuredfigure ...
1
vote
2answers
244 views

How to align equal sign

I want to make all equal sign align. So I tried many of the solutions in this forum but to no effect. I still couldn't make it work. Here is my code: \documentclass[12pt,a4paper]{article} ...
8
votes
5answers
2k views

Using \label with amsmath nested environments

First of all, I'm not sure these environments are supposed to be nested, but the fact is the alignment comes out exactly how I wanted, and no errors are issued. \documentclass[a5paper]{article} ...