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

7
votes
3answers
26k views

How to left-align a table in LaTeX

There are many Q&A's about left-aligning either table content-cells, or table captions. I'd like to left-align tables (or any/all floats for that matter). I would like to be able to tell that ...
6
votes
2answers
157 views

Align images with text without using tables

Problem: I have searched how you can align text without the use of tables using LaTex. What I am after is to align images after each other on one side and text to align to respective image on the ...
6
votes
2answers
163 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 ...
5
votes
2answers
154 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} ...
5
votes
2answers
278 views

how to left justify comments to indent same as other text in Algorithmic

How do I left justify my comments in the algorithm. I am using algorithmicx package. What I want is: to pull the comment to left as shown in the attached snapshot. The code for my algorithm is ...
5
votes
2answers
339 views

Memoir footnotes in margin with ragged2e

I would like to set up memoir so that when I use \footnote{foo}, foo is displayed in the margin with the proper label and preferably break over pages. There is an option \footnotesinmargin which ...
5
votes
2answers
346 views

How to left align text in two column itemize

When I use following MWE for getting itemized text in two columns, the item in the list sometimes take a "justified" formatting and thus there is significant space in between two words. This produces ...
5
votes
2answers
92 views

Float right aligned text around a text snippet in first line of a paragraph

I have right-aligned paragraphs and want to float text around a little text snipped, which should be placed in the first line of the paragraph at the right side. How can I achieve this? The LaTeX ...
5
votes
1answer
908 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) ...
5
votes
3answers
2k views

\phantom inside tabularx

I tried to improve the alignment in the following table using a \hphantom: \documentclass{article} \usepackage{tabularx} \begin{document} \begin{tabularx}{\linewidth}{p{2.8cm} X} 1/00\,--\,2/00 ...
5
votes
1answer
1k views

Cleanest way to make itemize ragged right?

