Stack Exchange Network

Stack Exchange network consists of 174 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.

2
votes
1answer
17 views

Different margins with different length text in tikz node with align=center

Why are the margins different in the two nodes in this code? I would expect (and like) them to be the same. Secondly, (and possibly related), why is the text hyphenated? This isn't normally desired ...
2
votes
1answer
23 views

Alignment of text in Fig footer

I want to align the fig footer text in figure caption to left in double column image. Use of following code giving center alignment. cta_author latex file is available at:CTA \documentclass{cta-...
0
votes
1answer
18 views

\item right align label

I have a document for a CV with a list, and I would like to right align the labels. I have seen this, this and this, but I can't make it work: \documentclass[12pt,a4paper]{article} \usepackage{...
2
votes
1answer
38 views

Section Rotation

How to type the part where the chapter is rotated with or without the shaded box, and then there is text right beside it? What I have so far \begin{document} \section*{\rotatebox{90}{Chapter 1}} \...
3
votes
1answer
28 views

How to justify the text in tikz node?

The text in the node in left-aligned. How can I make it justified? \documentclass[20pt]{extarticle} \usepackage[utf8]{inputenc} \usepackage{geometry} \geometry{paperheight=50cm,paperwidth=50cm,margin=...
4
votes
1answer
127 views

Align last word of a paragraph to the right?

Is it possible to reliably right-align the last word of a paragraph? Using \hfill works most of the time, looking like Left stuff Right stuff. but fails if the rest ...
1
vote
1answer
34 views

Horizontal alignment of nodes (with straight line edge connectors)

What I want is to have three nodes horizontally aligned (the root 1SA, the 1st level child "0--7 HL" and the second level child "Various distributions4") and having straight line connectors with the ...
3
votes
2answers
30 views

Problem of aligning three equations horizontally by using multicols

I have trouble to align three equations horizontally by using multicols. Any idea how to fix this? Thanks! \begin{multicols}{3} \begin{equation} f(x)=tanh(x) \end{equation} \begin{...
6
votes
1answer
36 views

pgfplotstable - remove space before first and after last column - @{}

I am using pgfplotstable and I want to remove the space before the first column and after the last column. In a regular tabular environment I would just use @{} twice in the argument. \documentclass{...
0
votes
1answer
28 views

text justification/comments filling the space left from equation - flalign and paragraph mode

I have equations in a flalign environment and comments that may need to be multi-liner. \parbox seems fine except I can't tell it to automatically stretch in order to fill the space from the right-end ...
1
vote
1answer
36 views

2-column alignment of equations: left-center

It's a long time since I try to align equations centerly with a prefix on the very left of the page. I was able to develop a basic version of it using IEEEeqnarray of IEEEtran class, but since I'm ...
2
votes
0answers
30 views

Centering not working on pdf/tikz plot!

I have looked at other posts regarding how to center a "figure." To be clear, I want to center the plot in the center of the document. I have followed the advice of many to use "\centering." However, ...
3
votes
1answer
86 views

Align subscript and superscript in math mode

I'm having issues with aligning superscript with subscript in math mode. My MWE is: % arara: xelatex \documentclass[preview,8pt,varwidth=true]{standalone} \usepackage{amsmath} \usepackage{mathspec} \...
1
vote
1answer
21 views

How to center a circuit?

I have the following problem: when I draw a circuit using circuitikz I can't center it when I add some figures on its side. Take a look at my code. The problem is that the environment considers both ...
2
votes
1answer
21 views

IEEEtran document class — how to align five authors properly

How do I align author names such that the first three authors appear in 3 column format and the last two in two column? \author{\IEEEauthorblockN{1\textsuperscript{st} Given Name Surname} \...
2
votes
2answers
41 views

Chapter Title not centering within margins

I have a class file that defines the margins and chapter / section title formats. Tables, images, and page numbers appear centered correctly within the margins but my chapter tiles appear to be ...
1
vote
0answers
104 views

Flushing short lines left and long lines right in lines environment

How can I get short lines flushed left and longer lines (which have to be broken in two or more) justified and flushed right in lines environment by using only environment setup options in ConTeXt? ...
4
votes
2answers
222 views

How can I place multiple images in a table and align them nicely

I'm currently trying to place multiple images inside a table. with the Multirow package. My current code looks like this: \begin{figure} \centering \begin{tabular}{cc} & \...
2
votes
2answers
53 views

Left indent names of skills in awesome-cv LaTeX

How do I align the skills to left side? \cvsection{Technical Skills} \begin{cvskills} \cvskill {Programming Languages:} {Java, Python, C, C++, R, JavaScript} \cvskill {...
2
votes
2answers
27 views

Reduce margin around tcolorbox

How to go about getting the text to have minimal spacing to the outline of a tcolorbox: I would like to know how to adjust this spacing shown in red. Thank you! CODE \documentclass{article} \...
2
votes
1answer
28 views

What is the latex code for pentadiagonal system of equations

Can anyone please provide or guide me to write the latex code for the given system of equation?
2
votes
1answer
50 views

TikZ controls cause false alarms about overfull \hboxes

The following code Then $e+F$ acts in the standard representation (on $\mathbb C^{mn+k}$) in such a way that we can decompose this action into the following pieces: for even $m$, $$ \begin{...
4
votes
2answers
25 views

Align boxed equation to the left margin

I am attempting to left align a boxed equation but I failed. Can you help me align this boxed equation to the left margin:? Thank you! CODE \documentclass{article} \usepackage{mathtools} \...
2
votes
1answer
24 views

\centering leads to cascade of errors

Context: I'm developing a title page (writing my own titlepage environment) and I'm writing my own \thanks command (to give me control over where I spew the footnotes). Not knowing how \footnote does ...
1
vote
1answer
34 views

Center listing horizontally in Beamer

I am trying to simply center a listing typeset with listings in a Beamer slide. There is some strange behaviour I cannot understand. I have been testing 3 methods of centering: the center ...
0
votes
0answers
36 views

How to align affiliations after the author names while using IEEEtran.cls?

The IEEEtran.cls aligns the author names in the following format. There are only two authors in the paper I'm writing but one of them has multiple affiliations. I want to keep the author names and ...
0
votes
0answers
36 views

In which format should we save graphics (png,pdf,…) in a document class report?

\begin{figure}[t] \centering \includegraphics[scale=1.5]{graph1} \caption{hhhhh} \end{figure} I have no control over the figure position. It is shifted to the right and the caption is very separated ...
2
votes
1answer
30 views

How to align numbers in enumerate environment

I have the following code which produces the document below: \documentclass{article} \usepackage{blindtext} \usepackage{enumitem} \setlength{\parindent}{0em} \setlength{\parskip}{0em} \setlist[...
1
vote
2answers
36 views

How to make equation spacing consistent in minipage regardless of horizontal alignment

Under ordinary circumstances with amsmath, when I wrap display equations in a minipage, they appear without any \abovedisplayskip spacing if the equation appears first in the minipage but with the ...
1
vote
1answer
30 views

How to create horizontal line before and after chapter heading but not in table of contents

I want to create a horizontal line before and after chapter heading (as shown in Picture) Chapter number at the Right hand side and chapter title at the middle. SO far I have this piece of code: \...
0
votes
1answer
15 views

How to make temporarily center-aligned math equation, when using option [fleqn] for amsmath

I am using fleqn for amsmath. So the euqation is default left-aligned. Now I want to teamporarily make one equation center-aligned. How to do this? Thank you all. MWE \documentclass{article} \...
0
votes
1answer
26 views

How can Text be vertically centered, but horizontally aligned to the right?

This is my example: ignore the German text. \documentclass[a4paper,11pt]{article} \usepackage[left=3cm, right=4cm, top=2cm, bottom=2cm]{geometry} \usepackage{array} \usepackage{tabularx} \usepackage{...
0
votes
2answers
31 views

Title formatting

I have the following code: \title{ \begin{center} CLAXXX Homework X \newline Prof. Professor \newline First Last \newline Day, Month XX, Year \end{center}} \begin{document} \centering \maketitle \...
2
votes
2answers
39 views

How do I place the \part heading in the center of the page?

How do I center the \part title, so it's in the middle of the page, instead of the middle of \textwidth (when using uneven margins)? I'm using the memoir class, which correctly places \part on a page ...
1
vote
2answers
52 views

Line Break in Equation Using empheq

I have an equation that overspills into the margins; I am using (and would like to continue using) empheq for it. Let me give a MWE. Note that it's not what I've actually got in my document, just an ...
1
vote
0answers
32 views

Same item indent for flushleft inside tcolorbox

I want to use itemize (or enumerate) where some items use an environment that basically amounts to flushleft inside a tcolorbox. They get another indent for the item marker, as seen for #4 here. I can ...
4
votes
1answer
89 views

Align S-type column headers

I'm very unhappy with the alignment of the headers in the following table. I've even tried using \multicolumn, but it has no effect. (And if someone knows what the table is about... Yes, I'm unhappy ...
1
vote
1answer
40 views

How to enumerate boxes?

\newcommand\answerboxb{%% \fbox{\rule{0.3in}{16pt}\rule[-0.5ex]{0pt}{4ex}}} \newcommand\answerboxw{%% \fbox{\rule{0.3in}{0pt}\rule[-0.5ex]{0pt}{4ex}}} ..... \centerline \answerboxb \answerboxb \...
1
vote
1answer
35 views

Booktabs help alignment

For some strange reason, the right column is left aligned in contrast with the other columns. I'm not seeing what I did wrong. This is due in 3 hours, but I haven't noticed it until now. Please help ...
1
vote
2answers
88 views

How to right-align text

I'm looking to format some text in the same way as showed in the image (highlighted part) where the text is right-aligned and the next line starts in the same horizontal position as the previous one. ...
1
vote
0answers
57 views

Why does centering not center? [duplicate]

I'm trying to get an image centered within an itemize list preferably without the use of the center environment (since this induces a call of \item which I otherwise redefine so that pages are ended ...
0
votes
0answers
9 views

Centering stat output

I use the command \input{regressionname} to include the following regression from stata. How can I get the output at the center of the page? As it is now there is much more space at the left hand side ...
2
votes
2answers
57 views

Horizontal alignment in table with siunitx package

I'm doing some tables but I can't find the right alignment using siunitx. I believe that the first and last column numbers should be more to the left and the second column numbers more to the right. I ...
1
vote
2answers
33 views

Splitting and flushing equations inside align

MWE \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &f = \text{here goes a very very very very very long equation} \nonumber \\ &\hspace*{7.5cm} + \...
0
votes
3answers
35 views

Aligning text to right

In the picture shown below, I want to align the starting of two line to the right where exactly the numbering starts. I used \hspace{} command but it is not working. How can I fix this problem?? ...
2
votes
3answers
33 views

Trouble using flalign for left aligned math equations

I tried to left align some equations, but always get the wrong result Code below \documentclass[a4paper]{article} \usepackage[fleqn]{amsmath} \usepackage{showframe} \begin{document} \section*{Test} ...
0
votes
1answer
44 views

How do I center align two minipages?

I am trying to center align the following two minipages. Or at least set the margin on both sides from the border of the page? I also included the result from the code below. Something else to note ...
0
votes
1answer
16 views

Subcaption package make all captions centered

If i include subcaption package, all captions of figures are centered. But i want to make captions justified text. What should i do? P.S I insert image by \begin{figure} and \includegraphics and make ...
0
votes
0answers
32 views

Weird \hfill behavior with custom length calculations?

I asked a question earlier about trying to write a macro/environment that would take in a number of \choice commands and then write them out in a way to minimize vertical space consumed, but still ...
4
votes
2answers
33 views

Is it possible to right-align the second line inside a “split” environment inside an “align” environment?

When breaking a long equation over exactly two lines, the multiline allows doing so without adding spurious equation numbering and without manually placing \notag tags. It also right-aligns the second ...