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

3
votes
2answers
87 views

How can I produce 3 centered columns, with the middle one fitting the width of its content?

How can I produce a document similar to this, but cause the middle column to take up only as much space as it needs (rather than explicitly specifying a width), such that as much space as possible is ...
5
votes
2answers
100 views

How can I made the final column in a table paragraph formatted (line breaks), while still being constrained by the total table width?

I have a table that will have substantial amounts of text in the final 2 columns, and I can't figure out how to define the columns in a way that works for that. My original attempt was as follows: ...
5
votes
2answers
107 views

alignment mark inside box can't be seen from outside this box

I didn't really know how to write the title, hope it's clear enough (I'm willing to change it if anyone suggests anything better). My problem is the following: I want to align different items with ...
6
votes
1answer
189 views

Boxing some cells in tabular enviroment

I would like to make a table in LaTeX, where I box some of the cells within my table. And I would like to be able to nest boxes so that I can have a box in a box. Here I have an example of what I ...
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
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} ...
2
votes
3answers
3k views

Control column width with left alignment in tabular

I want to make a table with a bigger than default column width for the first column. The text in this column should be left aligned. Here is my code. \begin{tabular}{llll|l} Address1 ...
18
votes
1answer
2k views

How to line up blocks in columns with full width blocks in beamer/beamerposter?

This input to pdflatex (whatever version of texlive is on Debian/squeeze) \documentclass{beamer} \usepackage[orientation=portrait,size=a3,scale=0.9]{beamerposter} \usepackage{lipsum} ...
3
votes
1answer
1k views

centering figure, containing a \subfigure with customized \includegraphics

My Problem: I would like to have all images in my Latex document beeing well sized in height and width. Precisly I want, that protrait and landscape images get a predefined size in the document. I got ...
3
votes
1answer
734 views

siunitx align numrange

ave a table with a table in which I use \numrange of the siunitx package. I would like to center align that column at the range-phrase. If I align it left, it sort of works, but if I align it center, ...
7
votes
1answer
813 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} ...
5
votes
1answer
511 views

Correct left aligning items in simplecv (LyX) [closed]

The simplecv class (for LyX), provides the Itemize environment which is defined in simplecv.layout as follows: Style Itemize Margin Static LatexType ...
5
votes
1answer
329 views

nag complains about \centerline in environment “shaded” from package framed

Running this with Miktex, pdflatex, Windows, TeXnicCenter, everything fully up to date: \documentclass{article} \usepackage[l2tabu]{nag} \usepackage{xcolor} \usepackage{framed} ...
4
votes
1answer
604 views

text alignment with center environment

I am going to include some scripts (programming) in my document and I used \texttt to make them look different from the rest of the document and I am gonna move them to the center of page with center ...
7
votes
2answers
831 views

How can I change the whitespace above and below center?

Is it possible to control the space above and below center, e.g. the way it can be controlled above and below math display? In other words, is there an equivalent to, say, ...
4
votes
3answers
198 views

How to create a table with a headline centered and columns centered?

I use the following code to create a table with a centered headline. \begin{tabularx}{\textwidth}{l|X} \multicolumn{2}{c}{Headline centered} \\ \hline Column1 & Column2 which should be ...
3
votes
1answer
1k views

Wrapping multicolumn in tabu

How do I get the text within a multicolumn to wrap when using tabu? I am hoping that tabu makes it somewhat easier than having to specify p with a manual specification of the width ...
5
votes
4answers
2k views

Center column headings in tabular: multicolumn not respected

