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

learn more… | top users | synonyms (1)

2
votes
1answer
41 views

Allowing line break at C++ operators ('::', '->', …) in \lstinline

The following picture shows my problem: How can I tell \lstinline to break lines at specific C++ operators? For example: FooFactory::instance()->createFoo() should be broken as follows: ... ...
2
votes
2answers
28 views

Inserting \\ with a command doesn't do the same thing as inserting it directly

I'm using the mathpartir package and I have some code generated (by LyX) that puts an environment (that I'll call lines) in the \inferrule* and it seems to bother pdflatex whenever there are more than ...
0
votes
0answers
27 views

Define amount of space after \newline, \\, or \linebreak

How do I define the amount of vertical space there are after all new lines? I am looking for something that works like this: \define{x = 4} blah blah blah blah \\[x pt] blah blah \\[x pt] Where I ...
0
votes
0answers
11 views

Automatically avoid linebreaks before symbols and numbers

I want to have latex avoid starting a line with a number or symbol. Or at least print some sort of warning (similar to an overfull hbox warning). I know I can manually wrap each situation where this ...
2
votes
0answers
24 views

Line break with supertabular won't work

So, I have a really long list of symbols that I decided to create with supertabular. I'd like the table to split as it goes over to the second column, so I used {multicols}{2} but I found out that it ...
0
votes
0answers
23 views

2-line leaf in tikz qtree [duplicate]

How can I get two lines of leaf text in tikz-qtree? Specifically what I want is to have a word with a gloss under it. So for example, the leaf would be "Tisch" with the gloss "'table'" directly ...
2
votes
1answer
25 views

Breaking line inside a set

