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

How could I draw 4 mosfets in a same line? (attached picture)

I only know how to do one and in a unique line. How is it possible to put four together and well spaced as the picture I am showing? what I did until now: \usepackage{circuitikz} \begin{document} ...
4
votes
1answer
60 views

How to define a new left-aligned environment?

I am working on preparing a document in latex, and I need to define an new environment as follow: When the code is: \begin{IF} the sum of $a$, $b$, and $c$ is 10,\\ the product of $a$, ...
99
votes
1answer
23k views

Manual/automatic line breaks and text alignment in TikZ nodes

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE). Is there a way to make lines break automatically at some specified width? And can I ...
2
votes
3answers
66 views

How to vertically and horizontally center a minipage

I tried centering horizontally using the "adjustwidth" environment, but unfortunately, it's not very accurate. Also my captions are not centered under my figures anymore. I have no idea how to use ...
13
votes
3answers
3k views

Errors with ragged-right justification in tables

My main goal is to disable text justification in tables and just have left-aligned text. I've loaded the array package and defined a custom \newcolumntype like so: \usepackage{array} ...
3
votes
1answer
44 views

Centering trees

How can I centre a tree, moving it to the middle of the page, whilst keeping \ex. in its normal position? \documentclass[12pt,a4paper]{article} \usepackage{tikz-qtree} ...
7
votes
2answers
12k views

Alignment of horizontal subfigures

I have three images as subfigures. Two images are aligned happily, the first one doesn't line up. All images are the same size (519x346 pixels). This is what it looks like: I'd like to line up ...
1
vote
1answer
24 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 ...
4
votes
1answer
40 views

Prevent Hyphenation across lines + Enforce right margin

My first question here, so it may sound rambling. So far I've found the answers about preventing hyphenation across lines and for setting margins, but I'm having trouble putting it together. This is ...
4
votes
2answers
66 views

Move tag next to equation in align environment

It's my first time asking here but I have got so much help from this site :D My particular case is that I need order and tag Maxwell's equations but I need set the tag in a particular location, just ...
2
votes
1answer
46 views

How to align text vertically and horizontally in table cells of the same column?

I want to top align and right justify the text in all tabularx cells of a certain column. So far, I tried: \documentclass[a4paper,10pt]{article} ...
2
votes
2answers
29 views

Left margins are different for longtable and tabular

I would like to use a tabular and a longtable in my document, but the left margins are not aligned. \documentclass[letterpaper,11pt]{article} \usepackage{longtable} \begin{document} ...
2
votes
1answer
24 views

Help with Chapter Headers Left-Aligning

I'm using the following code for the top of chapters which looks pretty cool: \usepackage{titlesec} \titleformat{\chapter}[display] {\normalfont\Large\raggedleft} {\MakeUppercase{\chaptertitlename}% ...
4
votes
2answers
85 views

Centering sections

I would like to use titlesec to center my sections as follows (MWE): \documentclass[10pt,a4paper,twoside]{book} \usepackage[latin1]{inputenc} \usepackage{lipsum} \usepackage{titlesec} ...
2
votes
1answer
79 views

Aligning The Title, Autor, and Date in the header of a Beamer Poster

I am using the beamer package and I have a title set at the top of the page, but I want to left align the title. So far I have this for the title portion: \documentclass[final]{beamer} ...
2
votes
1answer
34 views

How to get rid of extra indentation before table in \extratile of class scrreprt?

If I use the following scrreprt document, the initial tabularx table is aligned with the left boundary of the text area: \documentclass[draft=true]{scrreprt} \usepackage{tabularx} ...
3
votes
3answers
82 views

Hanging brackets in an align environment

I have two formulas in an align environment, and the second one starts with a bracket (this particular example is simplified): \begin{align} & x_\alpha(s) x_\alpha(t) \\ & \left[ x_\alpha(s), ...
3
votes
1answer
36 views

Stairs-like multline

The multline environment alignes the first line to the left, the last one to the right, while all the lines in between are simply centered. The result sometimes looks not satisfying, for example, when ...
3
votes
1answer
21 views

Source of figure below caption is not centered when there are too many characters

I want my figure source to be part of the caption but in an new line, everything located below the figure and both of the lines should be centered. This works out perfectly as long as the caption ...
5
votes
2answers
105 views

How to align a listing like itemize on the left and some graphics on the right in latex?

I have an itemized list like this: \begin{itemize} \item[\Square] 1 \item[\Square] 2 \item[\Square] 3 \item[\Square] 4 \item[\Square] 5 \item[\Square] 6 \end{itemize} and a graphics like this: ...
2
votes
2answers
37 views

Create fancyhdr footer with something like: \lfoot{\centering{Centered to the left}}

How can I create a footer like this one? It appears to be text centered in the left half of the page, and in the right half of the page. I tried, eg., using fancyhdr with: \lfoot{\centering{some ...
1
vote
1answer
39 views

How to get subfigure alignment

I have a 3 figures and I am trying to put them on one line but I can't achieve that. Any help would be great. Here is my code: \documentclass{article} \usepackage[demo]{graphicx} \usepackage{caption} ...
2
votes
1answer
41 views

Column in horizontal middle of page

I want to write a table with 3 columns. The second should be in the middle (horizontally) of the page. Thanks, Adrian.
7
votes
2answers
792 views

Creating an automated table of signs

When solving some inequalities in the context of algebra-precalculus course it is sometimes useful to sketch the behavior of the factors involved using a table. All becomes clear with an example - say ...
1
vote
2answers
54 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} ...
6
votes
2answers
449 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
42 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
30 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
12 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
83 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
35 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
1answer
101 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
178 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
84 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
113 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
42 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
47 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
37 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
37 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
36 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
136 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
48 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
43 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
173 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
331 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
40 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
68 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. ...