8

In a German document I would like to typeset some selected phrases in Fraktur while the rest is written in Linux Libertine. Using the yfonts-package, the round s (the 'modern' one as opposed to the tall s) is achieved with the input s:.

The first MWE:

\documentclass[border=2]{standalone}

\usepackage{libertine}
\usepackage{yfonts}
\usepackage[ngerman]{babel} 

\begin{document}
    \frakfamily
    The quick fox jumps: over the sleazy dog
\end{document}

results in: enter image description here

However, it appears that the selnolig-package (used in my document for the non-Fraktur text) prevents this output:

\documentclass[border=2]{standalone}

\usepackage{libertine}
\usepackage{yfonts}
\usepackage[ngerman]{babel} 
\usepackage[ngerman]{selnolig}

\begin{document}
    \frakfamily
    The quick fox jumps: over the sleazy dog
\end{document}

results in: enter image description here

Is there a way to disable the selnolig-package for this particular case?

3
  • Just out of idle curiosity: Why did you insert an italic correction, \/, between d and o in dog?
    – Mico
    Mar 26 at 21:32
  • 1
    This was a copy paste mistake. I originally experimented with \gothfamily in this example and did not want the biting of "d" and "o" (which is correct but sometimes reduces legibility for modern readers). It is edited now.
    – Gylfi
    Mar 27 at 9:00
  • After reading this post I understand that round S and long S are both used in the same font. And that there are rules when to use either one. I use various Fraktur, but I noticed that some only have the round S (like Breitkopf Fraktur) and others only have the long S, like Becker Fraktur. Is that sloppyness or is there a reason of is it plain incompleteness? Mar 31 at 0:07
8

You can define your own macros and bypass the predefined ligature automation.

Apart from the round s, you should perhaps also define macros for the most basic macros that should be used in typographically correctly typeset Fraktur, namely ch, ck and tz (as can be seen from your example, these are also broken by selnolig):

\documentclass[border=2]{standalone}

\usepackage{libertine}
\usepackage{yfonts}
\usepackage[ngerman]{babel} 
\usepackage[ngerman]{selnolig}

\DeclareTextSymbol{\ch}{LY}{133}
\DeclareTextSymbol{\ck}{LY}{134}
\DeclareTextSymbol{\tz}{LY}{139}
\DeclareTextSymbol{\rounds}{LY}{141}

\begin{document}
    \frakfamily
    The qui\ck{} fox jump\rounds{} bli\tz{}s\ch{}nell over the sleazy dog
\end{document}

enter image description here

1
  • This works for my purpose, thank you. I did miss that selnolig breaks the other ligatures as well, I will have to take a closer look at this.
    – Gylfi
    Mar 27 at 8:54
8

I will confess to having no knowledge of how the yfonts package goes about doing its work of converting s: to a Fraktur round-s. However, I gather that the package implements the conversion of s: to round-s as a ligature (in the TeX sense of the word). For sure, I can't think of any other reason for why selnolig -- which, after all, exists to suppress ligatures -- would interfere with the conversion of s: to round-s.

What I find truly baffling is that this inference occurs at all. For sure, if the selnolig package is loaded with the option ngerman, absolutely no \nolig directives are set up to suppress the s: ligature, either selectively or globally.

All I can suggest for now is that you run \selnoligoff to -- you guessed it -- switch off the operations of selnolig's routines before running \frakfamily. To reactivate selnolig's routines once you're back main document family, run \selnoligon.

E.g., something like the following:

\selnoligoff {\frakfamily 
The quick brown fox jumps: over the lazy dog.
}

\selnoligon
auffallen aufisst aufjaulen % suppress ff, fi, and fj ligatures

Because selnolig's routines don't recognize (and therefore ignore) TeX groups, be sure to let a paragraph break occur before executing \selnoligon. This works because selnolig's routines modify TeX's paragraph builder processes. Hence,

{\frakfamily 
The quick brown fox jumps: over the lazy dog.
} \selnoligoff 

auffallen aufisst aufjaulen
\selnoligon

will also get the job done, as \selnoligoff and \selnoligon kick in before the respective paragraph break occur. I agree that this must look downright weird to an old TeX hand.

I realize that this work-around isn't exactly elegant. And it might be quite tedious to implement if the document has lots of instances of \frakfamily.

enter image description here

4
  • Thank you! After some (painful) tinkering, the solution with \selnoligoff and \selnoligon works too. And I finally understood that TeX has a different understanding of the word 'ligature', a fact that has confused me for a while now!
    – Gylfi
    Mar 27 at 12:09
  • 1
    @Gylfi - What surprised me the most was that the yfonts package works at all under LuaLaTeX. Don't get me wrong: It's a very nice package. However, it's been around for at least 20 years, and its ligaturing routines were probably never meant to work with LuaTeX's paragraph-building mechanism. Thus my surprise that yfonts works under LuaLaTeX. But it works just barely. selnolig works by hooking in to LuaTeX's ligaturing callback. Even if selnolig is loaded without any language setting at all, its mere presence suffices to mess up the work performed by the yfonts package.
    – Mico
    Mar 27 at 12:28
  • Yes, I suspected that yfonts has a certain age when I noticed that an "a" with a superscript "e" in \frakfamily is only possible with \"a but not with the direct input of "ä"... I generally think that even manuscripts and old prints are much more accessible than anything TeX-related from before ca. 2015 so I will probably have to look into an alternative to yfonts at some point. ;-)
    – Gylfi
    Mar 27 at 13:04
  • 1
    @Gylfi - For an alternative to the yfonts package which is fully suitable for use under LuaLaTeX (and which doesn't freak out if selnolig is active...), you may want to look into the Unifraktur Maguntia OpenType font family.
    – Mico
    Mar 28 at 14:22

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.