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

Right align using tabulary

I have the following table: \documentclass[a4paper,twoside,11pt,openany]{book} \usepackage[utf8]{inputenc} \usepackage[spanish,english]{babel} \usepackage{tabulary} \begin{document} \begin{table} ...
1
vote
0answers
21 views

Insert negative of \widthof into \hspace without defining a newlength

Following MWE does not work: \documentclass{article} \usepackage{calc} \newlength{\charwidth} \setlength{\charwidth}{\widthof{$-$}} \begin{document} \centering $\infty$ \centering ...
6
votes
2answers
438 views

Using arrays to align parallel equations: Why isn't $|z|$ centered?

There was an earlier question about aligning different parts of two parallel equations in a multiple line environment, and I'm trying to adapt Werner's answer that used an array for my own use. ...
3
votes
2answers
30 views

How to have a figure with multiple groups of image and each image with individual name?

I have several images and I must put their names below them. Moreover, I need to give the name of the group of that images too (for example, "first layer", "second layer" ect as show below). I need to ...
0
votes
1answer
24 views

centering within a table cell not working in one cell only [duplicate]

I'm trying to create a table using custom columns as explained here. For some reason in the last row of my table the very left column is not centered horizontally and I don't know why. Here is the ...
0
votes
0answers
9 views

Text Prior to Subsubsection affecting alignment of text following it

Following are two snippets of code along with what they compile into. The issue is with the alignment of the text that follows the subsubsection. It should align with the subsubsection's heading, ...
3
votes
1answer
67 views

Center plot created with pgfplot from matlab

If I have a nice plot in matlab, then I save it as a tikz standalone file matlab2tikz('myimage.tikz','standalone',true) and I create a pdf in my terminal with pdflatex myimage.tikz to include ...
3
votes
1answer
31 views

Right alignment of a single line

I have some pieces of metrical text, set in quoting environments, in which some verse halves are longer than a line. The standard verse environment would just break automatically and indent the second ...
2
votes
2answers
28 views

The list in an alignat environment is pushed to the right

How do I get this list centered horizontally? \documentclass{amsart} \usepackage{amsmath} \usepackage{amsfonts} \begin{document} \noindent {\bf Example} \vskip1.25mm \noindent \hspace*{1em} ...
2
votes
1answer
94 views

How can I align this table with another way?

I tried to align this table. My code \documentclass[border=2]{standalone} \usepackage{amsmath} \begin{document} \begin{tabular}{c c c} 1 & $=$ & 1 \\ $2 + 3 +4$ & $=$ & $1+8$ \\ ...
6
votes
1answer
159 views

How can I correctly align the nodes of this TikZ picture?

I have the following TikZ picture: and I would like to have my nodes aligned in the way indicated in red. How can this be done? What I have so far is pretty messy and I don’t see how to achieve ...
4
votes
2answers
80 views

Center table in the page

Having this example (note the use of tufte-handout document class): \documentclass[12pt,english,nohyper]{tufte-handout} \usepackage[]{color} \usepackage{lipsum} \usepackage{graphicx} ...
0
votes
0answers
33 views

Why is \centering{}aligning text above it?? (basic question) [duplicate]

I am new to LaTeX and am trying to get used to the features of the language. I have typed \indent Like all languages mathematics has a few basic rules upon which its complexity is built. The first, ...
2
votes
1answer
25 views

How to disable right justification in the entire document including tabularx environment?

I am trying to disable right justification of text in Latex because it leads to too many hyphens which turn out to be distracting. I tried \raggedright as shown below. \documentclass{article} ...
2
votes
1answer
86 views

How to align the left edge of text in table with the section heading?

I am trying to make a table as follows. \documentclass{article} \begin{document} \section*{Foo} \begin{tabular}{l l l} Date & : & 2015-01-01 \\ Time & : & 20:30 \\ Place ...
1
vote
2answers
39 views

horizontal adjustment of side caption after tikz arrow addition

I have a figure with side caption and I added an arrow to the image but now everything is not centered anymore since I added the arrow, is there a way to force the centering to accommodate the added ...
1
vote
0answers
34 views

