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

1
vote
1answer
35 views

Justifying code according to corresponding elements indentation [duplicate]

How do I justify my comments as to inner for loop indentation in the below code: \documentclass[a4paper]{article} \pagestyle{empty} \usepackage{algorithm} \usepackage{algpseudocode} ...
4
votes
2answers
46 views

how to left justify comments to indent same as other text in Algorithmic

How do I left justify my comments in the algorithm. I am using algorithmicx package. What I want is: to pull the comment to left as shown in the attached snapshot. The code for my algorithm is ...
4
votes
2answers
60 views

How to h-alignment subtable to the limits of text?

I have this 2 subtables. How could I separate more the 2 tables, puttin the space indicate in the image in the center to get bigger the central distance ? I usually use \centering for center... are ...
2
votes
1answer
53 views

Align chapter and section headings after their number/counter

How do I align headings whithout interfering with my TOC? This what I have: 1 Chapter 1.1 Section 1.1.1. Subsection This is what I need 1 Chapter 1.1 Section 1.1.1. Subsection I am using ...
3
votes
1answer
75 views
+50

Variable \hspace value in relation to outside margin (Two-sided Memoir)

So I have received a great deal of help on this. I myself did not create the code, but I have an additional need. As you can see from my MWE, I have a long two-sided memoir document that has a ...
4
votes
2answers
52 views

Align right (hfil) doesn't work for me [duplicate]

I am using TEXShop working at a MAC and I don't really know what I am doing, I am just trying to fill a template. But I want to add something that the template does not offer; align a section to the ...
0
votes
0answers
72 views

Maintaining Optical Margins with Hanging Punctuation

To achieve hanging quotation marks, I am changing their protrusion settings in my preamble: \documentclass{minimal} \setlength{\parindent}{0cm} \usepackage{luatextra} \setmainfont{Times} ...
1
vote
1answer
58 views

latex text bold, center and link issue

I created one doc here. It has two pages, code seems correct as per me but there are some issue with it. I used \hfill to put the title in center. IS it wrong? In email, I made only this word bold. ...
5
votes
2answers
84 views

Implicit \hfil at the end of each paragraph?

Why do Alpha \hfil\ Omega\par and Alpha \hfil\ Omega not flush "Omega" to the right?
3
votes
3answers
594 views

Centering siunitx columns

