Unable to supress ligatures in headings which are set in Caps Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)LuaLaTeX: Unable to switch off ligatures in smallcapsfontspec for small caps and nocommon ligatures (actually, rawfeatures works, but not ligatures=NoCommon)How to use all variants of Latin Modern Roman with fontspec?How do I know which ligatures are used in my document?Which ligatures do the fonts used in my document offer?Why does using small caps break endash ligatures in lualatex?What are the incompatibilities of pdftex, xetex and luatex?Set tracking for small caps fonts with microtypeLuaLaTeX: Unable to switch off ligatures in smallcapsLuaLaTeX Error: Missing characters which are in the fonts usedfontspec: Small Caps feature wrong ligatures when using Renderer=Basic

What initially awakened the Balrog?

Tips to organize LaTeX presentations for a semester

retrieve food groups from food item list

Does any scripture mention that forms of God or Goddess are symbolic?

Moving a wrapfig vertically to encroach partially on a subsection title

Can two person see the same photon?

Putting class ranking in CV, but against dept guidelines

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

Does silver oxide react with hydrogen sulfide?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

How to write capital alpha?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Special flights

New Order #6: Easter Egg

Why is std::move not [[nodiscard]] in C++20?

Should a wizard buy fine inks every time he want to copy spells into his spellbook?

How to change the tick of the color bar legend to black

What adaptations would allow standard fantasy dwarves to survive in the desert?

If Windows 7 doesn't support WSL, then what is "Subsystem for UNIX-based Applications"?

"klopfte jemand" or "jemand klopfte"?

Would color changing eyes affect vision?

AppleTVs create a chatty alternate WiFi network

The test team as an enemy of development? And how can this be avoided?

Can an iPhone 7 be made to function as a NFC Tag?



Unable to supress ligatures in headings which are set in Caps



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)LuaLaTeX: Unable to switch off ligatures in smallcapsfontspec for small caps and nocommon ligatures (actually, rawfeatures works, but not ligatures=NoCommon)How to use all variants of Latin Modern Roman with fontspec?How do I know which ligatures are used in my document?Which ligatures do the fonts used in my document offer?Why does using small caps break endash ligatures in lualatex?What are the incompatibilities of pdftex, xetex and luatex?Set tracking for small caps fonts with microtypeLuaLaTeX: Unable to switch off ligatures in smallcapsLuaLaTeX Error: Missing characters which are in the fonts usedfontspec: Small Caps feature wrong ligatures when using Renderer=Basic










8















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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument
% Heading set in caps => ligature still present
sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

% Using breaklig command => ligature still present
sectionBerufbreaklig liche Praxis

% Disabling selnolig => works as expected
selnoligoff
sectionBerufliche Praxis
selnoligon

% No caps => works as expected
subsectionBerufliche Praxis

enddocument


(very high tracking to make it clearer)



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.










share|improve this question



















  • 3





    sectionBerufkern0ptliche 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






  • 1





    Is kern0pt any more inconvenient that the attempted breaklig?

    – 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 breaklig which inserts a 0pt space).

    – Ulrike Fischer
    Apr 5 at 18:58















8















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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument
% Heading set in caps => ligature still present
sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

% Using breaklig command => ligature still present
sectionBerufbreaklig liche Praxis

% Disabling selnolig => works as expected
selnoligoff
sectionBerufliche Praxis
selnoligon

% No caps => works as expected
subsectionBerufliche Praxis

enddocument


(very high tracking to make it clearer)



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.










share|improve this question



















  • 3





    sectionBerufkern0ptliche 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






  • 1





    Is kern0pt any more inconvenient that the attempted breaklig?

    – 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 breaklig which inserts a 0pt space).

    – Ulrike Fischer
    Apr 5 at 18:58













8












8








8


3






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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument
% Heading set in caps => ligature still present
sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

% Using breaklig command => ligature still present
sectionBerufbreaklig liche Praxis

% Disabling selnolig => works as expected
selnoligoff
sectionBerufliche Praxis
selnoligon

% No caps => works as expected
subsectionBerufliche Praxis

enddocument


(very high tracking to make it clearer)



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.










share|improve this question
















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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument
% Heading set in caps => ligature still present
sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

% Using breaklig command => ligature still present
sectionBerufbreaklig liche Praxis

% Disabling selnolig => works as expected
selnoligoff
sectionBerufliche Praxis
selnoligon

% No caps => works as expected
subsectionBerufliche Praxis

enddocument


(very high tracking to make it clearer)



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 3 at 11:02







schmattes

















asked Apr 3 at 10:57









schmattesschmattes

1568




