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

13
votes
5answers
36k views

Center table on page

I would like to center a table on the page, not only the content. But I can't find the right keyparameter or command. I have follwing table \documentclass[11pt]{scrartcl} \usepackage{multirow} ...
12
votes
2answers
6k views

Dynamically size arrow \mapsto in function definition

I have the following diagram: However, this looks a bit ugly, I would like a version that looks a little bit better. For example, size the last arrow such that the T_\phi is moved to the right. ...
23
votes
1answer
7k views

Underfull \hbox in bibliography

I am getting lots of "Underfull \hbox" warnings that point to the *.bbl file. It looks like these messages appear only when URLs are very long, like in the below example: @techreport{nistguidesec, ...
17
votes
3answers
5k 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?
16
votes
2answers
3k views

Placing TikZ drawings in a minipage side by side

I've some problems with aligning some drawings I made with TikZ: I want these two TikZ pictured below to be displayed side by side with the two captions being on the same horizontal level. ...
14
votes
1answer
771 views

Align numbers and separated uncertainties in tables with S columns

If I have a table like this \documentclass{article} \usepackage{booktabs} \usepackage[separate-uncertainty=true]{siunitx} \begin{document} \begin{table} \centering \begin{tabular}{ ...
12
votes
1answer
8k 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[|->, ...
12
votes
4answers
6k views

Aligning plain `align` and `cases`?

The cases environment works very well for enumerating cases within a large left bracket. I'd like to be able to combine it with the align environment so that equals-signs and conditions also line up: ...
10
votes
2answers
10k 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} ...
21
votes
4answers
11k views

How to align table headers differently than all other table cells?

I'm using fixed-width columns with my table, and using both longtable and booktabs packages (as well as tabularx because of \newcolumntype command). In my table, I'll have lots of number data in ...
14
votes
5answers
2k views

In a tabular, how to left align ignoring minus signs?

I'd like to create a table that is aligned left, but minus signs are ignored. E.g., the following gives a normal left-aligned table \begin{tabular}{llll} & a & b & c ...
12
votes
1answer
2k views

right description list LaTeX beamer

How to do right align a description list using beamer? Name | Joel Spolsky Address | Some address Using the enumitem package as suggested in Description list with right alignment of ...
8
votes
3answers
4k views

Format spacing for correlation table (any statistical table)

I'm attempting to format a correlation table for publication but can't get the spacing right when I include significance stars. I'd like to have minimal space between columns. The space between ...
46
votes
3answers
20k 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 ...
17
votes
1answer
29k views

How to center a specific caption?

I'm having a problem with centering my figure captions. Particuarly, I know that we can use \usepackage[justification=centering]{caption} to center captions, however, I'm interested in just centering ...
13
votes
3answers
1k views

How do I obtain multline-type alignment within a group of equations?

I want to achieve something like the following (for now achieved using Microsoft Paint): That is, I want to group a number of multi-line equations within a single equation-type environment (i.e. ...
13
votes
2answers
5k views

Tables with multiple panels in LaTeX, R and Sweave

I would like to know what the accepted Sweave/R/LaTeX solution is for producing tables with "panels": multiple parts, which may or may not contain the same columns, combined into one table. The ...
11
votes
4answers
670 views

Position margin notes relative to left margin in plain TeX

I want to add margin notes in the Tufte style to my Plain TeX document. (I'm using eplain, if that matters.) I know that if I were using LaTeX I could just use tufte-latex, but as a thorough ...
10
votes
1answer
4k views

Negative Sign and Matrix Alignment

I am having trouble centering the elements of a matrix such that the negative sign is not taken into account during alignment. Additionally, I would also like the space between the left parenthesis ...
10
votes
2answers
6k views

How to align source code produced by listings package with main paragraph text

I'm using the latex listings package for the first time to format some HTML. I'm noticing that by default, the html code is being pushed further left than the main paragraph text of my document. Is ...
8
votes
2answers
6k views

How to place and number 3 short equations in one line?

I have 3 short equations which consume much vertical space, if each one is typeset in a separate line. How can I typeset them in one line in a "mathematically correct" way? I do not necessarily need ...
7
votes
2answers
165 views

Is it possible to typeset with angled margins?

I'm typesetting a book using memoir in XeLaTeX, but on some pages, as an accent, I would like to make an angled margin, something like this: Even if I have to define the page limit separately ...
7
votes
1answer
375 views

Right-aligned line-break with long verses in verse

I'm happily using the verse environment to typeset French poetry. However, I'm unsatisfied with the behavior of long-line breaks (when the verse is too long to fit on the page). The verse behavior is ...
6
votes
1answer
423 views

\bfseries and alignment in table

I'm trying to highlight some decimal-point aligned entries in two large tables which are arranged in two columns. I'm using \bfseries to do this and unfortunately this seems to be affecting the ...
6
votes
2answers
1k views

How to center the TOC?

I would like to design the table of contents aligned to a vertical line near the center of the page. The chapter and section titles need to be flushright, the numbers flushleft, and between titles and ...
5
votes
2answers
7k views

Alignment of text in itemize environment

I would like to generate a list of "Aims" (1,2,3...etc) as the \item label, with the text for the aim located adjacent (with \hspace{Xmm}). For items that exceed the width of the line, the alignment ...
5
votes
1answer
874 views

Center parts in toc with tocloft

I'm trying to create a toc in a large Latex document which uses the KOMA script. In the toc I would like to center the parts and remove all other components (pagenumber, partnumber). I use tocloft (a ...
5
votes
2answers
430 views

Wrapping \obeylines with \halign into a macro

In the TeXbook, Knuth gives an example: Are you tired of typing \cr? You can get plain TEX to insert an automatic \cr at the end of each input line in the following way: \begingroup \let\par=\cr ...
10
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
137 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
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
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
1answer
2k views

Using infer from the proof package?

I am using the \infer command from the proof package. Few things that I am trying to do unsuccessfully: How can I have some space between the elements of the proof? such as space between x and y ...
9
votes
3answers
16k views

How to Center a BeamerColorBox

The question is, how to horizontally center a beamercolorbox on the page? I put it in the center environment, but that doesn't work. \setbeamercolor{bgcolor}{fg=black,bg=blue} \begin{center} ...
8
votes
1answer
702 views

eledmac and two column footnotes

I like dblfnote and have been working with it for a good while. Now my footnotes are just getting too long and the typesetting results accordingly undesirable, they would be way better if footnotes ...
8
votes
5answers
6k 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 ...
7
votes
2answers
3k views

How to align terms in alignat environment

These are my math equations. To enhance readability, I'd like the third column to be aligned around the + sign; that is, I wish to place some horizontal blank in front of $n\mathbf{A}_0$ (not ...
7
votes
1answer
553 views

TikZ graph not aligning

I am having two issues with TikZ pictures. I have three graphs side by side, and I am having issues, but only with some of them, which is very odd. First the x-axis is going out of alignment (some ...
7
votes
4answers
4k views

Table caption align top-right

How I can align caption for table like this? Current code: \begin{table}[h] \caption{} \centering \begin{tabular}{|l|r|r|l|} \hline № & X & Y & Время ...
7
votes
2answers
2k views

Push a block of lines to the right margin

The following code does what I need: \hbox to \textwidth{\hfill \vbox{ \hbox{some text} \hbox{some other text} } %vbox } %hbox The important things here are: Lines are not ...
7
votes
2answers
19k views

How to center the minipage?

The left margin is too wide if I set 1.5\textwidth: \begin{document} \noindent\begin{minipage}{1.5\textwidth} test \end{minipage} \end{document}
6
votes
1answer
174 views

Aligning and centering a lstlisting with two columns on a page

Consider the following code taken from here to produce a fancy listing : % PACKAGES \documentclass[11pt,a4paper]{book} \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} ...
5
votes
2answers
296 views

Implicit \hfil at the end of each paragraph?

Why do Alpha \hfil\ Omega\par and Alpha \hfil\ Omega not flush "Omega" to the right?
5
votes
2answers
1k views

Beamer table of contents custom bullets: Long section titles do not align

I have redefined the table of contents bullets in my slides to a circled number. However, long section titles which span more than one line do not align with the text from the previous line but with ...
5
votes
1answer
4k views

subcaption/subfigure not centered, and caption too narrow

I'm using the subcaption package to make some subfigures with subcaptions (clearly), in a two column document, specifically the IEEE Transactions journal document class. There are a lot of figures, ...
5
votes
1answer
520 views

Inserting an image on the right

I got a problem in my LaTeX document. I used the codes below: \begin{flushleft} \begin{figure}[tp] \centering \includegraphics{C:/Users/churva/Desktop/wla.jpg} ...
5
votes
3answers
3k views

Why are the lines around my multicolumn cell misaligned?

In the following table, why does the double line before the diff column not go through? I guess all the multicolumn{1} are wrong? How can I fix it? \begin{table} \centering ...
4
votes
1answer
110 views

Auto-numbering table environment with aligned numbers

I'm trying to create a table environment with: A header row that spans an arbitrary number of columns, aligned, automatically numbered cells with aligned numbers uniform spacing between the all ...
4
votes
2answers
16k views

How to right-align a title (without creating a complete custom title page)?

I suppose this is a simple matter, but I'm still finding my way around where to put things in LaTeX. I would like to right-align (i.e. flush to right) the contents of an article's title page. By ...
3
votes
2answers
263 views

Comic book or graphic novel style panels in LaTeX

I have heard that LaTeX is not necessarily suited to make panels. That even two-column is difficult to get the text to align. I would like to draw stuff like this: --------------------------- ...