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

learn more… | top users | synonyms (1)

4
votes
1answer
154 views

Line Breaking Question with Polyglossia

I am working with multiple languages (with polyglossia and XeLaTeX), and I am having issues with extra line breaks where I don't expect them, also likely related to an issue of not hyphenating where ...
1
vote
1answer
28 views

For programming a command: emit \newline iff we are within a paragraph

Short version: I am defining an environment: \newenvironment{myenv}{\begin{trivlist}\item}{HERE something\end{trivlist}} Now at the point marked with "HERE", I need a "conditional newline" doing ...
3
votes
1answer
60 views

Avoid pagebreak between equation and label

I have a very long equation which barely fits into one line, but the label does not and is positioned one line below. The problem is that if the equation is at the end of a page, the label is moved to ...
4
votes
3answers
141 views

How to deal with bad line-wrapping of \texttt?

If I have long words inside \texttt blocks, in my case for writing about variable names, sometimes the word-wrapping doesn't quite work, resulting in slightly-too-long lines. \documentclass{report} \...
1
vote
0answers
42 views

Removing carriage returns in LaTex file

I have huge list of references in \bibtex format that I need to alphabetize. Unfortunately, the original list included carriage returns to wrap the individual entries and keep them compact in the .tex ...
2
votes
2answers
37 views

Linebreak problem with titlesec

I'm trying to format the section titles in my article to be Large, centered and underlined using titlesec. Some of my section titles are quite long so i need them to be in multiple lines. However, I ...
1
vote
1answer
28 views

How can I make a line break on HostMath [closed]

I want to express the following: I need to express it on HostMath, where \nextline somehow doesn't work. What I have so far: \text(If ) \frac{x-3}{3}=k \text( and ) k=3, \text(what is the value ...
19
votes
2answers
6k views

Pandoc: Markdown to PDF, without cutting off code block lines that are too long

I'm trying to convert a Markdown file into a PDF file using Pandoc. I have a lot of code blocks in my Markdown. And if I have a line of code that is too long, it will just be cut off in the PDF. How ...
68
votes
2answers
3k views

Was the Knuth-Plass line breaking output ever subjected to a blind experiment?

Have any blind trials been organized to test to which extent "the average reader" prefers paragraphs typeset by the Knuth-Plass algorithm (or more advanced variants) over those typeset using the ...
1
vote
0answers
30 views

newline just before \cite

Is there anyway to insert a newline just before \cite command i tried with \\ and \newline but i could not compile my document i got errors just where i inserted the \\ and \newline here is my latex ...
0
votes
0answers
43 views

How to breakafter?

