Tagged Questions

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

Page number shifted to the left

I am writing a report with different geometry settings for the title page, so after finishing the latter with \end{titlepage}, I specified the new settings for the rest of the document using ...
3
votes
1answer
58 views

References spilling out of margin in bibliography

I have a search for this problem but all I could find was the case of reference citations in document spilling over, not the bibliography. Quite simple problem I hope... In my bibliography some of ...
1
vote
1answer
64 views

cannot figure out how to produce some tikz pictures next to each other

Ideally I would like to have the tikzpictures be in one line centered horizontally with its caption each preserving its node size and line strength and vertically aligned to a common bottom line. I am ...
5
votes
3answers
132 views

Aligning in- and out-text for algorithms

I use the algorithm2e package to typeset algorithms with custom keywords for input and output. When using \SetKwInput{KwInput}{Input} to define the keywords, colons are added but input and output are ...
2
votes
1answer
42 views

Center all same theorem

I would like to know if it's possible right from the definition of a theorem to center it : \begin{center} \begin{minipage}{5cm} { { \theoremstyle{plain} \theorembodyfont{\small} ...
1
vote
0answers
80 views

Centering TikZ picture inside poster box

I would like to center a tikzpicture inside a posterbox (baposter) \headerbox{Vorgehensweise}{name=definitions,column=3,below=problem,span=3}{ \usetikzlibrary{shapes.geometric, ...
0
votes
1answer
79 views

How to do \flushleft and \flushright with tikzpictures

I have two charts, one is drawn with pgfplots, the other with pgf-pie. I want put these two chart in align horizontally, so one is on the left and the other is on the right. I have read Aligning using ...
2
votes
3answers
52 views

How to right-align any line or word in a paragraph in any documentclass?

I have done some search for margin alignment in Latex but cannot find how can I right-align any single line? For example, in a letter sometimes we put a Sincerely on the right. But without using ...
2
votes
1answer
90 views

Align itemize bullet to text

I am looking for a command to align text to the itemize's bullet. {\addtolength{\leftskip}{10mm} \textbf{Short text in here} \begin{itemize} \item A description of.. \item Another description of.. ...
4
votes
1answer
115 views

Alignment of text in two columns: forcing empty lines in one, to avoid collisions in the other

I have a question about aligning text in two columns. A similar question was asked here:Two Columns whose content is positioned relative to each other, but I wasn't able to get the example solution ...
1
vote
1answer
112 views

Table heading formatting

I have had this problem before (sort of) - it's related to this question I asked previously. Basically, I am having trouble with my table headings. I want the headings to be bold and centered ...
2
votes
1answer
65 views

Algorithm2e comment line alignment problem

I would like to align a comment within the algorithm environment of algorithm2e in such a way that each line of a multi line comment is left aligned. See the following MWE. In this MWE the second and ...
4
votes
1answer
37 views

Color behind numbers in lstlisting

Currently, my listings use this style : \definecolor{lstgrey}{RGB}{217, 217, 217} \definecolor{lstback}{RGB}{246, 246, 246} \newlength{\numberlengthnormal} ...
2
votes
1answer
40 views

How to right-align whole longtables

Say I have the following document: \documentclass{article} \usepackage{longtable} \begin{document} \begin{longtable}{|lr|} \hline A & 1\\ B & 2\\ C & 3\\ \hline ...
2
votes
3answers
103 views

Problem with horizontal and vertical centering of multiline cells in a table

I'm having difficulties perfectly centering (both horizontally and vertically) a few cells in my table. Here is a screenshot of what it looks like right now: The problem line is the one which ...
0
votes
1answer
35 views

Latex table alignment [duplicate]

I have a table of 2 columns, I want the writing in the left column to be centered and the right column to be aligned to the left. Using the commands below, the left column is exactly how I want it, ...
3
votes
1answer
52 views

Justify text from right in two column springer document class

I am facing one problem in justifying text in springer document class. my code is as below \documentclass[twocolumn]{svjour3} %\documentclass[conference]{IEEEtran} \usepackage{graphicx} ...
3
votes
1answer
95 views

Change bibliography title align when using quotchap

I'm writing my Masters Thesis and I'm using quotchap package in my chapter tiles. However I want Bibliography title align at left instead of right like the other titles. I've tried ...
2
votes
1answer
41 views

Leaked styling from my stackon

\documentclass[12pt]{article} \usepackage{verbatimbox,stackengine,xcolor,hyperref} \usepackage[left=2cm,right=2cm]{geometry} \begin{document} \title{} \author{} \maketitle \section{Overview} There ...
5
votes
3answers
130 views

Two text lines in `flalign` environment

I want to achieve what the picture shows below. Basically, I want those two very long text lines to split into two lines shown below. My major problem is that if I keep the text in one line in ...
1
vote
1answer
46 views

How can I align horizontally matrices of different dimensions?

I'm wondering how can I align two different matrices horizontally. They are: [-1 0 +1] And: [-1 0 +1].T This is my code: \begin{equation} \begin{bmatrix} -1 & 0 & -1 \end{bmatrix} ...
4
votes
3answers
121 views

Horizontal alignment of equation and text

I want to make a list of Quantum Mechanics formula like the format of the following picture. But I am confused about how to make the equations align to the left while the text to the right. Usually, ...
7
votes
2answers
257 views

minipage horizontal alignment

I'm using minipage to put two tables next to each other, and instead it is putting them in vertically. It seems like this is usually caused by having blank lines between the minipages, but that isn't ...
2
votes
1answer
69 views

Dividing page into equally sized sections, vertically and horizontally

I am the editor of a student-paper for mathematicians and physicists, which is made entirely through LaTeX. Right now I need to make a page with several different sections, a lot like the ad-pages of ...
2
votes
2answers
68 views

How to center the graphic of LTXexample?

Scenario I want to write a tutorial on PSTricks, but because latex-dvips-ps2pdf (see the code shown in First Attempt section) makes my effort to prevent reader from copying the listing numbers no ...
4
votes
1answer
95 views

How to make a keyword list with enumitem with labels aligned right in the margin?

I kinda succeeded in doing with without using the enumitem package, by doing this: (disregard the lines, it's made with showframe) \newenvironment*{keywordlist}{% \list{}{% ...
2
votes
1answer
138 views

How to set the justification for all the standard paragraphs in a LyX document

This must be trivial. I am new to LyX but I have read most of the 183 page User Guide and not found the answer. When I change the justification setting (to remove right justify) it only does it for ...
2
votes
4answers
170 views

Alignment in a piecewise function

I would like to have the following two equalities displayed with the = aligned. I use the following code. The = are not aligned, and 2.5pt is typeset before the = in each line! Also, there is an ...
5
votes
1answer
73 views

How to obtain a fixed gap between columns in a table?

How can I center a column of a table which is raggedleft/raggedright at a specified position? Basically the length between W and X, X and Y and Y and Z should be the same, W should be raggedright, Z ...
3
votes
3answers
65 views

Multiple columns in table, problem with alignment

The following code generates a table: \begin{table}[!t] % increase table row spacing, adjust to taste \renewcommand{\arraystretch}{1.3} \caption{An Example of a Table} \label{table_example} ...
3
votes
1answer
40 views

How to force part of a paragraph title to correctly align with right marging (using e.g. \hfill)

I would like to have a \paragraph{A paragraph title 2000} with the term '2000' aligned to the right margin. If I use \subsubsection{A subsubsection title \hfill 2000}the term 2000is correctly aligned ...
0
votes
0answers
24 views

Make the text left side [duplicate]

I am trying to write in a template LaTeX document, all the text I am writing is centred. I couldn't find the command causing this problem and I don't know how should I make the text start from left ...
3
votes
1answer
73 views

Centering / horizontal alignment of text inside tikz boxes

I am facing a problem with centering the text inside the boxes: \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook} ...
2
votes
1answer
40 views

Shortcut to declare alignment of many columns in a table

Suppose I have a table with 20 columns that should all be centered. Is there a way to declare the alignment without literally counting out 20 c's? Something like c{20} might be the syntax. I feel like ...
3
votes
1answer
86 views

My Own CV Template - Help!

I wanted to develop a hybrid of moderncv and article class, another CV template. I am facing difficulties. Here is my code till now: \documentclass[12pt]{article} \usepackage{libertine} ...
1
vote
1answer
81 views

ragged2e justifying - centering figures

I am preparing a beamer presentation and I used the ragged2e package to justify the text in my slides (I justified the itemize environment). However, this does not allow me anymore to center a figure. ...
5
votes
2answers
105 views

How can I DeclareMathOperator* with spacing after it, preserving the alignment?

In the context of optimization problems, I'm using \usepackage{amsmath} \DeclareMathOperator*{\minimize}{\text{minimize}} \DeclareMathOperator*{\subjto}{\text{subject to}} to declare some operators ...
2
votes
1answer
95 views

How to properly format a proof/explanation with multiple points of alignment?

This answered question addresses how to properly align/format a proof, allowing one to add text commentary alongside equations without ruining the alignment of the equations; however, it only seems ...
0
votes
0answers
53 views

Aligning figures in a table

I'm trying to align four figures vertically and horizontally. But I couldn't get it right in spite of repeated tweaks. I guess its a fairly small error. Can someone help me out? Here is a MWE -- there ...
2
votes
2answers
66 views

Centering figure caption does not work

I have a few narrow figures for which I want to center the caption. I have to use a LaTeX template from Springer (svmult.cls). This makes captions left-aligned by default. I took a look at this ...
4
votes
2answers
98 views

Align split equation to the margins

How to align a two-lined equation such that the first line left aligns with the surrounding text and the second line right aligns with the surrounding text? Example (where the pipes denote the left ...
2
votes
2answers
121 views

Center equation ignoring condition/remark

Really basic question, probably already answered but couldn't find anything. I have this code: \documentclass[a4paper]{scrreprt} \usepackage{fontspec} \usepackage{amsmath} \begin{document} ...
3
votes
2answers
69 views

Difficulties aligning/centering tables that are side by side

I have two tables which are side-by-side and am having difficulty centering the first table underneath the "X" and centering the second table underneath the "Y". I'm getting the feeling I'm a little ...
4
votes
1answer
39 views

Justification inside Substack

How can I left-justify inside substack? \documentclass{standalone} \usepackage{amsmath} \begin{document} $L_{\textrm{disk}} = L_{ \substack{\textrm{disk} \\ \textrm{orbital} } } + L_{ ...
2
votes
1answer
76 views

2 rows legend and alignment

I got a legend with two rows and I would like to have a different alignment on each row. Is it possible ? In my current code, the legend entries on the second line are much longer than ones on the ...
1
vote
1answer
67 views

Centering images

I made my images in Ipe. But there are some not centered: But, there are others centered: I use the same code for both (just changing, of course, the files names): \begin{center} ...
4
votes
1answer
65 views

Text always on the right

I am trying to create a macro which always places the text in its argument on the right side of the line and then the line should end. For example: Left-Text \mymacro{Right-Text} should have text ...
1
vote
1answer
64 views

after end axis messes up pgfplots axis position

Latex and Tikz are going to get the life out of me... I saw Need to do some changes to pgfplots axis #39099, and that example was working fine for me; so I modified it a bit, and came up with the ...
2
votes
1answer
48 views

Centering table header with \multicolumn and intercolumn space

A previous answer directs that, when using \multicolumn in a tabular, subsequent intercolumn space added in the tabular column spec should be repeated in the \multicolumn column spec. However, this ...
3
votes
1answer
61 views

How to align terms in alignat: too much spaces and too few

Please, help me this code has too much spaces and too few, how can I fix it? \begin{subequations} \begin{alignat}{2} \forall i \in[m] && \sum \limits_{e \in N_{out(s_{i})}} y(i,e) - \sum ...