{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
2answers
48 views

Defining an environment for aligning elements in a table and labeling them alphabetically

I'd like to automate this process in an environment as far as possible: \documentclass[12pt,ngerman]{scrartcl} \usepackage[utf8]{inputenc} \usepackage{babel} \begin{document} \begin{tabular}{llllll}...
1
vote
1answer
21 views

hbox badness with line breaking in tables and use of \raggedright

I am hunting for hbox badnesses in my document at the moment and have some problems in resolving issues with a table using tabularx. As suggested in this thread I am using \raggedright to relax the ...
2
votes
1answer
37 views

Create a line with text on the left border and right border

I'm trying to create a line at the end of a document which will just display a name on the left and the date on the right. I've attached an example. I've considered using tables, but that seems like ...
3
votes
2answers
356 views

Simple visualization of 3D matrix

I need to visualize 3D matrix in a way similar to this one: There are no arrows needed, I only want to have all 2D arrays fully visible, one "behind" each other and their corners connected by lines. ...
2
votes
1answer
90 views

Line breaks in code affecting outcome appearance (boxes)

I fear the answer to my question might be obvious to many of you, still I couldn't explain it to me. Using a parbox in an fbox and changing the textcolor works out as desired. But I came across a ...
0
votes
0answers
41 views

format for justifying each step in a proof

I'm looking for a way to structure my proofs where I can indicate an application of a previous theorem. Right now I'm writing things like "so and so is true since Theorem 1" or "this is true (Theorem ...
0
votes
1answer
24 views

How to offset a pict2e picture horizontally?

One way or another I have chosen to use the picture environment (with the pict2e package) to create the figures in my document. Now I am to deal with the consequences, the main of which is the figures ...
4
votes
1answer
96 views

Horizontally centering a node in a TikZ diagram

I manged to draw this diagram with tikz: with this code: \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \pagestyle{empty} \...
8
votes
4answers
365 views

How to align superscripts?

I have an expression like $$\eta^{[\alpha\beta}_{\phantom{\alpha\beta}\rho}h^{\sigma]}A^\rho$$ and I would like that all the indices alpha, beta, sigma and rho appear on a same line. If someone ...
1
vote
0answers
57 views

Is there a way to justify ALL LINES of a given paragraph? [duplicate]

I would like to set the paragraph alignment to "all lines", like in Adobe InDesign, see screenshot below: Is there a way to do it with LaTeX? And if yes, will it work with the multicol package ? ...
2
votes
1answer
31 views

How to center elements of different sizes

I would like to display some matrix things \begin{frame} \begin{align*} \left( \begin{array}{c} y_1 \\ y_2 \\ \vdots \\ y_T \\ \end{array} \...
1
vote
0answers
50 views

Centering too wide figures?

How do I center these two figures that are too wide? \documentclass{amsart} \usepackage{amsthm, amsfonts, amsmath, amssymb, mathrsfs, enumerate,graphicx} \usepackage{pgfplots} \usepackage{...
2
votes
1answer
65 views

Text is off center with \begin{center}

Using this source: \documentclass{article} \begin{document} \begin{center} Lorem ipsum dolor sit amet, vim omnes munere at, no affert appetere cotidieque ius. Quo nulla elaboraret cu. Nec petentium ...
2
votes
2answers
68 views

Aligning chemical equations in a table

I have a table containing some chemical equations, some with more than one line. Can I align all of them at their reaction arrows without some much space around it? Dividing the reactions into parts ...
1
vote
1answer
75 views

Justify content in beamer blocks

I have a beamer presentation that contains different blocks, I need to justify all my paragraphs (right and left) how can I do that? \documentclass[11pt]{beamer} \begin{document} \begin{frame}{...
2
votes
1answer
43 views

Align text by numbers in table columns

I need to align the text in columns by decimals in the numbers. However the numbers go together with text so I can not simple use dcolumn package in 5th column as in the 1st one. If I split to more ...
0
votes
0answers
15 views

Insert line break if content doesn't fit empty space in last line of paragraph [duplicate]

I would like to typeset a small phrase aligned at the right in the last line of a paragraph. Ex: This is some text in with a short enought line this is the phrase The code: \...
3
votes
1answer
38 views

Justify left and right inside example environment

I use the "Numbered Examples (multiline)" environment in a LyX document (class : Book (Standard Class)). The text is not fully justified (it is not right justified) in the examples. Is there a way to ...
0
votes
2answers
39 views

How to make text at center of column in a table

i have to add a table in my report. See the picture .How I can change the code so that text in each columns fits in the middle of each box. If you see the last column the text in on extreme left side ...
2
votes
1answer
31 views

Why does combining arrays and \left/\right cause alignment?

The following MWE is rendered as shown below: \documentclass{article} \begin{document} \begin{array}[t]{@{}l@{}} \left[\int abc\right]\\ \left[abc\right] \end{array} \end{document} Why aren'...
2
votes
1answer
48 views

How to left-align exercise questions (exercise package)

Given the following document: \documentclass{article} \usepackage{exercise} \begin{document} \begin{Exercise} \end{Exercise} \end{document} How can I make the output ("Exercise 1") left-aligned? I'...
0
votes
1answer
124 views

Dot-aligned table column with defined width

I am trying to specify a custom column command, taking a width parameter and aligning the column by the decimal point of the content. I am using the tabularx package to use columns with a pre-...
1
vote
1answer
62 views

Underfull \hbox warning about alignement in a csvsimple table

The following csvsimple table keeps returning warnings of the type: Underfull \hbox (badness 10000) in paragraph at lines: \csvreader[no head, longtable=|p{\dimexpr 0.2\linewidth-2\tabcolsep}|p{\...
7
votes
1answer
242 views

Why don't these functions align perfectly with uniform spacing?

Thanks for the help. I don't see why the functions aren't aligning perfectly with uniform spacing. \documentclass[11pt]{article} \begin{document} \DeclareMathOperator{\csch}{csch} \...
2
votes
1answer
69 views

How to attach a table to another table horizontally?

How to attach a table to another table horizontally? \begin{tabular}{|c|c|c|} \hline some thing & some thing & some thing \\ \hline some thing & some thing & some thing \\ \hline ...
3
votes
2answers
62 views

Encode into an `enumerate` environment (Version 2)

From the following code, a selection from a multiple-choice test is rendered. The four problems should be enumerated as 1.), 9.), 16.), and 25.). How do I do that with an enumerate environment? I ...
0
votes
0answers
12 views

How to draw a horizontal separation line with thick center and thin sides? [duplicate]

I want to create a horizontal line to separate context and references, as always seen in papers like this I have tried \hrule abc\begin{center} \hspace{0.25\textwidth}\hrule width 0.5\textwidth \...
2
votes
2answers
30 views

text in align-environment

Is there a way to coordinate the space here? \documentclass[a4paper, 12pt, oneside, titlepage]{scrbook} \usepackage{amsmath} \usepackage{amssymb} \usepackage{colortbl} \begin{document} \begin{...
5
votes
1answer
117 views

Left-justified text with wrapping math

I would like left-justified text with embedded math which wraps in a manner similar to the behaviour with fully justified text. It seems LaTeX will wrap math at "sensible" points (e.g. between certain ...
3
votes
1answer
55 views

how to center Tikzpicture?

I am making a presentation, using a template I found online. The problem is that my tikzpictures are not getting in the center. I have tried \centering, \begin{center}. But that does not solve the ...
2
votes
1answer
39 views

\raggedright in glosses and switching back to normal alignment

I have to typeset long examples. Sometimes they span several lines. I would like to have them \raggedrightbut this should not affect the translation. The code for the glossed example taken from ...
1
vote
0answers
36 views

Moving title to the left without aligning to the left [closed]

I'm trying to produce a title page with a title made with \maketitle and a picture (logo) to the right of the title. I already managed to have the image to the right using tikzpagenodes, but I didn'...
3
votes
1answer
70 views

Justify text when using a tabular environment

I'm using \documentclass[10pt,twocolumn]{article} \usepackage{hhline} \usepackage[left=1cm,right=1cm,top=1cm,bottom=2cm]{geometry} \addtolength{\columnsep}{0.4cm} \addtolength{\textwidth}{\...
1
vote
1answer
37 views

How to align column of mixed fractions (after whole number) in tabular?

I have a table that has a column with mixed fractions (that is, whole number plus fraction part) as entries which I need to reproduce in latex. The problem is that the fraction part of the mixed ...
3
votes
2answers
47 views

Display hexcode in table

I want to display some hexcode aligned in a table. This is what I got: \begin{table}[h] \caption{Dirty table} \centering \begin{tabular}{p{6cm}|p{6cm}} \textcolor{red}{0000 0000 0001 0000 0000 0000 ...
1
vote
1answer
44 views

Split justified text between two pages with longtabu

I would ask how to split justified text between two different pages using longtabu. For now, if a single row exceed the space of the page, the entire text will be printed in the next page, leaving a ...
0
votes
0answers
32 views

How to change alignment of text inside a block?

I am drawing a block diagram in LaTex. In some of the blocks, I need to align text along vertical direction. How can I do that? \begin{figure*}[!t] \setlength{\unitlength}{0.13in} \centering \begin{...
3
votes
0answers
66 views

Centering list issue with Enumerate+Hyperref+Varwidth

I want to center an enumerated list so i've tried to use the answer of this question given by the Great David Carlisle. But using hyperref, varwidth and enumerate (in any order in the preamble) cause ...
4
votes
2answers
78 views

Horizontally misalligned sub-/superscripts in fractions when using 'minus' sign

I am combining sub- and superscripts in the denominator of a fraction. I get ill behaviour when the exponent is preceded with a minus sign: I would expect the sub- and superscript of the first two ...
0
votes
0answers
16 views

Alignment problem in tabularx that happens when I change it to non-decimal

I have the following code which aligns when I have decimal figures but fails to do so when I type 0 for instance. The code is as follow \documentclass{article} \usepackage{tabularx} \...
4
votes
2answers
41 views

calc package and global lengths problem in tabularx

The output of the following code is affected whether calc package is included or not: \documentclass{article} \usepackage{tabularx} % \usepackage{calc} \newsavebox{\testbox} \newlength{\testlen} \...
1
vote
1answer
31 views

Move two captions to the top and to the left respectively

I have two captions in the following table: \begin{table}[!htbp] \caption{Stuff Stuff Stufff.} \begin{tabular}{l |l l| l} \hline & aaaaaaa & aaaaaaa & aaaaaaaa \\ \hline bbbbbbb & ...
4
votes
3answers
135 views

Alignment of multiple equations and their comments

I need to center-align a series of equations and then align their comments (which are themselves to be right-justified (except not all of them!). I'm slightly overwhelmed by the numerous options ...
1
vote
1answer
27 views

longtabu alignment cell won't get to the center

I'm using tabu package. The inside of the every cell doesn't get to the center except for the second and the third. And also the line for closing the table doesn't show. Can anybody help me to fix it? ...
0
votes
0answers
39 views

How to get picture at center of the page

Dear All, I am using below lines to add picture to my document but it is not in center of the page (see the picture attached).Does any one know how I can get it at center of the page please. \...
4
votes
1answer
37 views

Is there a way to set the default alignment for mathtools matrices?

I have a lot of mathtools matrices in my document that require right alignment (and others that have other alignment): \begin{bmatrix*}[r] 1 & 0 & 0 \\ 7 & 1 & 0 \\ \end{bmatrix*} ...
0
votes
1answer
85 views

How do I make the text body go around a tikz picture flushed right?

I would like the text to start at the same height as the picture, but I want the picture to be flushed right. It's not directly associated with the text, but rather more like a visualization tool for ...
1
vote
1answer
45 views

How to Right Align \attrib in Verse Package?

This MWE comes straight from Peter Wilson's Verse Package manual (v2.4b). In the example the attribution is right justified. However, when I implement the MWE in MikTex my attribution is left ...
4
votes
1answer
89 views

centering tikzpicture

I have some problems concerning the command \centering. I want to put a tikzpicture in the center of the page but I can't do it. I tried with \centering and with \begin{center}...\end{center} but ...
3
votes
1answer
80 views

Insert a graphic within a sentence nicely?

I am using string diagrams that I draw in Illustrator a lot, and I would like to draw them within a sentence. When I just put \includegraphics{...} in the text, the image appears but its bottom is ...