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.

2
votes
1answer
25 views

How to reduce space between two columns

I have the table shown below. Due to the fact that the titles in Rown#2 are long, the numbers and their percentages become so distant from each other and made the table unreadable. Q: How to reduced ...
3
votes
1answer
28 views

How to align numbers in all rows

I have a table which contains numbers and their percentages. Because the numbers and percentages length is different, they become unaligned. The following figure illustrates: As shown in the table, I ...
0
votes
1answer
12 views

How to arrange two bodies of text /sections side by side? (Custom Resume Building)

I've done a ton of digging but have been unable to find a solution to this problem. Specifically, I am creating a resume using the AltaCV class and multi column packages together. The goal is align ...
0
votes
0answers
23 views

Aligning the axis of included graphics with the text in the document

I'm trying to align a pgfplot graph with the text area of the document. I create the graph as a standalone pdf with the scale only axis option and width=\textwidth and so far I only managed to ...
1
vote
0answers
20 views

Wrap figure first line alignment changed when using right alignment

Text properly aligned with wrap figure images on justify alignment, in the case of right alignment text, first line break with two or three words even the space occurs to fill the gap. Please suggest ...
1
vote
2answers
28 views

Centering math while having comments to the right

I'm trying to have math like in the gather* environment, where the math equations are centered within their space, but also have comments to the right explaining the steps. How can I do this? Below is ...
2
votes
2answers
41 views

Misplaced \noalign when centering tabularx cell

I have a minimal LaTeX document like this: \documentclass{article} \usepackage{tabularx} \begin{document} \noindent \begin{tabularx}{\linewidth}{ X | X } \centering A & B \\ \hline 1....
2
votes
1answer
27 views

Adjust border of one side of a minipage

I have a minipage with text on the left side and an image on the right. I would like to adjust the left side so that left and right of the text has space of 2cm in width, but the minipage on the right ...
4
votes
2answers
68 views

Centering, linebreaks and raggedright in underbrace text in mathmode

I want the text under an underbrace in mathmode to 1. Have linebreaks. 2. Be raggedright 3. Remain centered with respect to the midpoint of the underbrace. I have tried with the two methods in the ...
3
votes
1answer
70 views

How to left align the text shown in the following figure?

I am stuck in between and I need to left-aligned the text Suraj Prakash Sharma, Email,GitHub,LinkedIn. See the following figure, you can see space which I marked with a red box. I want to remove that ...
2
votes
1answer
43 views

How do I use \includegraphics with booktabs?

