{line-breaking} is about how (La)TeX breaks paragraphs into lines and how those breaks can be influenced.

learn more… | top users | synonyms (1)

2
votes
1answer
1k views

Unwanted line-breaking of hyphenated word in bibliography

In .bib file: @article{Kurahashi_Yokota2004, author = "Kurahashi, M. and Yokota, A.", title = "Agarivorans albus gen. nov., sp. nov., a $\gamma$-proteobacterium isolated from marine animals", journal ...
30
votes
2answers
29k views

How to format an inline source code

I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options ...
0
votes
1answer
382 views

revtex reporting underfull hbox at every newline

So I'm working on a seminar, and I was wondering, why revtex, every time I make newline after a paragraph (\), reports underfull hbox warning? I mean, everything looks fine once in pdf (I would expect ...
3
votes
2answers
358 views

Figure with long list of predicates and conjunctions (\wedge)

I have a figure with a long list of predicates connected with \wedge, here is the code: \begin{figure}[h] \small{ $ Defined\_in(subject\_state, concrete\_subject) ...
15
votes
3answers
3k views

How to use \sloppy for just some references?

I’m using XeLaTeX within MiKTeX and also the biblatex package for the literature. I’ve noticed that my bibliography set using \printbibliography is not set with the \sloppy option by default, which ...
7
votes
1answer
2k views

Control breaking of overlong section titles

I have following code: \section{This is some long text and probably it will be broken} I would like to prevent word division like: This is some long text and pro- bably it will be broken And the ...
32
votes
4answers
16k views

Prevent line breaking in inline math, but allow flexible spacing

How can I easily tell Latex to prevent line-breaks inside a part of an inline formula, without affecting inter-word spacing? Writing something like $ab(c+d)$ in Latex is bad: Latex might put a line ...
4
votes
1answer
505 views

How to adjust macro to respect current \linewidth?

I'm having issues with text going past the end of the specified \textwidth. I posted this question about why text was being placed beyond the specified line width. The MWE provided there produced ...
6
votes
1answer
250 views

Discouraging line break in an alignment

In the question Generate table with dynamic number of columns the OP posed a question to which my initial reaction was "No". However, now I've run into something interesting which, if I'm reading it ...
7
votes
2answers
5k views

Why is text being placed beyond the specified line width?

I thought that I knew a few things, but looks like I have some basic misunderstanding on how TeX is supposed to typeset material. I thought that settings by the geometry package would force the text ...
6
votes
1answer
1k views

How to prevent line break in citation with an argument?

If I cite a bibliography item with an additional argument, for example \cite[p.~6]{bib_item}, it can happen that there is a line break before the automatically inserted argument, such as: text ...
4
votes
1answer
314 views

Add a break between theorem head and theorem body if theorem note (the #3 arg) exists

I'm using the amsthm package for theorem style setting. I want the style like: Theorem 1 A triangle ... Theorem 2 (someone) A square ... that is, when the theorem includes a note, the ...
2
votes
2answers
1k views

bibtex large spacing

I couldn't find a solution to my problem searching. Apologies if it has been asked before. My problem is: on a few of my bibliography entries, there are massive spaces in the text to pad out the ...
7
votes
2answers
4k views

How do you get TeXShop to automatically insert line breaks?

As I am using version control (hg) it is convenient to have hard line breaks in my tex files. Is there a way to set up TeXShop so that it automatically inserts line breaks? (For instance, as I ...
7
votes
2answers
3k views

Line break in the table item

I am creating table in LaTeX and I need to get the text to perform line break automaticaly when it's too long. And if possible, I'd like to get the text alignment to the left. Is it possible to handle ...
8
votes
2answers
439 views

Passing text containing linebreaks as command or environment parameter?

I just tried to write some commands which used its argument to check whether they were empty (isempty{...} from package ifthen) or not. The problem was that the text to check contained a linebreak, ...
8
votes
2answers
2k views

ragged2e: “newcommands” option produces “underfull \hbox” warnings

The ragged2e package provides the commands \Centering, \RaggedRight and \RaggedLeft for setting ragged text while allowing hyphenation. The package offers a newcommands option that sets the standard ...
7
votes
2answers
4k views

Biblatex: Removing underlining of journal title and enabling line break of it

I'd like to use authoryear-comp for my bibliography. However, I'd like to suppress underlining the journal title that seems to be set default. Also, I got the problem that a line break is not ...
0
votes
1answer
839 views

Using inferrule with beamer

I am using the mathpartir package for its inferrule macro, which suits my needs very well when it comes to 'normal' document classes (article, book). However, when trying to work with the beamer ...
8
votes
3answers
914 views

Disallow hyphenated words go into the margin in section heading

I had a long section heading that the last word will hyphenate at the end, which goes into the margin. Minimal working example: \documentclass{article} \usepackage[english]{babel} ...
10
votes
2answers
1k views

Avoiding a line break at the beginning of an enumerate

How can I avoid the line break at the begin of an enumerate environment? I've noticed that theorem-style environments succeed in doing so. I'm using the enumitem package and my concrete example is: ...
3
votes
2answers
283 views

Macro with \n doesn't work, not sure why.

I created a macro called \code to wrap all the code fragments in my book, \newcommand{\code}[1]{\emph{#1}} But for some reason when I use this \code{\\n}, I never get the \n displayed. For some ...
3
votes
1answer
536 views

Insert \nobreak into subsection title in titletoc's \titlecontents star version

I want the label and title of subsection typsetting as a paragraph but NEVER break down in a subsection title. Say, the code below \documentclass{article} \usepackage{titletoc} \titlecontents* ...
2
votes
1answer
459 views

Put long formulas on new line/pgf tikz?

Sometimes I have to work with long formulas that can (or I want) not be split over two lines. I'm trying to write a macro that sent the formula at the new line if the formula would go over the margin. ...
19
votes
3answers
2k views

LaTeX word wrapping poorly

LaTeX is not word wrapping this anything close to sanely: \documentclass{article} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{geometry} \usepackage{lipsum} \geometry{margin=1in} ...
20
votes
2answers
13k 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 ...
15
votes
2answers
31k views

Phantom and line break

I want to make a cloze test using LaTeX. My Idea was to use the \phantom command to produce the space: Some text \underline{\phantom{some text to complete}} some more text. Now the problem is that ...
3
votes
1answer
246 views

How to properly break text with lots of inline formulas?

I have the following document: \documentclass{article} \begin{document} \textbf{Theorem:} $\forall x_0\cdots\forall x_{n+2}( \forall x_{n+3}(x_{n+3}\in x_{n+1}\leftrightarrow ...
30
votes
2answers
15k 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. ...
53
votes
5answers
20k views

When should I use non-breaking space?

DEK gained a reputation of painting red the draft dissertations of his students, taking particular note of incidents when they omitted a non-breaking space that should have been included. I have this ...
5
votes
2answers
735 views

Line wrapping on narrow pages

I'm trying to format a long paper of mine for the kindle. The following works, but there's a problem. \usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.1cm, left=0.1cm, right=0.1cm, ...
3
votes
1answer
765 views

Context-sensitive newline macro

I'd like to write a new command putOnNewLine such that \putOnNewLine{ABC} puts ABC on a new line, with exactly one line's vertical space separating it from what has gone before. It must also ...
0
votes
1answer
860 views

Split equation problem

I would like to split the following equation in two parts. Very basic thing, seems to be. \begin{equation} \zeta_k(x) = \frac{\sin (\frac{1}{2} (x - x_0)) \cdots \sin(\frac{1}{2} (x-x_{k-1}))} { ...
4
votes
1answer
2k views

Newline in equations

The code looks something like: $$ If \ abs(dx) = abs(dy) \ then \\ step = abs(dx)\\ else \\ step = abs(dy)\\ $$ I want the '\\' to ...
4
votes
1answer
652 views

Wrapping relational operators

If an expression $A = B$ (or say, $A \leq B$) occurs in a sentence and there is only enough space in the current line to accommodate $A$, LaTeX will place the equals sign beyond the margin and cause ...
8
votes
1answer
1k views

Title running off the page!

I haven't had this problem before so I'm not quite sure what's happening, but my title is running off to the right side of the page. This is my code: \documentclass{article} \usepackage{assymb} ...
2
votes
1answer
497 views

Caption alignment

For my master degree thesis I'm using a quite complicated latex template. The relevant part of the template is here: http://pastie.org/1728702 Probably this wasn't a good idea since I cannot ...
6
votes
1answer
849 views

Overfull \hbox produced by ntheorem subtitles

I switched from using the standard AMS theorem package to ntheorem so I can put alternative end marks on theorem environments (I want my examples to have an end mark, but not the same one as proofs). ...
23
votes
2answers
5k views

How can I prevent LaTeX from breaking inline formulas globally?

I am using the acmsmall template and my inline formulas are being broken at equal signs and arrows; how can I prevent them from being typeset like that globally (i.e. without having to put tildes ...
26
votes
3answers
24k views

How to put a line-break in section heading?

I have some section headings occupying two lines and I'm not satisfied with the way XeLaTeX breaks the heading. If I manually add \\ the output looks fine, but I get the following warning: [hyperref] ...
25
votes
3answers
11k views

Quote environment with reference at the end right

I want to define a quote environment such that after the quote on the right occurs the author with page number. My solution is yet the redefinition of the quote environment \usepackage{amsthm} % ...
6
votes
2answers
2k views

Centering and \MakeUppercase with linebreaks

I wish to make the list of authors show up as centered, uppercase and listed vertically on my titlepage. My documentclass contains a section like this \begin{center} ... ...
1
vote
1answer
806 views

Text crossing the page margin in math environment

I have some long text (a single sentence) which I want to put inside a math environment. But my text just goes accros the page margin and ignores the textwidth specification given in the preamble. ...
20
votes
1answer
5k views

How to suppress overfull hbox warnings up to some maximum?

I want LaTeX not to give warnings for overfull hboxes up to some maximum of say 2 pts. How to achieve this?
8
votes
4answers
2k views

Splitting very big numbers over several lines [duplicate]

Possible Duplicate: Wrapping long lines that contain no spaces I'm writing a report (in LaTeX) in cryptology and I have to work with very large numbers. I want those big numbers to be on ...
33
votes
4answers
4k views

How to prevent linebreaks after hyphen if word starts with hyphen?

(Remark: Maybe this is a typically German problem, I'm not sure in which other languages that might be relevant) Sometimes there are words which start with a hyphen, as they are connected with a word ...
8
votes
3answers
10k views

Insert a symbol at the end of line

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

How to spread words in several lines uniformly?

In TeX, I can use \hbox to 1in{foo bar baz} to get Is it possible generalize the use, to get this result: by typing a paragraph foo bar baz test text only? I tried \break to break lines at ...
8
votes
1answer
2k views

Optional but encouraged line break + \hfill

How would I write a macro (to be placed immediately before every URL in a bibliography) whose effect is to tell TeX This is a good place to insert a line break, but breaking the line here is not ...
18
votes
1answer
5k views

Verbatim environment and line-breaking

I've been wondering about how to display simple codes. I used verbatim and then found the fancyvrb package which added a lot of nice little features, but then I inserted some code with a long line and ...