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

6
votes
1answer
110 views

Flush what's following \hfill to the next line if it doesn't fit

I'm using \hfill to flush some text to the end of the line. However, when the stuff preceding \hfill takes up most of the line, the text at the end is broken over to the next line. What I am want is ...
6
votes
1answer
189 views

biblatex: no linebreaks in name lists when typesetting ragged-right

When typesetting a bibliography \raggedright, biblatex seems to have trouble breaking a line between an author's first/last/middle names (and, if multiple authors are present, between two authors). ...
6
votes
1answer
494 views

Alignment of Margin caption with floatrow and caption

I want my captions in marginpar to be left aligned. I am using raggedright option in caption package along with floatrow package. The captions are left aligned only for long captions. MWE ...
6
votes
2answers
358 views

Keeping the distance between mathematical symbols consistent?

In order to make text flushed both left and right, latex adjusts the distance between words, and to a lesser extent, the distance between characters within a word. This is good, however it also ...
6
votes
3answers
668 views

Math indentation environment

I'd often like to set formulas like Is there some other way than doing this by manually inserting whitespace (with \quad etc.), i.e., something like \begin{align*} f( & 1 + g( & 2 + \\ ...
6
votes
1answer
118 views

How to distribute narrow expressions along a line?

I want something like this: two narrow equations/words equally distributed along the linewidth. I used next code: \documentclass{beamer} \usetheme{Warsaw} \begin{document} \begin{frame} ...
6
votes
3answers
2k views

Right align inside header

I have a header, prepared using fancyhdr. I would like the first row of the left header to be right-aligned with the second row of the left header. In the following MWE I would like "My City" to be ...
5
votes
1answer
115 views

What causes this beamer block to be slightly offset to the right?

I'm facing a problem with the block environment in beamer. Adding a tikzpicture seems to offset the following block slightly to the right. What is causing that behaviour and how can I prevent it? ...
5
votes
1answer
148 views

Array Alignment using TikZ Matrices; cell over a complete row

I want to align subplots in a pgfplot. with \matrix it is easy to align pictures. My problem is, that I need several rows with two columns/pictures and a last row with a picture over both columns. ...
5
votes
1answer
202 views

Tabular alignment of text and figure

For an exam paper I'm preparing, I want to properly build a top page header, with the university logo, and two block of text side-by-side (for course, department, etc.). I have already seen some ...
5
votes
1answer
878 views

`\hfill`-like spacing in math mode without using `align`

In question 83509, a way of getting \hfill-like behaviour in the align environment is described, but for my purposes, I need one that works in the equation environment. (I want to display some ...
5
votes
2answers
3k views

How to center text in tabularx? [duplicate]

Possible Duplicate: Centering in tabularx and X columns I was using \begin{tabular} to insert a table in my article. The titles for columns were long which caused the table to extend out ...
5
votes
1answer
2k views

LaTeX advanced use of subcaption package

I am trying to create a figure with subfigures aligned both horizontally and vertically in the same figure to explain this better i attached a primitive drawing. The labels are not of importance in ...
5
votes
1answer
324 views

Independent Columns Environment

I am creating a two-page syllabus with a tikz calendar in the left column and all of the content on the right side of the page. Currently the right content is just like a normal article class document ...
5
votes
2answers
385 views

align columns in multiple tables

I am trying to align the columns of multiple tables. I know I can use p column format to fix column widths but I would prefer that TeX automatically figure out the widths for me. I was hoping to: ...
4
votes
3answers
267 views

Alignment in multiple locations of a single equation based on first line

I want to align a multi-line equation so that it basically looks like this: a = (b + c + d + e) f = g The requirements of this alignment are: The equal signs should be aligned. The beginning ...
4
votes
2answers
3k views

LyX: set width of image to 100% of page width

When I insert an image into LyX and set it to 100% page width, its left side is not at the farthest most edge of the left page. Instead it starts where the text margin is, and since it's too large to ...
4
votes
2answers
2k views

How can I put three pictures with sub-captions in two rows using subfig package?

I would like to put three pictures with sub-captions in two rows using the subfig package. I want to center the single picture in the second row. I use the following code : ...
4
votes
1answer
664 views

Exact position of a node in a rectangle

This question led to a new package: fancytabs I have a node positioned in a shaded rectangle with: \newcommand{\tabstyle}{\Large\scshape} \newcommand{\tabheight}{4cm} ...
4
votes
1answer
3k views

Override \centering to left justify an image

Background Dozens of source code snippets inserted into a document as images inside of Algorithm floats. Other images are screen captures, inserted as Graphics floats, to make a distinction. All ...
3
votes
1answer
58 views

How to wrap text with flalign*?

I am trying to left align some text as shown below: But the problem here is that the line is almost exceeding the page (shown by red arrow).What I want is somewhat shown in the blue line which ...
3
votes
2answers
244 views

Enumeration in margins and hang indentation

A solution was given to Enumeration across many sections. However, (A) it seems enumeration prevents hang indent from activating. (B) Can I get the numbers to go into the left margin and leave hang ...
3
votes
2answers
100 views

Enumeration across many sections

I am trying to combine enumeration over multiple sections: it is not working. \documentclass[12pt]{article} \usepackage[top = 1in, bottom = 1in, left = 1in, right = 1in]{geometry} ...
3
votes
1answer
95 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
3k views

Align multiline equation with expression after equal sign

I am trying to align a multiline equation using array within the equation but it turns out it doesn't do very well. The code I am using is as follows: \begin{equation}\ \begin{array}{lcl} ...
3
votes
1answer
466 views

Siunitx: alignment, parentheses and font size

I'm trying to align numbers (that are bolded, between parentheses, etc.) by decimal points in table columns while using the auto-round option of the siunitx package. The following code doesn't work: ...
3
votes
2answers
629 views

How can I insert address blocks on the left and right side of the page?

I want to insert my local address on the left side of the page and my permanent address on the right side of the page. However, I want both address blocks to be left-aligned. Basically, I want ...
2
votes
1answer
50 views

Moving the page number in a table of contents to the left of the titles with tocloft

I would like to move the page number from the right-hand side of a table of contents to the left, using tocloft. The page number should still be right-aligned. The question has already been answered ...
2
votes
1answer
70 views

How can I make the items aligned in section?

I have this code \documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl} \usepackage[inline]{enumitem} \setlist[enumerate,1]{label=\textit{\alph*)}} \usepackage[table]{xcolor} ...
2
votes
1answer
828 views

