Questions tagged [line-breaking]

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

2841 questions
173
votes
1 answer

What is the difference between \newline and \\?

As far as I know, \\ and \newline both insert a new line. But they do not have an identical expansion and tracing shows they do not execute the same commands, so what is their difference?
JanKanis
  • 2,307
69
votes
3 answers

How to put two newlines in LaTeX

How can I put two consecutive newlines in LaTeX? If I put two \\ the compiler gives me an error.
alexrn
62
votes
5 answers

Insert a new line without \newline command

I'm searching for inser a new line just push the "enter" button on the keyboard. Is there a solution? This is the "boring" way: \section{mySection} My really really really long text.\newline A new text line. This is instead a shorter and…
RikyTres
  • 877
  • 2
  • 7
  • 8
31
votes
4 answers

Automatic line breaking of long lines of text?

Here, it is just a example. I have a line: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa Now, I want to let LaTeX automatically wrap the line according to the width of the text…
27
votes
7 answers

LaTeX equivalent of


in HTML?

In HTML, all I would have to do is: This is line one
.
.
This is line two to get the following output: This is line one . . This is line two I've been playing around with \\ and \newline but can't get it to work. Can someone provide a…
Level1Coder
  • 7,029
27
votes
2 answers

Phantom and line break

I want to make a cloze test using LaTeX. My Idea was to use the \phantom command to produce the space: Some text \underline{\phantom{some text to complete}} some more text. Now the problem is that \phantom seems to handle "some text to complete" as…
student
  • 29,003
25
votes
3 answers

Asterism and similar breaking / non-breaking options

What are the options that can be considered an alternative to the old asterism (⁂) symbol ? I would like to denote a small break in the flow of the text, I noticed that this days many people like to just add more whitespace than the usual new line;…
user2485710
  • 767
  • 5
  • 9
18
votes
1 answer

Insert a linebreak only if there was none before

I am looking for a way to tell TeX: Please break that line if and only if you are not on new line already. I need this for a new environment which should always start in a new line. But I don't (how could I?) know, whether the author has typed a…
Dominikus K.
  • 897
  • 7
  • 18
17
votes
3 answers

How can I make a pair of words stick together in line breaks?

How can I make a pair of words stick together in line breaks? For example, "MS Access". I don't want a line break in the middle. But, I'd like to set this up once, not at every occurrence of that word pair. edit: Check out Sveinung's answer for two…
Emanuel Berg
  • 1,827
17
votes
2 answers

How to obtain perfect greyness with TeX?

Greyness, or typographic color is the apparent blackness of a block of text. I would be curious how you deal with improving it in TeX. How much can TeX's inherent line-breaking algorithm be fine-tuned to obtain the best solution? (Edit: Rephrased…
helcim
  • 1,548
16
votes
2 answers

Why is \linebreak failing?

Consider the following minimal, using \linebreak: \documentclass{article} \begin{document} It is impossible to say how first the idea entered my brain, but, once conceived, it haunted me day and night. \linebreak Object there was none.…
yannisl
  • 117,160
16
votes
2 answers

long word exceeds page width

I have this word in my document: --standard\_min\_confidence\_threshold\_for\_calling It currently exceeds the page width. How can I make it start on the next line, so it doesn't exceed the page width? I should probably add that I'm new to tex.
16
votes
3 answers

How to wrap a word in line without hyphen?

I m writing one article in which i need to write a paragraph full of medical terms. How can i wrap a text in a line without using line break (or hyphen)? Regards
manish
  • 9,111
15
votes
2 answers

How to prevent LaTeX from line-breaking a phrase?

How can I prevent LaTeX from putting line-breaks into a phrase? I could replace dashes with "~ and spaces with non-breaking spaces, but I'm looking for a more general solution in case I need other characters in such phrases.
Tim N
  • 10,219
  • 13
  • 63
  • 88
14
votes
2 answers

Breakable period

LaTeX will not insert a line break before or after a period . I understand why you'd want to avoid line break before a period, since you'd otherwise get stranded periods at the end of sentences. I assume there are good reasons for not allowing…
Sverre
  • 20,729
1
2 3
15 16