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

9
votes
2answers
767 views

Alignment of page numbers in table of contents

Consider the following example: \documentclass[a4paper,12pt]{article} \begin{document} \tableofcontents \newpage \section{test} \newpage \setcounter{page}{22} \section{introduction} \newpage ...
9
votes
4answers
3k views

Left-aligning specific text in math-mode

I currently have via \documentclass{scrartcl} \KOMAoptions{ fontsize = 10pt , headings = normal , } \usepackage{amsmath} \usepackage{multicol} \usepackage{siunitx} \begin{document} ...
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 ...
9
votes
3answers
2k views

horizontal alignment of dot over hat over bold greek letter!

For some strange reason, this: \hat{\dot{\bm{\phi}}} prints the dot and the hat slightly off the left of the phi letter. Any ideas if this can be fixed? thanks. Using bm package for bold symbols.
9
votes
2answers
293 views

Adjusting the gb4e {exe} environment locally

In my thesis I make extensive use of the exe environment of the gb4epackage and I love it. However, three of my approximately 100 examples need to have an alternative layout. Instead of the usual ...
9
votes
3answers
230 views

How To Make a Special Position Environment in LaTeX?

So I must admit I am way out of my depth and have no idea what I'm doing. I apologize in advance for a long and complicated question. I'm trying to build this output: Which I have successfully ...
9
votes
2answers
187 views

Centering all tables in a document with etoolbox

(I know there are already other questions about centering tables such as this. This question is specific to etoolbox.) How do I center all tables using etoolbox? I can do ...
9
votes
3answers
190 views

How can you change the alignment of calstable?

calstable is always left aligned. \documentclass{article} \usepackage{cals} \begin{document} \begin{center} \begin{calstable} \colwidths{{1.5cm}{1.5cm}{1.5cm}} ...
9
votes
2answers
157 views

\raggedyleft in memoir?

In memoir instead of \raggedright, you can use \raggedyright[<space>] which is much more beautiful in narrow columns. However what I also need is \raggedyleft which does not exist and I don't ...
9
votes
2answers
392 views

Align position of decimal point within table of numbers, text and percentage values

I have asked sthg similar with a MWE today answered by David C., but this is a more difficult follow-up question. Also I have just made a new account :) The Question is simple: I want the numbers to ...
9
votes
2answers
980 views

\RaggedRight makes document longer

I have a document carefully written to fit in 4 pages; but when I added a \raggedright (or \RaggedRight with use of the ragged2e package) the length gets longer. Furthermore, suddenly the output ...
9
votes
1answer
10k views

Left align (to the page) displayed math

