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

2
votes
1answer
925 views

Aligning multiple tables

I have several tables I'd like to align, but it comes out messed up. I'm using revtex4 for my general layout (two column), and I have this: \begin{tabular}{|c||@{\hspace{12pt}} c ...
14
votes
2answers
10k views

\hfill after linebreak

I have a simple text. Right after the end of the text I use \hfill to get some words right aligned. \documentclass[11pt]{article} \begin{document} Lorem ipsum dolor sit amet, consetetur ...
5
votes
1answer
338 views

Test if text fits on one line

I have a boxed text that is justified, but I would like to make it centered if it takes only one line. Currently, once the text is rendered, I add a \filcenter as an option to my box macro, but I'm ...
1
vote
1answer
1k views

Figure caption indent problem

The last lines of my figure captions are indented too much or centered. I use floatrow package which usually doesn't conflict with LaTeX. Is it possible to fix this? My preambles are as follows: ...
3
votes
1answer
295 views

Problem with babel, ragged2e and parbox

I have the following code: \documentclass{minimal} \usepackage[french]{babel} \usepackage[newcommands]{ragged2e} \begin{document} \begin{center} \parbox{9cm}{ \textsc{ Jesus a dit~: \og ...
11
votes
2answers
10k views

How to force to center the table captions?

i want to center the table captions.
6
votes
2answers
948 views

Underfull hbox with \hbox to <dimen> but not with \halign

When using the \halign primitive, cells in the same column all have the same width. Hence, if one entry is very large (abcdefg below), the others will be stretched to the same size. If an entry ...
3
votes
1answer
878 views

line-breaking in longtable

I'm using the longtable environment with the field p{0.5\textwidth}. The text on that field is set with very odd spacing, because latex attempts to justify it both for the left and right column ...
4
votes
1answer
723 views

Exact position of a node in a rectangle

This question led to a new package: fancytabs I have a node positioned in a shaded rectangle with: \newcommand{\tabstyle}{\Large\scshape} \newcommand{\tabheight}{4cm} ...
3
votes
2answers
834 views

Centered-justified style

Is there a text style that is centered and places words on lines in such a way that it looks justified on the left and right sides? I'm not looking for a fixed justified text, but kind of boxing whose ...
24
votes
2answers
9k views

Line breaking of URLs in bibliographies

I have a problem with the line break of an URL. The URL can´t break correct and extends into the border. I´ve tried some things. Amongst others I loaded the package breakurl, but without any success. ...
5
votes
2answers
367 views

Is it possible to tweak the alignment of an equation when it is broken using breqn?

I have a looooooooong displaymath that I'm using breqn to break into smaller chunks. As there are no actual relation symbols, I've manually added \allowbreak everywhere I'd be happy for one to occur ...
4
votes
2answers
1k views

Alignment accross multiple arrays/vectors

I want to align multiple vectors (horizontal arrays), each on a separate line. Specifically, some values are negative and some positive, and some have a decimal part and some not. I want to align ...
1
vote
1answer
613 views

Pagenumbers aligned raggedleft in scrartcl with tocstyle?

When trying to typeset a table of contents with KOMAscriptand tocstyle(alpha 0.2d), I finally managed to change the font of the pagenumbers (like the rest of the document to CMSS) with ...
5
votes
2answers
343 views

Creating a table that uses all available space

Is there a way to use tabular or some other method to create a table that expands to use the entire available space? So if I created a table with 4 rows, each row would use 25% of the space. Thanks! ...
5
votes
2answers
2k views

Draw horizontal line left and right of some text (a single line)

I want a horizontal line to the left and right of some text, that is at most one line wide. The lines should be equally sized such that they fill the remaining horizontal space (like two \hfills in a ...
2
votes
1answer
4k views

Centering Text using multirow that overflows onto multiple lines

I am trying to create a table where one column has multiple rows. This is very easy to do using the multirow package. However, if I specify a width for this \multirow and my text overflows, the second ...
3
votes
1answer
799 views

Changing the alignment of chapter headings and quotes in quotchap

How can I change the alignment of chapter headings and quotes in quotchap without modifying the .sty file? More specifically, I would like left-align the chapter headings and right-align the quotes.
3
votes
2answers
362 views

Macro to allow for alignment points within its argument

I would like to have a macro that allows for alignment points inside it. As a specific example, I would like to be able to say: \begin{align*} a &= b\\ \bracr{c &= d} \end{align*} ...
4
votes
2answers
2k views

Aligning text columns

I am using the following code to try to obtain something to the effect of Author: Laboratory Partners: Amos NG Rebecca ROYCROFT ...
5
votes
1answer
9k views

How to shift one equation only towards the left margin

I have an equation extending into the right margin and off the page. I have many equations. For this equation only, I would like to shift it to the left. MWE below. \documentclass[twoside]{book} ...
4
votes
3answers
532 views

Text without hyphenation with Tikz

How do I get the text does not break the line? I have \begin{tikzpicture} \node[align=left,text width=3cm] {Contemplando a contemporaneidade}; \end{tikzpicture} but i need
4
votes
1answer
1k views

Aligning function arguments in “algorithm” environment.

In the "algorithm" environment, when a function call spans multiple lines, I would like to have its arguments aligned, like so: MyFunction(long_arg_name0, long_arg_name1, ...
5
votes
2answers
451 views

flushright of theorem captions

Is it possible to flushright captions of theorem envrionments? For example consider the following code: \usepackage{amsmath} % \usepackage{amsfonts} % \usepackage{amsthm}% \theoremstyle{definition} % ...
11
votes
1answer
15k views

How do I align text?

How do I do something like this in LaTeX? X: a, b, c, e, f, g
16
votes
3answers
23k views

Use flalign or alignat or align or similar environment to align to the left

The following is a small example to use flalign environment to generate equation. \documentclass{article} \usepackage{amsmath} \usepackage{txfonts} \begin{document} The formula is: \begin{flalign*} ...
17
votes
3answers
4k views

How can I align two nodes to the left in TikZ?

I have two unaligned nodes |AAAAAAA| |B| and I want to have the node with the B aligned to the left of the node with AAAs and below it |AAAAAAA| |B| How can this be done?
1
vote
1answer
158 views

alignment in align-env: what is aligned in what way?

In this example: \begin{align*} & \lim( \neg ( \Sigma^* a_1 \Sigma^* a_2 \dotsb a_n \Sigma^* ) ) & = & \{ \alpha \in \Sigma^\omega | \exists^\omega n : \alpha [0,n] \notin \Sigma^* a_1 ...
1
vote
2answers
2k views

How to align multiple lines on same indent?

Desired effect is this: But my document is this: my code: From paragraph 1: \\ \textbf{Q1}\quad The writer calls the advertising industry ‘universal’. What phrase is used later in the paragraph ...
4
votes
3answers
3k views

Flush a left-flushed box right

I would like to put an address in my document as follows: | | | Name | | Street #| | City | | ...
6
votes
1answer
4k views

Center aligning chapters

I'm using the following to center align chapters. Heres the code \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}} And using \cchapter to format chapters. But the chapter heading for eg. ...
3
votes
1answer
1k views

Table: Caption is centered but table itself not

I have another problem with a table in my document. The following code centers the caption but not the table itself. Any hints why? \begin{table}[htbp] \begin{tikzpicture} \node (table) [inner ...
9
votes
2answers
9k views

How to align image

If i have in my beamer presentation some list of items and on that slide i wanna add a picture, which i want to be aligned e.g. to right top corner. \begin{frame}[fragile]{III. Override pages} ...
11
votes
3answers
11k views

Left alignment in TikZ

I'm not able to align the text left. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \newcommand{\altura}{.45cm} \begin{document} \begin{tikzpicture}[x=1cm, y=-\altura, node ...
2
votes
1answer
891 views

amsart and enumerate environment

I'm using the amsart documentclass. Now the equation numbers are aligned to the left, I'm okay with that but what bothers me is the following: If I have equations in an enumerate environment it ...
6
votes
3answers
6k views

Insert a symbol at the end of line

I want to insert a symbol (\Box) at the end of the line.
66
votes
2answers
94k views

How to create fixed width table columns with text raggedright/centered/raggedleft?

I would like to create a table with some columns' width specified, while the text in those columns should be centered both horizontally and vertically. I found out that \usepackage{array} ...
5
votes
3answers
454 views

How can I align numbers in equations?

What is the best way to produce the following: (Image shows a typo)
6
votes
1answer
259 views

Is there a ConTeXt version of the LaTeX lefteqn?

What I want is to be able to set up equations like this: a very long first expression = the second line = and a third line = and maybe even a fourth In LaTeX, this would be ...
6
votes
2answers
1k views

How to center the TOC?

I would like to design the table of contents aligned to a vertical line near the center of the page. The chapter and section titles need to be flushright, the numbers flushleft, and between titles and ...
9
votes
2answers
727 views

Protrusion of fractions in tabulars

I have a number of tables in a book that I am busy with that have quite a few tables of the general form shown below: If you notice the fractional part of the numbers 5 1/2 and 16 1/2 protrude to ...
18
votes
2answers
6k views

Alignment of equals sign in multiple align environments

I have multiple align environments in my document, separated by a small paragraph of text: \begin{align*} foo &= something very very long compared to the other align \end{align*} explanation ...
13
votes
2answers
6k views

How can I center text/math inside a list environment?

When using math (display) mode in conjunction with a list environment, the displayed material is not truly centered on the page; it is only centered with respect to the indentation of the item. ...
3
votes
1answer
826 views

In ModernCV, how to define a command in the cls style file to allow lines with right-aligned word.

I am using ModernCV for my CV. I want to achieve something like the following example (please note that the address "align2@rightMargin.com" is aligned to the right margin): Please note the last ...
13
votes
3answers
16k views

How to format the chapter heading?

How can I change the chapter heading of the book class to typeset centered chapter names as shown in the image above?
1
vote
2answers
596 views

Enumeration flush right

How can I do enumeration like this: Some loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume loresipsum, lores ipsume ...
8
votes
1answer
1k views

Using infer from the proof package?

I am using the \infer command from the proof package. Few things that I am trying to do unsuccessfully: How can I have some space between the elements of the proof? such as space between x and y ...
22
votes
1answer
6k views

Underfull \hbox in bibliography

I am getting lots of "Underfull \hbox" warnings that point to the *.bbl file. It looks like these messages appear only when URLs are very long, like in the below example: @techreport{nistguidesec, ...
1
vote
2answers
277 views

Is it possible to add centering and vspace to the caption text of a figure?

I have a figure containing a pair of plots that represent data points from 15 referenced papers (indicated in the plots as 1-15). To better indicate the source of each data point, I have added ...
7
votes
2answers
517 views

Aligning columns, but allowing for text inbetween

I need help aligning text that spans multiple lines where I have Verbatim code in between. Here is a mock example to show what I mean: Fruit Amount Apple $3.00 \begin{verbatim} ... ...