{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
1answer
177 views

Break line only if it's too long, but breaking won't create a new page

I'm the author of the contracard package/class for typesetting calling cards for traditional dances. Currently, if you typeset a particularly long figure on a calling card it wraps like this (look at ...
9
votes
1answer
257 views

How to use less space for ~

In a paper, I need to use the abbreviated form of Figure as in "see Fig. 2". To avoid line breaks between Fig. and the number itself, I place a ~ in between. However in that case, the inserted space ...
1
vote
1answer
816 views

Add a percentage error using siunitx package

I have a problem with the siunitx package. What I would like to do is the following. I have a number which for instance equals 145 and has the units mm. However, there is also an error expressed in ...
7
votes
2answers
1k views

Linebreak of words in math mode

I have some texts in math mode which does not break during justifications. For example, $A_xB_yC_z$ and $D_xE_yC_z$ The above two 'words' if at the end of a line, do not break and disrupts ...
1
vote
1answer
167 views

Resizing and line breaking for individual matrix entries

To make things easy, I have put up a pic here, I do not understand how I can reduce the size of the long entries in the matrix (the diagonal entries primarily) and also introduce line breaks so as ...
4
votes
1answer
108 views

Please help me fix a problem of tabbing

I typed a paragraph in tabbing environment. I use \= to place tab, and \> to move to tab position. It's alright with short line. But with long line, it out of line width. I don't know how can fix ...
0
votes
0answers
115 views

Long math expression in the middle of text exceeds the width page [duplicate]

I have a long math expression in the text, and it exceeds the width page. How can I fix it in middle of text? $x \in \left(10\%, 15\%, 20\%, 30\%, 40\%, 50\%, 60\%, 70\%, 80\%, 90\%\right)$
3
votes
0answers
30 views

Deleting new line when beginning new theorem in a list [duplicate]

I am using the package amsthm to type my assignments and I have encountered the following problem. Here's the code I use: \newtheorem{claim}{Claim} : : \begin{enumerate} \item \begin{claim} ...
1
vote
1answer
41 views

Prevent line break at one specific spot

I have \myDefineTerm{longFunctionName}($\pi$).... and want to tell LaTeX not to break the line just before the open bracket. Is there something like ~ that pretent a line break, but does not cause ...
2
votes
2answers
56 views

\item that starts with a number doesn't work with style=nextline

I've got a list of items and use style=nextline. Problem is, when a list-item starts with a number, the nextline doesn't work: \begin{example}[style=nextline] \item[3D] Doesn't line-break before ...
2
votes
1answer
288 views

Title in subfloat without line-break

My code is like this, but the title of subfigure is with line-break, which looks very ugly? How can I solve it? \begin{figure}[!ht] \centering \subfloat[Subgraph]{ \label{fig:subg} ...
1
vote
1answer
519 views

\medskip doesn't seem to work

I've just begun using TeXShop but seem to have come across a problem - I have a centered section that uses a \medskip right after a newline. Like so: \begin{center} Some text \\ Some subheading \#1\\ ...
3
votes
1answer
107 views

Overlong line even with suggestions for hyphenation

I have a paragraph which starts with \documentclass[a4paper,11pt,twoside]{book} \setlength{\textwidth}{14.6cm} \hyphenation{MnTPPCl CoTPP} \begin{document} We studied surface doping with the ...
1
vote
0answers
84 views

How to set word wrap for enumerate items in booklet?

The code below is based on the code from booklet manual Chapter 2. I used the enumerate environment. The problem is that words are stretching out of the paper. It won't break line automatically: I ...
0
votes
1answer
137 views

how to break lines in a table?

my code is here \begin{table}[t] \centering \bgroup \def\arraystretch{1.2} \begin{tabular}{|c|c|c|} \hline Frucht graph & Graph $K_3$ & An homomorphism from Frucht graph to $K_3$\\ ...
4
votes
2answers
175 views

Math-mode overrun in newtheorem

I would like to have a long math-mode "title" in a newtheorem environment: \documentclass[twocolumn]{article} \usepackage{amsthm} \newtheorem{definition}{Definition} \begin{document} ...
9
votes
3answers
145 views

Box with adaptive length

When I want to put formulas into boxes, I like the box to adapt to the length of my formula. For example, I don't want to put $1+1=2$ in a very large box. To address this, I use the command \encadrer ...
8
votes
2answers
293 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
224 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
175 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
111 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
172 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
88 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
216 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
69 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
441 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
111 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
172 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
497 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
57 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
396 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
230 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
118 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
59 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
228 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
226 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
207 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
312 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
197 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
1k 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
707 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
192 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
76 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
178 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
119 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
131 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
75 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 ...