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

learn more… | top users | synonyms (1)

15
votes
1answer
184 views

Expand abbreviation automatically at beginning of line

According to an tradition in Spanish typesetting (Martinez de Sousa, MELE4), the abbreviation etc. should be fully expanded to etcétera when it appears at the beginning of the line (Spanish page in ...
3
votes
2answers
71 views

Why linebreaks break the line height within certain environments with size-changing macros?

Why linebreaks break the line height within certain environments with size-changing macros? I'm trying to understand what's the difference between these three approaches: \newenvironment between {} ...
2
votes
2answers
146 views

paralist package: \setdefaultleftmargin{0em}… doesn't properly align wrapped lines

I am using the paralist package to create very compact lists (for a poster). I'd like to use \setdefaultleftmargin{0em}{2em}{}{}{}{} to set the indentation of itemized lists to zero. This works ...
4
votes
1answer
81 views

Keeping first and last rows of a pgfplotstable with longtable on a page

I am using pgfplotstable along with longtable. Everything works good, but sometimes a single row can be on one page, which is kind of ugly. How can i keep the first 3 and last 3 rows of the table on ...
5
votes
2answers
120 views

Preventing \mbox or \fbox from exiting the page

I am trying to do something like this: \documentclass[a4paper]{article} \usepackage[top=0mm, bottom=0mm, left=0mm, right=0mm]{geometry} \begin{document} \noindent \fbox{\hskip1cm Some text ...
2
votes
0answers
66 views

break line at comma inside listings [closed]

I'm trying to do some listings environments, but I'm encountering problems. The ideal output is this: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,⤦ ⤷ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
4
votes
3answers
895 views

How to center table caption that includes a newline

My table caption spans more than on line so I added a \newline to split the caption at an appropriate position. Now, the two lines are left aligned. How do I center the two lines of the caption? ...
1
vote
1answer
213 views

How to remove the extra blank line in algorithm2e

I want to add a right aligned comment in LaTeX after \For command, but it adds an undesired blank line. Please help me. CODE: \For(\tcp*[r]{Incremental calculation of edges}){$i \gets 1$ ...
3
votes
1answer
63 views

Weird new line using \cmpd from chemnum in long headingtitles

I have a problem using \cmpd in a heading, that is too long. For some weird reason, the compound number gets put on a new line, even though there is no need. I already have a workaround using ~, but ...
1
vote
1answer
171 views

Text wrapping in a minibox?

For a class I'm given access to a LaTeX version of the homework so that it's easier to fill out. We're given boxes we're suppose to answer the questions in similar to: \begin{picture}(420,570)(0,0) ...
5
votes
1answer
86 views

Break between words when line becomes too full

This example: \font\standard="Arial Unicode MS" at 10pt \standard \newlanguage\nohyphens \language=\nohyphens \hsize = 150mm \parindent = 0pt \vbox{ \setbox2=\hbox{\hskip12pt‣\hskip3dd} ...
7
votes
1answer
153 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
245 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
499 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
781 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
104 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
96 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
89 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
29 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
38 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
55 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
218 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
303 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
86 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
74 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
129 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
151 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} ...
8
votes
3answers
126 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
1answer
217 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
172 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
146 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
87 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
149 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
66 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
194 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
64 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 ...
4
votes
0answers
274 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
98 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
139 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
69 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
372 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
55 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
202 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
202 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
91 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: ...
8
votes
1answer
84 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
53 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}{}{} ...
3
votes
1answer
165 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
193 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 ...