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

6
votes
3answers
43 views

Vertically align at operator, but keep default horizontal spacing

This is a follow up to «How can I align limits at “lim”?». What is the best approach to achieve the following alignment? Namely, I would like the two \prod to be aligned, but each line should remain ...
3
votes
1answer
44 views

Relationship of \\, \newline, \raggedright, \RaggedRight, and parindent

I'm trying to understand if there is anyway to get \\, when in \raggedright or \RaggedRight, to produce a new line that is not indented, while \parindent or \RaggedRightParindent are set in order to ...
5
votes
1answer
69 views

How can I align the first row of these equations?

\documentclass[ngerman]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} ...
1
vote
0answers
18 views

Line break after \hfill [duplicate]

I hope this question is not a trivial one, but I was not able to find any answer to that. I found out that sometimes when I put an \hfill command in order to align some text to the right, there is a ...
5
votes
3answers
70 views

Shift Verbatim environment to the left using \hspace

I pasted some code into a document in a Verbatim environment from fancyvrb. Because it is within two nested enumerate environments, the code is indented quite far over. As a result, one long line of ...
3
votes
2answers
46 views

Alignment inside the \align enviroment-horizontally and vertically

Is it possible to make both expressions for omega's aligned with one another and do the same for the coefficients a,b,r and d,c,t? I tried to align them manually by using center but it does not work. ...
3
votes
1answer
34 views

misplaced & in equation using non-ams format

the following code works with ams environment, however I am trying to use it using aip conference template found here: http://scitation.aip.org/content/aip/proceeding/aipcp/info/authors and it is ...
1
vote
1answer
41 views

Overlapping ticks and figure not centered with matlab2tikz

See the printscreen. What I want is that the figure is centered, now that is not the case with using \setlength\figurewidth{1.0\textwidth}. Besides that the ticks with negative signs on the x-axis are ...
0
votes
0answers
21 views

Centering of Multiple affiliations

I have to centrally alligned the affiliation inforamtion but it is not appearing on center of the page.(appearing right side of the page) Here is the source code: \author{ ...
0
votes
0answers
28 views

Numbering of head title on titlepage?

I want to combine several independent papers in a pdf-format. However, due to time constraints, I am looking for a "quick and dirty" solution. Therefore, I manually constructed a table of contents and ...
9
votes
4answers
106 views

Align text to right-hand edge of centered image?

I am including an image in a beamer presentation, centred, and want to give an unintrusive attribution link, just under the picture, right-aligned to the right-hand edge of the image. In other words, ...
1
vote
3answers
69 views

Extending Text Outside Table Cell

I have a simple graphic I'm trying to make with a table, but for it to work I need to extend the text beyond the table cell - through something like a negative margin - is this possible? Specifically, ...
3
votes
1answer
80 views

How to make right alignment when using Tikz

I use tikz to draw an image, below is part of the image. But the variable name is central alignment, how to make it right alignment? Below is the related code \foreach \i [count=\j from 1] in ...
3
votes
3answers
61 views

Table alignment help

I have three fairly minor problems, but I can't seem to figure out how to fix them. First Problem: Even though I have 'gaps' in my Latex editor between the semi-colon and the number after it (e.g. ...
2
votes
1answer
25 views

I want to left-align the following equation. I don't want that to be centred [duplicate]

\documentclass[10pt]{article} \usepackage{amsmath} \begin{document} \begin{equation*} \epsilon(\lambda_1,...,\lambda_n)=sgn\prod_{\substack{r=s}}(\lambda_s-\lambda_r). \end{equation*} \end{document} ...
7
votes
3answers
78 views

Tikz matrix arrows alignment

I have a problem that I cannot solve for myself. The following code produces the following image, which I do not really like. \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix, ...
3
votes
1answer
53 views

How can I arrange the table and the image in a minipage vertically?

I need the table and the image arranged vertically in the minipage instead of horizontally. I also add the pictures used in the code in the end. \documentclass[12pt,a4paper]{article} ...
0
votes
1answer
29 views

Why does one sometimes get what appears to be arbitrary spacing with the subcaption package? [duplicate]

I have a very simple MWE which demonstrates the problem: \documentclass{book} \usepackage{graphicx} \usepackage{subcaption} \begin{document} \begin{figure} \centering ...
1
vote
1answer
44 views

How to globally left align the text of paragraphs containing variable-length headers with the first line of the paragraph?

I have several paragraphs each with unique headers of differing lengths: \documentclass[12pt]{article} \begin{document} \subsection{Subsection 1} \paragraph{Title} Paragraph text here. Paragraph ...
0
votes
1answer
28 views

Line wrapping mathmode in ACM article-proc style

I am using the ACM document class acm_proc_article-sp. It is a two column page style. I keep running into a badbox where I have some line of text, and then a short equation in mathmode. For example, ...
4
votes
2answers
34 views

centered text/equations inside align environment

is there a way to insert a centered line of text or mathematics inside an align-environment? For example, in the code below, I'd like to have the \vdots between the equations above and below ...
2
votes
1answer
37 views

How do I center text in a cell with `tcbox`?

I have this code in preambule: \documentclass[12pt,letterpaper,twoside]{article} \renewcommand*\rmdefault{cmd} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{animate} ...
5
votes
2answers
72 views

Table alignment problem

So I wasn't happy with how esttab was formatting my regression tables from the statistical program Stata. So I instead I decided to attempt to build my own skeleton table, which had better formatting, ...
7
votes
0answers
39 views

Adding color package destroys listing centering

I am using @egreg's answer to make listings centered: \documentclass[a4paper]{book} \usepackage[T1]{fontenc} \usepackage[ hang, small, it, hypcap=true ]{caption} \usepackage{fancyvrb} ...
4
votes
1answer
39 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
35 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
29 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
100 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
32 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
50 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
57 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
45 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
45 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
81 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
92 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
34 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
31 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
28 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
80 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
32 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
32 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
55 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
34 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
91 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
36 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
103 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
105 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
56 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
51 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
70 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{}{% ...