I want to make my itemize text ragged right. Is there a cleaner way than to redefine the \@item[#1]{...} from latex.ltx? This is what I have done now: \def\@item[#1]{% \if@noparitem ... ...
5
votes
1answer
8k views

How to align right within equation array

Suppose I have something like the following: \begin{eqnarray*} \mathrm{gcd}(x^3 + 6x^2 + 5x + 5, x^3 + 13x^2 + 6x + 3) &=& 102x^2 + 108x + 2 \ \mathrm{with} \ p = 109 \\ \mathrm{gcd}(x^3 ...
5
votes
1answer
1k views

Controlling cell width and height simultaneously in a table

I'm trying to create a multi-page table with all cells having the same height (as well as certain fixed widths) so that certain manual cut-and-paste operations are a lot easier. One issue is that one ...
5
votes
2answers
558 views

Centered, wide float [duplicate]

Possible Duplicate: Balancing figure that is wider than document's width I have a table which is just too wide for the page. I'd like to be able to float it, centered across the text, ...
5
votes
2answers
2k views

Combined header cell in a table

This question is closely related to at least two other ones; namely, Tables of numbers, and slashbox alternative. What I'm after, is the horizontal- and vertical-alignment of row- and column-headers ...
4
votes
1answer
21k 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: ...
4
votes
2answers
3k views

pdfpages doesn't center pdf on page, using Thesis.cls

I am using the Thesis-template from http://www.latextemplates.com/template/masters-doctoral-thesis. I have several LaTeX-documents to include in the Appendix. The best solution seems to be compiling ...
4
votes
2answers
2k views

Header of the table must be centered, all other rows aligned to left

I have this MWE: \documentclass{article} \usepackage{multirow} \begin{document} \begin{table}[here] \begin{center} \begin{tabular}{|l|l|c|} \hline ...
4
votes
2answers
6k views

Left-aligning authors section in an article

I want to align the authors section of my article to the left. If there are more than one authors, each author should be aligned left in its own cell. I am using memoir's article class. This is what ...
4
votes
3answers
3k views

Flush a left-flushed box right

I would like to put an address in my document as follows: | | | Name | | Street #| | City | | ...
3
votes
1answer
83 views

Having Overfull and underfull box warnings. Please help out as there are many matrices and equations

\documentclass[11pt]{article} \begin{document} The above equations on application of Laplace Transform become: $$sL_1\hat{i}_{L1}(s) = D\cdot \hat{v}_{C1}(s) + D\cdot \hat{v}_{C2}(s) - D\prime ...
3
votes
1answer
153 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} ...
3
votes
1answer
69 views

Alignment of the titles in a ToC and \Roman{section}

There is a problem with the alignment of the numbering of the ToC: When we use \renewcommand{\thesection}{\Roman{section}} the numbers encroach on the titles. When the command is commented out, ...
3
votes
1answer
459 views

Align all equal signs in the document

Is there a way to align all the equal signs in all equations all over the document? I write a theses (scrbook) and like all equal signs to line up. At least in a chapter if not possible for the whole ...
3
votes
1answer
208 views

Aligning three small box together with a text

I made through creating the boxes inside a box with help of an expert by this link Is three boxes inside a box posibble in latex Now im being troubled on how will i put into command to align this ...
3
votes
2answers
967 views

Puzzled as to “centering” of KOMA-script captions

Section 3.20 of the KOMA-script documentation ("scrguien.pdf", pp. 120-1) prescribes the syntax \setcapwidth[justification]{width} for the formatting of a caption. [c] is the option for centering. ...
3
votes
1answer
617 views

Standard math environment for equally-spaced columns of expressions?

I often need a display environment which would let me easily present equally-spaced expressions in the same line, with content on successive lines appearing centred at the same x-coordinate as content ...
3
votes
1answer
1k views

How can I do numbering with a hanging indent to the left into the page margin?

I am compiling some solutions to textbook exercises, and I am trying to do so in the style of the book. The way the book does it is that the body of each exercise appears unindented, left-aligned, ...
3
votes
2answers
3k views

AMS align: Left aligned text/math plus multicolumn align

This question is basically a combination of two previous posts: Adding left aligned text to an equation. and AMS align / Align multiple “=”, too much space (the latter being my own question). What I ...
2
votes
1answer
42 views

Is it possible to flushright the right-hand side with systeme without \hphantom?

I typeset some systems of equations, and I really like the format of input (as well as the output) the systeme package provides. Now, I wonder if there is a way to flushright also the right-hand side ...
2
votes
1answer
183 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 ...
2
votes
3answers
3k views

How to center align the whole table?

I created a table and it starts from the left and goes all the way to right, which looks really skewed. So I want to center align the whole table but couldn't figure out how to do it. I'm new to latex ...
2
votes
2answers
2k views

How to change the position of the caption in a “narrow” and “minipage” environment?

I have some huge figures to include in Latex. Therefore I use the "minipage" and "narrow" environment to place it right at the desired position and to move it to the left until it looks centered. ...
2
votes
2answers
3k views

float left figure in titlepage

I try add a figure in the titlepage \begin{titlepage} \begin{center} \begin{figure}[h] \includegraphics[scale=0.15]{images/logo.jpg} \end{figure} ...
1
vote
1answer
889 views

Alignment of CV Reference in ModernCV

I'm using the latex template for CV from here CV Template. For reference, I added these lines \newcommand{\cvdoublecolumn}[2]{% \cvline{}{% ...
1
vote
1answer
305 views

New Commands with text align

I would like to create a new command in LaTeX that aligns the text right and left (see example below). Only that I wish the text column were as large as half page. ...
1
vote
1answer
429 views

Align table side by side with graph

I'm trying to get my csv table aligned to the left of my graph. The graph is appearing below (and indented) the table. Any ideas? \begin{minipage}{0.5\textwidth} \pgfplotstabletypeset[col sep=comma, ...
1
vote
1answer
448 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
1k views

Left/Center/Right references to subfigures

I have a figure with three subfigures shown in the code sample below. How can I change the reference to a subfigure so that I have Figure 1 (left), Figure 1 (center), and Figure 1 (right) instead of ...
1
vote
0answers
336 views

Modify the contents in a single slide in beamer class [closed]

I have an outline frame with a sidebar (which is a background canvas). Only for this slide I want to move the contents to right side. For example the current Outline page is as follows: - Section ...
1
vote
1answer
672 views

Pagenumbers aligned raggedleft in scrartcl with tocstyle?

When trying to typeset a table of contents with KOMAscriptand tocstyle(alpha 0.2d), I finally managed to change the font of the pagenumbers (like the rest of the document to CMSS) with ...
39
votes
2answers
134k views

How do you center equations?

I can't seem to center equations without causing some weird formatting problem. The following results in the R being dropped: \begin{center} E(R_{i,t})=E(\alpha_i)+E(\beta_{i,F_1 } ...
36
votes
3answers
111k views

Syntax similar to \centering for right and left?

For images we can use \centering is there anything to position the image to right side or left side of the page.
26
votes
4answers
45k views

making a table fit on a page by moving it left

I have a table where the last columns fall off the page. Instead of making the text smaller I would like the table to not adhere to the margin of where it begins. I would like to move it to the left. ...
30
votes
2answers
21k views

Difference between flushright and raggedleft

What is the difference between flushright and raggedleft?
19
votes
1answer
10k views

Place label in middle of line with TikZ

What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close \begin{tikzpicture} \draw[|->, ...
62
votes
3answers
31k views

What is the correct way to center a \tikzpicture? [duplicate]

Possible Duplicate: Should I use center or centering for figures and tables? What is the correct way to cause a \tikzpicture to be centered? By default it appears to be aligned with the ...
32
votes
3answers
78k views

How to center large figures in LaTeX and how to fix short justified lines?

I have 2 questions: I am trying to center a figure in LaTeX, but above a certain size it just starts at the left margin and goes beyond the right. How can I make it actually center, so the amount it ...
18
votes
2answers
15k views

Math inside tables and formatting

I'm trying to make a little summary of mathematic analysis, useful for my university, in LaTeX. I'm stuck in the problem of creating nice table, with alternate colouring containing equations with ...
18
votes
3answers
8k views

How can I align two nodes to the left in TikZ?

I have two unaligned nodes |AAAAAAA| |B| and I want to have the node with the B aligned to the left of the node with AAAs and below it |AAAAAAA| |B| How can this be done?