4

In German language there exists a word like Wachstube.

It has different meanings when split into syllables:

  1. Wachs-tube
  2. Wach-stube

No problem, when the word crosses a line -- one can fix like above with a forced line break.

But how to set it up correctly without any line break to make it read best to get its correct meaning? It is about to provoke or avoid some kind of ligatures ...

Of course it might depend on the font one chooses and what ligatures are provided within that font. What is the correct way to make the reader get the correct meaning -- when the word won't cross a line?

Any hints welcome!

  • if your font has a st-ligature you should break it in the first case, but apart from this you should simply expect your readers to get the meaning from the context, like with all other words that have more than one meaning. – Ulrike Fischer May 6 '18 at 21:43
  • @Ulrike Fischer you are of course right to get the meaning by the surrounded context ... That shouldn't be a problem ... it is more about the st-ligature to be broken or not -- if existant within the font. – user151328 May 6 '18 at 21:49
  • @marmot ... either/or ... I'd like it more subtle, like from case to case if necessary ... btw. it is not about that word only -- just for general purposes that behave quite equally ... – user151328 May 6 '18 at 21:53
  • @marmot ... it is more how to setup the word without crossing a line and therefore set it up to provoke or avoid a st-ligature if provided by the font – user151328 May 6 '18 at 22:04
4

You can use the selnolig package. It provides an interface to suppress ligatures in certain patterns.

Requires fontspec and LuaTeX.

\documentclass{article}
\usepackage{fontspec}
\setmainfont[Ligatures=Historic]{Linux Libertine O}
\usepackage{selnolig}

\begin{document}

\nolig{st}{s|t}
Wachstube

\keeplig{st}
Wachstube

\end{document}

enter image description here


selnolig breaks ligatures by inserting a whatit in the node list. Unfortunately this also inhibits kerning between the letters taking part in the broken ligature. If you have to adapt the kerning between them (for whatever reason) you have to remove the ligature from the font itself. This, and adding some custom kerning, is feasible with LuaTeX and fonts.handlers.otf.addfeature.

\documentclass{article}
\usepackage{fontspec}

\directlua{
fonts.handlers.otf.addfeature({
    name = "kernst",
    type = "kern",
    data = {
        ["s"] = { ["t"] = 200 },
    },
})
fonts.handlers.otf.addfeature({
    name = "ligast",
    type = "multiple",
    data = {
      ["s_t"] = { "s", "t" },
    },
})
}

\setmainfont[Ligatures=Historic]{Linux Libertine O}

\begin{document}

{
  \addfontfeature{RawFeature=+kernst;+ligast}
  Wachstube
}

Wachstube

\end{document}

enter image description here

  • Wow, I didn't know that package. However if I'd like to kern the ligatures by hand, what would be the correct kerning? Are there any rules to follow? – user151328 May 7 '18 at 4:59
  • @JürgenG See updated answer – Henri Menke May 7 '18 at 6:23
  • Thanks for the explanations and the updated version! GREAT! – user151328 May 7 '18 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy