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

4
votes
1answer
39 views

How to make a keyword list with enumitem with labels aligned right in the margin?

I kinda succeeded in doing with without using the enumitem package, by doing this: (disregard the lines, it's made with showframe) \newenvironment*{keywordlist}{% \list{}{% ...
2
votes
4answers
93 views

Alignment in a piecewise function

I would like to have the following two equalities displayed with the = aligned. I use the following code. The = are not aligned, and 2.5pt is typeset before the = in each line! Also, there is an ...
5
votes
1answer
47 views

How to obtain a fixed gap between columns in a table?

How can I center a column of a table which is raggedleft/raggedright at a specified position? Basically the length between W and X, X and Y and Y and Z should be the same, W should be raggedright, Z ...
2
votes
2answers
31 views

Multiple columns in table, problem with alignment

The following code generates a table: \begin{table}[!t] % increase table row spacing, adjust to taste \renewcommand{\arraystretch}{1.3} \caption{An Example of a Table} \label{table_example} ...
3
votes
1answer
25 views

How to force part of a paragraph title to correctly align with right marging (using e.g. \hfill)

I would like to have a \paragraph{A paragraph title 2000} with the term '2000' aligned to the right margin. If I use \subsubsection{A subsubsection title \hfill 2000}the term 2000is correctly aligned ...
0
votes
0answers
23 views

Make the text left side [duplicate]

I am trying to write in a template LaTeX document, all the text I am writing is centred. I couldn't find the command causing this problem and I don't know how should I make the text start from left ...
3
votes
1answer
34 views

Centering / horizontal alignment of text inside tikz boxes

I am facing a problem with centering the text inside the boxes: \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook} ...
2
votes
1answer
26 views

Shortcut to declare alignment of many columns in a table

Suppose I have a table with 20 columns that should all be centered. Is there a way to declare the alignment without literally counting out 20 c's? Something like c{20} might be the syntax. I feel like ...
3
votes
1answer
44 views

My Own CV Template - Help!

I wanted to develop a hybrid of moderncv and article class, another CV template. I am facing difficulties. Here is my code till now: \documentclass[12pt]{article} \usepackage{libertine} ...
1
vote
1answer
31 views

ragged2e justifying - centering figures

I am preparing a beamer presentation and I used the ragged2e package to justify the text in my slides (I justified the itemize environment). However, this does not allow me anymore to center a figure. ...
5
votes
2answers
77 views

How can I DeclareMathOperator* with spacing after it, preserving the alignment?

In the context of optimization problems, I'm using \usepackage{amsmath} \DeclareMathOperator*{\minimize}{\text{minimize}} \DeclareMathOperator*{\subjto}{\text{subject to}} to declare some operators ...
1
vote
1answer
38 views

How to properly format a proof/explanation with multiple points of alignment?

This answered question addresses how to properly align/format a proof, allowing one to add text commentary alongside equations without ruining the alignment of the equations; however, it only seems ...
0
votes
0answers
42 views

Aligning figures in a table

I'm trying to align four figures vertically and horizontally. But I couldn't get it right in spite of repeated tweaks. I guess its a fairly small error. Can someone help me out? Here is a MWE -- there ...
2
votes
2answers
35 views

Centering figure caption does not work

I have a few narrow figures for which I want to center the caption. I have to use a LaTeX template from Springer (svmult.cls). This makes captions left-aligned by default. I took a look at this ...
4
votes
2answers
83 views

Align split equation to the margins

How to align a two-lined equation such that the first line left aligns with the surrounding text and the second line right aligns with the surrounding text? Example (where the pipes denote the left ...
2
votes
2answers
94 views

Center equation ignoring condition/remark

Really basic question, probably already answered but couldn't find anything. I have this code: \documentclass[a4paper]{scrreprt} \usepackage{fontspec} \usepackage{amsmath} \begin{document} ...
3
votes
2answers
66 views

Difficulties aligning/centering tables that are side by side

I have two tables which are side-by-side and am having difficulty centering the first table underneath the "X" and centering the second table underneath the "Y". I'm getting the feeling I'm a little ...
4
votes
1answer
25 views

Justification inside Substack

How can I left-justify inside substack? \documentclass{standalone} \usepackage{amsmath} \begin{document} $L_{\textrm{disk}} = L_{ \substack{\textrm{disk} \\ \textrm{orbital} } } + L_{ ...
2
votes
1answer
46 views

2 rows legend and alignment

I got a legend with two rows and I would like to have a different alignment on each row. Is it possible ? In my current code, the legend entries on the second line are much longer than ones on the ...
1
vote
1answer
60 views

Centering images

I made my images in Ipe. But there are some not centered: But, there are others centered: I use the same code for both (just changing, of course, the files names): \begin{center} ...
4
votes
1answer
54 views

Text always on the right

I am trying to create a macro which always places the text in its argument on the right side of the line and then the line should end. For example: Left-Text \mymacro{Right-Text} should have text ...
1
vote
1answer
33 views

after end axis messes up pgfplots axis position

Latex and Tikz are going to get the life out of me... I saw Need to do some changes to pgfplots axis #39099, and that example was working fine for me; so I modified it a bit, and came up with the ...
2
votes
1answer
31 views

Centering table header with \multicolumn and intercolumn space

A previous answer directs that, when using \multicolumn in a tabular, subsequent intercolumn space added in the tabular column spec should be repeated in the \multicolumn column spec. However, this ...
3
votes
1answer
37 views

How to align terms in alignat: too much spaces and too few

Please, help me this code has too much spaces and too few, how can I fix it? \begin{subequations} \begin{alignat}{2} \forall i \in[m] && \sum \limits_{e \in N_{out(s_{i})}} y(i,e) - \sum ...
1
vote
1answer
39 views

How can I align the itemize with its title?

I want to align the list of items with its title, all start from the left margin of the page. For decreasing the space between the items, I have used "compactitem" package. But the result is like ...
7
votes
2answers
480 views

Infinitely shrinkable glue except if surrounded by text?

Say \a and \b are two macros that expand to some text and either one may be \empty but not both. I want two put \a and \b in a line, centered and separated by a \quad. \hfil\a\quad\b\hfil Problem: ...
1
vote
0answers
53 views

Marginfix font size and flushright

i have a Problem with marginfix. first i used marginnotes but sometimes content ran "out of the page" so i found marginfix to solve that problem. in marginnotes i used: \usepackage{marginnotes} ...
2
votes
1answer
44 views

Caption of figure not centred [duplicate]

I'm using the template provided by IEEE: \begin{figure}[!t] \centering \includegraphics[width=0.8\columnwidth]{top} \caption{CAPTION} \label{fig-top} \end{figure} However the caption is not ...
2
votes
0answers
39 views

Unwanted graphic offset

I'm getting a small difference in horizontal alignment when using the two ways of placing an image as shown in my code below. I know it doesn't look like there's much point in what I've done, but this ...
3
votes
2answers
54 views

Alternating column layouts in LaTeX (beamer)

I have been using LaTeX beamer for my presentations for some time. My standard slide layout consists of bullet-points on one side, with a 'hook' image on the other. To keep visual interest, I ...
3
votes
1answer
42 views

List of figures / tables when using subfloat to combine a figure and a table

I want to have a plot and a table side by side which can be solved using the subfig package. However I'd like the table to appear in the list of tables and not in the list of figures. Is there a way ...
4
votes
1answer
35 views

Is it possible to make odd-numbered columns have implicitly a prefix {}?

Prefix {} is implicitly inserted for even-numbered columns of alignedat (and alignat). As a result, + (or -, etc) becomes a binary operator. The section "Left aligned" below \begin{alignedat}[t]{3} ...
2
votes
1answer
39 views

Constant alignment of centered text on different lines [duplicate]

I want to have multiple lines with three sections: a left-justified column, a center-justified middle column, and a right-justified last column. For any line this is mostly done with \hfill. The ...
1
vote
1answer
42 views

`helvet` and `moveleft` in resume

I have several questions about the following code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Medium Length Graduate Curriculum Vitae % LaTeX Template % Version 1.1 (9/12/12) % ...
4
votes
1answer
37 views

Raggedright not working inside a table

I have a table and i want to align elements left. This is my code : \begin{tabular}{|c|c|} \hline Priorité&Description \\ \hline \multirow{4}{16 mm }{\centering 0} & \tabitem ...
5
votes
1answer
121 views

Is there a better and compact way to represent the expansion of products of polynomials?

Objective: to show the expansion process as readable as possible so we don't run the risk of misreading the coefficients of the corresponding terms of the expanded, long expressions. ...
3
votes
2answers
97 views

Help me with alignment

Anyone can help me write a latex for this? Except there should be no space between the letters because they are one word (ex. no space between d,e,and f). Thank you for your help!
1
vote
2answers
164 views

Placing text, includegraphics or a table above and below Tikz picture in standalone

The documents I am working with produce very large Tikz pictures (using Forest package) that span multiple horizontal and vertical pages in PDF. These pictures need to have titles, compbined of text, ...
3
votes
1answer
37 views

Text and picture top-aligned, where text is left-aligned and picture is right aligned

Using the answers from this sight, I tried to accomplish top-aligned text and image where text would have to start from the left side of the page, and picture would be at the right side. However, ...
1
vote
1answer
53 views

What is the correct way to properly align a split equation with continued parts prefixed with a binary operator?

Consider the following result with 2 methods. Don't hesitate to propose better ones if any. The question is: What is the correct way to properly align a split equation in which binary operator ...
2
votes
1answer
45 views

How to change flushright in order to set space between margin and text?

In my table I have got something like this: \multicolumn{1}{p{12cm}}{\rule{0pt}{1cm}\small\begin{flushright}\noindent keywords:\\ aaa\\bbb\\ccc\end{flushright}} \\ Does anybody know if it is ...
3
votes
2answers
36 views

How to align the new environment

I have to define the new environment, similar to the proof environment. I learned on our site how to define it, but I do not know how to customize it. In particular, I design a book by using gsm ...
3
votes
2answers
43 views

Moving a table all the way to the left side of the Page

I'm having trouble with a table I have made. It is too long and goes off of the page to the right. I have already made the font smaller and made the page landscape. What I need to do is have the ...
3
votes
1answer
43 views

aligning numerical data in columns on decimal marker

I created this table: I use this code: \documentclass[12pt,twoside,a4paper,openright]{report} \usepackage{color} \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} ...
4
votes
2answers
61 views

Align text in tables in LyX

I want to align the text of one of my tables like this: However, I got this: The header of the table are centered and rotated (in case of the first column header) and the rest of the text are ...
2
votes
1answer
41 views

How do I add indentation between text?

I have to write my homework with LaTeX, and I don't know how to add indentation inside text. I want to write my text, like this : Input : Sebuah digraf berbobot dengan bobot sisi tak negatif Output ...
3
votes
1answer
83 views

how to align an image using Tex/LaTex so it is above text

I am using the res.cls class to write my resume. And I thought it would be nice to put an image of myself just above the name. However when I have used the \includegraphics[scale =.09]{josh.JPG} I ...
1
vote
1answer
32 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
39 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
56 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 ...