6

I was recently gifted the Zapfino otf character, and I'm using it to typeset an "handwritten" letter inside of a book. I like the way the discretionary ligature are typeset, but the Co ligature is kind of a pain since the o is placed inside the C, which is not suitable for my composition.

Since this is confined in an environment inside of the book, I'd like to know whether it is possible to disable the ligature

  • per font
  • per environment

I'm using LuaLaTeX with TeX Live 2016.

EDIT this has been closed by comments.

That is:

  • one can use the Lua-specific features described in this post

  • One can resort to use the selnolig package, removing the ligature throughout the document via \nolig{Co}{C|o}. While this is more invasive and not font-based, it's quicker for some strange ligature such as mine.

I found that both solutions were adequate.

Moriambar
  • 11,466
  • Have you tried loading the selnolig package and issuing the instruction \nolig{Co}{C|o}? – Mico Jul 13 '16 at 22:29
  • Since you didn’t provide a MWE to elaborate on, I suggest having a look at the eighth section of the manual of the microtype package. As far as I know, ligatures can only be disabled globally. Since you are using LuaLaTeX, there is also the selnolig package available, but I don’t think it exactly addresses your problem. Edit: @Mico: Because the disablement is not context-based, in this case. – GuM Jul 13 '16 at 22:29
  • Well, I knew about selnolig but I did not know that ligatures cannot be disabled locally. I will look into the resources you suggested. Thanks – Moriambar Jul 13 '16 at 22:30
  • @GustavoMezzetti - Indeed, the main purpose of selnolig is to perform selective, context-based ligature suppression. However, the package's \nolig macro can also be used to suppress selected ligatures globally. – Mico Jul 13 '16 at 22:34
  • @ilFuria - I think there's an excellent chance that Zapfino will be the only font in your document that features a ligature for "Co". :-) – Mico Jul 13 '16 at 22:36
  • @Mico: Thanks for having pointed that out (it was rather obvious, after all—my mistake!). – GuM Jul 13 '16 at 22:38
  • Let me clarify: (1) I was speaking about pdfTeX and its \tagcode primitive. (2) That primitive does not permit to disable ligatures only inside a group, but (3) it does permit disablement on a per-font basis. – GuM Jul 13 '16 at 22:42
  • Ok, now I'm quite confused. I understand there are two ways to achieve this. I know that that's probably the only font with a "co" ligature, but I was interested to the general case. I don't know which is best if tagcode or the selnolig package. Can you please elaborate in a more complete answer? Thanks – Moriambar Jul 13 '16 at 23:26
  • I don't have the font on my system, so I can't provide an answer with real code. :-( – Mico Jul 13 '16 at 23:38
  • @Mico: I don't like it per se, since I'm disabling a ligature globally via selnolig, and also I think I'm abusing the package since, as I understand it, it was created with another purpose in mind. Nevertheless for this special case I think it works, so thanks! – Moriambar Jul 15 '16 at 06:34
  • @ilFuria - Good to know that selnolig is working for you. :-) Don't worry one bit about possibly abusing the package because you're using it to suppress a ligature globally rather than for certain contexts only. Indeed, the package itself suppresses ligatures such as fb, fh and fk globally if either the ngerman or english language options were set. Incidentally, I can see no downside to suppressing the Co ligature globally rather than just for Zapfino: If this ligature is not desirable with Zapfino, it's probably not desirable with other fonts either, right? – Mico Jul 15 '16 at 12:52
  • 1
    @Mico yes indeed. I said "abusing" just because that the ligature-suppressing feature seemed more "composite word"-oriented and hyphenation-oriented. But with "Co" I think you're right! – Moriambar Jul 15 '16 at 12:55
  • I don’t have Zapfino, but see the “Remove a ligature” section of https://tex.stackexchange.com/a/315635/7883 – Thérèse Jul 17 '16 at 02:42
  • @Thérèse fantastic! As soon as I will be able to test it, I'll try, and it seems just what I was searching for! – Moriambar Jul 17 '16 at 06:47
  • 3
    I'm voting to close this question because it is solved in the comments, as OP has stated in his edit of the question. – Stefan Pinnow Apr 16 '17 at 10:49
  • @Mico -- please add a simple answer, just for the record. (for my motivation, see What is the etiquette for providing an answer already in the comments?.) – barbara beeton Apr 16 '17 at 14:01
  • @barbarabeeton - Thanks for this suggestion. Unfortunately, a few minutes after you posted your comment the posting got closed for the reason "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." Answers may no longer be posted. :-( – Mico Apr 16 '17 at 15:05
  • @Moriambar -- as this question has been closed, and at some point in the future, comments may disappear, please add to your edit the information about the fix that worked. it's a useful piece of information that someone else may be looking for. (i'm following up according to suggestions made in this meta question: ,What is the etiquette for providing an answer already in the comments?. ) – barbara beeton Apr 16 '17 at 15:15
  • @barbarabeeton complied. – Moriambar Apr 16 '17 at 15:19
  • @Moriambar -- thanks. very nicely done. – barbara beeton Apr 16 '17 at 15:23

0 Answers0