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

4
votes
1answer
444 views

How can I align equations to the left?

I looked up a template to put my homework in a nice formatting, but I can't get it to look the way I want. More specifically, I want to: Align to the middle whatever is after: \hspace{1in} .... (I ...
4
votes
1answer
206 views

Tabular* Alignment of Columns

I've read about the tabular* environment, and the same example pops up over and over again. What I'd like to know is when the example is converted, why do columns 2 and 3 lose their centering? I've ...
2
votes
0answers
45 views

Aligning comments that break in several lines? [duplicate]

Possible Duplicate: How to align comments with lstlistings? I want to include Matlab code with long comments. The next MWE shows that it is achieved by using the listings package. However I ...
11
votes
1answer
433 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 ...
5
votes
1answer
3k views

Automatic horizontal centering of beamer frame content

I would like to set some global option so that the content of all beamer frames is horizontally centered with respect to the page. In other words, I want to achieve the effect of wrapping all frame ...
5
votes
1answer
440 views

Table alignment with inner table and hline

There are 3 issues with this table. After much experimenting, I can sort of resolve 1 or 2 of them but never all 3 at the same time. I have a very picky customer (aren't they all) and I have to get ...
0
votes
1answer
151 views

How to fix the alignment of table cells?

While trying to improve the answer for another question, I am stuck at getting proper horizontal alignment. The alignment problem is evident in second column. It also shows up as difference in spacing ...
5
votes
1answer
523 views

Different alignment for table number and caption

I have a table whose table number should be right-aligned and its caption should be center-aligned on the next line like this: Table 1 Caption ...
5
votes
1answer
471 views

How to use a math environment without the vertical extra space? [duplicate]

Possible Duplicate: Remove vertical space around align I would like to center two text lines with equations. Normally, one can do that with the align* environment. But I do not want the ...
4
votes
1answer
6k views

How to center a text line within an itemize environment?

How to center a text line within an itemize enivornment ? What I tried: \documentclass[a4paper]{article} \begin{document} \begin{itemize} \item {\centering text to center} \end{itemize} ...
4
votes
3answers
635 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 ...
2
votes
1answer
446 views

How to center text and a rule in a heading

I'm working on my resume, found a nice template as a starting place, but I want my name to be centered on the top above a horizontal rule. Also, rather than two arguments, I just want one, my name. ...
8
votes
1answer
230 views

How do I adjust the placement of descriptions I've made alongside enumerated statements within a boxed theorem environment?

Basically, what I'd like is to have an elegant command that would enable descriptions (commutativity, associativity, etc.) made alongside enumerated statements to be aligned to the far right side of ...
25
votes
2answers
22k views

Table rowspan and colspan

I need to create similar table using LaTeX: I have tried to use \tabular and \multicolumn, but every time I get something wrong. I want: Fixed width columns and fixed height rows; Centered cells ...
3
votes
1answer
788 views

Centering the frontpage using memoir

I'm using memoir (two-side layout). I have the problem that my front page is centered with respect to the margins, which are not equal in left and right side. \begin{center} will not solve this, since ...
7
votes
1answer
750 views

nested equations numbering

Is there a way of playing with align, alignat, numcases etc environments that produces aligned and numbered equations which look like this : Blahblah text before equations : A = B \iff C = D ...
3
votes
2answers
137 views

aligning question numbers, paragraphs

I am typing up a sheet of course problems, and wanted to offset the question numbers from the text of my solutions slightly. Based upon an answer to this question, I tried adjusting leftskip. The ...
9
votes
1answer
745 views

Center in ConTeXt

What is the equivalent of \begin{center}...\end{center} in ConTeXt? I know \raggedcenter, but that not an environment. I could define one command, but surely there is anything like that predefined.
7
votes
1answer
924 views

How to change the alignment of a tabularx within an easylist?

I'm probably missing something super obvious, but my searching has turned up nothing. I want to put a table in the middle of an outline that I'm making with the easylist package. The table is coming ...
7
votes
1answer
684 views

Aligning on plus sign (as well as decimal sign) in tabular environments using numprint

Is it a bug in the numprint package .. or maybe a missing feature? I can't align on the plus/minus sign in tabular environments, padding numbers with spaces. \documentclass{article} ...
4
votes
1answer
1k views

Right aligning text while underlining entire line

For the record, I've spent about five hours endlessly looking here and elsewhere on the Internet, looking for an answer. I'm relatively new to using LaTeX and am trying to create right aligned text ...
6
votes
2answers
2k views

Modify title page

Is it possible to modify the title page from its default in LaTeX? Example: \documentclass[pdftex,12pt,a4paper,english,dutch,leqno]{article} \usepackage[utf8]{inputenc} \usepackage{authblk} ...
3
votes
4answers
261 views

Writing CV, need some advice on achieving structure similar to this

I'm a LaTeX beginner and under a heading (e.g. Interests) I want to have the text laid out as above. Specifically, my problem is getting the part on the right to stay aligned to the line above when ...
32
votes
5answers
18k views

Justify text in moderncv cover letter

I am writing a cover letter and CV using moderncv. Everything works fine so far, but the text in the cover letter is not justified. I think it is good that it is not hyphenated, but it would look much ...
6
votes
3answers
220 views

Specify alignment per column in align equation

Using the following mwe i have not yet found a way to align the formulas correctly. \documentclass{article} \usepackage{mathtools} % extends amsmath and fixes some of its quirks ...
11
votes
1answer
6k 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 ...
4
votes
1answer
799 views

Alignment of nodes and scopes in tikz matrix?

I am trying to fix the positions of the arrows of the following diagram without much success. I would like the arrows to be centered (both horizontally and vertically) in the matrix cell no matter ...
11
votes
2answers
25k views

Align left and right same line

I have this problem: Basically on the second line "Matricola: XXXXXX" isn't right aligned. My latex is: \begin{minipage}[t]{7cm} \textsc{Relator} Prof. NameName\\ \end{minipage} \hfill ...
2
votes
1answer
2k views

Line alignment with \par

I was writing a document in LaTeX and found out that I am not able to properly align the text when I use \\ or \newline Here is the code. \par{ {\bfseries{\today}} \vspace{1\baselineskip} Name \\ ...
13
votes
4answers
5k views

How to edit the linear programming in LaTeX?

How to edit a linear programming as the following: Max z = x1 + 12x2 s.t. 3x1 + x2 + 12x3 ≤ 5 x1 + x3 ≤ 16 15x1 + x2 = 14 xj ≥ 0, j=1,2,3. I want the format to be ...
7
votes
3answers
2k views

Center line based on only part of text

I'm working off of a resume template I found. This is what it looks like I want to center the bottom line of text differently. Right now, it is centered based on the whole line of text, but I ...
4
votes
2answers
3k views

Vertical and horizontal alignment with tabu package

Another question led me to use tabu for the purpose of fitting one column to its content while allowing the others to stretch equally. This is my current code: \documentclass{article} ...
3
votes
2answers
95 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
103 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
109 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
209 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 ...
10
votes
3answers
5k 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} ...
10
votes
1answer
5k 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
3k 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
2k 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
898 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
1k 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
616 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
375 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
705 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
1k 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
242 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
2k 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 ...