How can I write \[A=\Bigg\{\alpha\in \mathbb{Z}G : \alpha\ \text{is a unit in}\ \mathbb{Z}G\ \text{with}\ \varepsilon(\alpha)=1\ \text{and}\ \alpha+\Delta(G,G')\ \text{has finite multiplicative ...
1
vote
1answer
37 views

How to prevent line breaks in code listings?

I am adding a big Linux terminal output as a listing and would like to prevent these line breaks from happening: e.g. user@pc ~ $ top PID USER PR NI VIRT RES SHR S %CPU %MEM ...
1
vote
4answers
36 views

What is the command to add newline linebreak in \sum \prod? [duplicate]

I am sure this question or similar has been asked but I cannot find it by searching so adding it to make it more accessible: what is the command/environment to add newline linebreak in \sum \prod so ...
3
votes
2answers
38 views

Preformatted text using ConTeXt's \startlines

This is a follow-up question to ConTeXt equivalent to LaTeX's \linebreak with full justification Include original page images for side-by-side comparison + SyncTex I am using the ...
0
votes
0answers
18 views

Line breaks between quotation mark and footnote number, while using xeCJK

At the end of a line, a break sometimes happens between a quotation mark and the number of a footnote, while using xeCJK. MWE: \documentclass{scrreprt} \usepackage{xeCJK} \begin{document} This is an ...
0
votes
1answer
46 views

Text is spilling over the margin with standard margin settings

I have default margin settings, but certain text is spilling over the margin boundary. It happens when the final word on the line includes a hyphen. For example, if eye-movement happens to be at the ...
2
votes
1answer
28 views

French bis/ter/quater/quinquies section numbering with manual line breaks

As a follow-up to my previous Question French section numbering using bis, ter, etc, I'm attempting to manually add line breaks in my section titles that show up in the body of the text as intended ...
6
votes
2answers
87 views

Can't get teletype \texttt to move to next line

I'm having a problem that, whenever I have a lengthy region of \texttt{} at the end of a line where it continues to trail off rather than wrapping to the next line. Here is a MWE: ...
3
votes
1answer
26 views

Bad linebreak with tabulars in loop

I have built arrays (with csnames) containing contact information, and I would like to print out all the contacts in tabular format, using a loop. But when the tabulars overflow the \textwidth, ...
0
votes
2answers
29 views

line break in enumeration and \underline command

How can I break a line that is inside of an enumeration, and \underline{} command, without using \usepackage{soul} and it's \ul{} command? \item{\textbf{\underline{Long string of text that needs to ...
1
vote
2answers
31 views

How to force a subfigure's caption to be on one line?

I want the caption for each subfigure to be on one line because it isn't so long that it should line-wrap. Is there any way I can force it to be on one line? Here is a minimum working example: ...
0
votes
0answers
23 views

Bizarre line-skipping in tex file

A tex source file that I have received from a coauthor is double-spaced (i.e. every even-numbered line is blank) when I open it in TexShop in Mac OS X, or in TexStudio. Naturally, the file won't ...
1
vote
0answers
31 views

\newline not working with longtable?

This table comes from SAS output. The \newline is not working correctly. E.g. "Percent trimmed in tail" ought to be Percent Trimmed In tail but it is showing up as Percent Trimmed In Tail Here ...
3
votes
2answers
44 views

How can I break lines automatically in tabular in IEEEtran?

I use tabularx to break lines automatically in tabular. Here is my code. \begin{table}[h] \caption{A table} \begin{tabularx}{\textwidth}{|l|X|} \hline \multicolumn{1}{|c|}{\textbf{Term}} & ...
1
vote
0answers
32 views

How can I break lines automatically in tabular to fit to page width? [closed]

I expect to break a long text automatically in tabular. After searching this site, there are several ways: (i). Use p{dimension} in tabular, answered here \begin{table}[h] \begin{tabular}{|l|l|} ...
1
vote
1answer
42 views

How can I make the appendix one column to fit my very long equations? And also keep equations from running off the page?

The rest of the document is two columns, just the appendix needs to be one column to fit the equations. Here is the code, any help greatly appreciated! ...
2
votes
0answers
28 views

sagetex with breqn ? break line sagetex equations

When using sagetex, it often produces very long equations that are not visible anymore because they go over the page width. How to fix that? I could work around it by loading the .sagetex.sage into ...
9
votes
1answer
244 views

Balancing lines in two-column document containing figures

How to balance lines in two-column document that contains figures? In other words - how to set the vertical margins of figure with caption so that the line after the figure corresponds to the line in ...
2
votes
1answer
35 views

Centering two line caption in memoir

I'm struggling to center my two line captions. I'm using memoir and I want the second line to be the reference to where I got the figure from. I'm using the following code for the figure: ...
0
votes
0answers
14 views

seqsplit error: \SQSPL@scani has an extra }

I created some commands to allow me to easily handle Japanese text in Latex. Recently I added seqsplit to automatically break lines, as Japanese text is handled as a single word due to the lack of ...
2
votes
2answers
41 views

Center in a table if the result has at maximum two lines, otherwise try harder to squeze it on two lines (and then maybe center)

This has the second cell span over three lines: \documentclass[12pt,landscape,a4paper]{article} \usepackage{microtype} \usepackage{multirow} \usepackage[T1]{fontenc} \usepackage{lmodern} ...
3
votes
3answers
72 views

No newline before scientific units without using “~”

Is it possible to define a list of units (like ml, °C, nmol, eq., etc.) and forbid latex to insert a newline before those? I know it is possible to use a ~ between number an unit, but the above ...
0
votes
1answer
31 views

How to force long lines to automatically split into several to fit on the page? [duplicate]

Intro I have a list of elements in a tabular, where some elements of the last (3rd) column sometimes are long enough to overpass the width of the page. It is quite boring to have to go line by line ...
2
votes
2answers
76 views

New line after reaching margins

I wonder if there is a way to tell to WinEdt (or TexStudio) to start a new line when a word reaches the margins of a document. The reason is that I don't like to have long expressions and I don't ...
1
vote
2answers
100 views

Redefining \section command

I'm writing a draft of my notes with Latex. They are basically definitions related to a particular concept from different sources. Therefore I have used the command \section to highlight the concept ...
2
votes
0answers
39 views

Proper way of line breaking [duplicate]

I know 2 options to break the line. Option 1: Abcdef\\ Ghijkl Result: Abcdef Ghijkl Option 2: Abcdef Ghijkl Result: Abcdef Ghijkl Are there any rules when to use which? PS: I'm using ...
2
votes
1answer
29 views

changing fontsize in pstricks

I'd like to create a contour diagram based off the following template \documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add,pst-eucl} \psset { PointName=none, ...
4
votes
2answers
55 views

Affiliations with multiple lines of information

I want to format affiliations for a paper in a certain way - so that is looks like the following I have tried the following code \title{TITLE} \author[1]{Author1} \affil[1]{School \\ University ...
0
votes
2answers
27 views

Making url package customized break settings apply only to specific urls

I have an huge url consisting mostly of letters. I found Marco's answer to a url breaking question, and using \g@addto@macro{\UrlBreaks}{\UrlOrds} and \g@addto@macro{\UrlBreaks}{% ...
0
votes
1answer
12 views

Figure caption has line break problems when using subfig

I'm using the subfig package and I'm getting words that are broken in captions. Can anyone explain why, or how to stop it? \documentclass[11pt,a4paper, draft]{report} \usepackage{gensymb} ...
2
votes
2answers
57 views

Writing additional \section commands

My company has a Word document with lots of styles based on the basic headings. I need to create LaTeX equivalents and am struggling with how to do so because I need to do more than just redefine ...
0
votes
2answers
52 views

How can I force a new line after a subsection?

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 ...
1
vote
1answer
37 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 ...
6
votes
1answer
142 views

The LaTeX \obeylines command not working for the entire document if document contains a table

I'm using MikTeX 9.6.0.5 on windows 8.1. The following displays all the four lines in a new line, as expected: \documentclass{article} \begin{document} \begin{obeylines} This is first line. And the ...
2
votes
1answer
25 views

Creating a newline breaks entire page?

I'm using LuaLaTeX and I tried using a template found at: http://www.latextemplates.com/template/deedy-resume-cv However, when I try running it using Texmaker, the page splits into 2. Any idea how I ...
8
votes
4answers
164 views

Paragraph break only if insufficient space to end of line

I want to write source like Lorem ipsum dolor sit amet. \smallnote{Smaller.} and have it render so that if there is enough room for a \parindent plus the start of the \smallnote (the first word, ...
1
vote
1answer
36 views

Selective breaking of biblatex urls?

Based on Avoiding inelegant splits on URLs, I have this MWE: \documentclass{article} \usepackage[backend=biber]{biblatex} \usepackage{filecontents} \usepackage{trace} \usepackage{hyperref} ...
2
votes
2answers
81 views

Is it true that when using \newline to stay in horizontal mode, the information will be on the same page?

I read here that using \newline keeps horizontal mode engaged. Is it true, then, that when I opt for \newline in for example \noindent\rule{\textwidth}{\heavyrulewidth}\newline Here is some text. ...
0
votes
2answers
32 views

Long set description

I want to define the following set whose description is too long. How do I break it into two? $L_4 =\lbrace{ w \mid w \text{ every } 1 \text{ in } w \text{ is either preceeded or followed (not ...
4
votes
0answers
93 views

Which algorithms does (La)TeX use? [closed]

People often talk about the many "typesetting wonders" (La)TeX can do because of the countless algorithms it uses. But exactly what are these typesetting algorithms? Concrete examples I have gathered ...
0
votes
0answers
35 views

Paragraph skip preserving titlesec, titletoc, table of contents, list of figures and indentation

I have hard time dealing with paragraph skip while keeping titlesec/titletoc, table of contents, list of figures and indentation the same (this is a french book). I have the following class: ...
0
votes
0answers
26 views

Aligning the equations [duplicate]

How do I align the two equations and label them? \begin{equation} \begin{split} \pd{EU}{\alpha} &= d(\theta) U'(\pi_{1}) [G_{\alpha}(\alpha, \theta, \epsilon) - \widebar{P} C_{\alpha}(\alpha, ...
2
votes
1answer
81 views

How can I reduce the width of a table?

I'd like to put this table in a page: \begin{table}[h] \begin{tabular}{ccccccccc} \hline \textbf{No.} & \textbf{Author (year)} & ...
3
votes
0answers
49 views

Automatic line breaking for English

I have c. 80 pages of English text that naturally contains (in)definite articles. The text is block-aligned. The problem is that the article sometimes remains in the end of line and the noun starts on ...