{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
351 views

Text alignment in a Marginpar (Arabic)

how can I write a marginpar in Arabic with a text alignment from right to left. I use XeLaTeX. When I write \marginpar{{\A كتاب حلية الأبدال وما يظهر عنها من المعارف والأحوال}} Then that comes ...
4
votes
1answer
1k views

Create and center nice EBNF

I used the package syntax to create the following EBNF. I would like to center it, however \begin{center}...\end{center} and other commands do not seem to work on the grammar environment. When I set ...
4
votes
1answer
636 views

Justify text left and right

My code is the following: \documentclass[twoside, a4paper, 11pt]{article} \title{asdfsadf} \author{asdfasdf} \usepackage{ragged2e} \usepackage{booktabs,tabularx} \usepackage{amsfonts} ...
3
votes
1answer
140 views

Centering a text in longtable

I am having some difficulty with centering a text in a table. If you happen to have some spare time, please kindly enlighten me on the following problem. Referring to the picture below, you could see ...
4
votes
1answer
144 views

Table entry shifted downwards with Hyperref package

I wanted to make a table with two columns: the left column lists the terms that the right column explains. Also I'd like to make the terms on the left column link to itself. The minimum working ...
5
votes
1answer
3k views

Aligning bullet and text in itemize

I want to make the bullets in itemize to align at 0 mm (no indent). Using the enumitem package, this can be done by specifying the option [leftmargin=*]. At the same time, I would like the texts to ...
2
votes
0answers
606 views

Subfigure plot in conflict with psfragfig

I am trying to place 2 graphs one next to the other using pstools. I have generated 2 graphs using the commands hFig = figure(1); set(gcf,'PaperPositionMode','auto') set(hFig, 'Position', [0 0 300 ...
2
votes
0answers
547 views

center align 2x2 plot of subfigures [duplicate]

I've got a 2x2 plot of subfigures that is too wide to fit within the margins of a page. Latex left aligns it and the right hand side goes off the page. I would like to center align the whole thing ...
2
votes
1answer
72 views

Spanning a row over defined columns

My code is as follows, however, "Banks' reaction strategy" should be centered over columns 2 to 4. How can I do that? The code: \documentclass[a4paper,12pt]{article} \usepackage{booktabs} %To make ...
7
votes
1answer
124 views

Why does not \centering work on a table, while \begin{center} does?

I cannot get my grips around the different effects of \begin{center} and \centering when used on tables (not inside tables). The MWE should explain the issue clearly: \documentclass{article} ...
3
votes
2answers
237 views

How to move subscripts to the right and text to the left

I have \[ \sum_{\substack{m \in [1,\dots,n] \\ b \in \{0,1\}}} P[y_{i_\ell}= z_{i_\ell}\mid xxx] \] For space reasons I need to move the subscripts so that they are flush left with the summation ...
5
votes
2answers
2k views

Remove extra space from framed environment

I would like to remove or better said have the framed environment (box) aligned with the content in the description. Notice below how the box is out of alignment and aligns with the margin. See a MWE: ...
4
votes
2answers
284 views

How to align equation items below their =

How is it possible to sort equations align with their = like this: a*b*c = d*e*f g*h = i*j k = l*m*n o*p*q = r I've seen it before but I don't know how to find that!
7
votes
2answers
128 views

Amsmath: Using \tag{name} when you have a long name

When the name is long, the centering of the equations is off even though the tagged name wouldn't overlap the content. How can I center equations with a long name? \documentclass{article} ...
3
votes
1answer
66 views

How to improve simple macros to leave the surrounding text justification undisturbed

I have prepared a series of macros in order to simplify the incorporation of pictures into long documents. All of them are based onthe MWE below. However I have just noticed that the text following ...
3
votes
1answer
616 views

How can I center a Sweave verbatim chunk?

I have a very simple sweave chunk with two lines, like this: <<results=verbatim>>== quantile(foo$bar) @ How can I center this element? I've tried embracing the chunk with \begin{center} ...
10
votes
2answers
992 views

Center Aligning Labels in a enumerate environment

I am trying to get enumerate environment do the following: (subgroup) some description of a subgroup of a group G. (hello!) This subgroup is a hello subgroup of G and satisfies an ...
4
votes
1answer
136 views

How can I center multiple paragraphs that are wider than the text width?

I have a figure that consists of multiple paragraphs of tabulars and images. At least one of these paragraphs is wider than the text width. How can I center the entire figure so that the widest ...
2
votes
0answers
31 views

Aligning long entries in LOF using tocloft package [duplicate]

I am facing a problem by left aligning long entries in the LOF using the tocloft package. Although my TOC for long entries looks perfect and aligned, the LOF is not :( . I am using the command ...
3
votes
1answer
493 views

How can I center a tikzpicture horizontally by a certain point/coordinate?

this is a rather nit-picky question but I wanted to ask anyway. Is is possible to center the tikz figure horizontally with using the coordinate indicated by the red circle? The catch is, I have ...
9
votes
1answer
205 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} ...
4
votes
1answer
337 views

Figure + table wider than textwidth

I have a figure and a table placed next to one another, but they are wider than the textwidth. Now I want to center them so they exceed the textwidth margins. Can this be done? Edit: currently I have ...
3
votes
1answer
1k views

\hfill and \hspace do not work

All, I want to put three figures together in one line, spanning two columns. I used \hfill and \hspace{} in order to make the three figures fully span the horizontal width of the paper. However, ...
5
votes
3answers
170 views

Help with left align?

I was trying to left align this equation by using code $$\begin{equation} \begin{aligned} E_\theta(L(\delta_1(X)) &=& E_\theta[(1-\frac{b}{a+X^2}) X-\theta]^2\nonnumber\\ ...
6
votes
2answers
1k views

scale column width with image width

I'm writing a presentation using the beamer class where multiple slides consist of an image on the very right and centered text on the left. So far I do this using the columns environment: ...
1
vote
1answer
115 views

Editing a signature block

I am trying to get a signature block that look exactly like what is shown below, but I am unable to achieve it in LaTeX. Can anybody be of help to me. Please note that the Jun 13 is left aligned, ...
4
votes
3answers
245 views

Misalignment of equations using amsmath

I would like all my equations to be aligned to the left on the same margin ie. move the first one forwards or the other two backwards. The second 2 equations are inside an enumerate package though: ...
1
vote
1answer
584 views

Making a text right-sided under an equation in LaTeX?

I'm trying to put a text on the right side under an equation in LaTeX. Here is my code: \begin{dmath} \mbox{log-likelihood ratio} = A \log{ \left( \frac{A/(A+B)}{(A+C)/N} \right) } + B \log{ \left( ...
2
votes
1answer
65 views

Making a table centered in latex?

I'm trying the following code to make a table in latex, however the table is out of layout. Here's the code I'm trying: \begin{table} \caption{Table Title} \begin{tabular}{|c|c|c|} \hline & ...
3
votes
2answers
419 views

Full width table with caption in refman doc

The refman document class has a big left margin for text. Only the headings are on the normal left margin. Perfect for what I'm doing. But I have a wide table (float) that must be centered on the ...
9
votes
3answers
698 views

TikZ Matrix - How can I align content horizontally which is spanning over multiple cells/rows?

I'd like to finetune the big rectangle in the last column and its content, i.e. that it's all aligned to the third column's center. It is currently too far on the right: So far I have been unable ...
13
votes
7answers
469 views

Alignment in cases

I have this text in LaTeX: $$ sgn(x)= \begin{cases} -1 & \mbox{za podmínky } x>0\\ 0 & \mbox{za podmínky } x=0\\ 1 & \mbox{za podmínky } x>0 \end{cases} $$ But I ...
2
votes
1answer
113 views

Centering content in tables with borders

I have encountered a problem using \centering within the tabular environment. The following code \documentclass{article} \begin{document} \begin{tabular}{|r|r|} \hline \centering{Lolcats} & ...
4
votes
1answer
71 views

Alignment in math environment

Consider the following piece of code \documentclass[twocolumn]{article} \usepackage{amsmath} \begin{document} \begin{align*} A_i &= B_i + C_i\\ &= D_i + E_i+F_i + G_i + H_i\\ &= I_i + ...
3
votes
1answer
116 views

Different alignment in one column of longtable

I have a longtable with this row \begin{center} \renewcommand{\arraystretch}{1.75} \begin{longtable}{c|c|c} ... $x^\alpha$ & $\frac{x^{\alpha+1}}{\alpha+1}+c$ & ...
2
votes
1answer
99 views

Blank space above centered text in tabularx

I have a problem in my report with tabularx and center... I try to center the content of some columns but I don't know why, is there a blank space above the centered text... Here is my code ...
4
votes
2answers
797 views

Why isn't LaTeX centering with the geometry package in use

I am messing around with LaTeX and I am trying to center a title at the top of a legal sized sheet of paper with margins at .25 inch. I can't get the title to center with a center environment ...
2
votes
1answer
109 views

Left/right scripts with horizontal centering

I have been using \newcommand{\lrscript}[3]{\raisebox{.5ex}{\llap{\scriptsize$#2$}}#1\raisebox{.5ex}{\rlap{\scriptsize$#3$}}} to produce the middle segment of things like this: Produced with ...
13
votes
1answer
2k views

How to right align columns but center align header row using pgfplotstable?

I am a newbie with pgfplotstable: I would like to right align the columns of the table containing my data, but keep the headers center-aligned. Here is the code for the tables - does anyone know how ...
8
votes
2answers
404 views

Better way to center text below overline with given length

I need to create lines for signatures. I need 3 of them with different texts below them, but i want all lines to have the same length and the texts centered below them. Tables with \hlines made the ...
19
votes
2answers
239 views

What's a quick way to align text?

I am often writing quick statements in which I would like the following lines to continue underneath the end of the first. Is there a quick way to do this (requires arrays?) this is the first ...
3
votes
3answers
272 views

Free cell alignment in a table

I want to use the package tabu which I've heard is the latest and greatest package for creating tables to generate a table that looks like this: ------------------------------------- |A | ...
7
votes
2answers
137 views

Why \\ increases interline spacing before the command in center environment?

This is about the effect of the line breaking command "\\" in center environment. It appears that the command has the effect of increasing the interline spacing of text appearing before the command. ...
2
votes
2answers
87 views

Alignment not what I would expect

I'm using the following source: \usepackage[fleqn]{amsmath} \begin{equation} \begin{aligned} \notag &t_m & = & \alpha_1(m_1) & \oplus & \alpha_2(m_2) & ...
4
votes
1answer
249 views

Underbraces with text inside a list

I am using uderbraces to annotate text. When I want to have an itemized list though, the bits of text involving underbraces are awkwardly indented w/r/t the bullet point. Is there a way to have it be ...
128
votes
1answer
34k views

Manual/automatic line breaks and text alignment in TikZ nodes

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE). Is there a way to make lines break automatically at some specified width? And can I ...
2
votes
1answer
731 views

When wrapping text around an image, latex fills the bottom line first, not the top. How do I fix this?

I am using the wrapfig package in LaTeX, and in some areas, it is working fine to wrap the text around the image. However here it is breaking the lines in a weird way, and extending the blank area ...
5
votes
1answer
105 views

Where is this whitespace coming from in align*?

I am trying to align 2 simple equations using the align* environment: \begin{align*} \phi(\gedge{\tilde{v}_{i_1}}{\tilde{u}_i}) & = \phi(\gedge{\tilde{v}_{i_2}}{\tilde{u}_i}) & = \gedge{v}{u} ...
7
votes
3answers
5k views

Multiline equation with specific indentation style

I have a multiline equation of the following type: \begin{equation} \begin{split} f(x,y) & =a\\ & =b\\ & +c\\ & +d. \end{split} \end{equation} But the output I would like to have is ...
2
votes
2answers
8k views

Indentation after '\tabular' environments

I was filling some tables for my progress report and noticed something were odd. The following text/tables are indented. MWE: \documentclass[12pt, oneside]{book} \usepackage[ngerman]{babel} ...