I would like to center column headings (and column headings only) in the following table. Why does it work with the first column, but not the second (I thought \multicolumn is the correct approach to ...
6
votes
3answers
146 views

How can I set a list inside a definition in latex?

I need to write a definition that has a list of items. What is science : Lorem ipsum dolor sit amet, consectetur adipiscing elit. - List item 1 - List ...
4
votes
3answers
414 views

Center table and align caption over table

I have a small table that I want to center in a document. I can do this but the caption then is left justified rather than aligning with the centered table. I'd like to center the table and make the ...
3
votes
1answer
210 views

How to align text left in psTextFrame

How can I align text left in a psTextFrame? Here's the example: \documentclass[letterpaper,dvips]{article} \usepackage[utf8]{inputenc} \usepackage{textcomp} \usepackage{pst-all} ...
2
votes
1answer
368 views

siunitx | Alignments in Table

Consider the following (refined) MWE: \documentclass{article} \usepackage[locale=DE]{siunitx} \usepackage{booktabs} \begin{document} \begin{table} \centering \caption{S{\o}vnm{\ae}ngde blandt ...
2
votes
2answers
202 views

Help me to align homework points A, B and C in LaTex

I have this kind of homeworks here and I want to get things aligned nicely like "1.2.6 EX. ... a) ... b) ..", "` -- how? I don't like that LaTex inserts immediately the point 8 and points 8.1/8.2 etc. ...
19
votes
2answers
114k views

Adding tabs or creating my own command

I have a problem adding tabs and I can't use a tabular environments (like tabular or tabbing) because I can't mix it with enumerate environments. Is there a way to add a simgle tab like in any text ...
4
votes
1answer
124 views

An environment with custom justification

I would like to create an environment called "question" with one argument (being the question number) with a certain alignment/justification. How might I define one so that it comes out like how it ...
2
votes
1answer
679 views

Align Text in Navigation

I have a beamer template with following code: \begin{beamercolorbox}[wd=.24\paperwidth,ht=\@tempdimb]{section in head/foot}% \vbox ...
3
votes
1answer
3k views

Change alignment locally inside a tabular cell

I want to align some specific cells inside a LaTeX table. I tried using center enviroment inside cell, but it didn't work-Error: Undefined Control Sequence \begin{center}. I also tried with \centering ...
7
votes
3answers
212 views

Undesirable alignment in series of 'enumerates'

(I'll preface this question by saying that there seem to be quite a few question on tex.se with keywords 'align' and 'enumerate', but it seems as if they all deal with questions regarding alignment ...
5
votes
2answers
2k views

colorbox and text placement

I was playing up with \colorbox for my resume and really loved the way I can create styling for the document. Anyway I was trying to center align the text but failed to achieve it using the ...
1
vote
1answer
770 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 ...
3
votes
2answers
96 views

When I include url on a line, it shows up left-justified instead of centered

If I use the url package and include a url on a line inside the centering environment, it shows up left-justified instead of centered. How can I make it centered? MWE: \documentclass{article} ...
3
votes
3answers
194 views

Alignment Issue

I am creating my resume in LaTeX and loving it, using new commands and learning many new things. However I am stuck at the top. I am trying to create an output like this .. I have learnt a bit ...
6
votes
2answers
491 views

How to justify an element in matrix

I have a formula in LaTeX attached below. But I could not justify the position of $+\infty$ symbol. I want it appear just after the $\{$ and aligns to the left of the second term. The LaTeX Code: ...
9
votes
1answer
244 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 ...
2
votes
2answers
213 views

Best way to centre figure in float [duplicate]

Possible Duplicate: Should I use center or centering for figures and tables? There are (at least) two ways of centering a single figure / graphic horizontally in a figure float: 1) using ...
4
votes
2answers
1k views

flalign* still maintaining indent - caused by \text{}?

The goal is to align all of the text that spans more than one line with the equal sign. It appears that if I use \usepackage{amsmath} in my preamble and then use align* it will align with the ...
2
votes
1answer
751 views

Align items on the left

Please, how can I align items on the left (reduce horizontal spacing) ? \begin{itemize} \item[\textbullet] first \item[\textbullet] second \item[\textbullet] third \end{itemize}
8
votes
3answers
418 views

Poster text positioning: Get width of \hfill

How can 0123456789 be aligned as shown in red: Same baseline as abcdefghij, aligned left with ABCDEFGHIJKL? \vlines are just for illustration. I am designing a poster where exact text positioning ...
9
votes
1answer
17k 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?
4
votes
2answers
318 views

Align the text in flushright block

I had two different lines into a block flushright.it is so: Foo Hello Everyone I would align these two lines in this way: Foo Hello Everyone Edit: \begin{flushright} Foo Hello ...
8
votes
2answers
335 views

Have almost managed to get my TOC the way I want, but need help making it 100% perfect

If you compile my current TOC code: \documentclass[a4paper,10pt]{book} \usepackage{lipsum,kantlipsum} \usepackage[dotinlabels]{titletoc} \contentsmargin{0pt} ...
3
votes
0answers
93 views

width=\textwidth yet plots overlaps with margin [duplicate]

Possible Duplicate: pgfplots: how can I scale to text width? Without using such command as trim axis=left or scale only axis, I would expect the following plots to be contained in the text ...
5
votes
1answer
621 views

How to ensure that 2 couples of figures are on 2 facing pages?

I would like to reproduce the following layout with two figures on one page and two others on the facing pages. I would like the first couple to be on an even-numbered page and the second on an ...
8
votes
1answer
1k views

“Nice” way to list pro and contra aspects

I am currently evaluating different alternatives and would like to present a few pro and contra arguments for each possibility. My first thought was to present these arguments side-by-side using two ...
7
votes
3answers
280 views

Center a column in align

I have the following type of code in my document: \begin{align*} (-m)+m & \stackrel{\mathrm{Ax 1.1 (i)}}{=} m+(-m)\\ &\stackrel{\mathrm{Ax 1.4}}{=} 0 \\ I want to align on the = ...
3
votes
1answer
101 views

Align content with the bottom of a table

My sense is that I am missing something basic, but here goes: I have a \tabular object, and on the same line as it ends, I wish to put a \Box If I create a dummy column to store the \Box then the ...
2
votes
1answer
1k views

Latex, left indent numcases

I have this simple equation (representation a dynamic programming recursion): \begin{numcases} {Opt\left(P, i, \ell \right)=min } \nonumber (1)\hspace{0.5 mm} Opt(P,i+1,\ell) + ...
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 ... ...
1
vote
1answer
685 views

Center align italic number in siunitx S-column

Here is a table with the siunitx S column type. I would like the italic value (the command with swapshift) to be still centered on the decimal point. The superscript can be variable, but will almost ...
6
votes
1answer
155 views

alignment problem under new environment

i have defined a new environment called "example" \newenvironment{ex}{\begin{quote}% \refstepcounter{examplecounter}% \textbf{Example \arabic{chapter}.\arabic{examplecounter}}% \quad }{% ...