Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
2answers
38 views

Place `tikzpicture` on the left of the text

Background I’d like to write a LuaLaTeX document for the Roman Catholic Liturgy of the Holy Week (from the Psalm Sunday through Easter Sunday). I do this in Slovak language (here’s a pdf that uses ...
2
votes
1answer
32 views

How to arrange the flushleft and flushright beside each other?

\documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{graphicx} %% Header Footer \usepackage{fancyhdr} \pagestyle{fancy} %\fancyhead{} \fancyfoot{} \fancyfoot[R]{ \thepage\ } \usepackage{...
3
votes
2answers
73 views

Uneven column widths when using a long multi-column header

I have the following MWE, but I have a problem with the alignment of the last column (under the multicolumn) \documentclass{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{...
1
vote
1answer
11 views

Override table cell horizontal alignment with cellspace

Consider this example: \documentclass{article} \usepackage{makecell} %\usepackage{cellspace} ...
0
votes
1answer
19 views

longtable in landscape 2 colum article center

Im have a two column article and I need to put a long table in landscape. The problem is that the table keeps aligning to the right of the page instead of centering. Any idea why? This is what I'm ...
2
votes
3answers
72 views

Aligning an equation at multiple points, with both left and right alignment, as well as equals sign alignment

I am trying to achieve the formatting in the image attached, with the bracketed right equation/text aligned to the right side of the page. However, I would also like to be able to align the equal ...
1
vote
2answers
46 views

Left align all levels in table of contents

The following MWE generates a ToC with different alignment according to the section level. How to force all them left align irrespectively to their level? MWE: \documentclass[12pt]{report} %-> ...
0
votes
0answers
14 views

Align multiple bracketed equations

I'm trying to allign the equals signs in front of each bracket.. I have tried \align but it's giving me lua errors. My code is \begin{equation}\label{c66_conditions} c_{66} = \left\{ \begin{...
0
votes
1answer
14 views

Table and picture in a Figure

I am trying to put a table and an image next to each other in one figure. But the image aligns strangely with the table and I can't seem to figure out how to fix it. I tried putting each into an entry ...
0
votes
0answers
14 views

Bussproofs compact prooftree

I have the following code: \begin{prooftree} \AxiomC{$\Gamma $} \AxiomC{} \LeftLabel{($\to$-elim)} \BinaryInfC{$\Gamma , x : A, y : C \vdash x y \Leftarrow D$} \AxiomC{} \...
0
votes
1answer
21 views

How to center text in figure with subfigs

Say that I have this code: \documentclass[12pt,a4paper]{article} \usepackage{graphicx} \usepackage{subfig} \begin{document} \begin{figure} \textbf{Text I want centered} \\ \subfloat[Image]{\label{}\...
1
vote
1answer
29 views

Text is not justified after adding a picture

My text was justified by its width as it should be. But after adding the picture it was its left and right borders became not right. How can I fix it? Here is the code snippet: \section{Samples} ...
2
votes
3answers
45 views

Center align columns in table ignoring minus signs?

I have some tables of numbers, most of which are small (0, 1, -1), but occasionally I have fractions. If I just has 0, 1, -1's I'd right align so the $-$ signs will line up, but the fractions throw ...
1
vote
1answer
25 views

Centering caption in subfloat with a forced linebreak [duplicate]

I have a few subfloat captions that are too short to have an automatic linebreak, but I want to force one and still have centering among the lines: Basically I would like a and b to be like c ... ...
2
votes
1answer
21 views

Put subscript text below text and align

I am trying to put the subscript text {m=1/3\\n=1.9-2} below the text AF and then align the two lines at the "=" sign. Can you assist me in accomplishing this task? CODE \documentclass{article} \...
4
votes
1answer
33 views

Horizontal align overbrace

In my attempt to horizontal align two overbraces, the original equations gets skewed. Can you help me to correctly align the equation and overbraces? CODE \documentclass{article} \usepackage{...
0
votes
1answer
18 views

How to specify alignment in specific cell in tables?

I have a table with solutions from statistic tests and I am needed to have numbers such as 1234^{***}. How to align such number with usual one: 1234, that way it is right aligned to its numbers, and ...
0
votes
1answer
26 views

Table of contents items longer than one line getting centered in custom class

NOTE: this question was answered below by Jhor, and the class file that I link to below has now been fixed, so the problem is no longer reproducible. I am using a class that was created for my ...
1
vote
1answer
18 views

Centering a figure on tikz's x=0, not on the figure's actual center line

I'm trying to get a figure made with tikz to be centered exactly on the figure's own internal x-axis. I don't want to use \centering, as at least with its default behaviour, \centering finds its own ...
2
votes
2answers
42 views

Align multiple equations at multiple points with \alignat

I'm trying to generate an aligned pair of equations with the alignat environment. However, I have two major problems: There is extra horizontal space before my aligned points. The euqation numbers ...
3
votes
2answers
99 views

Implementation of “clouds” for notes in the text [duplicate]

It is hard to describe what I want in a setence, better take a look on how I usually write down (lecture) notes. I want to point your attention to these little "clouds" which contain some useful, but ...
0
votes
0answers
17 views

Center align glossary table

I have a glossary section which is styled as \usepackage[acronym]{glossaries} \newglossarystyle{mylong}{% \setglossarystyle{long}% \renewenvironment{theglossary}% {\begin{longtable}[...
1
vote
2answers
28 views

How to use \thead with left align locally instead of globally?

How to align the contents of the \thead cell to the right? \documentclass[12pt]{memoir} \usepackage{tabularx} \usepackage{makecell} \begin{document} \begin{tabular}{|c|} \thead{Content \\ ...
1
vote
1answer
28 views

Aligning \includestandalone{} graphs

I have these two standalone bar graphs that are identical in size, but when I \includestandalone{} them, to insert them into my main document, I can't for the life of me get them to line up. If I put ...
2
votes
1answer
38 views

How to align equal sign and text after it

I want to write this text aligned c = the center of circle b = the board around each circle = c+b+sin(x) How can I do that? I used alignment but it didn't work can you provide simple example? I ...
0
votes
1answer
15 views

Paragraph with text alignment and width of contained text

I need a (centered) paragraph that has the width of the text that it contains. This text has to be centered/left-aligned/right-aligned (one of these). The text contains newlines. It is no problem to ...
0
votes
0answers
13 views

Tender dossier with centered articles

I'm trying to write a tender dossier in LaTeX. I'm trying to achieve the result in the picture below: I need mainly to know 3 things: which would be the best class to use (article, book etc.) how ...
0
votes
1answer
41 views

Putting two figures side by side shifts them on to a new page? [duplicate]

In two-column paper I want to place two figures side by side. If I use figure* it shifts them to a new page. If I use minipage option again figures don't obtain correct position. Can I fix this ...
0
votes
1answer
63 views

Error emerged when I run the following LaTeX code

The following code gives error message: \documentclass[energies,article,accept,moreauthors,pdftex,10pt,a4paper]{mdpi} \usepackage{booktabs} \usepackage{array} \newcommand{\PreserveBackslash}[1]{\let\...
0
votes
2answers
39 views

How to align the lines on the left

Consider the code \begin{align*} (pq+q-3)^2-(3pq+p+q-6)(pq+q-3)+2(p^2q^2+p^2q+pq^2-7pq+p+q+2)\\ =&\;(p^2q^2+q^2+9+2pq^2-6q-6pq) +(-3p^2q^2-p^2q-pq^2+6pq-3pq^2-pq-q^2+6q+9pq+3p+3q-18)\\+2(p^2q^...
8
votes
4answers
545 views

Is it possible to make a 9x9 table fit within the default margins?

so I have the following code: \begin{align*} \setlength\extrarowheight{3pt} \noindent\begin{tabular}{c | c c c c c c c c } + & $(0,0,0)$ & $(0,0,1)$ & $(0,1,0)$ & $(0,1,1)$ & $(...
4
votes
2answers
67 views

Multi-header column alignment with booktabs

After looking at multiple tex.stackexchange questions, I'm still having trouble getting the alignment of multiple columns right. Here's my code \documentclass[a4paper]{article} \usepackage[T1]{...
2
votes
1answer
48 views

MathJax - \bbox alignment issues [closed]

I'm working on a post using mostly markdown but for the math side of things I've thrown MathJax in, I've been trying to get a definition for rings inside of a box and I've discovered as per the ...
0
votes
0answers
23 views

Some lines are failed to be fully aligned? [on hold]

I'm writing a document that should be fully aligned. My document is in Indonesian. But some lines cross the right border like this: How can I force Latex to fully justify all lines?
5
votes
2answers
82 views

problem with theorem, tikzpicture and center environment

I use a dialog-bubble style for some theorems, by using the code below, that works fine. \documentclass[a4paper,11pt,twoside]{book} \usepackage[a4paper,left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{...
0
votes
2answers
41 views

Regular arrangement of tcolorboxes on a beamer slide

I would like to have a regular arrangement of 4 identical tcolorboxes on a slide. Here is my code: \documentclass{beamer} \usepackage{tcolorbox} \begin{document} \begin{frame} \tcbset{width=(\...
1
vote
2answers
54 views

Reducing space between two pictures in latex

Belows is apart of my code and I want to reduce space between the two pictues and also want to make them larger. Please suggest me. \begin{figure}[!htbp] % \centering \includegraphics[...
0
votes
1answer
95 views

How to format table title width and position

I am generating PDF documentation from rst files using sphinx, latex and latexpdf. The rst files include wide tables with long table titles using "csv-table". I would like the table title to print in ...
4
votes
2answers
69 views

ConTeXt: Matrix inside startalign/stopalign changes specified column alignment

Example: \starttext \startformula \startalign[n=2,align={right,left}] \NC x \NC = a ~ long ~ sequence ~ of ~ terms \NR \NC y \NC = ok ~ left \NR ...
3
votes
2answers
53 views

Aligning individual characters/glyphs like a monospace font

You know how most fonts and typography in general have characters/glyphs of various widths? Like if you compare a regular font: A E I O U Z X C V B a e i o u z x c v b They don't quite ...
6
votes
3answers
254 views

How to align and center standalone amsmath equations?

I had this code produce the following document. I wanted to align a few things. Particularly under the "degree sequence" heading: \documentclass[varwidth,margin=2mm]{standalone} \usepackage{amsmath,...
0
votes
0answers
24 views

specialized legends aligned with changing text margins in two-sided documents

I have a figure with multiple subfigures and tikz-type of figures therein. This figure contains a \pgfplotslegendfromname{named} type of legend. This legend, which is wider than the text width, is ...
0
votes
1answer
29 views

Table center not working

I am new to latex. I have tried to make the following table center. I have tried \centering and \begin{center} both approach. However, it is not moving a bit. How to make this table center. Thank you. ...
2
votes
1answer
58 views

Extra space after \@hangfrom

I defined a command \tstcmd with one parameter as \@hangfrom{[#1]{ }}\nobreak. When using this command, I found that there is always an extra space between the right bracket and the text that follows. ...
0
votes
1answer
26 views

Overlay of tcbitems are not well aligned

I'd like to be able to overlay several tables made from raster/tcbitems. I tried several methods to do that, but none of them work for me. There is always a margin somewhere that is wrong. This ...
2
votes
2answers
85 views

Center page as a whole without centering each element individually

I have some narrow text and tabular environments that I'd like to center based on the horizontal space they use up in total. However, it's important that when centered, the original alignments between ...
1
vote
2answers
103 views

How to increase spacing between two rows in a large matrix? [duplicate]

Currently, here is what I have: \documentclass[11pt]{amsart} \usepackage{amssymb,latexsym,amsmath,amsthm,enumitem,hyperref} \usepackage{graphics,graphicx,multicol,tikz,pgfplots,tkz- euclide,relsize,...
3
votes
1answer
25 views

pgfplots: How to align legends of multigraph diagram?

Assumed we have the following MWE to display various graphs in one single diagram. Minimum working example (MWE): \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=...
2
votes
1answer
54 views

How to determine nodes to reduce their length using `tikzpicture` environment

This is and addendum of a previous question: How to insert elective subjects section within a diagram. What I want I would like to reduce the length of those nodes that only have a single column of ...
1
vote
1answer
30 views

Justification failure in beamer enumerate list

I'm somewhat new to LaTeX and trying to make a presentation for my prelim exam...no big stress or anything. I'm using an overleaf template, and trying to use an enumerated list for a function with ...