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

learn more… | top users | synonyms (1)

8
votes
2answers
278 views

How to automatically keep the indentation level when a line has to be broken

I'm using the algpseudocode package with two custom commands, \Let and \LongState to handle automatic indentation of (broken) long lines in the spirit of Werner's answer, which uses \parbox to wrap ...
4
votes
1answer
212 views

BibTeX (TeX Live 2013) doesn't escape & in url

BibTeX (TeX Live 2013 on ubuntu) doesn't escape the & specifically in urls. The % escapes but not &. For example I have the following reference: @article{benson1975, title = {The ...
7
votes
3answers
172 views

Overruns in newtheorem in latex

I'm defining a newtheorem as follows: \newtheorem{definition}{Definition} the problem is when the definition name is long, it results in overruns. I've tried \\ to split the name in two lines, ...
3
votes
1answer
107 views

breaking lines in listings enviroment

I am trying to make listing enviroment brake lines. Unfortunately breaklines=true does not work for me. Here is my code: \usepackage{listings} \begin{document} ...
0
votes
1answer
165 views

PDF not generated but I see no error!

I am having a lot of trouble adding png images and also with hyphenations, All of a suddent I was adding the following tkiz scheme and when I add the lattest part I started getting a bunch of ...
2
votes
1answer
84 views

Text in itemize goes onto margin and doesnt align with other text

I'm having some problems with margins. \usepackage[top=2.5cm, headsep=0.4cm, bottom=2.5cm,left=2.5cm, right=2.5cm]{geometry} \geometry{bindingoffset=5mm} When I use itemize, the text doesn't align ...
4
votes
0answers
214 views

How to line-break cites correctly (hanging-over problem)?

while using Bibtex, I experienced an frustrating issue with line-breaks on cites in my block text. I have chosen to use the following bibtex implementation: \bibliographystyle{plain} ...
5
votes
1answer
68 views

Processing a particular line of text in a document

My question points actually to a particular problem, as opposed to the more general type of problem suggested in the title -- which would nevertheless be interesting to me to see answered: I'd like to ...
5
votes
0answers
403 views

break lines in minted code

Thanks to this question minted is able to break long source code lines. It is working really fantastic, except in one case: When already indented code gets breaked into two lines, than line two gets ...
1
vote
2answers
107 views

Line break in large formula and error message in align?

I have a very long align formula and I do not know how to optimally (that it looks good and is accetable with LaTeX rules) line-break this. Currently I have \begin{align*} ...
3
votes
1answer
166 views

Can't insert newlines in the code listing

I am currently trying to insert a batch file programming code in my report. I am using the code listing. I am not able to add new lines to format my code! I have following code example yet: ...
4
votes
1answer
73 views

Discourage linebreaks before/after math

I would like to discourage linebreaks right before and after inline math displays, such that now let $f$ be the function that connects acts similar to now let~$f$~be the function that connects ...
5
votes
1answer
479 views

Overfull hbox in tabular

In the following (M)WE, the tabular version of the Contact information from a CV gives an overfull hbox warning when compiled with pdfLatex, but the minipage version does not. Why? I have not found a ...
0
votes
0answers
56 views

Breaking line inside tikz node [duplicate]

I have the following code. I cannot for the life of me find a way to lay the table under the pink figure .. \documentclass{article} \usepackage[english]{babel} \usepackage{tikz} ...
11
votes
1answer
90 views

remove endashes at linebreaks

I want to typeset a paragraph of endash-separated expressions, like this \documentclass{article} \setlength{\parindent}{0pt} \begin{document} \centering test -- test -- test -- test -- test -- test ...
6
votes
2answers
342 views

Manual linebreak with justification but without empty line afterwards

What do I write at the end of a paragraph if my text is a couple letters short of being flush from left to right and I want the last line stretched slightly so that no empty space is left that the ...
7
votes
2answers
227 views

How can I effect line breaks within the title without hardcoding \\'s in \title?

