Tagged Questions

{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
2answers
17 views

A command like `\hspace` calculating the distance from the beginning of the line

I would like to place several blocks of text in one line, but fixing their positions by distances from the beginning of the line. For example (1.2pt from beginning) cat (2.1pt from beginning) dog ...
2
votes
2answers
72 views

How may I write the following text 'and generally' and the second equation on one line?

Please note that the two equations ought to be aligned; the text, and generally should be placed on the left-hand corner, but the second equation should be centred. \documentclass{article} ...
5
votes
3answers
73 views

Tricky alignment within an equation with a case environment

I couldn't figure out how to do the following alignment: \begin{equation} \begin{aligned} \textrm{Row I:} \qquad & A = 1, \quad j = 1, 2, \ldots, N \\ \textrm{Row II:} \qquad & A = ...
4
votes
1answer
68 views

Auto-numbering table environment with aligned numbers

I'm trying to create a table environment with: A header row that spans an arbitrary number of columns, aligned, automatically numbered cells with aligned numbers uniform spacing between the all ...
4
votes
1answer
68 views

Shifting graph in TikZ: centre not working

I am having trouble making a diagram align in tikzpicture. At the moment if I use '\centering', my network graph moves to the right of the pdf. If I don't, it is in the left of the pdf. How do I make ...
3
votes
2answers
73 views

Vertically center text or math in a framebox

I have the following commands in my code (taken from Creating uniformly sized boxes around text) to manually adjust the height of frameboxes (the reason is that I often put several in a row with ...
2
votes
1answer
35 views

Add right flushed verse number to last line of verse

I'm using the custom Verse environment provided in this answer for producing horizontally centered verses. I would like to add a verse number to the last line of a verse and I would like just the ...
2
votes
1answer
18 views

How can I align the footer so it is generally centered at the bottom of the page?

I am completely new to using Latex and I am trying to set up the basic layout of a document. I want to have a footer that has my name in the left part of the footer, some text in the center of the ...
1
vote
0answers
16 views

Horizontally align \vdots with equal signs in aligned environment [duplicate]

I have a number of equations aligned at the equal sign. I insert a line containing just \vdots to indicate a bunch of steps and then equations again. How I can make the \vdots align with the equal ...
2
votes
1answer
37 views

Horizontally aligning equations with overset text

Say that for example I have the following set of equations for which I want to use overset to clarify what equations are used: \documentclass{article} \usepackage{amsmath} \begin{document} ...
3
votes
2answers
37 views

How to align text to right without adding additional vertical spacing?

I am trying to simply align one paragraph to the right. However, when I try to use flushright environment, additional vertical space is added above that environment: \documentclass[final]{book} ...
2
votes
1answer
38 views

How to center text in a cell of a longtabu (horizontal and vertical)

I have a long tabu like the one defined last in this question and online here. It looks like this when compiled: As you can see the "point" and "score" text is placed in the buttom right corner. ...
2
votes
2answers
54 views

Center content of a minipage inside of a longtabu

How do you center the content of a minipage that is placed inside of a longtabu? My minipage looks like this and can be found online here: ...
1
vote
3answers
91 views

How can I fit my table in the text block?

I want to make my table fit in the text block. At the minute, a large part of my table is being cut off at the right-hand edge the page. My code is: \documentclass{article} \usepackage{graphicx} % ...
4
votes
1answer
57 views

\halign does not affect \prevdepth?

What is the purpose of restoring the initial value of \prevdepth at the end of a horizontal alignment: \prevdepth=.1234pt \everycr{\noalign{\dimen0=\prevdepth prevdepth in noalign: \the\dimen0}} ...
0
votes
1answer
33 views

Justified alignment for equations

I am writing a IEEE journal paper full of equations and with center alignment the paper looks so messy. I needed to justified align at least those that are coming successively one after another. I ...
3
votes
1answer
37 views

Bad alignment in table cell using siunitx table type S

I have a problem with number alignment using the S table type from siunitx package. The numbers are not centered and especially on the right side the number falls out of the table. The ...
2
votes
1answer
22 views

Header does not align with text frame

I have noticed that my header not is aligning with my text boarder, which I would like. The problem only occurs when I have the part where I adjust the spacing above and below equations. Can anybody ...
4
votes
3answers
70 views

Right align address

I am pretty new to LaTeX and I'm having some issues for creating a motivation letter. I have a nice structure in my mind, but I can't complete it fully. Here's a live example: click. Everything looks ...
3
votes
1answer
100 views

Figure not centered properly in LaTeX, kindly help!

I am making a figure in LaTeX of which the code is given below. In the end result, the figure is not centered in the page, the page offset from the left is more than the page offset from the right. ...
4
votes
1answer
36 views

Simultaneous left and right justification in TOC with tcolorbox

A tcolorbox can have a title and an after title. Is it possible to put them simultaneously in the TOC, the title being left aligned and the after title right aligned ? \documentclass[11pt]{book} ...
2
votes
3answers
151 views

How may I align a mathematical statement and a few words straight of the following?

I would like to have the words 'to mean' and the following mathematical statement to be on the same straight line. Thank you very much! \documentclass[11pt,a4paper]{article} ...
1
vote
1answer
31 views

How can a verbatim environment be centered using a basic LaTeX installation?

I want to centre some verbatim text in a reasonable way using only a basic LaTeX installation, i.e. the packages listings and fancyvrb are not available. \documentclass{article} \begin{document} ...
2
votes
2answers
46 views

LaTeX weird alignment

I'm new with stackexchange and I'm not sure if I post this question the right way, please let me know if I need to provide additional information. I can't identify the source of this alignment ...
7
votes
2answers
129 views

How to align the last column to the right in tabular?

This is my code: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{p{10em}>{\raggedleft\arraybackslash}p{10em}} First\newline Second & Alpha\newline Beta ...
3
votes
1answer
44 views

How to center subfigures in a 2 by 2 subfigmatrix

I have a figure with 4 subfigures displayed in a 2 by 2 matrix \begin{figure}[h] \begin{subfigmatrix}{2} \subfigure[ALS1]{\includegraphics[height=2.5cm,keepaspectratio]{fig1.png}} ...
10
votes
3answers
221 views

Centering disregarding symbol ®

I have a titlepage for a report. This title is split into two lines with only the word "BRAND®" on the second. It should be centered, but should disregard the ® as it is placed in the third line ...
1
vote
2answers
86 views

Typesetting Multipart Exercises

When I typeset exercises, I sometimes like to provide the exercise number in the left margin rather than as part of the paragraph describing the exercise. This poses a problem when I need typeset ...
4
votes
4answers
130 views

Align multiple graphics at different indentation levels

I want to include centered graphics with items at different levels in an enumerate environment, such that the images line up with each other horizontally. I currently have \documentclass{article} ...
1
vote
0answers
47 views

Justification isn't done in this part of my document

\documentclass{article} \usepackage{amsmath} \usepackage[spanish]{babel} \usepackage{graphicx} \usepackage{graphics} \usepackage{times} \usepackage{color} \usepackage{float} \usepackage{multicol} ...
3
votes
1answer
42 views

Strange line space behavior with vspace

I noticed an unexpected different line spacing of the titlepage what drives me crazy. The left page is the MWE, the right page without the \\ in front of Name. \documentclass{scrartcl} ...
1
vote
2answers
88 views

How to set horizontal space for tabular

Below is item in tabular. Using tabular text gets out of the page. In-order to get rid of this. I tried with \\. But doesn't help. It's not aligned. Can anyone help me to get the below Below ...
1
vote
1answer
32 views

cellcolor affects horizontal alignment in table

I have a table and I want to highlight some cells with color with \cellcolor. However the horizontal alignment is distorted, as you can see in the image. Can this be corrected with the current ...
4
votes
1answer
29 views

Keeping compactenum counters right-aligned

I'm using the compactenum environment (in the paralist package). I'd like to customize the font of the number counter, but when I do so the list ceases to be right-aligned. In the example below, the ...
0
votes
1answer
47 views

Useasboudingbox and measuredfigure to align caption

I use useasboundingbox in my tikz pictures to make them optically centred. I want the caption to be aligned with the left edge of the bounding box. Normally this can be done with the measuredfigure ...
1
vote
2answers
238 views

How to align equal sign

I want to make all equal sign align. So I tried many of the solutions in this forum but to no effect. I still couldn't make it work. Here is my code: \documentclass[12pt,a4paper]{article} ...
2
votes
1answer
49 views

Figure alignment using sub caption

I'm trying to align some figures using the subcaption package. My current code is that: \documentclass[11pt,twocolumn]{article} \usepackage[demo]{graphicx} \usepackage{subcaption} ...
2
votes
1answer
57 views

Node in TikZ : change text alignment in one node ?

I am working with tikz, and I am wondering if there is a simple way to have different text aligment in one node ? For instance, in my MWE below, I would like to have blabla1 centered, but blabla2 ...
4
votes
2answers
54 views

How to prevent line break in a long line on the title page?

I am trying to design a very simple title page for my thesis. Here is a MWE: \documentclass[a4paper,12pt]{report} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
0
votes
1answer
25 views

How to center a piecewise function. (On the page.)

Look at similar questions I can't find anything exactly what I'm looking for. I've already got the actual function aligned properly but when I compile it to a PDF, the function is centered on the page ...
1
vote
1answer
100 views

New Commands with text align

I would like to create a new command in LaTeX that aligns the text right and left (see example below). Only that I wish the text column were as large as half page. ...
2
votes
2answers
35 views

Centering tabular data horizontally, without giving it its own page

I have a fairly basic table set up right now: \documentclass[paper=a4, fontsize=11pt]{scrartcl} \usepackage[T1]{fontenc} \usepackage{fourier} \usepackage[english]{babel} ...
1
vote
1answer
54 views

How do I align the equations about the equal to sign, with lines of text in between? [duplicate]

I want to align unnumbered equations about the '=' sign having one or two lines of statements in between. And also, I want them to be centered. Here is what I did in my code: \begin{align*} T & ...
4
votes
3answers
59 views

Align two lines of text inside a \emailfrom

I am very new to TeX and I am trying to do a simple cover letter using LaTeX. I've downloaded a template for a cover letter and it has a component (don't know how you call these things) named ...
7
votes
2answers
122 views

Why does center not center \halign?

With the following code: \documentclass[a4paper]{report} \begin{document} \begin{center} \halign{\vrule \hfil # \hfil & \hfil # \hfil \vrule \cr a & b \cr\noalign{\hrule} c & d ...
1
vote
1answer
37 views

Bibliography heading left alignment

I am having following code, due to which the heading of bibliograpy/references is center align, if \titleformat{\chapter}[display] is removed then it is left justified but all the chapter heading is ...
3
votes
1answer
84 views

\centering not working in latex

This is my code, but my picture is on the left!!! Can anyone share a better code? thanks a lot \begin{figure}[H] \centering \includegraphics[width=25cm,height=25cm,keepaspectratio]{1.eps} ...
3
votes
1answer
70 views

ModernCV: how to make first entry of \cventry “raggedright”

I want to modify the first field of \cventry{Aug 2014 - Present}{WiMi}{LMU}{}{}{} in a way that it is ragged right. This might be equally interesting for: \cvitem \cvitemwithcomment Is this ...
0
votes
0answers
23 views

Text to the right of a section heading

This is a macro that defines a heading for a project \newcommand{\project}[2]{ %1: project name %2: percentage of time \subsection*{#1 \begin{flushright} ...
0
votes
1answer
41 views

aligning and logo shape in moderncv

How can I align the logos and the elements on their right side? Another, and more important, problem that I face has to do their shape. As soon as I close TeXworks and try to open the pdf document I ...