I want to break after whitespace or symbol in my http code example. I am using minted with my Xelatex. How my preamble looks like: \newminted{json}{breaklines,frame=bottomline,rulecolor=\color{...
4
votes
1answer
42 views

How can i split the chapter name in two lines, i have style file provided by college?

% % This is a version of NITC Seminar/Thesis/Dissertation latex format. Modified from the Old Dominion University Latex thesis template to confirm to NITC thesis % format. Modifications done by N ...
43
votes
5answers
27k views

How to get long \texttt sections to break

I often format path names with \texttt which can be very long. Usually Tex will not break this text. The line will just create a hbox overflow. It looks like this: ................ ...C:\documents ...
1
vote
1answer
157 views

Change of chapter appearance

I got the following code for making the chapter appearance in [report] mode, which I would like to keep: \renewcommand{\thechapter}{\arabic{chapter}} \titleformat{\chapter}[display] {\bfseries\Large} ...
1
vote
1answer
35 views

Line break in arabic text?

i'm stuck trying to insert a line break in an arabic text, any suggestions are welcome I'm using \usepackage{arabtex} Here is the complete example \documentclass[10pt,a4paper]{report} \usepackage[...
2
votes
2answers
81 views

Avoid linebreak in abbreviation

I use the macros for i.e. and e.g. from the tufte-book example. They look great, but sometimes a linebreak occurs in between like in the following example: \documentclass[nobib]{tufte-book} \...
2
votes
2answers
32 views

Colored text with linebreaks

at the risk that this has been solved somewhere, but I just can't find a solution: I want to highlight java class names in my text, for what I've created a macro \newcommand{\class}[1]{\textcolor{...
3
votes
2answers
82 views

Unable to line break \title with \maketitle - using custom title package

I want to use a title page package, ku-forside, made for my university, which can be found here. The site is in danish, so i will translate the instructions (briefly) to english: Hit "Zip-fil med ku-...
5
votes
2answers
56 views

Colorbox does not linebreak

I'm new here, so I'm sorry for any mistakes or error in from my part. I am trying to make colored textboxes that refer to colored blocks in a figure. My problem is that the colored box does not ...
2
votes
1answer
270 views

TeXworks adding bogus endline characters

I realise this is not exactly a TeX question, but I figured someone here might know what this is about, and in any rate, this is a question a LaTeX user might encounter. If it is not appropriate, do ...
2
votes
1answer
18 views

How to prevent line break before quotation mark when using a different font in quotation

I have \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \newcommand\french[1]{\!\! \fontfamily{jkplkvos}\selectfont #1 \fontfamily{\familydefault}\selectfont \!\!} \begin{...
3
votes
1answer
20 views

break lines with \includegraphics[draft] option

When I am using \includegraphics with the draft option \includegraphics[draft]{long-image-name} the image name is shown instead of the image. Unfortunately it appears on one line without lines ...
2
votes
1answer
27 views

write a small text in an equation environment after the symbol “=” [duplicate]

I wanto to write something like this c dt = average probability that a particular 1-2 molecular pair will react according to R in the next infinitesimal time interval dt. I tried with ...
12
votes
2answers
475 views

Tweak showlabels/showkeys - wrap the label

Can showlabels wrap the label in the margin? A very similar question is showlabels: wrap labels in marginpar, but the solution of @DavidCarlisle does not solve the more general case. Consider the ...
30
votes
2answers
16k 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. ...
2
votes
1answer
26 views

How to tell alltt not to skip lines at beginning/end?

It seems like there is no option for specifying that, like a hack for verbatim I found on tex.stackexchange: \usepackage{etoolbox}% \makeatletter \preto{\@verbatim}{\topsep=0pt \partopsep=0pt} \...
2
votes
1answer
31 views

long table multicolumn single word without hyphen [duplicate]

I am trying to create a long table that will be multicolumn. In one of the columns, I have a DNA sequence that is very long. I am trying to use the \multicolumn but the text is not wrapping possibly ...
8
votes
3answers
9k views

How do I keep a string of text together without it doing a line break?

I'm writing up a long paper, in which in prose I have various equations. However, I do not want a line break to occur within the equation - I want the equation to stick together. I want to do this ...
2
votes
2answers
51 views

Start a new line after the first page

The command to start a new line in LaTeX is \\. It works well on the first page of my document, but from the second onwards no longer works. Does anybody tell me why? This is the code: https://...
2
votes
1answer
33 views

Aligning long broken equation (with brackets also split over multiple lines)

I have long equation $F=\left\{ abcdef \right\}$ which needed to break line at halfway. To do it I use \begin{multline}. \begin{multline} F = \left\{ abc \right.\nonumber\\ \left. {} + def \...
14
votes
5answers
17k views

How to allow line break in a long hyperlink in a PDF compiled by latex-dvips-ps2pdf?

I am using latex-dvips-ps2pdf steps with -Ppdf option passed to dvips. The following code snippet \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{breakurl} \hypersetup{...
0
votes
0answers
12 views

Line break within brackets in Bibtex

When I use Bibtex, I want everything within a bracket to appear in the same line. So, for example, in the attached Bibtex, I want the phrase "Phys. Rev. A" to appear in the same line. You can try and ...
4
votes
2answers
55 views

Unexpected first line break

Sometimes pdfLaTeX decides to break the first too early and I really can't understand why and how to avoid this. Unfortunately, following our standards, I had to disable word division, which seems to ...
1
vote
1answer
49 views

Breakable \colorbox? [duplicate]

Given a phrase in the middle of which TeX will place a return carriage, if we place this phrase within a \colorbox, TeX no longer places the return carriage and the phrase protrudes in the margin. Is ...
2
votes
1answer
59 views

How do I get a space or line break between paragraphs rather than an indent? Parskip is not working [closed]

So when I first started out with my file I had gaps between paragraphs and no indent, as I was using the parskip package as listed below in my pre amble. At some point for a reason unbeknown to me ...
2
votes
2answers
45 views

background package - Using text with line breaks

I'm designing a very simple cover for a university publication in Sanskrit. I'm using the package "background" to add some "watermark-like" Sanskrit text on the cover, both top and bottom, while the ...
11
votes
3answers
15k views

URLs in bibliography: LaTeX not breaking line as expected

I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document. I have seen a number of questions about breaking URLs in bibliography, but after trying ...
6
votes
5answers
9k 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
28 views

How to insert a break line in LaTeX just like hr tag do in HTML?

In HTML, I can insert a line below any text using <hr> tag. How can I do same thing it in LaTeX?
68
votes
4answers
27k views

Allowing line break at ',' in inline math mode?

In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g. very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc may be ...
1
vote
0answers
25 views

How to break long sequence of fractions in math mode? [duplicate]

I tried few solutions, such as using seqsplit and breqn but no success. splitting-very-big-numbers-over-several-lines I want to break long sequence of fractions. Here is MWE \documentclass[12pt]{...
2
votes
1answer
16 views

Line break between two graphics in a subfig-style subfloat

What I am trying to achieve is this: AA B AA C A being one subfigure, B+C a second. However, I don't achieve the line break between B and C: \documentclass{article} \usepackage{subfig} \usepackage{...
3
votes
1answer
59 views

How can I redefine verbatim to wrap lines (add break before or after spaces)?

Before continuing, I would like to inform readers that I know it is generally discouraged to reimplement functionality that packages already support. Automatically wrap the text in verbatim has an ...
0
votes
1answer
29 views

Vertical Spacing After NewEnvironment Definition

How can I modify this, \newenvironment{definition}[1][Definition]{\begin{mdframed}\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}\end{mdframed}} so that a newline (vertical ...
1
vote
2answers
41 views

Automatic Line Breaking Under Gradient Color Text

How could I add automatically line breaking for a gradient color text? I would like to add gradient color for separate words and long ones are just causing trouble. The code I am using is \...
39
votes
4answers
2k views

How to create nonbreaking arbitrary length snakes for full-width justification?

This is a follow-up to the recent xkcd comic: Here is a simple version without justification: \documentclass{article} \usepackage[text={1.2in,3in}]{geometry} \raggedright \begin{document} \...
0
votes
0answers
32 views

Underfull hbox error using \newline and \hfill\break

I am trying to remove warnings/errors from the document I am writing that includes underfull (and overfull) \hboxs from the code below. Why does \newline and \hfill\break produce this warning? Aren't ...
2
votes
1answer
35 views

Tabular using X column not wrapping cells (tabu package)

I have the following code. \documentclass{article} \usepackage{lscape} \usepackage[table]{xcolor} \usepackage{tabu} \usepackage{multirow} \begin{document} \begin{landscape} \taburowcolors[3] 2{gray!...
2
votes
1answer
27 views

line break in “moderncv like \section” in the article class suggests missing \item

With the default definition of \section in the article class, I can make a multiline section header: \documentclass{article} \author{} \begin{document} \section{test \\ test} \end{document} The ...
0
votes
1answer
29 views

How to avoid linebreak at `http:` in url

I have a long url that gets wrapped at http: in my layout (using beamer). This is the latex-code: \documentclass{beamer} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{url} \...