How can I left align the display math environment (either $$ or \[)? I keep running into people asking about the align environment; but I just want to change displayed math from center to left align ...
9
votes
2answers
2k 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 ...
9
votes
3answers
4k views

Table column width “fill to margin”

I kind of would expect tables to be able to "fill to margin", instead of choosing a number and iteratively rebuilding the document until it is the right size. For example, I want this 2-column table ...
9
votes
2answers
9k views

How to align image

If i have in my beamer presentation some list of items and on that slide i wanna add a picture, which i want to be aligned e.g. to right top corner. \begin{frame}[fragile]{III. Override pages} ...
9
votes
1answer
7k views

Centering chapter/section/subsection

I am trying to center my chapters/sections/subsections. I have used the following: \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}} \newcommand{\ssection}[1]{\section[#1]{\centering #1}} ...
9
votes
2answers
519 views

Why are my Images not correctly centered?

First of all this is my first posting here on tex.stackexchange.com. I'm new to the tex world and I need a little bit of your help. I am trying to align text relative to a figure. How it should look ...
9
votes
1answer
386 views

In align environment, put word at left margin and still align equations with &?

In an align environment, how can I put a word such as "Now" or "And" at the left margin and still align equations on that line and subsequent lines with &?
9
votes
1answer
945 views

List of abbreviation

I want to display a list of abbreviation in two columns and list each abbreviation preceded by the corresponding letter. for example : A AAR .... AG .... i use the package nomencl : below the ...
9
votes
1answer
312 views

How to split and align equations when they are inside an enumerate environment?

How to make the first line of aligned equations sit in the same baseline as the bullet and make the equation left justified? \documentclass{article} \usepackage{amsmath} \begin{document} ...
9
votes
1answer
240 views

Using discretionary linebreaks in centering environment

I am having trouble with the interaction between discretionary line breaks and centering. I have defined macros for math mode that contain discretionary line breaks to help TeX lay out inline ...
9
votes
3answers
8k 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). ...
9
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 ...
9
votes
1answer
407 views

Center over-long equations between both margins

I understand the reasoning behind the fairly narrow textwidth in a default LaTeX article. 60-80 characters per line and all that. However, I am preparing a document that features many lengthy ...
9
votes
1answer
147 views

How can I align the terms of this equation nicely?

I have the following alignat segment: \begin{alignat*}{3} \text{max}_{\underline{\lambda}} \text{min}_{\underline{x}} \quad & \underline{c}^T \underline{x} + \underline{\lambda}^T(\underline{d} ...
9
votes
2answers
4k views

How to center verbatim [duplicate]

\begin{figure} \centerline \begin{verbatim} for (int a = 0; a < 10; a++) for (int b = 0; b < 10; b++) ... \end{verbatim} \caption{C++ code} \end{figure} I would like the figure to be ...
9
votes
1answer
3k views

How to center a lstlisting

I have the following problem. I want to center a listing, I tried this approach: How to center a listing? It works but when I try to set frame or numbers specifically for each listing I get errors. ...
9
votes
1answer
3k views

LaTeX Centering newline in subfloat caption

I have these images with their title beneath: I want to add some information below, like this: The good news is, I'm able to do it. The last screenshot is from my pdf previewer. ...
9
votes
2answers
133 views

Preventing line shrinking with raggedright

Sometimes with \raggedright, if a line is too long, but only slighly so, it will be shrunk instead of broken up. Here is an example: \documentclass{article} \raggedright \begin{document} This is a ...
9
votes
3answers
1k views

Leftalign labels with enumitem

I'm using the enumitem package to define a legal list: \usepackage{enumitem} \newlist{legal}{enumerate}{10} \setlist[legal]{label*=\arabic*.} The output for a list looks like this: 1. foo 1.1 ...
9
votes
1answer
977 views

\mathclap not centering

I'm trying to stack two symbols on top of each other (not \stackrel) using \mathclap in the mathtools package, but the symbols are not centering: \mathclap{\rightleftharpoons}\circ How do I get the ...
9
votes
3answers
255 views

Remember position of equal sign from one align environment to the next

As you know, the align-environment puts all positions marked with & (normally the equals sign) exactly beneath each other. I now want to save the position LaTeX calculates for & and use it ...
9
votes
1answer
125 views

How to center chapter, section an subsection using memoir?

I am trying to centre chapter, section and subsection using memoir, with the following code: \renewcommand{\chapnamefont}{\centering\normalfont} \renewcommand{\chapnumfont}{\centering\normalfont} ...
9
votes
1answer
153 views

How to float something right even if it wraps down a line?

I have a situation where I have some data in section headings (and sometimes normal paragraphs} that needs to be: floated right not split across lines I was able to accomplish this for most cases ...
9
votes
1answer
195 views

How to typeset the table of contents raggedright in memoir?

I basically have the same question as this one Table of contents: section titles ragged right but none of the two solutions there work with memoir. I want to typeset section etc. titles raggedright ...
9
votes
2answers
10k views

Include centered full page figure with no margins

I have a big figure that takes up a full page. I'd like to include it in my latex document on a separate page, centered horizontally and vertically. I managed to put it on a separate page (or it is ...
9
votes
1answer
236 views

Centering contents name with [twocolumn] contents

I'm trying to make Table of Contents in two columns, but I'd like to center the contents name. Now I'm doing \twocolumn \tableofcontents but these commands give something like this: Contents name ...
9
votes
1answer
434 views

Alignments by means of the tikzmark macro

This is a follow up of my previous question Issues and potentiality of the tikzmark macro: dynamic box adaptation. I thought should have been better to ask two questions although they are related to ...
9
votes
2answers
438 views

Help me create my out patient documentation template

\documentclass[a5paper]{article} \usepackage{eso-pic} \usepackage{fancyhdr} \usepackage[pdfauthor={VB},% pdftitle={Consultation},% pagebackref=true,% ]{hyperref} \usepackage[headsep=3cm,top=4cm, ...
9
votes
1answer
1k views

One-line equation with two columns

I try to write an equation with two similar formulas, i.e. \begin{equation} \qquad A_1 = B + C \qquad A_2 = D + E \qquad \end{equation} Of course, instead of \qquads I want to use something like ...
9
votes
1answer
828 views

Text justification within multicols environment

I'm using this 3-column layout. \begin{multicols}{3} [.. a lot of text ..] \end{multicols} I want to left-align the text in the left column, center the text in the middle column, and right-align ...
9
votes
2answers
731 views

Protrusion of fractions in tabulars

I have a number of tables in a book that I am busy with that have quite a few tables of the general form shown below: If you notice the fractional part of the numbers 5 1/2 and 16 1/2 protrude to ...
9
votes
2answers
449 views

How, in ConTeXt, can I get body text to align flush to the outside?

I'm using ConTeXt Mk IV, and I'd like the text in a two-page document to line up like so: +--------+--------+ + + + + xxx + xx + + xxxx + xxx + + xx + + + ...
9
votes
1answer
1k views

How to have a figure touch the edge of the page?

How can I position a figure (picture) so that it: is aligned on the left-hand side with the text (this is in two column page) touches (or exceeds) the right-hand side of the page? An example can ...
8
votes
5answers
5k views

Table will not center (and it is spilling off the right side of the page)

I just generated this table using Excel2LaTeX: Even though I enclosed the table in \begin{center} the table did not get centered. The table still sticks out the right side. Is there somehow that ...
8
votes
3answers
23k views

How can I use an align environment flush left?

Is there a way possible to imitate the align environment for math mode commands, without having all writing being placed toward the center on the output page? MWE: \documentclass{article} ...
8
votes
4answers
246 views

How to align five equations on three lines, e.g., 2-2-1, with the last equation centered?

I'm trying to use the alignat environment to arrange five equations on three lines as follows: two equations on the first line, two equations on the second line (aligned with those of the first ...
8
votes
4answers
2k 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
3answers
220 views

Control the alignment of each “cell” in amsmath's aligned environment

In amsmath's aligned environment, the alignment of each "cell", or each "column" is predetermined, and seems to work in the following way: the first "column" is aligned to the right, the second to the ...
8
votes
3answers
138 views

Aligning elements in set

How can I create a set with aligned elements? Example: I tried using align but it does not align as nicely as in the example. \begin{align*} &P = \set{ &A &\rightarrow &a | ...