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

learn more… | top users | synonyms (1)

11
votes
1answer
2k views

The word “Wikipedia” does not hyphenate

In my Tex, the word "Wikipedia" does not break down in the end of lines, therefore I always have "overfull hbox" problem. Details: it is a loooo- oooo word it is a long Wikipedia word In the ...
4
votes
3answers
1k views

break an long line in an algorithm

I have a long line in an algorithm and want to break it into two lines. For similar case in equations, split can be used. How do I do this within an algorithm? \documentclass{article} \usepackage{...
1
vote
1answer
44 views

LaTeX: Overlapping text in table

I am making a large table for the appendix of my paper, only I have problems with overlapping columns. I have checked multiple posts however the solutions did not help to solve my problem. I hope you ...
3
votes
2answers
47 views

Theorem environment : interaction with enumerate/itemize

My question is related to this one : Is it possible to skip the first line in a theorem environment? Actually, I am looking for a way to implement the solution given there in a somewhat systematic ...
2
votes
0answers
16 views

Citation Breaking Across Lines

I have a citation that is being split across 2 lines. Specifically, I have "author last name" at the end of the first line and "(Year)" at the start of the second line. I want both pieces to be on ...
2
votes
0answers
34 views

Widow numbers and \cite seprated from the previous words

I did search for this (even asked for help in meta), but found nothing. Sometimes I need to use tilde ~ to keep things looking good in situations I fell LaTeX should do it automatically. Examples: ...
27
votes
5answers
20k views

How can I prevent inline math formulas from overflowing into the margin?

When I compile my document in LaTeX, some formulas in the document in math mode, between $ $, go into the right margin area beyond all the text. Is there a way to fix this aesthetic problem?
1
vote
0answers
14 views

Automatic new line to my macro [duplicate]

I've created that new macro: \newcommand{\undbf}[1] {\textbf{\underline{\smash{#1}}}} To get underline closer to letters but, for instance with this code: \documentclass[8pt,a4paper,dvipsnames]{...
4
votes
3answers
47 views

Line break with equations in game tree labels produced with TikZ

I use this manual for help with the drawing of game trees using TikZ (http://www.sfu.ca/~haiyunc/notes/Game_Trees_with_TikZ.pdf). However, I have a challenge I cannot seem to overcome. Some of my end-...
1
vote
1answer
29 views

Automatic line-breaks in a table

I need a short table that I have to add to my document. I'm afraid, LaTeX does not seem tp break the lines at the spaces. My table currently looks like that: \begin{table}[!ht] \centering \...
4
votes
1answer
1k views

Typesetting mathematical formulas in line breaking

When you typeset a mathematical formula is there a rule regarding the breaking of the formula in a new line, meaning if for instanse the formula breaks in a plus sign (+) or in a equal sign (=) then ...
3
votes
1answer
27 views

how to insert a line break in tex4ht in \Hcode?

I got the problem that I need to produce Javascript Code with a certain structure. I need a line break or new line at a certain point, but no html-tags or similar in my code. Below there's a ...
0
votes
0answers
24 views

Latex table of figures invades margins sometimes

I have some problems with my list of figures. some figures invade the margins and other not. I don't seem to understand why sometimes it works fine and others not. the command i used is: \...
3
votes
2answers
67 views

\quad not working after using \newline

I am just starting to use LaTeX and I like it a lot. When I am in a \subsection or \section I can use \quad as much as I wish and it works properly until I use a \newline (or any line breaking ...
0
votes
3answers
279 views

How can I force a new line after a subsection? [closed]

I have this code: \subsection{Definitions} \subsection{Two important results} \textbf{Proposition}. Let $(\mathbb R^{n},d)$ be a metric space and suppose $X,Y\subset \mathbb R^{n}$ are compact ...
31
votes
6answers
15k views

How do I make LaTeX push long citations to a new line?

When I use the \cite command for my citations, often LaTeX will overflow the margins for my lines, and the text looks pretty bad. How can I make LaTeX push long citations to the next line ...
0
votes
1answer
71 views

inline listings line wrapping issues

I am having issues with inline listings line wrapping. As you can see in the linked image, the period ending the sentence is on the next line due to wrapping of the cite-website text. The listings ...
2
votes
0answers
23 views

Align environment without newline [duplicate]

Is it possible to use the align environment while suppressing the auto \newline? I have a problem with the following command: \begin{lemma} \begin{align*} a+b &= c \\\ &=d \...
2
votes
1answer
40 views

How to make all hyphens (including automatically inserted linebreak hyphens) bold?

Is it possible to make the hyphen bold without making a virtual font? I have spent about an hour now trying to figure out how to get my linebreak hyphens bold. I understand that we cannot replace a ...
6
votes
1answer
104 views

What does + before \\ do?

In Grätzer's More Math Into LaTeX, 5th Edition, the chapter on books shows a master document that includes at its end the following lines: \appendix+\\ \include{AppendixA}%Math symbol tables+\\ ... +\...
2
votes
1answer
34 views

I need to break lines in a {tabular} environment using memoir

I need this table to fit the page...breaking the lines... Is there a way to do it? MWE: \documentclass[14pt,twoside,a5paper,extrafontsizes]{memoir} %Classe estilo memoir \usepackage[brazilian]{...
7
votes
1answer
214 views

count the newlines in title

I am trying to automatically adjust the title page to get a pleasing result independent of the title size. This means that I have to count the number of line breaks in an argument. My MWE (not very ...
2
votes
0answers
37 views

Formatting Code around Line Breaks

I am typing up a sentence which contains code, and \verb's ignorance of line breaks is annoying me. This code is very short, and it does not make sense to give it its own line, but I also do not think ...
6
votes
1answer
90 views

How does \input adds a space?

Consider the following : A\input{foo1}C A\input{foo2}C A\input{foo3}C A\input{foo3} C with foo1.tex containing "B", foo2.tex containing "B%" and foo3.tex containing "B\n%". In the first case, ...
3
votes
1answer
285 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 ...
1
vote
2answers
47 views

How to force table to maintain the margins

I created a table using LaTeX, but as shown in the image, the table width spans to reach the page width as well. I want to maintain the margin in the page. How can I do that? code: \begin{tabular}{ ...
1
vote
0answers
25 views

line breaking has no effect in doublespace

I am trying to break a doublespace content without any success. \documentclass{article} \usepackage{amsmath, amssymb, graphics, setspace} \begin{document} \begin{doublespace} \noindent \(\left\{\...
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
29 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
62 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
145 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
50 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
40 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
35 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
7k 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
31 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
45 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
48 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 ...
44
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
164 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
39 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
85 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
33 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
93 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
66 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
20 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
21 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
489 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 ...