Although I do need line breaks within my title for my document's title page (I'm using the book class), I'd like to avoid hardcoding line breaks in the argument passed to the \title command, for three ...
3
votes
1answer
112 views

Retain line breaking behaviour inside macro

I use a macro which just wraps its argument in a pair of delimiters (brackets). It interferes with the way LaTeX would normally wrap an inline math expression. The following illustrates: ...
9
votes
1answer
99 views

Macro to capture until end-of-line as argument

Is it possible to capture the contents to the end-of-line as a macro argument? For example, consider the following naive visualization: \documentclass{article} \newenvironment{myitemize} ...
3
votes
1answer
58 views

Error with nested environment and forced linebreak inside tabbing

I reduced the offending code to this: \documentclass[12pt,a4paper,notitlepage]{report} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \begin{document} \newenvironment{foo}{}{} ...
4
votes
1answer
220 views

URL linebreaks W/O \sloppy

Hours of reading the different articles on url linebreaking did not reveal a solution for the following problem: I've got a long url, which I do not intend to short using online services. The url ...
5
votes
1answer
224 views

Textsuperscript and linebreak problem

I got a problem when doing cites and linebreaks. I configured natbib the following way: \usepackage{babelbib} \usepackage[super,square,numbers,sort&compress]{natbib} Now, citing multiple ...
4
votes
1answer
192 views

Hyphenate long acronyms

I'm using the package acronym but I have a problem. I have a very long acronym "ADD1/SREBP1". I defined it like this: \acro{srebp}[ADD1/\-SREBP1]{adipocyte determination-and differentiation-dependent ...
1
vote
1answer
291 views

Can not force \newline within \longtable

\begin{table}[htbp] \begin{tabular}{p{3cm}|p{1.5cm}|p{8cm}} A \newline B & C \newline D & E \\ \end{tabular} I tried creating a table as shown in the above MWE, the table is longer than 1 ...
3
votes
1answer
193 views

Multiline Inferences / Rules / Axioms in Bussproofs

I have a proof that I need to set in LaTeX, and to do so I am using the bussproofs package. However my proof has large amounts of free text in it, which makes the proof overly wide. Is there a way to ...
1
vote
1answer
950 views

Break a subfigure set in two lines

Is it possible to break a figure block made by three subfigures in two lines? I would like to maintain the first subfigure on the first line and the other subfigures on the second line. ...
16
votes
3answers
695 views

Rounded box around placeholder text that supports line breaking

I want to draw a rounded box around a piece of text like that: The left and right borders should be half circles and line breaking should be supported. This my code so far: \setuppapersize[A7] ...
9
votes
2answers
180 views

How to get listings that both feature line breaking of long identifiers and keywords highlighting?

I'm currently writing a book chapter in bioinformatics, and I would like to provide my readers some useful command lines to invoke recent software. To that purpose, I'm using the listings package to ...
3
votes
1answer
73 views

output generated macro content with newline

I would like to debug a latex macro, but I do not really know how. I got the following MWE which replaces the \\ in a string. I would like to print the value of generated string to check the result. ...
3
votes
1answer
162 views

How to wrap section titles when using wordlike?

I have a template based on the wordlike package. When I have a long section title, it extends beyond the edge of the page instead of wrapping to a newline (like this). Here's the code: ...
3
votes
1answer
118 views

How to add two force line breaks in cell

I would like to add two force line breaks in a cell. Using an answer from this question I can add one force line break. Can you help to add two line breaks using similar function like ...
5
votes
1answer
125 views

Make less space between lines on a table

I have a big table where I need to use multiple lines on each cell. The table is too big though so I need the space between lines on each cell to be smaller. I found on another post that I could use ...
7
votes
2answers
74 views

Line break in macro