1568







  • 3





    sectionBerufkern0ptliche 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






  • 1





    Is kern0pt any more inconvenient that the attempted breaklig?

    – 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 breaklig which inserts a 0pt space).

    – Ulrike Fischer
    Apr 5 at 18:58












  • 3





    sectionBerufkern0ptliche 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






  • 1





    Is kern0pt any more inconvenient that the attempted breaklig?

    – 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 breaklig which inserts a 0pt space).

    – Ulrike Fischer
    Apr 5 at 18:58







3




3





sectionBerufkern0ptliche Praxis

– Steven B. Segletes
Apr 3 at 11:11





sectionBerufkern0ptliche 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
Apr 5 at 18:58





The next luaotfload version will resolve the problem (for the automatic case, not for breaklig which inserts a 0pt space).

– Ulrike Fischer
Apr 5 at 18:58










2 Answers
2






active

oldest

votes


















6














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

makeatletter
usepackagelistofitems
expandafterdefcsnameflligendcsnamefkern0ptl% fl
expandafterdefcsnameffligendcsnamefkern0ptf% ff
expandafterdefcsname ligendcsnamehspace11pt% INCREASE SPACE KERN
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection@ifstarstarsectionnostarsection
newcommandstarsection[1]%
tmptitle#1%
svsection*tmp%

newcommandnostarsection[2][relax]%
tmptitle#2%
ifrelax#1relaxsvsection[#2]tmpelse%
svsection[#1]tmp%
fi%

newcommandtmptitle[1]%
readlistmyligs#1%
deftmp%
foreachitemxinmyligs%
expandafterg@addto@macroexpandaftertmpexpandafterx%
ifnumxcnt<listlenmyligs[]relax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter%
csnamemyligssep[xcnt]ligendcsname%
fi
%

makeatother
begindocument
tableofcontents

hrulefill
section[blah Berufliche]Berufliche Praxis

sectionHoffähige Praxis

subsectionBerufliche Praxis
enddocument


enter image description here



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):



expandafterdefcsnameeligendcsnamekern3pttextcolorredekern1pt
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"


produces this result:



enter image description here






share|improve this answer




















  • 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


















8














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=
Letters=UppercaseSmallCaps,
Ligatures=CommonOff, %disable ligatures
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument

sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

enddocument


enter image description here






share|improve this answer


















  • 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











  • @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…”? 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





    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











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
);



);













draft saved

draft discarded


















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









6














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

makeatletter
usepackagelistofitems
expandafterdefcsnameflligendcsnamefkern0ptl% fl
expandafterdefcsnameffligendcsnamefkern0ptf% ff
expandafterdefcsname ligendcsnamehspace11pt% INCREASE SPACE KERN
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection@ifstarstarsectionnostarsection
newcommandstarsection[1]%
tmptitle#1%
svsection*tmp%

newcommandnostarsection[2][relax]%
tmptitle#2%
ifrelax#1relaxsvsection[#2]tmpelse%
svsection[#1]tmp%
fi%

newcommandtmptitle[1]%
readlistmyligs#1%
deftmp%
foreachitemxinmyligs%
expandafterg@addto@macroexpandaftertmpexpandafterx%
ifnumxcnt<listlenmyligs[]relax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter%
csnamemyligssep[xcnt]ligendcsname%
fi
%

makeatother
begindocument
tableofcontents

hrulefill
section[blah Berufliche]Berufliche Praxis

sectionHoffähige Praxis

subsectionBerufliche Praxis
enddocument


enter image description here



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):



expandafterdefcsnameeligendcsnamekern3pttextcolorredekern1pt
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"


produces this result:



enter image description here






share|improve this answer




















  • 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















6














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

makeatletter
usepackagelistofitems
expandafterdefcsnameflligendcsnamefkern0ptl% fl
expandafterdefcsnameffligendcsnamefkern0ptf% ff
expandafterdefcsname ligendcsnamehspace11pt% INCREASE SPACE KERN
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection@ifstarstarsectionnostarsection
newcommandstarsection[1]%
tmptitle#1%
svsection*tmp%

newcommandnostarsection[2][relax]%
tmptitle#2%
ifrelax#1relaxsvsection[#2]tmpelse%
svsection[#1]tmp%
fi%

newcommandtmptitle[1]%
readlistmyligs#1%
deftmp%
foreachitemxinmyligs%
expandafterg@addto@macroexpandaftertmpexpandafterx%
ifnumxcnt<listlenmyligs[]relax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter%
csnamemyligssep[xcnt]ligendcsname%
fi
%

makeatother
begindocument
tableofcontents

hrulefill
section[blah Berufliche]Berufliche Praxis

sectionHoffähige Praxis

subsectionBerufliche Praxis
enddocument


enter image description here



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):



