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

0
votes
1answer
34 views

Centering a simple table of text

Seems a stupid problem, but I can't find solutions on previously answered questions here on tex.stackexchange. I have the following table (pretty simple): \begin{table}[h] \centering ...
1
vote
1answer
58 views

Declaretheoremstyle headpostspace = \newline + indent?

I am having problems trying in declaring a theorem style. I would like the first row of the definition to be on a new line with the normal indent. If I try to add \par instead of \newline for ...
2
votes
2answers
36 views

How to centering cells with these code

I have searched with many solutions about centering the cells. But none of them works with my code. Could you please help a newbie like me. \begin{table}[htbp] \label{concent55} \centering ...
4
votes
1answer
89 views

long list set of numbers

I have a list of sets and some of the sets have almost 1000 elements and some have 14 elements. At the moment I use \\ and & to separate the lines but somehow it doesn't look proper. Some lines ...
1
vote
0answers
58 views

Horizontal alignment problems in table

This is a follow-up question to "Alignment issues in a table". Consider the following code: \documentclass[ a4paper, 12pt, landscape, danish ]{article} \usepackage[utf8]{inputenc} ...
2
votes
2answers
91 views

Text alignment issue

I have been having trouble getting some text to line up correctly and was hoping I could get some assistance with this. My code is below, as well as a screenshot of the output. I've highlighted the ...
2
votes
1answer
45 views

Vertical spacing around custom center environment followed by \noindent

Inspired by this answer (to define a center environment with no vertical spacing): \newenvironment{nscenter} {\parskip=0pt\par\nopagebreak\centering} {\par\noindent\ignorespacesafterend} I ...
0
votes
0answers
46 views

Clean inner upper left corner with single horizontal line (\hhline) and doube vertical line (||)

\documentclass[12pt]{scrartcl} \usepackage{hhline} \usepackage{verbatim} \begin{document} The basic table looks like: \begin{tabular}{|c||c||c|} \hline \multicolumn3{|c|}{1 + 2 + 3} \\ ...
2
votes
2answers
78 views

latex \right\} not show up in pdf

The following is a piece of LaTeX code displaying a function. But in the PDF file generated, the right curly bracket "}" does not show up at the end. If I replace \right\} with just \}, then the right ...
1
vote
1answer
36 views

Horizontal alignment in flalign

I feel like this will probably be an obvious one, but I've been struggling to keep the horizontal spacing tight in flalign; but with: \begin{flalign*} &\int_{-\pi}^{0} f(x)dx ...
10
votes
5answers
601 views

In LaTeX, make a box with the width of another text

I am looking for a command like \makebox{text to set width}[c]{new text} which would make a box with the width of text to set width containing ____new text____ centered.
7
votes
2answers
109 views

How to get a nice alignat of this equation?

I want to align this equation. I tried \documentclass{article} \usepackage{amsmath} \begin{document} \begin{alignat*}{2} A\cdot \left(A^{n-1}+A^{n-2}\cdot B + \cdots + B^{n-1} \right)&=& ...
1
vote
1answer
36 views

Tstrut and Bstrut seem to be messing up the centering of my table

I'd like to have some spacing between the hlines of my table, but Bstrut and Tstrut (which I understand are the standard ways of dealing with this issue) are adding unwanted empty characters that are ...
2
votes
1answer
122 views

desired horizontal alignment of pgfplots' axis in tikzpicture environment inside tabular environment

this is the first time I ask a question on this site (benefited from a lot of answer, though). I have problems with horizontal alignment of pgfplots' axis inside a tabular environment. My target, ...
0
votes
2answers
56 views

Text alignment at a particular position on the line

I want to know how can I position text in a line which is neither entirely left aligned, nor right aligned, nor centrally aligned but is according to my choice. For example if I want a space of 10 cm ...
-2
votes
1answer
62 views

Align text to left

How to align text to left with a bullet using itemize?
2
votes
1answer
27 views

Align polynomials on multiple rows in a table