I have defined a macro in my document as \newcommand{\FSeq}[2]{\ensuremath #1_1, #1_2, \ldots, #1_#2} The problem is that surpasses the margin usually. Is there anyway to solve this problem? I ...
5
votes
2answers
175 views

Special line breaking problem in my bibliography

The following is how my bibliography entry looks: Lagrange, Joseph-Louis (1773/1775). “Recherchesd’arithmétique”. In: Œvres.Vol.3. Hildesheim: Georg Olms Verlag, 695–795 The problem is: vertically, ...
7
votes
2answers
95 views

Why \\ increases interline spacing before the command in center environment?

This is about the effect of the line breaking command "\\" in center environment. It appears that the command has the effect of increasing the interline spacing of text appearing before the command. ...
4
votes
1answer
76 views

White spaces in report

My editor produces a new paragraph every time I omit a line with pressing 2 times enter. I would like to turn this function off and begin new paragraphs only with explicit \par command. Does ...
2
votes
2answers
240 views

Line break “no line to end”

I would like to know how to force a gap say in this instance: \subsection{$K\nsubseteq L$}<br> [Line break here]<br> In the next three results that follow, ... Naively using \newline or ...
51
votes
1answer
6k views

Manual/automatic line breaks and text alignment in TikZ nodes

How can I insert a line break in a TikZ node? Simply putting \\ where I want the break doesn't work (see MWE). Is there a way to make lines break automatically at some specified width? And can I ...
1
vote
1answer
82 views

Two hyphenation problems with non-language items

The first hyphenation problem occurs with the double-word "algébrico-géometriques", which is in French, and I'm writing in English. Unfortunately, I already tried different variants of ...
0
votes
0answers
34 views

Badbox in TexnicCenter.. How to solve it? [duplicate]

After compiling my Project in Latex, I got 206 badboxes of all the types you want. However, I can only see the reference of the Badbox, for example: Underfull \hbox (badness 1607) in paragraph at ...
4
votes
3answers
101 views

How to break words at paragraph width?

I have a few long nonsensical words I'd like to break at the same place as the other words. How do I do it? Example below. The text quoted is: As an example of the two first properties, the ...
2
votes
1answer
425 views

When wrapping text around an image, latex fills the bottom line first, not the top. How do I fix this?

I am using the wrapfig package in LaTeX, and in some areas, it is working fine to wrap the text around the image. However here it is breaking the lines in a weird way, and extending the blank area ...
2
votes
1answer
123 views

List all sections in TOC in one line wrapped [duplicate]

How can I list all sections under a chapter in TOC, in one (wrapped) line (without pagenumber is fine)? Thanks. Expected,: Chapter 1 .................................................... 10 section ...
2
votes
1answer
238 views

Verbatim Linebreaks

I would like to enable automatic line breaking in Verbatim environment; besides I do not want to use lstlisting as it will not have exactly the same font shapes as Verbatim and some other special ...
6
votes
2answers
79 views

Start the content of an item on a new line after the item label in enumerate environment

How to have the full content of an enumerate item to start on a new line below the item label and number, and aligned to the left margin of the document ? This question is closely related to this ...
16
votes
3answers
1k views

Help on dealing with items divided with slash

I am using a number of items in text that are divided with a slash. For example dates in different calendars or names of locations, such as 585/1190~CE (the first number is the year in Islamic lunar ...
5
votes
2answers
139 views

Conditional linebreak in align environment

I have a large document to typeset in two different page formats. Some of the equation lines are too long in the small format so I wanted to break some equation lines conditioned on whether the macro ...
2
votes
1answer
3k views

Breaking words at the end of line

LaTeX tends to break words at the end of the line when that causes better typography. Great. I'd like to have some sort of influence on where the words are broken, though. For example, LaTeX ...
5
votes
1answer
191 views

Newline Not Working Inside \pbox After Using \selectfont Command

I have the following command defined for a custom row of a two-column tabularx table with column specifiers rX: \newcommand{\pbrow}[2]{\pbox[t]{\linewidth}{#1} & \pbox[t]{\linewidth}{#2} \\} ...
9
votes
2answers
181 views

stacking text for cryptography

What is the best way to stack long passages of (fixed-wdith) text on top of each other? I am writing exercises and solutions for a cryptography class and would like to be able to have plaintext above ...