New answers tagged

0 votes

Force LaTeX to break a nonsensical line with a hyphen

Still another approach based on luatex, which allows \patterns in the document. A new language is declared and a set of hyphenation patterns are then assigned to it. \documentclass{article} \...
user avatar
  • 7,569
5 votes

Force LaTeX to break a nonsensical line with a hyphen

This adds \- between all characters, but care is taken not to do it too early (three leading characters and three trailing ones are not considered) and not to tamper with combining characters (from U+...
user avatar
  • 1.0m
3 votes

Force LaTeX to break a nonsensical line with a hyphen

If you're free to use LuaLaTeX, it's straightforward to set up a Lua function that modifies the string so that line breaks are possibly everywhere. The code can handle pretty much all utf8-encoded ...
user avatar
  • 443k
8 votes
Accepted

Force LaTeX to break a nonsensical line with a hyphen

It wasn't clear if you want a hyphen at the break, I show without and with - here, also it wasn't clear if the space between some ] [ was meaningful, I do nothing outside [...] here so ] [ allows a ...
user avatar
1 vote

Soft hyphens with priority don't change style with their environment but should do so

This post isn’t an answer (at least directly) to the original question, but to a comment. It’s a full answer because the explanation is a bit large and, on the other hand, it provides an alternative ...
user avatar
  • 7,569
2 votes
Accepted

How can I insert a hyphen in LaTeX?

As a general TeX rule, explicit hyphens1 can be used as a line break point. The second argument to \href is suitably processed so it can participate to line breaking, which might be necessary if it ...
user avatar
  • 1.0m
2 votes
Accepted

Trying to assign priorities to different breaking points in a word. Discretionary broken?

This is an engine level bug in the luatex source (texlang.c) Hans is testing a fix which looks good so far: So this will be fixed at source in the next day or so, so in texlive 2023 (probably earlier ...
user avatar
2 votes
Accepted

Soft hyphens with priority don't change style with their environment but should do so

This looks like a bug at the engine level so not really fixable in babel it is losing the font if the fields in the discretionary are empty as shown by this plain TeX example. The workaround is to ...
user avatar
1 vote

New language - hyphenation

Hyphenation patterns can be created in basically two ways. 1. With patgen for morphological, etymological, etc., rules. You will need to feed patgen with a large list of hyphenated words, and set a ...
user avatar
  • 7,569
0 votes

How to automatically hyphenate within \texttt?

Unfortunately none of the original answers worked for me (\DeclareFontFamily...{\hyphenchar ...}, \DeclareTextFontCommand{\mytexttt}{...}, \newcommand\textvtt[1]{...} or \usepackage[htt]{hyphenat}). ...
user avatar
  • 101
0 votes
Accepted

Hyphenation of quote environment in Beamer

You can adapt the quote begin template to include \raggedright \documentclass{beamer} \usepackage{lipsum} \addtobeamertemplate{quote begin}{}{\raggedright} \begin{document} \begin{frame} \...
user avatar

Top 50 recent answers are included