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

10
votes
2answers
2k views

Justify Table by Row

For example, is it possible to justify the first row of a table differently from the rest? Maybe there is a way to combine two tables to look like one? MWE: \documentclass{article} \begin{document} ...
0
votes
1answer
443 views

Alignment inside a curve rubric

I have the following problem with my CV using Curve: I have two files, namely main.tex: \NeedsTeXFormat{LaTeX2e} \documentclass[a4paper]{curve} ...
4
votes
2answers
236 views

Problem with the alignment of stage directions when using dramatist

I've been writing scripts using the dramatist package and followed the guide on these forums to make the justification of the names and dialogue nice. Justification when using the dramatist package ...
5
votes
1answer
987 views

Adjusting S column in siunitx

I am a beginner in LaTeX, trying to use it for an industrial test report. I have numerous tables in my document, and I have recently discovered the capabilities of siunitx. I would like to use S ...
1
vote
1answer
490 views

I need help aligning my equations to the left

Here is my working code: I want my equation to be aligned to the left, does anyone see how? I want each \iff sign to be under an \iff sign. \begin{eqnarray*} e^z &=& e^w \\ \iff log(e^z) ...
1
vote
1answer
664 views

Positioning text both left and right on the same line

I am having a hard time positioning text. Especially if I need to 'float' elements to different sides. Currently, I'm trying to show a header with a 'subheader' that should be to the right of the ...
3
votes
3answers
398 views

Table growing with content and automated line break

I would like to have a tabular or something similar with one cell and the following behavior: The cell grows vertically and horizontally to fit the content of the cell but no more than \linewidth ...
8
votes
2answers
2k views

Table of contents: section titles ragged right

In the standard book class, if there are very long section titles, \tableofcontents tries to produce justified text. How can I produce a table of contents so that the section titles are typeset flush ...
4
votes
1answer
1k views

Align environment: take exact control of tab position

I was wondering if it is possible to take control of the exact position of the tab in an align environment. Like so: \begin{align}[2cm] A &= x^3 + 14789\\ B &= f^6 \end{align} Which should then ...
4
votes
1answer
654 views

How to indent a \halign?

I have a weird problem. I want to indent a \halign, but it seems no matter what I try, it just does not like to be indented! Things I've tried: text \indent\halign{&#\hfil\cr foo& bar\cr ...
4
votes
1answer
468 views

Centering a Table

I have a tabular environment nested within a table environment which I'd like to place horizontally centered. What's the best way to achieve this? If the right thing to do is use the \centering ...
22
votes
3answers
12k views

How do I left-align entries in a matrix with \begin{matrix}?

I'd like to left align the -1 entry in the following matrix so that the 1s line up. Is there a way to get matrices to ignore signs in that way? \begin{matrix} 1 & 1 \ 1 & -1 \ ...
4
votes
0answers
3k views

Changing the title height in a beamer [closed]

How can I change the height of the title in the beamer? Height of the title block is big and I want to make it smaller and similarly the width of the left block is big and I want to make it smaller ...
8
votes
1answer
341 views

How to make barplots with text above the bars that always will be inside the axes?

I am making bar plots (xbar) in pgfplots and adding text/numbers on top of each bar by using the nodes near coords command in the axis environment. The x-axis is by purpose not given any value for the ...
15
votes
2answers
12k views

Math inside tables and formatting

I'm trying to make a little summary of mathematic analysis, useful for my university, in LaTeX. I'm stuck in the problem of creating nice table, with alternate colouring containing equations with ...
2
votes
2answers
3k views

Moving Table to Left and Adding Space to Columns

In the following table, the numbers take up too much room. I do not want to landscape the table because there are too many rows. So, I'd like to do both of the following: Create more space between ...
18
votes
3answers
9k views

Aligning Decimal Points in Table

I want to align two numbers in two different rows the decimal point. I do see a link for that here: Aligning numbers by decimal points in table columns However, I don't understand how to ...
8
votes
1answer
847 views

Alignment/whitespace to compensate for negative sign

I have two equations: \begin{equation} \begin{cases} \begin{aligned} a_x &= - \sin \alpha \cos \beta \\ a_y &= \cos \alpha \cos \beta ...
3
votes
2answers
172 views

Using different centring-methods within a table

I've got following table which is almost what I wanted to have. But it would be much better if cells with text would be aligned vertical (only vertical) and cells with -- would be aligned vertical ...
4
votes
1answer
439 views

Text alignment in tabular-environment

I would like to align the text within following table to the top and left. I'm pretty new to LaTeX so I have no clue. Sorry, if this questions has been asked already: \documentclass{article} ...
4
votes
1answer
803 views

Why does >{\centering} in my column spec produce an error?

I want to create a column in a tabular with column specifier 'p' and centred text. I have tried to achieve this using the example below. \documentclass{article} \usepackage{array} \begin{document} ...
8
votes
2answers
20k views

Shifting Figure to the Left in Beamer

I have a figure in a .pdf file that I'd like to shift to the left a little bit in how it appears in the slide. How may I do this? \frame { \frametitle{Slide Title} \vspace{-0.75cm} ...
4
votes
2answers
240 views

Strange centering

\centering command, that I use in my document gives strange output - values aren't centered equally image below should let you understand (elements in red frame and two not framed "value" strings in ...
10
votes
1answer
1k views

Having problems aligning in a table with siunitx when using uncertainties in some power of 10

I'm trying to have a table, with an S column (from the siunitx-package) where the numbers are aligned to the \pm signifying uncertainty. Some values have uncertainties like 1.00 x 10⁴ and that seems ...
6
votes
3answers
1k views

Center-justify with hrule above and below

On my title page, I have something like this: \rule{\linewidth}{0.25mm}\\[0.25cm] \huge \textbf{This is my title, it is somewhat long and split over two lines!}\\[0.25cm] \normalsize ...
5
votes
1answer
716 views

tikz matrix : centering cells

I have what's below and I do not know why the term m_{n+1,k} is not horizontally centered in its cell? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} ...
1
vote
1answer
113 views

\footnotes in environment with \pushftn \popftn

Code proposed by David Carlisle works out-of-the box, cause has no package dependencies. It's comfortable solution of dealing with footnotes in environments needing \footnotemark+footnotetext. I have ...
4
votes
2answers
3k views

LyX: set width of image to 100% of page width

When I insert an image into LyX and set it to 100% page width, its left side is not at the farthest most edge of the left page. Instead it starts where the text margin is, and since it's too large to ...
1
vote
1answer
367 views

LaTeX + Django templating and margin run on text

I am rendering LaTeX templates with Django template tags in them and for testing when I put a very long string of text, no matter if I used \raggedright, or \sloppy, the text always seems to run into ...
4
votes
1answer
423 views

Two line hfill in custom chapter

\def\thickhrule{\leavevmode \leaders \hrule height .5pt \hfill \kern \z@} \def\position{\centering} %% Note the difference between the commands the one is %% make and the other one is makes ...
7
votes
1answer
4k 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
127 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} ...
1
vote
1answer
401 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
737 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
1k 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 ...
6
votes
3answers
2k 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
158 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 ...
2
votes
2answers
676 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
692 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} ...
3
votes
2answers
688 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 ...
5
votes
1answer
8k 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
81 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 ...
2
votes
2answers
187 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 ...
16
votes
1answer
4k 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
337 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
824 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 ...
7
votes
2answers
2k 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
754 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
625 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
379 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 &?