{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
3answers
357 views

Nicer alignment of x^*/2

I'm trying to typeset $\frac{x^*}{2}$, but I can't find a (simple) way to make the alignment look nice. So far, I've tried the following: \documentclass{article} \begin{document} \begin{equation} ...
9
votes
4answers
1k views

Align denominator of fraction to left

The highlighted part has the equation centred, which looks rather imbalance with the top equation, is it possible to align the highlighted part to the left? Below is the code I am using. ...
9
votes
3answers
4k views

Underline and center headings

For a paper I have to make my LaTeX document guideline conforming. Many of you will already guess now that this means dirty work by violating virtually all possible typography standards. My biggest ...
9
votes
4answers
287 views

Aligning mathematical inequalities

I want to align the following at the inequality signs, however it becomes very ugly: \begin{alignat*}{2} ...
9
votes
6answers
295 views

Center hyphen between words

I have to center '-' mark in each line and it should be in the same location of each line. How would I do that? \begin{flushleft} $I(b)$ - interrogating signal\\ $h_n$ -forward ross ...
9
votes
4answers
262 views

How to start a new line in \boxed{}?

I have: \documentclass[12pt,a4paper]{article} \newcounter{conto} \setcounter{conto}{\time} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{dsfont} ...
9
votes
3answers
4k views

How to put two images side by side and put some symbol in the center?

I want to put two images side by side and put a comparison symbol in between them. Here is the tikz code : \documentclass{article} \usepackage{tikz} \usepackage[margin=15mm]{geometry} ...
9
votes
4answers
187 views

Align text to right-hand edge of centered image?

I am including an image in a beamer presentation, centred, and want to give an unintrusive attribution link, just under the picture, right-aligned to the right-hand edge of the image. In other words, ...
9
votes
4answers
333 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
5answers
537 views

centering a part of an equation

I am using \vdots in my equation, and I need it to be centered. As shown in the figure it is automatically left indented. I am not able to bring the dots to the center. I am providing MWE also. ...
9
votes
2answers
8k 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 ...
9
votes
2answers
828 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
3k 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
3k 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
348 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
244 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
444 views

How to horizontally align headers and decimal centered cells

I use this code to produce a table and to align the column with the dot of the numerical values. \documentclass{article} \usepackage{dcolumn} \begin{document} \begin{tabular}{l D{.}{.}{3} ...
9
votes
1answer
16k views

center horizontally and vertically a block of text

I would center horizontally and vertically a block of text as if it was an abstract text block.How can I do? I tried this: \null\vfill \begin{center} \end{center} \vfill\null it It correct?
9
votes
3answers
200 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
167 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
1answer
12k 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
466 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
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
5k 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
1answer
14k views

Putting Figures Side-By-Side Using Minipage

I am trying to put two figures next to each other. However, it is not working. Here is my code: \begin{figure}[h] \centering \begin{minipage}{1.0\textwidth} \centering ...
9
votes
1answer
1k 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
3k views

algorithmicx package comments on a single line

Is it possible in algorithmicx package to have comments not aligned to the right side? For example I have code like this - \begin{algorithm}[!ht] \caption{My Algo.} \label{myalgo} ...
9
votes
2answers
563 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
378 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
2answers
3k 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
406 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
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
259 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
10k 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
776 views

How to left align the section title in latex?

I am using the \documentclass{ctexart}, and this document class centers the section title by default. How could I left align the section title?
9
votes
2answers
240 views

How to center chapter, section and 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
159 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
1answer
4k 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
138 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
2answers
507 views

KOMA-Script scrbook: width of chapter and section number

I'm using KOMA-Script’s scrbook class and have problems with the Table of Contents. When the chapter number is too large, the chapter number is glued to the chapter heading. The chapter-section ...
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
1k 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
265 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
157 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
135 views

Why is this lettrine being bumped into the margin?

Consider the MWE from an earlier question: \documentclass{article} \usepackage{lettrine} %\usepackage{fontspec} %\defaultfontfeatures{Ligatures={Historical}} ...
9
votes
1answer
233 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
12k 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
239 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 ...