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

7
votes
1answer
6k views

Two y-axis pgfplot with ylabel and width=\linewidth badly aligned

I am trying to draw a pgfplot with to different y-axis with their respective label in a full line width and I can't get an alignment of the whole tikzpicture within the margins. The problem seems to ...
6
votes
1answer
160 views

How to distribute narrow expressions along a line?

I want something like this: two narrow equations/words equally distributed along the linewidth. I used next code: \documentclass{beamer} \usetheme{Warsaw} \begin{document} \begin{frame} \begin{...
1
vote
1answer
480 views

Wrapfig pushes section text out of the page

wrapfig works perfectly with all text except the sections. It seems to push the section text out of the page to the left. The only section text that is still showing is the one the wrapfig command is ...
6
votes
1answer
1k views

How do I right-align the last line of a justified paragraph?

I want to wrap around text in a table cell; therefore I use the p option in the definition of tabular. However, I'm writing in Hebrew, so it aligns the last line to the left, instead of to the right. ...
1
vote
2answers
2k views

How can I get this title page?

I want my university title page but I wonder if can I get this. As I was trying a lot with many classes but I am not getting the correct format. Could someone help me to get this? I don't know how to ...
6
votes
3answers
4k views

Right align inside header

I have a header, prepared using fancyhdr. I would like the first row of the left header to be right-aligned with the second row of the left header. In the following MWE I would like "My City" to be ...
3
votes
2answers
183 views

Centering a very wide plot

I would like to center the plot in the following code. How can I do that without changing the dimensions of the page for the parts containing text ? I must keep the dimensions of the plot as it ...
6
votes
3answers
949 views

Alignments in bussproofs package

I'm using bussproofs and would like my premises always to be left-aligned with the beginning of the inference line. So far when I have a single premise inference, I can only get the premise centered ...
3
votes
1answer
844 views

A modification of \part style in memoir

I have modified the \part command style in a memoir document as in the following minimal example: \documentclass[b5paper,10pt,twoside,openright,final,english]{memoir} \usepackage{lipsum} \usepackage[...
6
votes
2answers
1k views

Centering tables in document class apa6

I'm using the apa6 class in doc mode for my thesis. Now, when I create a table and try to center it on a page, the table is centered alright. The caption, however, still floats on the left of the ...
7
votes
1answer
14k views

Subfloat caption width requirements and alignment problems

I'm having problems with conflicting width requirements for subcaptions on subfloats that are horizontal versus vertical. I've spent considerable time searching here and more broadly, poring over the ...
2
votes
1answer
95 views

Put the text of each section inside an environment

I want to put each section's content inside a center environment, that means when I write the code \section{First} texts\dots text text text \section{Second} texts\dots text text text it will be ...
4
votes
2answers
266 views

Can I not use the align & operator within a \frac?

This code is causing LaTeX to throw an error: Missing } inserted. It appears to be because I put a & inside a \frac command (on line 4). I feel as though it should be possible to accomplish my ...
21
votes
1answer
9k views

How to prevent automatic justification of references?

I have a reference entry in the bibliography that appears as follows: [50] AB MySQL. MySQL: The world's most popular open source database, http://www.mysql.com/, 2005. How to prevent ...
6
votes
2answers
468 views

Widths of digits and letters

Within a minipage environment (of a fixed length) I have a list; each list item consists of a phrase followed by an equal sign followed by a percent. The first percent is 60%. I want (1) each ...
11
votes
2answers
1k views

Moving an object to the right margin

I need a macro that aligns an object against the right margin, on the current line if this leaves a space between the text and the object, and on the next line otherwise. No other material should ...
9
votes
2answers
4k views

Align footnote mark with text margin

I have to clone a document, and the footnote mark shouldn't be indented, but aligned to the text body. I couldn't find an answer elsewhere. Any ideas? I'm using XeLaTeX. The result should look like ...
3
votes
1answer
1k views

“Center” table offset, to account for floating figure?

I'm composing a document in which I use the wrapfig environment to let me wrap text around a floating figure. I've placed this figure (of width 0.3\textwidth) on the right of a page, and I'd like to ...
7
votes
2answers
757 views

Subfloat indexes misaligned when using setcaptionwidth

I have the following document: \documentclass{article} \usepackage{subfig} \usepackage{graphicx} \usepackage{geometry} \setcaptionwidth{12cm} \begin{document} \begin{figure}[t] \centering% \...
9
votes
1answer
465 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 &?
8
votes
2answers
5k views

Place four algorithms (algorithm2e) in a subfigure and arrange them in two rows and two columns

I want to arrange four algorithms set with the algorithm2e package in two rows and two columns, as shown in the figure below. I've tried the subfigure package and have also read several related ...
6
votes
1answer
312 views

Centered captions containing \vref may not always appear as expected

I've noticed that when centered captions contains \vref to some reference, the captions may sometimes not become entirely centered. I see this especially in my document where there are two figures on ...
2
votes
4answers
2k views

How to write long equation

I want to write the following equation in such a way that right align is possible. That is all right most elements are in same column. Here left align is done. \begin{eqnarray*} y_{0}&= &(...
3
votes
1answer
587 views

How to centralize the tables

I have made a table like this \documentclass[notuble,10pt,a4paper]{leaflet} \usepackage{color} \usepackage{flowfram} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{hyperref} \usepackage{...
6
votes
3answers
23k views

Aligning text in LyX: left/center/right

How can I center/right/left align text in LyX? In Microsoft Word, I can just click the 3 buttons on the toolbar.
1
vote
1answer
651 views

How to center the name of nomencl?

I am writing my thesis and need to use the nomenclature package to make a list of symbols. Initially I get a list of symbols, making the entire procedure that specifies the help of this package. But ...
6
votes
2answers
1k views

How to use hfill and underbrace together

I'm basically trying to achieve what was answered in How to make nested table span all underlying cells but this time with an horizontal brace under 1 2 3. But as soon as I use \underbrace, 1 2 3 ...
3
votes
1answer
997 views

Spacing in multiple choice question

I tried to make multiple choice question using the following code... but the choices are not uniformly distributed in a single line... I used \hfill by replacing \penalty -50\hskip 2em plus 2em\relax....
30
votes
2answers
20k views

How can I center a too wide table?

I have a document containing a table which is slightly too wide for the page. But instead of growing to the right side only, I would like to have it centered on the page. I have tried to use the ...
8
votes
2answers
1k views

Justification when using the dramatist package

I'm trying to typset a play using the dramatist package. I'm having difficulty figuring out how I change some settings. I want to ensure that the text that the characters say, is justified, rather ...
7
votes
1answer
478 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 ...
3
votes
1answer
705 views

Siunitx: alignment, parentheses and font size

I'm trying to align numbers (that are bolded, between parentheses, etc.) by decimal points in table columns while using the auto-round option of the siunitx package. The following code doesn't work: \...
5
votes
1answer
649 views

Subtable inside a table / Adjusting table column width on the fly

I've been fiddling with the following table for a while, and have some minor issues. \documentclass{article} \usepackage{threeparttable} \usepackage{multirow} \begin{document} \begin{table}[!ht] \...
2
votes
2answers
819 views

siunitx multicolumn problem

In addition to Right-centered columns in LyX, I have another problem, now with multicolumns. I want to center the number "98" (which spans two columns) above the two other columns. These shall be ...
1
vote
1answer
393 views

Right-centered columns in LyX

This is very near to my topic: How to align integers on the right, but still center them. However, I do not get it to work under LyX. This is the code I have: \begin{table}[H] \centering \begin{...
3
votes
1answer
954 views

Center body and left margin in page

I'm using the titlesec package to put section titles to the left of their body, but I'd like for the entire page to appear centered. That is, I'd like for the space from the far left of the page to ...
6
votes
3answers
752 views

Controlling text overflow when using \hfill to left- and right-align parts of title

I’m creating a template in plain (Xe)TeX which must have, in the first line, a location and reference number. The location is left-aligned and the reference number is right-aligned. (See example 1, ...
11
votes
2answers
1k views

Custom alignment of columns in align environment

I need to typeset two columns of equations, each row typeset with an equation number to the right as with an ordinary equation. The first column must be centered, and the second column must be left-...
14
votes
1answer
5k views

How to align TikZ figures in subfigs

I use subfig to show an array of tikz figures. Unfortunately these figures are sometimes of different height, so they don't show up properly aligned: I'd like to see all nodes on the same line. I'm ...
14
votes
4answers
4k views

Best Pattern For Adding Commentary in align Environment? [duplicate]

I've been using the align environment to line up equations in proofs/explanations/etc and I like to place parenthetical commentary for each step, similar to the code below: \documentclass{article} \...
6
votes
1answer
711 views

Include hspace in header/footer in fancyhdr? [duplicate]

Possible Duplicate: How can I force a \hspace at the beginning of a line? I am trying to put a postal address in the footer. I want the first line to be "Address: Address line1", then the next ...
6
votes
4answers
1k views

Resetting alignment in the align environment

I have a few aligned lists of coefficients. One set of coefficients has three columns and the other has four. At the moment I display them with two align environments: \begin{align} \gamma_1 &=...
1
vote
1answer
723 views

Justify text in memoir class margintable environment

In page 181 of texdoc memoir, The marginfigure and margintable environments can of course be adjusted using \setfloatadjustment, default \setfloatadjustment{marginfigure}{\centering} \...
8
votes
3answers
5k 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 ...
8
votes
3answers
3k views

How to align piecewise functions?

I have two piecewise functions defined like this: \begin{align*} \left\{ \begin{array}{ll} i = x^2 + y^2 \\ j = a^2 + b^2 \\ \end{array} \right. \\ \left\{ \begin{array}...
5
votes
2answers
1k views

Theorem environment - centered line

\begin{theorem} Let apples be fruits and let tomatos be a veg. Then the following is true: \centerline{apples are veg} \end{theorem} I just read that one shouldn't use centerline because it's TeX ...
8
votes
2answers
2k views

Make ToC in the center and left aligned in beamer

Using the following code I could put the ToC lines in the center in beamer: \begin{frame} \begin{center} \tableofcontents \end{center} \end{frame} But how to make these ToC lines left aligned ...
1
vote
1answer
7k views

Left-align {align} environment

I have a problem writing my report in LaTeX. I dearly need this block of equations to be aligned on the left side of the page, in fact I want all my equations to be left-aligned and have the option of ...
2
votes
2answers
2k views

How to align if-condition in equation systems

I use this environment for an equation system: \newenvironment{sistema}{\left\lbrace\begin{array}{@{}l@{}}}{\end{array}\right.} But in this way the "if-conditions" are not aligned, as an example: \...
11
votes
3answers
32k views

Clean-Looking Piecewise-Defined Functions

I want to write a clean-looking piecewise defined function. There's a similar post here: How to write a function (piecewise) with bracket outside?, but I have follow-up questions. The two options I ...