Skip to main content

Questions tagged [discretionary]

{discretionary} is for questions about the TeX primitive \discretionary (or variants thereof, such as LaTeX's \- shortcut), used to typeset text conditionally in a line break or otherwise. Questions about {discretionary} may also use the {line-breaking} and/or {hyphenation} tags, if appropriate. Questions about discretionary ligatures should be tagged {ligatures} instead.

2 votes
1 answer
93 views

I adapted Skillmon’s solution from my previous question for automatically breaking long Python module names at dots inside \texttt{…} in a table. His \newcolumntype uses \newcolumntype\pymod[1] {>...
user2379123's user avatar
0 votes
0 answers
25 views

For example using emtex to create a .tex file to got to a .pdf where i want a dollar sign to appear in the .pdf file. But since the $ is a special symbol then it seems that it would be impossible to ...
user158293's user avatar
1 vote
0 answers
142 views

Feeding \documentclass[ngerman]{article} \textwidth=104.2mm \usepackage{fontspec} \usepackage[ngerman]{babel} \babelprovide[hyphenrules=ngerman-x-latest]{ngerman}%%% according to the documentation of ...
user avatar
2 votes
0 answers
118 views

Let's say we wish to provide different priorities of hyphenation points in long compound words in German. Here is what we tried out for now: \documentclass[ngerman]{article} \usepackage{iftex} \...
user avatar
0 votes
1 answer
136 views

I try to assign priorities to different breaking points in a word. To this end, I work around the bug Soft hyphens with priority don't change style with their environment but should do so and ...
user avatar
2 votes
2 answers
305 views

Feeding \documentclass{article} \pagestyle{empty} \usepackage[ngerman]{babel} %%% The following 3 lines may be uncommented; it doesn't really matter. %\hyphenpenalty=49% one less than the default ...
user avatar
1 vote
1 answer
114 views

I have been transcribing an old, public-domain novel and am attempting to typeset it using Latex as close as I can to the original formatting of the book. I've taken Memoir template and am modifying ...
regret's user avatar
  • 21
5 votes
1 answer
239 views

Is the discretionary of the word difficult di\discretionary{f-}{fi}{ffi}cult equivalent to dif\-ficult (or dif\discretionary{-}{}{})?
yanpengl's user avatar
  • 2,751
2 votes
1 answer
70 views

How to find out if a break occurred at a manually inserted \discretionary? I can't do it by assignments within the arguments of \discretionary—assignments are finished before decision about breaking ...
Jewdokija's user avatar
1 vote
0 answers
100 views

The following MWE renders differently in XeLaTeX and LuaLaTeX: XeLaTeX has a line break, but LuaLaTeX doesn't. pdfLaTeX produces the same result as XeLaTeX. \documentclass{article} \usepackage{...
Clément's user avatar
  • 4,094
0 votes
1 answer
80 views

I want to set an automatic hyphenation for the Armenian word յանդգնել in XeLaTeX with \discretionary. The problem is, that there are four consonants in a row, and the Armenian language has very ...
Quaternion's user avatar
1 vote
0 answers
360 views

While experimenting ways to extract UTF-8 character strings from TeX boxes, I found a post from user micahl-h21 here: UTF-8 text extraction. After looking at the way glyph data is stored in the ...
codepoet's user avatar
  • 1,326
11 votes
2 answers
2k views

In poking around in someone else's package, I found the \discretionary command being used quite a lot. I wanted to hook into the code being used in one of its arguments, but found that my code got ...
Andrew Stacey's user avatar
5 votes
2 answers
247 views

I'm trying to create a template (.sty file) that will typeset [value of macro 1], [value of macro 2] if this expression does not exceed the length of the line, and [value of macro 1] [value of macro ...
Sora.'s user avatar
  • 403
2 votes
1 answer
329 views

I'm working on applying the answer to my question about color and ligatures and have run into a problem when the color change is supposed to happen inside a discretionary. Boiled down to a MWE and it ...
rpspringuel's user avatar

15 30 50 per page