Questions tagged [penalty]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
70 views

Stretching vertical space and reducing badness at the bottom of a page

Problem Is there a way in TeX/LaTeX to somehow reduce the badness which comes from a distance of a line from target height of a page? Context I am creating a document class for my students to use ...
lpszTemp's user avatar
1 vote
0 answers
75 views

How to discourage a page break without completely prohibiting it in a block of formulas?

Feeding \documentclass{article} \predisplaypenalty=0%%% that's what our class svmono.cls from a nonminimal example (not given here) does. \usepackage[helvratio=.9]{newtxtext} \usepackage[slantedGreek,...
user avatar
1 vote
1 answer
37 views

What's the effect of two penalties directly following one another?

„I think the combination of age and the greater coming together is responsible for the speed of the passing time.“ (Sam Melville) What happens if penalties come together? Let's say we have \penalty𝑙\...
user avatar
1 vote
2 answers
80 views

How to adjust the line spacing of the previous page?

I'm working on an automatic mechanism for handling orphans and widows in my own defined documentclass. Tex version: xelatex-2022 Current progress is to reference the widows-and-orphans package and ...
Мақсат's user avatar
1 vote
1 answer
131 views

How to Insert Penalty for Page Breaking At Point?

I'm trying to figure out a way to insert a penalty for page breaking at a particular point similar to how the \brokenpenalty adds a penalty for page breaking after hyphenating a word. I want to insert ...
User23456234's user avatar
  • 1,860
0 votes
1 answer
26 views

Relative priorities for line breaks between certain words in a phrase

Let's assume we wish to typeset message sequence chart (MSC) We interpret this phrase as a (computer-science) term followed by its abbreviation in parens. Further, we interpret the term “message ...
user avatar
13 votes
1 answer
745 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 vote
0 answers
91 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 ...
B Legrand's user avatar
  • 541
1 vote
0 answers
40 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 ...
user271571's user avatar
0 votes
3 answers
69 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, ...
Fabien's user avatar
  • 123
1 vote
1 answer
96 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 ...
tobiasBora's user avatar
  • 8,704
1 vote
1 answer
74 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 ...
Fredrik P's user avatar
  • 1,386
6 votes
3 answers
473 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 ...
imakhlin's user avatar
  • 247
2 votes
1 answer
1k 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 \...
Watson's user avatar
  • 890
1 vote
1 answer
82 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} \...
dgoodmaniii's user avatar
  • 4,270
0 votes
1 answer
68 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 ...
RCV's user avatar
  • 2,030