I want to format a table with polynomials in each column. These polynomials do not necessarily have the same degree, and their coefficients can be any rational number. The terms of the polynomial ...
2
votes
1answer
44 views

Cannot get TiKz images side-by-side instead of up and down

Here is what I have so far after reading a post on here saying subfigure is used to place images horizontally: \documentclass{amsart} \usepackage{amssymb} \usepackage{enumerate} \usepackage{array} ...
0
votes
0answers
19 views

Alignment for equations [duplicate]

Due to a physical disability using pen and paper for maths problems is not an option for me. So I am using Latex to work on maths problems, typically algebra at the moment. To be clear I'm using Latex ...
2
votes
2answers
87 views

Centering text in \adjustbox minipage with \hfill

I need to center text in a adjustbox package with a minipage keyword (see code below). I found I can do this by using two \dotfill or \hrulefill commands on either side of the text. Surprisingly, ...
1
vote
1answer
78 views

How to center first node in Forest diagram

I want to horizontally center the first node Sing(f)=V(x,y,z). Everything I've tried so far won't work but frankly I don't know that much about Forest. My Code: ...
5
votes
2answers
61 views

Missing equation number using \omit

In this answer I found a very useful approach to easily center certain elements in a alignat environment using a new command: \newcommand{\ccol}[1]{\omit\hfill $#1$\hfill} I inserted the $’s ...
2
votes
1answer
82 views

fleqn, koma-script and align: fleqn doesn't work properly

I have a problem using koma-script classes, fleqn and align: The equation are not completely left aligned. The fleqn option moves them to the left , but the equation are not left aligned. In my main ...
1
vote
3answers
49 views

Filling blank alignment

I want write a test with several question of filling blank questions. But I don't like the result. Because some sentences are shown in two or more lines, and a piece of the text is below the line for ...
1
vote
0answers
69 views

Align by decimal point using long-table

I am have numbers with stars and want to align them by decimal. How is this possible within the longtable environment? \documentclass[12pt]{report} \usepackage{longtable} \begin{document} ...
3
votes
3answers
186 views

Moving a matrix (array) to the left margin

So, of particular interest to my question is the second to last line of the following code: \documentclass[]{article} \usepackage{amsmath} \usepackage{units} \usepackage{amssymb} \usepackage{array} ...
5
votes
2answers
201 views

Vertical space in bmatrix

I have matrices with dense expressions in them and I'd like to loosen the matrix brackets a little. I'd like to be able to control the horizontal distance from bracket to first letter (both sides) and ...
2
votes
2answers
58 views

How to make Page X of Y in article document class?

I would like to just have a footer with "Page X of Y", but the following only works half the way for me: \documentclass[a4paper]{article} \setlength{\parskip}{\baselineskip} ...
2
votes
1answer
42 views

Problem aligning text and table horizontally

I'm trying to make a page heading using \documentclass[12pt]{article} \usepackage{sidecap,wasysym,array,caption,graphicx} \usepackage[a4paper,margin=1cm,footskip=.5cm]{geometry} ...
5
votes
4answers
127 views

How do I align the sums using the align* environment?

\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} \sum_{k=1}^\infty \frac{1}{k} &\rightarrow \infty &\sum_{k=1}^\infty \frac{1}{k^2} &= \frac{\pi^2}{6} ...
4
votes
2answers
103 views

Centering doesn't work for figure with tabularx

I have a figure with 3 images in it, searching TeX I found out that the best way to accomplish that was with a tabularx inside a figure, like this: \begin{figure}[t] \centering ...
4
votes
2answers
84 views

PGFOrnaments don't center properly

I would like to have nice fleurons and decorations at the end of my chapters to mimic the style of a book from the late 1800's. Some searches brought pgfornaments to my attention (a more user ...
3
votes
1answer
49 views

Simple way to align text within tabbing environment

I want to align text within a tabbing environment without using a new environment. That means flushleft and flushright are not options. Ideally smething like this would be nice: \begin{tabbing} ...
3
votes
1answer
43 views

Two vertical aligned subfigures not lining up