expandafterdefcsnameeligendcsnamekern3pttextcolorredekern1pt
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"


produces this result:



enter image description here






share|improve this answer




















  • 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













6












6








6







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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

makeatletter
usepackagelistofitems
expandafterdefcsnameflligendcsnamefkern0ptl% fl
expandafterdefcsnameffligendcsnamefkern0ptf% ff
expandafterdefcsname ligendcsnamehspace11pt% INCREASE SPACE KERN
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection@ifstarstarsectionnostarsection
newcommandstarsection[1]%
tmptitle#1%
svsection*tmp%

newcommandnostarsection[2][relax]%
tmptitle#2%
ifrelax#1relaxsvsection[#2]tmpelse%
svsection[#1]tmp%
fi%

newcommandtmptitle[1]%
readlistmyligs#1%
deftmp%
foreachitemxinmyligs%
expandafterg@addto@macroexpandaftertmpexpandafterx%
ifnumxcnt<listlenmyligs[]relax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter%
csnamemyligssep[xcnt]ligendcsname%
fi
%

makeatother
begindocument
tableofcontents

hrulefill
section[blah Berufliche]Berufliche Praxis

sectionHoffähige Praxis

subsectionBerufliche Praxis
enddocument


enter image description here



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):



expandafterdefcsnameeligendcsnamekern3pttextcolorredekern1pt
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"


produces this result:



enter image description here






share|improve this answer















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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=Letters=UppercaseSmallCaps,
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160
usepackage[ngerman]selnolig

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

makeatletter
usepackagelistofitems
expandafterdefcsnameflligendcsnamefkern0ptl% fl
expandafterdefcsnameffligendcsnamefkern0ptf% ff
expandafterdefcsname ligendcsnamehspace11pt% INCREASE SPACE KERN
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"
letsvsectionsection
renewcommandsection@ifstarstarsectionnostarsection
newcommandstarsection[1]%
tmptitle#1%
svsection*tmp%

newcommandnostarsection[2][relax]%
tmptitle#2%
ifrelax#1relaxsvsection[#2]tmpelse%
svsection[#1]tmp%
fi%

newcommandtmptitle[1]%
readlistmyligs#1%
deftmp%
foreachitemxinmyligs%
expandafterg@addto@macroexpandaftertmpexpandafterx%
ifnumxcnt<listlenmyligs[]relax
expandafterexpandafterexpandafterg@addto@macro
expandafterexpandafterexpandaftertmp
expandafterexpandafterexpandafter%
csnamemyligssep[xcnt]ligendcsname%
fi
%

makeatother
begindocument
tableofcontents

hrulefill
section[blah Berufliche]Berufliche Praxis

sectionHoffähige Praxis

subsectionBerufliche Praxis
enddocument


enter image description here



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):



expandafterdefcsnameeligendcsnamekern3pttextcolorredekern1pt
setsepchar % CONCATENATE THE DESIRED LIGATURES WITH || "OR"


produces this result:



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 3 at 14:03

























answered Apr 3 at 12:13









Steven B. SegletesSteven B. Segletes

163k9207419




163k9207419







  • 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





    @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











8














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=
Letters=UppercaseSmallCaps,
Ligatures=CommonOff, %disable ligatures
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument

sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

enddocument


enter image description here






share|improve this answer


















  • 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











  • @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…”? 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





    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















8














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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=
Letters=UppercaseSmallCaps,
Ligatures=CommonOff, %disable ligatures
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument

sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

enddocument


enter image description here






share|improve this answer


















  • 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











  • @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…”? 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





    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













8












8








8







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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=
Letters=UppercaseSmallCaps,
Ligatures=CommonOff, %disable ligatures
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument

sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

enddocument


enter image description here






share|improve this answer













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

usepackagefontspec
setmainfontTeX Gyre Termes[%
Ligatures=Common,
SmallCapsFeatures=
Letters=UppercaseSmallCaps,
Ligatures=CommonOff, %disable ligatures
]

setkomafontdispositionrmfamily

usepackage[tracking=true]microtype
SetTrackingencoding=*,shape=sc160

RedeclareSectionCommand[%
font=scshapemdseriesLarge
]section

RedeclareSectionCommand[%
font=mdseriesLarge
]subsection

begindocument

sectionBerufliche Praxis
Berufliche Praxispar
ff fl fi

enddocument


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 3 at 11:10









Ulrike FischerUlrike Fischer

200k9306693




200k9306693







  • 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











  • @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…”? 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





    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





    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






  • 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…”? 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





    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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High