Questions tagged [horizontal-alignment]

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

1
vote
1answer
27 views

Wrong spacing generated by a footnote image

I wrote the following code: \documentclass[a4paper,12pt]{book} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{lipsum} \input{insbox} \begin{document} \lipsum[1] Why?\footnote{ ...
0
votes
2answers
38 views

Some items in enumerate jump left out of margin

I have a boxed list in latex, and for some reason some items jump out of the box out of the left margin. I cannot figure out what is causing this and already have searched and tried some fixes. The ...
0
votes
0answers
31 views

second page starts with more indented margin [duplicate]

[![enter image description here][1]][1]as I applied the enumerate to generate the numbered list for my latex file, unfortunately the second page pdf output generate bit different than the first page. ...
0
votes
1answer
36 views

Data is getting right aligned

Hello I am using following code to generate table. My requirement is to generate table which fits to text width. \begin{table}[b]\renewcommand{\arraystretch}{2.0}\setlength\LTleft{0pt}\setlength\...
3
votes
0answers
29 views

Alignment of an un-numbered multicolumn tcolorbox listing

Consider the following code: % Preamble \documentclass[letterpaper, 10pt]{article} \usepackage{calc} \usepackage{xcolor} \usepackage{listings} \usepackage{multicol} \usepackage[most]{tcolorbox} \...
0
votes
1answer
32 views

Horizontal alignment in multirow table

I have this table to which I want the first column to be horizontaly centered and the cells: "annotated messages" "annotated process" "provided guidelines" "annotator agreement" having two lines, ...
2
votes
2answers
51 views

Table: shift entry to center and make whitespace even

I have this table below. How do I make the white spacing even and also put the 0s center? \begin{table}\centering \scriptsize \begin{tabularx}{\linewidth}{@{}l *{1}{>{\centering\arraybackslash}X} ...
5
votes
2answers
186 views

The equations do not align with respect to +

I have the following code to align a system of equations \begin{aligned} p &= q r &+ r_0 \\ r &= q_0 r_0 &+ r_1 \\ r_0 &= q_1 r_1 &+...
1
vote
2answers
35 views

How can I align the text with an image in a tabularx?

So I have this table with an image and a table \cleardoublepage \thispagestyle{empty} \bgroup \noindent\begin{tabularx}{\textwidth}{@{}c@{}X} \includegraphics[width=1.02in]{img/uaqlogo.eps} &...
3
votes
3answers
112 views

How make a table fit inside the margins?

How can I make this table fit inside left and right margin? \documentclass{article} \usepackage[T1]{fontenc} \usepackage{array} \textwidth 15cm \textheight 22cm ...
6
votes
2answers
226 views

Housemarks (superimposed & combined letters, heraldry)

I am trying to typeset three housemarks from a manuscript (see also images): V + R superimposed A + B combined A and H + S combined However, it's turning out to be harder than I thought. I have the ...
2
votes
3answers
102 views

Latex - unable to get proper boxes

I'm trying to get boxes with keywords after paragraphs. But the boxes are overlapping with previous lines and there is no spacing between boxes in latex This is the result I'm getting. Please help me ...
2
votes
1answer
31 views

Center single lines between other commands, don't center multiple lines

I am writing a latex-class for our theatre club for collaborative writing of theatre-scripts. So the class can be as complex as needed, as long as the usage is as easy as possible. We have a "says" ...
1
vote
2answers
20 views

Alignment of columns in tabular

Is there a command to make all columns of the same width? In my example the first two columns are small and the third is much wider. I know that I could have set exact psarameters, but I'm just ...
10
votes
3answers
358 views

The colon does not align with the \vdots

I have the following code to align several equations: \begin{aligned} s_{1} & :=\sum_{1 \leq j \leq m} X_{j} \\ s_{2} & :=\sum_{1 \leq j<k \leq m} X_{j} \cdot X_{k} \\ & \vdots \\...
3
votes
2answers
66 views

Tree in Diagram not centered

while the diagram seems to be centered (as seen by the caption), the tree inside is not. The narrower the tree, the farther to the right it is positioned. Any thoughts? Here's my code \...
0
votes
0answers
35 views

Incomplete \iffalse; all text was ignored in tabstackengine

My MWE \documentclass[10pt]{article} \usepackage{tabstackengine,xcolor} \usepackage{amssymb} \makeatletter \newcommand*{\pmzerodot}{% \nfss@text{% \sbox0{$\vcenter{}$}% math axis \sbox2{0}% \sbox4{...
2
votes
2answers
25 views

Why do my below cells no longer center after using \multicolumn?

I've got the following table: \documentclass{article} \usepackage{booktabs} \begin{document} \begin{tabular}{cccccccc} \toprule \multicolumn{2}{c}{Letzter Zustand} & \...
1
vote
1answer
51 views

Two listings side-by-side in TColorBox

I have two requests: I am trying to compare two codes side by side using tcolorbox. The problem is that I am not able to put them both with code format (i.e., one is in plaintext and the other is in ...
2
votes
1answer
39 views

Environment Aligning Two Inner Environments

I am trying to create an environment allows for displaying two environments side by side. These two environments are \code environments. A \code environment allows for a title for the code to be ...
3
votes
1answer
39 views

Align several pie charts in table

I want to align several pie charts of different sizes in one table. Specifically, I want that these pie charts are horizontally and vertically aligned such that the centers of the pie charts are on ...
0
votes
1answer
37 views

Misplacement alignment tab character problem

I have no idea why the code returns a warning error. I want to align the nomenclature but the equal signs are not aligned under the one column \begin{equation}\label{key} \frac{\partial u}{\partial ...
2
votes
3answers
72 views

How to add text right to normal text body?

Ok, I'm totally frustrated now. I want to place some vertical text right to the main body text. I managed to rotate the text, but the main body text only starts after the vertical text's end. ...
0
votes
0answers
14 views

Minipages with “fixed” sizes, completely break alignment when content is added to them

The following example run through pdflatex, with an fbox that simply surrounds each minipage which I have omitted for clarity: \begin{figure}[t] \begin{minipage}[t][0.15\textheight][t]{0.28\...
0
votes
1answer
22 views

Redefining 'section' environment to add margin to text

I'm writing a class and I would like to add a margin to the section, such that the text is aligned with the section title (and not with the section number as it is default). Basically using the ...
2
votes
0answers
25 views

LyX justification problem

I am experiencing some problems with LyX justification. I left all parameters as default, but suddenly when I start a new section the subsequent text automatically changes justification. How can I ...
1
vote
3answers
44 views

Putting text in the middle of a line within a three part table

I am trying to put some text in the middle of a horizontal line that only spans a part of the table. Below is my table so far \documentclass{article} \usepackage{amssymb, amsmath, bm} \usepackage[...
2
votes
2answers
44 views

Aligning table notes to the left in three part table

I have some trouble with the table notes of my table. For some reason, my table notes do not align to the left (probably because my table is quite wide). Is there a way to widen the table notes such ...
6
votes
2answers
72 views

Alignment: “Breaking out” of environment (enumerate / minipage)

I have an enumerate environment inside a minipage (the minipage might not be needed, I only included it here to show the margins). Each item has a paragraph of descriptive text and contains smaller ...
1
vote
1answer
25 views

Wrong horizontal spacing of tabular in KOMA-script firsthead

I am trying to replicate my company's corporate design Word template in LaTeX and getting stuck with this behavior: I defined a firsthead \setkomavar{firsthead}{ \scriptsize test\\ \...
1
vote
1answer
29 views

Allowing values to bypass tabular column alignment

I have 8 columns in my table and everything fits perfectly except the very last value, which is about 5 columns long/wide (it's a very long binary string) and it's on the last row all by itself, I ...
0
votes
3answers
56 views

Side by side equation not fitting in page

I want to write an equation that has two equivalent forms so i want to write them both side by side. So I do this using the following \[ \begin{aligned} (X',Y',Z')=\begin{cases} \left(X,2Y,\...
1
vote
1answer
33 views

\hfill -like command in the middle of a paragraph

I want to align the contents of a paragraph such that it is justified, BUT the white space at the end of the paragraph (on the last line) is moved inside the paragraph at a place where a \hfill-like ...
0
votes
1answer
24 views

How to automatically shrink lines in align block to fit hbox?

I have written the following latex \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \renewcommand{\P}{\mathcal{P}} \date{May 2019} \begin{document} \begin{align*} &...
3
votes
2answers
74 views

Align many matrices and operations so it's more beautiful

I have the following matrices, I'd like to align them under each other more beautifully. Can anyone recommend a good way to do this? $ \left[\begin{matrix} 1 & 1 & 1 & 6z-2 \\ -1 & 2 &...
2
votes
1answer
38 views

Align image and text horizontally [closed]

I am trying to align an image and text horizontally on a page. This is an extra question for what I have asked here. I got some suggestions in comments: like add [t] to the minipage, but it does not ...
3
votes
1answer
51 views

Why are my alignments not working?

I am trying to align all the = symbols in the photo below. However, all my attempts of using \begin{align*}with' &...\\ to indicate alignment, produced nothing but errors. The best I could do was ...
2
votes
1answer
44 views

Page contents aligning weirdly in LaTeX/Overleaf

I'm writing a report in LaTeX using the Overleaf online editor. For some reason - when translating to pdf - it arranges all contents far-left and doesn't fill out to the right. Does someone know how ...
2
votes
2answers
26 views

Aligning an array with text beside it

I am trying to create a 'matrix' using the array environment. I have multiple of these lines each with text besides it of varying length. I would like to have the array aligned; however, in example ...
1
vote
1answer
54 views

Left align right-aligned text in align environment

I have the following piece of code: \documentclass{article} \oddsidemargin 43pt \textheight 20.4 cm \textwidth 14.0 cm \parskip 6.8 pt \parindent 12 pt \usepackage{mathtools} \begin{document} \begin{...
6
votes
1answer
88 views

Hook to add code when switching font faces?

The xeCJK package provides a key-value option xCJKecglue which sets the horizontal space when transitioning between CJK script and Latin script. This transitional space usually ranges from 1&...
3
votes
2answers
77 views

How to align underlines in a cases environment

Please consider this MWE: \documentclass{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \...
1
vote
0answers
28 views

pgfplots: How to align dateplot with two x axis?

Assumed we have this Minimum Working Example (MWE) to display a dateplot with two completely identical x axis, but with different xtick positions: \documentclass{standalone} \usepackage{pgfplots} \...
2
votes
1answer
47 views

pgfplots: How to draw boxplot pairs separated in two y axis?

The user Korijn has posted a nice approach on how to create pairs of boxplots which are belonging to each other. Minimum Working Example (MWE): \documentclass[border=2mm]{standalone} \usepackage{...
5
votes
3answers
192 views

Align a table column at a specific symbol

well met! I need some help/advice regarding how to align a table at a specific symbol - in this case, I would like to align the table at the \to symbol Thanks for your help! Find my MWE below! \...
0
votes
0answers
81 views

Automatic justification in bibliography results in spaces before author name

I am using citavi in combination with bibtex and bibstyle plain. My problem is that sometimes there are one to two spaces/ blanks in front of the author name (compare the author Albert with one ...
1
vote
2answers
33 views

What's the syntax for right justifying a caption only on an inserted pdf?

I'm new to Latex and although I've got the hang of basic justification, I don't have enough knowledge to work out the syntax for this specific problem. I have inserted a pdf page and as a figure, it ...
1
vote
1answer
39 views

How to stop `hrule` from breaking centering of text inside `center` environment?

For some reason, placing \hrule above center environment makes text in that environment to appear left-aligned. Why? \documentclass[margin=5mm,varwidth=100mm]{standalone} \begin{document} \begin{...
1
vote
1answer
41 views

Why don't \TextField and \ChoiceMenu begin at the start of the line?

Even if the \TextField and \ChoiceMenu are the first objects in a line with \noindent, they don't begin and the start of the line, there is a little gap. Why? \documentclass{article} \usepackage{...
4
votes
1answer
61 views

How to center multi column multi row environment in matrix

Using this I was able to create a big zero but how can I center it? I'm a bit lost on the horizontal space. How can I center the 0_{3 \times 3} in this matrix. My code: \documentclass{article} \...