Unable to supress ligatures in headings which are set in Caps
I am aware that similar questions have been asked a few times. However, none of the answers solved my problem. This Answer says that it is a bug in luaotfload. But I'm already using a newer version (2.80001).
I'm trying to supress ligatures via selnolig package. It works great, but not for text that was set in capitals. Using microtypes DisableLigatures or selnolig package breaklig also has no effect. See MWE:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
% Heading set in caps => ligature still present
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
% Using breaklig command => ligature still present
section{Berufbreaklig liche Praxis}
% Disabling selnolig => works as expected
selnoligoff
section{Berufliche Praxis}
selnoligon
% No caps => works as expected
subsection{Berufliche Praxis}
end{document}

So the selnolig package takes care that ligatures in Berufliche gets suppressed. This is correct. But it does not work for headings with small caps. Adding selnoligoff right before the section seems to be the only way to supress ligatures in headings with small caps? Or have I missed a setting? I'm wondering which package is responsible for this bug.
luatex fontspec microtype selnolig
|
show 3 more comments
I am aware that similar questions have been asked a few times. However, none of the answers solved my problem. This Answer says that it is a bug in luaotfload. But I'm already using a newer version (2.80001).
I'm trying to supress ligatures via selnolig package. It works great, but not for text that was set in capitals. Using microtypes DisableLigatures or selnolig package breaklig also has no effect. See MWE:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
% Heading set in caps => ligature still present
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
% Using breaklig command => ligature still present
section{Berufbreaklig liche Praxis}
% Disabling selnolig => works as expected
selnoligoff
section{Berufliche Praxis}
selnoligon
% No caps => works as expected
subsection{Berufliche Praxis}
end{document}

So the selnolig package takes care that ligatures in Berufliche gets suppressed. This is correct. But it does not work for headings with small caps. Adding selnoligoff right before the section seems to be the only way to supress ligatures in headings with small caps? Or have I missed a setting? I'm wondering which package is responsible for this bug.
luatex fontspec microtype selnolig
3
section{Berufkern0ptliche Praxis}
– Steven B. Segletes
Apr 3 at 11:11
Okay,kern0ptworks. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut"|(provided by babel) does not work.
– schmattes
Apr 3 at 11:46
1
Iskern0ptany more inconvenient that the attemptedbreaklig?
– Steven B. Segletes
Apr 3 at 11:48
1
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
1
The next luaotfload version will resolve the problem (for the automatic case, not forbreakligwhich inserts a 0pt space).
– Ulrike Fischer
2 days ago
|
show 3 more comments
I am aware that similar questions have been asked a few times. However, none of the answers solved my problem. This Answer says that it is a bug in luaotfload. But I'm already using a newer version (2.80001).
I'm trying to supress ligatures via selnolig package. It works great, but not for text that was set in capitals. Using microtypes DisableLigatures or selnolig package breaklig also has no effect. See MWE:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
% Heading set in caps => ligature still present
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
% Using breaklig command => ligature still present
section{Berufbreaklig liche Praxis}
% Disabling selnolig => works as expected
selnoligoff
section{Berufliche Praxis}
selnoligon
% No caps => works as expected
subsection{Berufliche Praxis}
end{document}

So the selnolig package takes care that ligatures in Berufliche gets suppressed. This is correct. But it does not work for headings with small caps. Adding selnoligoff right before the section seems to be the only way to supress ligatures in headings with small caps? Or have I missed a setting? I'm wondering which package is responsible for this bug.
luatex fontspec microtype selnolig
I am aware that similar questions have been asked a few times. However, none of the answers solved my problem. This Answer says that it is a bug in luaotfload. But I'm already using a newer version (2.80001).
I'm trying to supress ligatures via selnolig package. It works great, but not for text that was set in capitals. Using microtypes DisableLigatures or selnolig package breaklig also has no effect. See MWE:
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
% Heading set in caps => ligature still present
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
% Using breaklig command => ligature still present
section{Berufbreaklig liche Praxis}
% Disabling selnolig => works as expected
selnoligoff
section{Berufliche Praxis}
selnoligon
% No caps => works as expected
subsection{Berufliche Praxis}
end{document}