different text alignment on even/odd pages (like raggedouter but for text)

For a poetry book I would like to typeset all text on even pages \raggedleft and all text on odd pages \raggedright, including headings. Poems can span across multiple pages, so the change of text ...
3
votes
1answer
28 views

How do I center the title names of List of Figures and List of Tables?

I know for centring the Table of contents, the following code is used: \usepackage{tocloft} \renewcommand{\cfttoctitlefont}{\hspace*{\fill}\Huge\bfseries} But what do we use for the List of Figures ...
2
votes
1answer
35 views

Combined Tables Not Centering Correctly with ACM

I'm trying to put two tables together, so that they sit immediately, with ACM's template and I'm having a problem. The tables will sit next to once another, but the first table will be too far to the ...
3
votes
1answer
31 views

How to center two figures heighthwise

I have two figures A and B, and A is larger than B. What can I do so that the center of the two figures is at the same height ? \begin{figure}[] \begin{center} ...
4
votes
1answer
129 views

Centering a wide table

I can't seem to center this table. Here's the code I have. I've tried using \centering too. There is a big indent and the table goes all the way to the right edge of the page. \documentclass{article} ...
10
votes
2answers
2k views

How do I center the table of contents title using tocloft?

I'm getting odd behavior using package tocloft to format my table of contents and center the titles "Contents", "List of Figures", and "List of Tables". Using the code suggested in the tocloft ...
3
votes
1answer
40 views

Horizontal alignment of ytick labels

I am working on a population pyramid. With some sort of hard-code I managed to overlap the ytick-labels of the age in the middle of the graph (but not properly). My question is, how to 1.) suppress ...
4
votes
2answers
37 views

Alignment of TOC with exotic numbering

