Questions tagged [penalty]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
13 votes
1 answer
676 views

Any elegant way to tell LaTeX that a line break after an abbreviation is bad but not impossible?

LaTeX manuals are full of examples such as Fig.~5 or Thm.~10. The tilde prohibits a line break after the abbreviation completely, to make sure that the reader doesn't see a period at the end of a ...
user avatar
  • 1,119
1 vote
0 answers
37 views

How to insert LaTeX commands through LuaLaTeX callbacks?

I would like to encourage LaTeX to break a line or page at the end of a sentence, after one of the following punctuation marks: "." ; "!" and "?". I would like to put a ...
user avatar
  • 335
1 vote
0 answers
28 views

Making punctuation groups almost unbreakable, avoiding orphans and widows

I have a script that generates PDF from the rich text. I want to make sure there are no orphans and widows that contains only punctuations or line break before punctuation if there is a word attached ...
user avatar
0 votes
3 answers
61 views

How to place an optional break with second line flushed to right?

I wrote a table of the \advance operator. If the line is too long, I want a break, and the second line flushed to right. I tried to get inspiration from the macro \signed presented in the TeXbook, ...
user avatar
  • 113
1 vote
1 answer
53 views

Reliable way to know a (lower bound?) remaining space on the page

In order to solve this question: Wrap automatically into figure if not enough space to place it Here I need to learn the remaining space on the current page. I tried this to put a rule of exactly the ...
user avatar
  • 5,175
1 vote
1 answer
60 views

Could someone explain threeparttable's para setting?

The para setting in threeparttable (excerpt below) uses what David Carlisle calls "an interesting collection of penalties and glue" that I must sadly confess is beyond me. Could someone ...
user avatar
  • 568
6 votes
3 answers
155 views

Forbidding line breaks after specific symbols in inline math?

I'm writing a text in which order relations (e.g. <, \prec, \ll) often appear as arguments of functions rather than binary operators (e.g. $O(P,<)$). Every so often this leads to an inline ...
user avatar
  • 247
2 votes
1 answer
289 views

What are exactly those \widowpenalties and what are they doing precisely? [duplicate]

In this answer, the author is using the command \widowpenalties=3 10000 10000 150. While I can understand what \widowpenalty is doing, I found no documentation for \widowpenalties3 nor for \...
user avatar
  • 747
1 vote
1 answer
46 views

\penalty Not Having Effect

I am trying to suppress page breaks following a minor heading that I've defined. However, the penalty does not seem to have any effect, no matter where I place it. MWE: \documentclass{article} \...
user avatar
  • 4,072
0 votes
1 answer
47 views

How to avoid the consecutive hyphenation in a para

i am getting the consecutive hyphen at the line end in a paragraph (more than 5 consecutive hyphen), in a two column format, I already used \doublehyphendemerits=10000, but not solved the issue. how ...
user avatar
  • 1,814