I have the following table, with the decimal aligning handled by siunitx (MWE): \documentclass{scrartcl} \usepackage{booktabs} \usepackage{multirow} \usepackage{siunitx} \sisetup{ ...
2
votes
1answer
69 views

Alignment of toc in beamer class

I have some problems with vertical alignment of toc in beamer class related to this question. The answer works for me, but i would like to center the toc and decrease the horizontal space between ...
7
votes
3answers
97 views

How to align text in title with \fcolorbox

I have defined a new command to make some titles for a newsletter. I'm using the article class for the document. The command is defined with the following code: \definecolor{myblue}{rgb}{0.16, 0.32, ...
4
votes
7answers
125 views

How to align a word below other which is on the right side

As shown in the picture, I want the date to be below the external examiner. This is on the right side of the page. Help me
4
votes
3answers
53 views

How to center \rhead

I currently have my header as follows \pagestyle{fancy} \setlength{\headheight}{39pt} \renewcommand{\headrulewidth}{0pt} \lhead{\includegraphics[width=.1\textwidth]{Logo}} % Frist page only header ...
4
votes
2answers
110 views

Align and Center equations

I have the following equations . I just want to center them , such that the equality '= ' signs are one below the other. I tried \begin{align} but, that pushes them all to the left of the page. ...
2
votes
1answer
108 views

Alignement in table of contents (\titlecontents)

In the code below, I use \titlecontents{part} to customise the way the parts are displayed in my table of contents. \titlecontents{part} [0em] ...
2
votes
2answers
59 views

How to I move the from (sender) address position to the left in a letter document class

This one deals more with vertical, not horizontal, space: Positioning the address in a Letter I know about the scrlttr2 document class, but the letter class has much better default formatting (I only ...
1
vote
1answer
32 views

Authblk style file using but I can't able to find out the required output

I am using the authblk package. But I can't able to find out the output for below mentioned problems. I am using the below mentioned logic. If the same affiliation is repeated different author like ...
6
votes
1answer
163 views

How to align comments in algorithm code?

I will to align comments in another column, package algorithm. (Similar question: Faulty right alignment for comments in algorithmic package), but I will to become that result: ...
1
vote
2answers
69 views

Two figures with side captions next to one another

I currently have the following figure placed at the bottom of my page: \begin{SCfigure}[][h] \centering \caption{Georg Kantor (1845--1918)} ...
3
votes
4answers
124 views

Making an array in the Table

So we have an Table and there is an array which we wish to have it in the Table: Here is the code \documentclass[onecolumn,amsmath,amssymb,nofootinbib,superscriptaddress,floatfix]{revtex4} ...
3
votes
2answers
90 views

Remove vertical lines in the table unsuccessfully

I have created this Table: via the LaTex source code: \documentclass[onecolumn,amsmath,amssymb,nofootinbib,superscriptaddress,floatfix]{revtex4} \begin{document} \begin{table}[!h] ...
5
votes
2answers
95 views

alignment of numbers in exponential format in a table with complicated header rows

I have a table that contains a lot of numbers. I have been defining new column types to allow me to specify column widths and allow \newline within a cell. Some of my columns of numbers are in ...
3
votes
1answer
123 views

Two videos side by side in one slide beamer?

How can I add two videos in one slide side by side. Both videos should be in a horizontal line. The following code put a video above the other video. \begin{frame}[t] \frametitle{ Results} ...
3
votes
1answer
58 views

Minitoc settings + \hfill in \subsection

I'm trying to make a note book on LaTeX for a language course. For this I sort my vocabulary lists by theme. As you can see in the example below, I use a \hfill inside the \subsection command to make ...
6
votes
3answers
83 views

Left align text that is flushed right?

I want the row kandidatnivå, 15 hp to be aligned to left with examensarbete nr. xxx. How do I solve this? \begin{minipage}[t]{0.48\textwidth} \scriptsize Institutionen för Fastigheter och ...
1
vote
0answers
46 views

Center code in a lstlisting float

Out of pure laziness, I decided to create lstlisting floats with the option offered by the package: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{listings} \begin{document} ...
3
votes
2answers
55 views

Distributing two small images in a document (horizontally) evenly

Consider the following code (no special packages added) \begin{document} Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text ...
3
votes
2answers
41 views

Mini-alignment of a single equation?

So I have this problem, whereupon I would like to do some 'mini-alignment'. I have googled for ways to do this, but I get results based on aligning whole equations. Here is my current output: What ...
0
votes
1answer
69 views

Centering a xy matrix inside beamer frame and figure

In the following beamer frame, I want the description text to stay top-left, while the xymatrix-figure should be centered. However, whatever I tried with \centering, \begin{center} and other online ...
1
vote
1answer
49 views

Centering a table of images

I'm trying to center a table of images; 2 images per table row. Right now the code I have is ugly, and doesn't center on the document. I've tried using \begin{center} and \centering without any luck. ...
3
votes
1answer
98 views

Alignment in Siunitx with Comma separators

How can I right align the following two columns, just specifying that there will be at most 5 integer digits and never any decimals? I can't seem to get the right combination of options. I can align ...
4
votes
1answer
60 views

Aligning by ; with dcolumn works only for 1 column

I have a problem with aligning columns by ;. Using the dcolumn package I was able to align the first column but when I try align all 4 columns by ;, like this \begin{tabular}{r|kkkk}, it fails with ...
2
votes
2answers
49 views

How to increase the horizontal space in an array below?

\documentclass[preview,border=12pt,12pt]{standalone} \usepackage{mathtools} \newcommand\specifier{% r@{}r@{}l @{\quad}c@{\quad} r@{}r@{}l @{}c} ...
4
votes
3answers
81 views

Concerning the equation mode

I am listing a bunch of itens that are left-aligned (actually, I am using the \hspace command); then, for one of them, I need to do a definition by cases, so i'm using the equation mode and, inside ...
2
votes
2answers
72 views

The item in my title will not centre

I am trying to make a title page for a report, and everything comes out great, except for the one line (Lecturer:John Doe) that does not want to centre properly. My code: \title{ \normalfont ...
6
votes
2answers
79 views

\centering just a table instead of all text

I'm having problems with this my code because once I added the tables all the text following them was no longer justified. here is the code \begin{document} \chapter{1} \centering\large ...
6
votes
3answers
140 views

How to insert a picture without the name “figure”

I am trying to put a figure with a subtitle but without the name "figure". For example: 'This is a triangle' and not put the name "Figure": 'Figure: This is a triangle' I tried: 1. ...
1
vote
1answer
45 views

How to left-align text

How to left-align text into the second column? \documentclass{beamer} \begin{document} \begin{frame} \begin{columns} \column{4.7cm} \hspace{0.6cm} ...
1
vote
2answers
77 views

How to center an ellipse into a frame?

How to center an ellipse into a frame ? I've tried this but it wouldn't work : \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{frame} \begin{tikzpicture} ...
1
vote
1answer
41 views

How to correctly align bibitems

I am using the thebibliography environment. In addition I use custom labels, which are different in length. How do I align my bibitems correctly, so that all bib entries vertically start at the ...
2
votes
0answers
119 views

How to draw “stacked blocks” with tikz?

I want to draw using tikz a figure which looks like the following: I started writing it using nodes and positioning them using right of =, above of = but I don't know how to avoid using hard coded ...
2
votes
1answer
66 views

Aligning item numbers in the table of contents

I am taking notes on a textbook, and want to mimic the style used in the book. I have gotten very close, and only have one minor issue left to fix. Consider the example below. The only thing that I ...
4
votes
2answers
195 views

Text is not centered

The issue is that the text is not getting centered even after issueing \centering. The following picture depicts it : The code: \documentclass[12pt]{book} \usepackage{wedn} ...
1
vote
2answers
60 views

enumerate in itemize environment, no new line [closed]

I want to have something looking like this: \item \item 1. 2 My intention is to have the first enumerated item in the same line as the itemize item. I read something about \leavemode, ...
4
votes
2answers
121 views

Align tikzpicture to body text with node as reference

In a example like the one below I would like to adjust the figure horizontally so that the grid aligns with the surrounding text and the y-axis and the label protrudes into the margin. Note that the ...
3
votes
1answer
96 views

Alignment of marginnote independently of main paragraph

I've noticed that when a \marginnote is added (edit: using the marginnote package), the horizontal alignment of that note is inherited from wherever the note is placed. In my case, I wish to have a ...
5
votes
2answers
153 views

Right align text in table

\begin{center} \begin{tabular}{|p{3.35cm}||p{5cm}|l|} \hline \thead{Område} & \thead{Positive konsekvenser} & \thead{Negative konsekvenser} \\ \hline \hline \textbf{Arbejdsfordeling} & ...
1
vote
2answers
82 views

Paragraph mode inside a math equation or reuse array-columns

My problem is that I want to reuse the spacing in a certain math equation like: \begin{equation} \begin{array}{l@{\hspace{3mm}}c@{\hspace{3mm}}l} ... & := & ... \\[4mm] & =: & ...
6
votes
1answer
99 views

Aligning and centering a lstlisting with two columns on a page

Consider the following code taken from here to produce a fancy listing : % PACKAGES \documentclass[11pt,a4paper]{book} \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry} ...