While answering this question : French section numbering using bis, ter, etc, I realized that when you add (using \addcontentsline) some content to ToC with "non conventionnal numbering" (in my case 2 ...
4
votes
1answer
158 views

Why is the picture not centered in the frame?

Using the following code: \documentclass[12pt]{beamer} \usepackage{ctex} \usepackage{graphicx} \begin{document} \begin{frame}{PSA分析级别和实施程序} \begin{figure}[htbp] \centering ...
3
votes
2answers
318 views

Full width table with caption in refman doc

The refman document class has a big left margin for text. Only the headings are on the normal left margin. Perfect for what I'm doing. But I have a wide table (float) that must be centered on the ...
3
votes
1answer
36 views

Reproduce lhs2tex’s code indentation in LaTeX

The preprocessor lhs2tex has a very neat way of aligning code. Consider this snippet: let t1 = foo x in let g x = if x > 10 then t1 else let t2 = bar x ...
3
votes
2answers
66 views

German date notation in paragraphs

According to the DIN ISO 8601 a German date needs to be formated without a linebreak between in it. So LaTeX have to break before or after the date. Instead sometimes a date exceeds the linewidth. ...
2
votes
1answer
27 views

flush align equations to left margin

In the attached MWE: \documentclass[11pt,fleqn]{book} % Default font size and left-justified equations \usepackage{etex} \reserveinserts{28} \usepackage[svgnames]{xcolor} % Required for specifying ...
0
votes
1answer
15 views

Tabular Alignment and Centering around Decimal Point [duplicate]

I'm trying to align numbers by a decimal point in LaTex. I know this has already been answered, but what I can't figure out is how to center justify the labels around the decimal point. ...
0
votes
0answers
16 views

Specify horizontal position of xtable output in LaTeX

I originally posted about this on StackOverflow (http://stackoverflow.com/questions/31359737/table-environment-from-xtable), but it was recommended for me to post it here instead. I am using the ...
2
votes
1answer
40 views

How to left-align a table in LaTeX with nonstandard document class

I need to align my table with the left margin of my page. The adjustbox package looks to be the solution, but I'm having difficulty implementing it. I realize my question is potentially a duplicate to ...
2
votes
1answer
61 views

Horizontal alignment of tikzpicure in an equation

In this minimal working example, \documentclass{article} \usepackage{tikz} \begin{document} \begin{equation} \lambda = \begin{tikzpicture} \draw(1cm,0) -- (2cm,0); \draw(2cm,0) -- (3cm,0); ...
3
votes
2answers
46 views

Right aligning atom in chemfig

I'm using chemfig (perhaps improperly) for relational algebra graphs. Here, for example, is a simple one: \documentclass{article} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} ...
1
vote
3answers
53 views

Align table horizontally - rescale

I would like to align horizontally two tables, if necessary rescaling them, to put them on the same line. Obviously even the caption must be scaled, remaining aligned with the center of the table. ...
4
votes
1answer
77 views

Using custom-aligned subarray in LyX

I need to write a vertically stacked subscript in a notation meant to say "evaluate expression at k=..., and k'=...". In the end it should look like / SOME \ | BIG | \ ...
3
votes
1answer
31 views

Centered lineheaders with classicthesis package

I began to use the classicthesis package which is very close to a word theme I used to work with before. The package is configured like that : ...
4
votes
1answer
69 views

How to make vertical alignment of columns different in Beamer?

I try to make a frame in which I indicate a figure on the right side and add a description about it on the left side. I want the description top-aligned and the figure center-aligned, but I have ...
1
vote
0answers
40 views

Caption settings before and after loading caption package

Why do captions look so different after the mere loading of the caption package? What are the default settings for a caption BEFORE loading the caption package? I would prefer to be able to load most ...
0
votes
1answer
98 views

Fixed column width ruins alignment of table row using Lyx

I am having the worst luck with a table I am trying to create. The problem occurs when I want to have multiple lines in a column, I use the trick posted on here (and I think Lyx's wiki) and set a ...
3
votes
2answers
34 views

how to force alignment of text with itemize

I have two similar looking sentences and I would like to "push" certain pieces of text to the same x coordinate. \documentclass[12pt]{article} \usepackage{amsmath, amsfonts} \begin{document} ...
2
votes
2answers
49 views

insert a scaled picture on the right side of the page on an existing picture in latex

I am new user of latex. Can I insert a scaled image on the right side of the page?While, I have already full size image on the same page. There is no text on this page. Thanks in advance. ...
3
votes
3answers
176 views

How can I only make table headers center and bold?

I would like to center and bold the table header. Here are codes. \begin{center} \begin{table} \caption{table decription} \label{t_sim} \begin{tabular}{|l|l|} \hline Key & Value \\ \hline $x$ ...
0
votes
0answers
35 views

Centering left justified

I would like to combine left justification and centering for a figure with multiple panels created using sidesubfloat. I.e. the entire block should be centered on the page, but with the left side of ...
2
votes
2answers
136 views

Displaying formula with a star

I want to display a centered formula to which can be referred as (*). Now, I have the following: But I want the formula to be more centered and the star to be right aligned. The code is now: $$ ...
4
votes
4answers
69 views

Spreading letters evenly across a line from margin to margin

I wish to achieve something that can be easily accomplished by simply pressing this button in Microsoft Word: So that I could make something like this: What I've seen so far on this forum either ...
1
vote
1answer
19 views

Unexpected center alignment of the text after the remark block

I am working on a draft within an ieeetran template. There are a couple of definitions and remarks within the text, have which been embedded, deservedly. But the odd thing is that, as I try to ...
6
votes
2answers
855 views

scale column width with image width

I'm writing a presentation using the beamer class where multiple slides consist of an image on the very right and centered text on the left. So far I do this using the columns environment: ...
1
vote
1answer
63 views

How to make flushleft work on multicolumn title?

In the below code, "Title3Title3 Title3Title3 Title3Title3" is misaligned with the other titles because flushleft does not seem to work with multicolumn titles. How do I left-justify all of these text ...
1
vote
1answer
41 views

Centering a column in align or alignat with desired spacing

Initially, I had the code \begin{align*} |a_d|_p & = 1 \\ |a_i|_p & \leq 1 \end{align*} which produced the result below: This is undesirable because the vertical bars | on the left ...