So the selnolig package takes care that ligatures in Berufliche gets suppressed. This is correct. But it does not work for headings with small caps. Adding selnoligoff right before the section seems to be the only way to supress ligatures in headings with small caps? Or have I missed a setting? I'm wondering which package is responsible for this bug.
luatex fontspec microtype selnolig
luatex fontspec microtype selnolig
edited Apr 3 at 11:02
schmattes
asked Apr 3 at 10:57
schmattesschmattes
1568
1568
3
section{Berufkern0ptliche Praxis}
– Steven B. Segletes
Apr 3 at 11:11
Okay,kern0ptworks. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut"|(provided by babel) does not work.
– schmattes
Apr 3 at 11:46
1
Iskern0ptany more inconvenient that the attemptedbreaklig?
– Steven B. Segletes
Apr 3 at 11:48
1
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
1
The next luaotfload version will resolve the problem (for the automatic case, not forbreakligwhich inserts a 0pt space).
– Ulrike Fischer
2 days ago
|
show 3 more comments
3
section{Berufkern0ptliche Praxis}
– Steven B. Segletes
Apr 3 at 11:11
Okay,kern0ptworks. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut"|(provided by babel) does not work.
– schmattes
Apr 3 at 11:46
1
Iskern0ptany more inconvenient that the attemptedbreaklig?
– Steven B. Segletes
Apr 3 at 11:48
1
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
1
The next luaotfload version will resolve the problem (for the automatic case, not forbreakligwhich inserts a 0pt space).
– Ulrike Fischer
2 days ago
3
3
section{Berufkern0ptliche Praxis}– Steven B. Segletes
Apr 3 at 11:11
section{Berufkern0ptliche Praxis}– Steven B. Segletes
Apr 3 at 11:11
Okay,
kern0pt works. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut "|(provided by babel) does not work.– schmattes
Apr 3 at 11:46
Okay,
kern0pt works. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut "|(provided by babel) does not work.– schmattes
Apr 3 at 11:46
1
1
Is
kern0pt any more inconvenient that the attempted breaklig?– Steven B. Segletes
Apr 3 at 11:48
Is
kern0pt any more inconvenient that the attempted breaklig?– Steven B. Segletes
Apr 3 at 11:48
1
1
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
1
1
The next luaotfload version will resolve the problem (for the automatic case, not for
breaklig which inserts a 0pt space).– Ulrike Fischer
2 days ago
The next luaotfload version will resolve the problem (for the automatic case, not for
breaklig which inserts a 0pt space).– Ulrike Fischer
2 days ago
|
show 3 more comments
2 Answers
2
active
oldest
votes
Here is an automated approach that reconditions the arguments of section to look for specified ligatures, such as fl and to replace them with, for example, fkern0ptl.
In the MWE, look for the lines between makeatletter and makeatother for the approach.
As an aside, I actually used the same method to also increase the default kern of the space character in small-caps section titles.
Shown for ligatures fl and ff. Can easily add more as needed.
EDITED to handle star sections/toc.
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
makeatletter
usepackage{listofitems}
expandafterdefcsname{fl}ligendcsname{fkern0ptl}% fl
expandafterdefcsname{ff}ligendcsname{fkern0ptf}% ff
expandafterdefcsname{ }ligendcsname{hspace{11pt}}% INCREASE SPACE KERN
setsepchar{fl||ff|| }% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection{@ifstar{starsection}{nostarsection}}
newcommandstarsection[1]{%
tmptitle{#1}%
svsection*{tmp}%
}
newcommandnostarsection[2][relax]{%
tmptitle{#2}%
ifrelax#1relaxsvsection[#2]{tmp}else%
svsection[#1]{tmp}%
fi%
}
newcommandtmptitle[1]{%
readlistmyligs{#1}%
deftmp{}%
foreachitemxinmyligs{%
expandafterg@addto@macroexpandaftertmpexpandafter{x}%
ifnumxcnt<listlenmyligsrelax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter{%
csname{myligssep[xcnt]}ligendcsname}%
fi
}%
}
makeatother
begin{document}
tableofcontents
hrulefill
section[blah Berufliche]{Berufliche Praxis}
section{Hoffähige Praxis}
subsection{Berufliche Praxis}
end{document}

Of course, I shouldn't mention the crazy stuff you can do with this approach. But I will. Adding these lines (and the xcolor package):
expandafterdefcsname{e}ligendcsname{kern3pttextcolor{red}{e}kern1pt}
setsepchar{fl||ff|| ||e}% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
produces this result:

1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
add a comment |
With a current luaotfload (version 2.96) you can disable the ligatures in the SmallCapsFeatures:
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures=
{Letters=UppercaseSmallCaps,
Ligatures=CommonOff}, %disable ligatures
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
end{document}

1
I still get the FL ligature though when I loadselnolig. As in the OPselnolighas to be turned off explicitly to get rid of the ligature.
– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? Soselnoligis the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?
– schmattes
Apr 3 at 11:53
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482961%2funable-to-supress-ligatures-in-headings-which-are-set-in-caps%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is an automated approach that reconditions the arguments of section to look for specified ligatures, such as fl and to replace them with, for example, fkern0ptl.
In the MWE, look for the lines between makeatletter and makeatother for the approach.
As an aside, I actually used the same method to also increase the default kern of the space character in small-caps section titles.
Shown for ligatures fl and ff. Can easily add more as needed.
EDITED to handle star sections/toc.
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
makeatletter
usepackage{listofitems}
expandafterdefcsname{fl}ligendcsname{fkern0ptl}% fl
expandafterdefcsname{ff}ligendcsname{fkern0ptf}% ff
expandafterdefcsname{ }ligendcsname{hspace{11pt}}% INCREASE SPACE KERN
setsepchar{fl||ff|| }% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection{@ifstar{starsection}{nostarsection}}
newcommandstarsection[1]{%
tmptitle{#1}%
svsection*{tmp}%
}
newcommandnostarsection[2][relax]{%
tmptitle{#2}%
ifrelax#1relaxsvsection[#2]{tmp}else%
svsection[#1]{tmp}%
fi%
}
newcommandtmptitle[1]{%
readlistmyligs{#1}%
deftmp{}%
foreachitemxinmyligs{%
expandafterg@addto@macroexpandaftertmpexpandafter{x}%
ifnumxcnt<listlenmyligsrelax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter{%
csname{myligssep[xcnt]}ligendcsname}%
fi
}%
}
makeatother
begin{document}
tableofcontents
hrulefill
section[blah Berufliche]{Berufliche Praxis}
section{Hoffähige Praxis}
subsection{Berufliche Praxis}
end{document}

Of course, I shouldn't mention the crazy stuff you can do with this approach. But I will. Adding these lines (and the xcolor package):
expandafterdefcsname{e}ligendcsname{kern3pttextcolor{red}{e}kern1pt}
setsepchar{fl||ff|| ||e}% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
produces this result:

1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
add a comment |
Here is an automated approach that reconditions the arguments of section to look for specified ligatures, such as fl and to replace them with, for example, fkern0ptl.
In the MWE, look for the lines between makeatletter and makeatother for the approach.
As an aside, I actually used the same method to also increase the default kern of the space character in small-caps section titles.
Shown for ligatures fl and ff. Can easily add more as needed.
EDITED to handle star sections/toc.
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
makeatletter
usepackage{listofitems}
expandafterdefcsname{fl}ligendcsname{fkern0ptl}% fl
expandafterdefcsname{ff}ligendcsname{fkern0ptf}% ff
expandafterdefcsname{ }ligendcsname{hspace{11pt}}% INCREASE SPACE KERN
setsepchar{fl||ff|| }% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection{@ifstar{starsection}{nostarsection}}
newcommandstarsection[1]{%
tmptitle{#1}%
svsection*{tmp}%
}
newcommandnostarsection[2][relax]{%
tmptitle{#2}%
ifrelax#1relaxsvsection[#2]{tmp}else%
svsection[#1]{tmp}%
fi%
}
newcommandtmptitle[1]{%
readlistmyligs{#1}%
deftmp{}%
foreachitemxinmyligs{%
expandafterg@addto@macroexpandaftertmpexpandafter{x}%
ifnumxcnt<listlenmyligsrelax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter{%
csname{myligssep[xcnt]}ligendcsname}%
fi
}%
}
makeatother
begin{document}
tableofcontents
hrulefill
section[blah Berufliche]{Berufliche Praxis}
section{Hoffähige Praxis}
subsection{Berufliche Praxis}
end{document}

Of course, I shouldn't mention the crazy stuff you can do with this approach. But I will. Adding these lines (and the xcolor package):
expandafterdefcsname{e}ligendcsname{kern3pttextcolor{red}{e}kern1pt}
setsepchar{fl||ff|| ||e}% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
produces this result:

1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
add a comment |
Here is an automated approach that reconditions the arguments of section to look for specified ligatures, such as fl and to replace them with, for example, fkern0ptl.
In the MWE, look for the lines between makeatletter and makeatother for the approach.
As an aside, I actually used the same method to also increase the default kern of the space character in small-caps section titles.
Shown for ligatures fl and ff. Can easily add more as needed.
EDITED to handle star sections/toc.
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
makeatletter
usepackage{listofitems}
expandafterdefcsname{fl}ligendcsname{fkern0ptl}% fl
expandafterdefcsname{ff}ligendcsname{fkern0ptf}% ff
expandafterdefcsname{ }ligendcsname{hspace{11pt}}% INCREASE SPACE KERN
setsepchar{fl||ff|| }% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection{@ifstar{starsection}{nostarsection}}
newcommandstarsection[1]{%
tmptitle{#1}%
svsection*{tmp}%
}
newcommandnostarsection[2][relax]{%
tmptitle{#2}%
ifrelax#1relaxsvsection[#2]{tmp}else%
svsection[#1]{tmp}%
fi%
}
newcommandtmptitle[1]{%
readlistmyligs{#1}%
deftmp{}%
foreachitemxinmyligs{%
expandafterg@addto@macroexpandaftertmpexpandafter{x}%
ifnumxcnt<listlenmyligsrelax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter{%
csname{myligssep[xcnt]}ligendcsname}%
fi
}%
}
makeatother
begin{document}
tableofcontents
hrulefill
section[blah Berufliche]{Berufliche Praxis}
section{Hoffähige Praxis}
subsection{Berufliche Praxis}
end{document}

Of course, I shouldn't mention the crazy stuff you can do with this approach. But I will. Adding these lines (and the xcolor package):
expandafterdefcsname{e}ligendcsname{kern3pttextcolor{red}{e}kern1pt}
setsepchar{fl||ff|| ||e}% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
produces this result:

Here is an automated approach that reconditions the arguments of section to look for specified ligatures, such as fl and to replace them with, for example, fkern0ptl.
In the MWE, look for the lines between makeatletter and makeatother for the approach.
As an aside, I actually used the same method to also increase the default kern of the space character in small-caps section titles.
Shown for ligatures fl and ff. Can easily add more as needed.
EDITED to handle star sections/toc.
% !TeX program = lualatex
% !TeX encoding = UTF-8 Unicode
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures={Letters=UppercaseSmallCaps},
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
usepackage[ngerman]{selnolig}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
makeatletter
usepackage{listofitems}
expandafterdefcsname{fl}ligendcsname{fkern0ptl}% fl
expandafterdefcsname{ff}ligendcsname{fkern0ptf}% ff
expandafterdefcsname{ }ligendcsname{hspace{11pt}}% INCREASE SPACE KERN
setsepchar{fl||ff|| }% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection{@ifstar{starsection}{nostarsection}}
newcommandstarsection[1]{%
tmptitle{#1}%
svsection*{tmp}%
}
newcommandnostarsection[2][relax]{%
tmptitle{#2}%
ifrelax#1relaxsvsection[#2]{tmp}else%
svsection[#1]{tmp}%
fi%
}
newcommandtmptitle[1]{%
readlistmyligs{#1}%
deftmp{}%
foreachitemxinmyligs{%
expandafterg@addto@macroexpandaftertmpexpandafter{x}%
ifnumxcnt<listlenmyligsrelax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter{%
csname{myligssep[xcnt]}ligendcsname}%
fi
}%
}
makeatother
begin{document}
tableofcontents
hrulefill
section[blah Berufliche]{Berufliche Praxis}
section{Hoffähige Praxis}
subsection{Berufliche Praxis}
end{document}

Of course, I shouldn't mention the crazy stuff you can do with this approach. But I will. Adding these lines (and the xcolor package):
expandafterdefcsname{e}ligendcsname{kern3pttextcolor{red}{e}kern1pt}
setsepchar{fl||ff|| ||e}% CONCATENATE THE DESIRED LIGATURES WITH || "OR"
produces this result:

edited Apr 3 at 14:03
answered Apr 3 at 12:13
Steven B. SegletesSteven B. Segletes
161k9205416
161k9205416
1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
add a comment |
1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
1
1
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
@Mico Thanks. Done. Plus support for increased space kerns.
– Steven B. Segletes
Apr 3 at 13:29
2
2
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
This looks like a really sophisticated hack. Thank you very much for your effort.
– schmattes
Apr 3 at 13:50
add a comment |
With a current luaotfload (version 2.96) you can disable the ligatures in the SmallCapsFeatures:
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures=
{Letters=UppercaseSmallCaps,
Ligatures=CommonOff}, %disable ligatures
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
end{document}

1
I still get the FL ligature though when I loadselnolig. As in the OPselnolighas to be turned off explicitly to get rid of the ligature.
– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? Soselnoligis the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?
– schmattes
Apr 3 at 11:53
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
add a comment |
With a current luaotfload (version 2.96) you can disable the ligatures in the SmallCapsFeatures:
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures=
{Letters=UppercaseSmallCaps,
Ligatures=CommonOff}, %disable ligatures
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
end{document}

1
I still get the FL ligature though when I loadselnolig. As in the OPselnolighas to be turned off explicitly to get rid of the ligature.
– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? Soselnoligis the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?
– schmattes
Apr 3 at 11:53
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
add a comment |
With a current luaotfload (version 2.96) you can disable the ligatures in the SmallCapsFeatures:
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures=
{Letters=UppercaseSmallCaps,
Ligatures=CommonOff}, %disable ligatures
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
end{document}

With a current luaotfload (version 2.96) you can disable the ligatures in the SmallCapsFeatures:
documentclass[%
a4paper,
DIV=9,
fontsize=14pt,
parskip=half-
]{scrartcl}
usepackage[ngerman]{babel}
usepackage{fontspec}
setmainfont{TeX Gyre Termes}[%
Ligatures=Common,
SmallCapsFeatures=
{Letters=UppercaseSmallCaps,
Ligatures=CommonOff}, %disable ligatures
]
setkomafont{disposition}{rmfamily}
usepackage[tracking=true]{microtype}
SetTracking{encoding=*,shape=sc}{160}
RedeclareSectionCommand[%
font={scshapemdseriesLarge}
]{section}
RedeclareSectionCommand[%
font={mdseriesLarge}
]{subsection}
begin{document}
section{Berufliche Praxis}
Berufliche Praxispar
ff fl fi
end{document}

answered Apr 3 at 11:10
Ulrike FischerUlrike Fischer
198k9306692
198k9306692
1
I still get the FL ligature though when I loadselnolig. As in the OPselnolighas to be turned off explicitly to get rid of the ligature.
– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? Soselnoligis the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?
– schmattes
Apr 3 at 11:53
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
add a comment |
1
I still get the FL ligature though when I loadselnolig. As in the OPselnolighas to be turned off explicitly to get rid of the ligature.
– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? Soselnoligis the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?
– schmattes
Apr 3 at 11:53
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
1
1
I still get the FL ligature though when I load
selnolig. As in the OP selnolig has to be turned off explicitly to get rid of the ligature.– moewe
Apr 3 at 11:23
I still get the FL ligature though when I load
selnolig. As in the OP selnolig has to be turned off explicitly to get rid of the ligature.– moewe
Apr 3 at 11:23
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
@moewe Ah yes, selnolig interferes.
– Ulrike Fischer
Apr 3 at 11:27
3
3
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
@moewe and selnoligoff works by paragraph and doesn't respect tex grouping, so you can add it simply to the font commands ;-(.
– Ulrike Fischer
Apr 3 at 11:37
I guess you meant “so you can't add…”? So
selnolig is the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?– schmattes
Apr 3 at 11:53
I guess you meant “so you can't add…”? So
selnolig is the one to “blame”? Maybe tex.stackexchange.com/users/5001/mico could comment on that?– schmattes
Apr 3 at 11:53
4
4
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
Yes I meant "can't", and selnolig is not really to blame, but you need a more complicated setup to reset the setting after the section.
– Ulrike Fischer
Apr 3 at 11:59
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f482961%2funable-to-supress-ligatures-in-headings-which-are-set-in-caps%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
section{Berufkern0ptliche Praxis}– Steven B. Segletes
Apr 3 at 11:11
Okay,
kern0ptworks. Although this is rather inconvenient because it must be applied separately to each and every occurrence of all words that contain unwanted ligatures. The shortcut"|(provided by babel) does not work.– schmattes
Apr 3 at 11:46
1
Is
kern0ptany more inconvenient that the attemptedbreaklig?– Steven B. Segletes
Apr 3 at 11:48
1
I added an issue here github.com/u-fischer/luaotfload/issues/53.
– Ulrike Fischer
Apr 3 at 15:28
1
The next luaotfload version will resolve the problem (for the automatic case, not for
breakligwhich inserts a 0pt space).– Ulrike Fischer
2 days ago