How to add author an affiliation and their email address and all left aligned

How to add author an affiliation and their email address and all left aligned? title author 1, author 2, author 3 Authors affiliation author1 's email address abstract I'm using a single column ...
15
votes
4answers
842 views

How can I make (La)TeX prefer to fill centered lines

My thesis formatting requirements ask for multiline chapter and section titles to be a maximum of 4.5 inches wide with any subsequent lines being wrapped such that they are sucessively shorter, ...
13
votes
1answer
1k views

Centre roman numbers in enumerate environment

I have an enumerated list that uses roman numbers. \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label=\roman*] \item first entry \item second entry ...
12
votes
2answers
5k views

Raggedleft paragraph in a table

I am trying to typeset a table of two columns, where each column consists of paragraphs and the paragraphs in the right hand column are set raggedleft. Here is a minimal example of the code I thought ...
11
votes
1answer
305 views

Aligning text in S columns in a way that respects the decimal marker for numerical entries

As I understand it, using various options for the S column in siunitx, I may produce columns containing both numerical and nonnumerical entries. I may have the numerical entries aligned at their ...
11
votes
2answers
650 views

Problems with alignment of sequences

I want to align two sequences: a_1, b_1, c_1, d_1, e_1 etc. a_2, b_2, c_2, d_2, e_2 etc. here's what I wrote \begin{align} \notag &a_1,\ &b_1,\ &c_1,\ &d_1,\ &e_1\ ...
11
votes
1answer
2k views

Do I need \leavevmode for centering figures?

I have an image I'd like horizontally centered on the page. Currently, I'm using the following code (which does work) under pdflatex: \usepackage{float} ... \begin{figure}[H] \begin{center} ...
9
votes
4answers
312 views

Center table by end of cell

I want to be able to center my table, but align the center by the end of the first cell. Currently just using the \begin{center} command i am able to center the table but i would rather the table be ...
9
votes
3answers
2k views

Centered box, text inside it flushed right?

I have some text (like a title), that needs to be centered, and some notes to it (multiline - note 1 \\ note 2), which should be directly underneath it and on the left side of it: Some ...
8
votes
4answers
1k views

Centered but left-aligned paragraph

I want to have a paragraph, that is centered but in itself left-aligned. Does somebody of you know how to achieve this? (I have text in a paragraph, on each line the text is shorter than the width, ...
8
votes
2answers
7k views

Numbers in tables: align by decimal point *and* flush right?

This is a followup question to siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers and Aligning numbers by decimal points in table columns. While ...
7
votes
1answer
199 views

Overlay two .tikz files from input

I have some plots generated from matlab2tikz which I would like to overlay. Each plot is a seperate .tikz file which I input using \input. My code currently is: \pgfplotsset{ every axis/.append ...
7
votes
1answer
92 views

Formula label outside of formula

I want to label a block of equations like that: The "AB" should not inflict the central alignment of the formula. I saw it a lot, but do not succeed on my own. Do I need to build boxes? I used the ...
7
votes
2answers
143 views

How to align terms in separate lines in this case?

I want to get another variant for the alignment points in my question answered by Hendrik Vogt, see How to construct a long equation that is split in LHS and RHS to occupy a narrow column?. ...
7
votes
1answer
325 views

Unindent section headings

In attempting to answer Indent all the normal text, I had to resort to using the titlesec package to unindent the section headings. With \let\OldSection\section, I was sure that either ...
7
votes
1answer
489 views

Bad width of head of longtable

Here is an MWE: \documentclass[a4paper,11pt]{article} \usepackage{soul} \usepackage{amsmath} \usepackage{amssymb} \usepackage{longtable} \usepackage{booktabs} \usepackage{multirow} ...
7
votes
1answer
463 views

Right-align numbers in ToC

How do I right-align the section/subsection/.. number in the ToC? The distance between the number and the heading should be fixed. Instead of | 1 Section | 1.1 Subsection I'd like ...
7
votes
3answers
6k views

Beamer: How text wrapping around a graphic right aligned?

I want to include a graphic in beamer presentation with right alignment and this graphic should be wrapping by text. I tried three packages but non of them works correct (minimal example below). ...
7
votes
2answers
2k views

How to flush right but align left? [duplicate]

I am writing an introduction, and I need to put my name at the end of it at the right side of the page, but it should be aligned left: Lorem Ipsum is simply dummy text of the printing and typesetting ...
7
votes
2answers
1k views

Table of contents: section titles ragged right

In the standard book class, if there are very long section titles, \tableofcontents tries to produce justified text. How can I produce a table of contents so that the section titles are typeset flush ...
7
votes
2answers
201 views

Align columns of text

So basically what I am trying to achieve is something like the following... Mobile : +12 111 111 111 Email : something@something.com Phone : +12 111 111 Website : ...