I've got two subfigures below each other. They got the same aspect ratio but don't line up as they should. This is my LaTeX code and below is the produced image. unity-slide.png is 1174 x 660 pixels ...
4
votes
1answer
30 views

aligning a matrix with its label

Suppose I have the following latex code which draws a matrix within a matrix as follows where the cell (1,2) of the outer matrix is a vector that defines the column labels and the cell (2,1) of the ...
1
vote
0answers
28 views

Why float is centered with margins

I have a problem with centering a table or image float with the page text. When ever I use a float (e.g. \begin{table}) it aligns with the page number (i.e. margins) and not the text. If I don't use ...
8
votes
2answers
177 views

Why doesn't \par end this \centering?

As per this answer, \par should properly end the effect of \centering. But in the following case, it doesn't. Why? \documentclass{article} \makeatletter \newcommand\@mytitle{} % create macro for ...
2
votes
3answers
72 views

How can I add 1 line of source code (source code snippet) in a LaTeX document?

The easiest way of explaining this is probably to provide an example of what I want to do: Consider the following section of a LaTeX document. Calls to the function // a blank line ...
2
votes
1answer
83 views

left and right aligned section title on one line

I am trying to have a simple bilingual title for a section. The English text should align to the left and the Arabic text should align to the right, both on the same line. The following line of ...
6
votes
2answers
138 views

Align images with text without using tables

Problem: I have searched how you can align text without the use of tables using LaTex. What I am after is to align images after each other on one side and text to align to respective image on the ...
2
votes
1answer
43 views

\raggedright in footnotes with hanging indent

This answer to Layout of multiple lines footnotes shows how to get hanging indent in footnotes (extremely ugly if you ask me, but the editors want what the editors want). \documentclass{article} ...
1
vote
2answers
36 views

setting left margin in \itemize

I want to use \itemize to list several short paragraphs of prose designated (a),(b), (c) etc. The first line of each paragraph should be indented as usual, then the rest of the paragraph should be ...
3
votes
1answer
53 views

vertically and horizontally center content of complex tabu table

I'm having this MWE and want to horizontally and vertically center the x's in the last row (the numbers are for debugging purpose only). I've tried an appraoch with \newlength{\xlength} ...
2
votes
1answer
62 views

Alignment inside the table in tabular

I created a table, but the last column is moved to the left, although I set it as central. I cannot find what I am doing wrong, so if someone can suggest me how I can solve my problem I would be very ...
2
votes
3answers
112 views

Double hard carriage return does not generate indented paragraph after pasting text from Word. Any tips or workarounds?

I'm using ShareLaTeX and I have pasted some text from Word into the tool. In some of these sections I am noticing an issue when I compile to PDF. Even though a blank line exists in the LaTeX coding, ...
3
votes
2answers
99 views

horizontally align group of nodes with respect to coordinate

I have one node (or rather, a coordinate) and a couple of nodes which are aligned in one "row" (via right=of, left=of). They are aligned below each other (via below right=of), \documentclass{article} ...
3
votes
1answer
140 views

Center aligned group of equations based on ampersand

MWE: \documentclass[11pt,a4paper]{article} \usepackage{amsmath} \begin{document} aaa \vspace{17cm} \begin{align*} \centering (a+b)^3 &= (a+b)^2(a+b)\\ &=(a^2+2ab+b^2)(a+b)\\ ...
2
votes
1answer
242 views

How to horizontal/vertical combine two math symbols?

This is an absolutely minor/cosmetic problem. I can e.g. use stackrel so combine two math-symbols vertically. This is nice for \stackrel{!}{=}. But how to do this horizontally? I want to combine (only ...
2
votes
1answer
108 views

How to align this block of text?

I have a problem. How can I put this text perfectly aligned on the right side, like the trying of the screenshot? Is there a smarter way? \noindent \hspace*{8cm} Artigo apresentado ao curso de ...
3
votes
2answers
90 views

How to automatically center images?

In a beamer-LaTeX document, I want to horizontally center all images, without specifying this explicitly in each case. I did the following: In the preamble I write: \let\oig\includegraphics % ...