I'm making a reference document for my students regarding the 14 Bravais lattices. I've gotten this table to work but it is messy. Does anyone have suggestions on how to clean it up? (I've added ...
0
votes
0answers
26 views

\resheading command

\resheading command is generating text boxes with different alignments (different horizontal margins) for different pages. How can I generate two text boxes on the same margin on two consecutive pages ...
1
vote
1answer
28 views

Indented paragraph next to a box

I am trying to indent a whole paragraph to the right of a numbered box. However, the paragraph does not appear vertically aligned with the box. I am using the below code: \documentclass[journal,...
1
vote
0answers
46 views

How to center a paragraph with larger margins?

I am hoping to get something like the following where the paragraph is centered and left-aligned. Thank you]1
2
votes
1answer
19 views

Adjust spacing between personal information & photo columns in moderncv classic

I wish to reduce the spacing between the personal information column and the photo column in moderncv classic style. Here is a MWE \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{classic} ...
1
vote
1answer
28 views

Strange centring problem of side by side equations in an enumerate environment

I'm facing a problem in centring two side by side equations correctly inside an enumerate environment. This problem only occurs to me under certain conditions and I can't get my head around it. ...
1
vote
1answer
33 views

How to justify only the first column of this user-defined tabular environment **while using ragged2e**? [UPDATED]

I'm currently updating my CV using a very cool template I found on the Internet quite a long time ago (a user-defined CV class + the template itself). During these years, I've been more or less able ...
1
vote
2answers
37 views

How to center image in beamer when also using \only?

\documentclass[10pt]{beamer} % \usetheme[progressbar=frametitle]{metropolis} \begin{document} \begin{frame} \frametitle{Test} \begin{itemize}[<+->] \item A \item B \item C \end{...
1
vote
1answer
31 views

Centering Cells with m{}

I have a very simple table with only a few cells. \documentclass{article} \usepackage{mwe} \begin{document} \begin{table}[ht] \centering \begin{tabular}{c|ccc} \hline Long Text Here & D &...
2
votes
1answer
43 views

How to align text and icon?

Here is my code: {\hspace{10mm}\textcolor{brown}{2006 - 2010} \hspace{5mm}} {\textbf{\textcolor{blue}{BBA Hons (equivalent MBA)} \hspace{6.5mm} {\faUniversity}\hspace{2mm}Al Khair University}\...
2
votes
1answer
18 views

Imposing custom spacing within citation lists

I want to impose a custom spacing between items on a list of references listed by \citep command, akin to what I would do with `\hspace*' in text. One option is to write: \documentclass{beamer} \...
2
votes
1answer
39 views

Figure and subfigures titles should be left justified

Could you please give me some advice about this situation? Thank you so much. I would like to move all the titles to the left. But if we want to draw the following figure with 2 subfigures then we ...
3
votes
1answer
33 views

Beamer: Global text justification in the `example` enviroment

Using this answer, I can justify text in block environments globally. However, if I replace the block environment by an example environment, the above solution doesn't work: \documentclass{beamer} \...
1
vote
1answer
45 views

Image formating

How can I go about creating a compact two column figure with 3 figures for each column? This is the mess the mess I've created trying to do so. \documentclass[a4paper,man,12pt]{scrartcl} \...
0
votes
1answer
28 views

Alignment problem with textbf

I am trying to write the lines with textbf but next line is starting from the left side of the text written in textbf. Is there a way to do something so that next lines start exactly below of text in ...
3
votes
2answers
43 views

How do I center a single line of text in a tcolorbox?

This one is really stumping and it seems like it should be so simple. I'm attempting to center lines at the end of a tcolorbox. This is what I have: \documentclass[A4]{letter} \usepackage{graphicx} \...
2
votes
2answers
42 views

Align elements inside a newcommand

I made this newcommand \boldAcr: \makeatletter % we need to use kernel commands \newcommand{\boldAcr[1]}{\MakeTextUppercase{\textbf{#1}}\@boldAcrOne} \newcommand\@boldAcrOne{\@ifnextchar\stopBold{\@...
0
votes
0answers
23 views

centering caption not working

I'm using this to insert a new line inside of my caption \caption[caption]{This is the caption\\\hspace{\textwidth}This is the second line} When I try to use the \captionsetup{justification=...
0
votes
0answers
21 views

Recursive newcommand - Align words [duplicate]

I would like to define a command that does this: \command word1 word2 ... n-word --> Word1 Word2 ... n-Word with first letter bold and capital. I wrote this: \makeatletter % we need to use ...
1
vote
1answer
21 views

Centering a left-justified column within a tabular environment

I know this has to be somewhere, so a link to the right question would be helpful; my google-fu keeps returning the incorrect version of what I want (clarified below). Goal: I want to be able to have ...
5
votes
3answers
553 views

How to align numbers in parentheses

This code aligns the 4 and the -3 roughly centered, i.e., the 4 is centered above the -3. I would like the 4 and the 3 to be perfectly vertically aligned, with the negative sign out to the left and ...
0
votes
2answers
46 views

How to center Header values in a table?

How can I center the Header values in this code? Below is my code. \renewcommand{\tabularxcolumn}[1]{>{\raggedright\arraybackslash}m{#1}} \setlength{\cellspacetoplimit}{8pt} \setlength{\...
1
vote
1answer
23 views

How to flush right margin contents on even pages in two sided document?

In report class with twoside option, how to flushright the marginpar contents on even pages? The image below was produced manually inserting \hfill. I'd like to automatize it. MWE \documentclass[...
3
votes
1answer
39 views

2x2 figure and caption alignment: clash with packages subcaption, subfigure and subfigures

I am trying to align three figures and their three captions as the following 2x2 (four square) pattern: In order to solve this, I have the following code which works, but not in aesthetic appeal \...
1
vote
1answer
42 views

line break in subfigure caption with proper “hang” alignment

I want to insert a manual line break in the subfigures captions. I have achieved this with either \protect\\ or \newline. However, the second lines do not align properly. I want them to start at the ...
3
votes
2answers
55 views

How to make text aligned left/center/right in the same line without collisions?

The goal of this code is to arrange three pieces of text on a line such that if any of the three parts are too long, then the center text is lowered by \baselineskip: \documentclass{article} \...
6
votes
3answers
159 views

Automatically formatting mesostics

A mesostic is poem/text similar to an acrostic except the "spine word" runs down the middle. Wiki's article explains it ok. The format was pioneered by the composer John Cage and as the years went on ...
0
votes
2answers
26 views

How can I left-align a block of equations that are also horizontally aligned at multiple tabs?

I am trying to display a derivation that should look like: f(x) = (expression 1) + (expression 2) - (expression 3) = (expression 4) I can get this to display just the way ...
0
votes
2answers
40 views

Aligning equation on the left

I need to align equations of the left. I wrote the following according to this topic : Align equation left \begin{flalign} p(1-p)^2 (\alpha |001\rangle + \beta |110 \rangle).hc +p^2(1-p) (\alpha |...
0
votes
0answers
58 views

Undesired extra space on the left

Hello I am using MikTex in TexStudios and I have this document: \documentclass[paper=letter,fontsize=11pt]{scrartcl} % KOMA-article class \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \...
3
votes
2answers
74 views

Perfect alignment, LuaTex and sidebearings. Part II

I want to achieve a perfect alignment of the right (and/or left) margins of all the lines of paragraph (to the ink), among the lines themselves and eventually with other geometric elements of a page. ...
3
votes
0answers
25 views

Line numbers inside margin but outside frame in minted

I've been trying to make the line numbers appear outside the colored frame in my output code blocks, but I also want everything (numbers included) to be inside the margins specified by the geometry ...
4
votes
2answers
275 views

How to center the middle of a table to be in the center of the page?

I'd like to have the vertical rule in my {r|l} table to be horizontally aligned in the center of the page. So far, I've only managed to do \begin{center} \begin{tabular}{r|l} short & ...
0
votes
1answer
38 views

Table of Contents Spacing/Indentation

I need help formatting my Table of Contents. All my sections have a roman numeral numbering system that I would like to keep but it does not space it right in the Table of Contents. I also prefer the ...
2
votes
2answers
49 views

Center tabular in align

I'm trying to place a tabular containing some values for x and y inside an align statement. \begin{align*} 0 &= 0 \\ \begin{tabular} {|c|c|c|} %table content \end{tabular} \\ ...
1
vote
2answers
55 views

Image side by side with table keeps on not working

Good morning, I would like to put the picture on the left of the table, all horizontally. When I try this solution it doesn't work. What changes is the picture and table are aligned with left margin ...
1
vote
2answers
45 views

Horizontal centering in tabularx cells

This is my current code: \newcolumntype{b}{X} \newcolumntype{m}{>{\hsize=.5\hsize}X} \newcolumntype{s}{>{\hsize=.2\hsize}X} \begin{table} \caption{Summary of the Most Common BCI Control ...
0
votes
0answers
49 views

How to left align titles and author details in apa6

I am using the following document class: \documentclass[jou,apacite]{apa6} My code is as follows. \documentclass[jou,apacite]{apa6} \title{Example of journal article} \twoauthors{Author One}{...
0
votes
1answer
30 views

How to align section heading after wrapping text around figure

\documentclass[letterpaper,11pt]{texMemo} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[dvipsnames]{xcolor} \usepackage{indentfirst} \usepackage{wrapfig} \...
0
votes
1answer
20 views

Format issues in longtable (left alignment of cells plus different cell lenght)

I got a longtable with rows containing more or less information. I want to achieve a left alignment because of justification errors plus different lengths in row size (horizontally). My current ...