N.B. ligature in Latex












12















Wikipedia mentions a ligature for NB (nota bene), however I can't seem to find any reference to this in the latex literature. Is there a way to use this ligature in my latex document?



An example of the ligature:
Nota Bene ligature










share|improve this question



























    12















    Wikipedia mentions a ligature for NB (nota bene), however I can't seem to find any reference to this in the latex literature. Is there a way to use this ligature in my latex document?



    An example of the ligature:
    Nota Bene ligature










    share|improve this question

























      12












      12








      12


      1






      Wikipedia mentions a ligature for NB (nota bene), however I can't seem to find any reference to this in the latex literature. Is there a way to use this ligature in my latex document?



      An example of the ligature:
      Nota Bene ligature










      share|improve this question














      Wikipedia mentions a ligature for NB (nota bene), however I can't seem to find any reference to this in the latex literature. Is there a way to use this ligature in my latex document?



      An example of the ligature:
      Nota Bene ligature







      ligatures






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 22 hours ago









      David PoxonDavid Poxon

      1785




      1785






















          2 Answers
          2






          active

          oldest

          votes


















          11














          To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.



          It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.



          The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the textcolor{red}{...} wrapper in the definition of NB.)



          enter image description here



          documentclass{article}
          usepackage{xcolor} % for 'textcolor' macro
          newcommandNB[1][0.3]{Nkern-#1emtextcolor{red}{B}} % default kern amount: -0.3em
          usepackage{fontspec}
          begin{document}

          setmainfont{Latin Modern Roman}
          NB --- Latin Modern Roman

          setmainfont{Times Roman}
          NB[0.265] --- Times Roman

          setmainfont{EB Garamond}
          NB[0.275] --- EB Garamond

          setmainfont{Trajan Pro}
          NB[0.385] --- Trajan Pro

          setmainfont{Latin Modern Sans}
          NB[0.27] --- Latin Modern Sans

          setmainfont{Helvetica}
          NB[0.24] --- Helvetica

          setmainfont{Futura}
          NB[0.295] --- Futura

          end{document}





          share|improve this answer



















          • 2





            You can never find a Monk when you need one

            – David Carlisle
            21 hours ago






          • 2





            It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

            – Marcel Krüger
            19 hours ago











          • Thank you! The Latin Modern Roman looks pretty good!

            – David Poxon
            18 hours ago



















          6














          Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:



          documentclass{article}
          usepackage{fontspec,luacode}
          setmainfont{P22 Hoy Pro}[
          Contextuals=Alternate,
          Ligatures=Rare]
          % https://tex.stackexchange.com/a/120762:
          begin{luacode}


            documentdata       = documentdata or { }

          local stringformat = string.format
          local texsprint = tex.sprint
          local slot_of_name = luaotfload.aux.slot_of_name

          documentdata.fontchar = function (chr)
          local chr = slot_of_name(font.current(), chr, false)
          if chr and type(chr) == "number" then
          texsprint
          (stringformat ([[char"%X]], chr))
          end
          end


          end{luacode}
          deffontchar#1{directlua{documentdata.fontchar "#1"}}
          begin{document}
          fontchar{N_B}: This is P22 Hoy Pro.
          end{document}


          output






          share|improve this answer





















          • 1





            +1. P22 Hoy Pro is a truly remarkable font face! :-)

            – Mico
            16 hours ago











          • I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

            – Mico
            15 hours ago






          • 1





            @Mico Thanks. Neat trick — how do you do that?

            – Thérèse
            15 hours ago






          • 1





            I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

            – Mico
            14 hours ago














          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%2f483627%2fn-b-ligature-in-latex%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









          11














          To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.



          It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.



          The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the textcolor{red}{...} wrapper in the definition of NB.)



          enter image description here



          documentclass{article}
          usepackage{xcolor} % for 'textcolor' macro
          newcommandNB[1][0.3]{Nkern-#1emtextcolor{red}{B}} % default kern amount: -0.3em
          usepackage{fontspec}
          begin{document}

          setmainfont{Latin Modern Roman}
          NB --- Latin Modern Roman

          setmainfont{Times Roman}
          NB[0.265] --- Times Roman

          setmainfont{EB Garamond}
          NB[0.275] --- EB Garamond

          setmainfont{Trajan Pro}
          NB[0.385] --- Trajan Pro

          setmainfont{Latin Modern Sans}
          NB[0.27] --- Latin Modern Sans

          setmainfont{Helvetica}
          NB[0.24] --- Helvetica

          setmainfont{Futura}
          NB[0.295] --- Futura

          end{document}





          share|improve this answer



















          • 2





            You can never find a Monk when you need one

            – David Carlisle
            21 hours ago






          • 2





            It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

            – Marcel Krüger
            19 hours ago











          • Thank you! The Latin Modern Roman looks pretty good!

            – David Poxon
            18 hours ago
















          11














          To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.



          It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.



          The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the textcolor{red}{...} wrapper in the definition of NB.)



          enter image description here



          documentclass{article}
          usepackage{xcolor} % for 'textcolor' macro
          newcommandNB[1][0.3]{Nkern-#1emtextcolor{red}{B}} % default kern amount: -0.3em
          usepackage{fontspec}
          begin{document}

          setmainfont{Latin Modern Roman}
          NB --- Latin Modern Roman

          setmainfont{Times Roman}
          NB[0.265] --- Times Roman

          setmainfont{EB Garamond}
          NB[0.275] --- EB Garamond

          setmainfont{Trajan Pro}
          NB[0.385] --- Trajan Pro

          setmainfont{Latin Modern Sans}
          NB[0.27] --- Latin Modern Sans

          setmainfont{Helvetica}
          NB[0.24] --- Helvetica

          setmainfont{Futura}
          NB[0.295] --- Futura

          end{document}





          share|improve this answer



















          • 2





            You can never find a Monk when you need one

            – David Carlisle
            21 hours ago






          • 2





            It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

            – Marcel Krüger
            19 hours ago











          • Thank you! The Latin Modern Roman looks pretty good!

            – David Poxon
            18 hours ago














          11












          11








          11







          To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.



          It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.



          The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the textcolor{red}{...} wrapper in the definition of NB.)



          enter image description here



          documentclass{article}
          usepackage{xcolor} % for 'textcolor' macro
          newcommandNB[1][0.3]{Nkern-#1emtextcolor{red}{B}} % default kern amount: -0.3em
          usepackage{fontspec}
          begin{document}

          setmainfont{Latin Modern Roman}
          NB --- Latin Modern Roman

          setmainfont{Times Roman}
          NB[0.265] --- Times Roman

          setmainfont{EB Garamond}
          NB[0.275] --- EB Garamond

          setmainfont{Trajan Pro}
          NB[0.385] --- Trajan Pro

          setmainfont{Latin Modern Sans}
          NB[0.27] --- Latin Modern Sans

          setmainfont{Helvetica}
          NB[0.24] --- Helvetica

          setmainfont{Futura}
          NB[0.295] --- Futura

          end{document}





          share|improve this answer













          To the best of my knowledge, there are no fonts out there (not even Junicode!) that provide a ready-made NB ligature.



          It's actually not too difficult to create a composite NB glyph (not to be confused with a "true" ligature) by inserting a negative kern between N and B. However, for many font families the N-B composite is quite unattractive. It's a vivid reminder, IMNSHO, of the fact that creating a good-looking ligature requires a lot more work than just "snugging up" two or more glyphs.



          The following screenshot shows possible NB candidates for 4 serif fonts and 3 sans-serif fonts. (If you wanted to use this in "real work", be sure to omit the textcolor{red}{...} wrapper in the definition of NB.)



          enter image description here



          documentclass{article}
          usepackage{xcolor} % for 'textcolor' macro
          newcommandNB[1][0.3]{Nkern-#1emtextcolor{red}{B}} % default kern amount: -0.3em
          usepackage{fontspec}
          begin{document}

          setmainfont{Latin Modern Roman}
          NB --- Latin Modern Roman

          setmainfont{Times Roman}
          NB[0.265] --- Times Roman

          setmainfont{EB Garamond}
          NB[0.275] --- EB Garamond

          setmainfont{Trajan Pro}
          NB[0.385] --- Trajan Pro

          setmainfont{Latin Modern Sans}
          NB[0.27] --- Latin Modern Sans

          setmainfont{Helvetica}
          NB[0.24] --- Helvetica

          setmainfont{Futura}
          NB[0.295] --- Futura

          end{document}






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 22 hours ago









          MicoMico

          286k32390779




          286k32390779








          • 2





            You can never find a Monk when you need one

            – David Carlisle
            21 hours ago






          • 2





            It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

            – Marcel Krüger
            19 hours ago











          • Thank you! The Latin Modern Roman looks pretty good!

            – David Poxon
            18 hours ago














          • 2





            You can never find a Monk when you need one

            – David Carlisle
            21 hours ago






          • 2





            It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

            – Marcel Krüger
            19 hours ago











          • Thank you! The Latin Modern Roman looks pretty good!

            – David Poxon
            18 hours ago








          2




          2





          You can never find a Monk when you need one

          – David Carlisle
          21 hours ago





          You can never find a Monk when you need one

          – David Carlisle
          21 hours ago




          2




          2





          It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

          – Marcel Krüger
          19 hours ago





          It might be worth noting that this is the same workaround which is also used on the linked Wikipedia page: The "ligature" is $mathrm{N}!!mathrm{B}$ which should be the same as NB[0.33333] with Computer Modern Roman.

          – Marcel Krüger
          19 hours ago













          Thank you! The Latin Modern Roman looks pretty good!

          – David Poxon
          18 hours ago





          Thank you! The Latin Modern Roman looks pretty good!

          – David Poxon
          18 hours ago











          6














          Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:



          documentclass{article}
          usepackage{fontspec,luacode}
          setmainfont{P22 Hoy Pro}[
          Contextuals=Alternate,
          Ligatures=Rare]
          % https://tex.stackexchange.com/a/120762:
          begin{luacode}


            documentdata       = documentdata or { }

          local stringformat = string.format
          local texsprint = tex.sprint
          local slot_of_name = luaotfload.aux.slot_of_name

          documentdata.fontchar = function (chr)
          local chr = slot_of_name(font.current(), chr, false)
          if chr and type(chr) == "number" then
          texsprint
          (stringformat ([[char"%X]], chr))
          end
          end


          end{luacode}
          deffontchar#1{directlua{documentdata.fontchar "#1"}}
          begin{document}
          fontchar{N_B}: This is P22 Hoy Pro.
          end{document}


          output






          share|improve this answer





















          • 1





            +1. P22 Hoy Pro is a truly remarkable font face! :-)

            – Mico
            16 hours ago











          • I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

            – Mico
            15 hours ago






          • 1





            @Mico Thanks. Neat trick — how do you do that?

            – Thérèse
            15 hours ago






          • 1





            I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

            – Mico
            14 hours ago


















          6














          Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:



          documentclass{article}
          usepackage{fontspec,luacode}
          setmainfont{P22 Hoy Pro}[
          Contextuals=Alternate,
          Ligatures=Rare]
          % https://tex.stackexchange.com/a/120762:
          begin{luacode}


            documentdata       = documentdata or { }

          local stringformat = string.format
          local texsprint = tex.sprint
          local slot_of_name = luaotfload.aux.slot_of_name

          documentdata.fontchar = function (chr)
          local chr = slot_of_name(font.current(), chr, false)
          if chr and type(chr) == "number" then
          texsprint
          (stringformat ([[char"%X]], chr))
          end
          end


          end{luacode}
          deffontchar#1{directlua{documentdata.fontchar "#1"}}
          begin{document}
          fontchar{N_B}: This is P22 Hoy Pro.
          end{document}


          output






          share|improve this answer





















          • 1





            +1. P22 Hoy Pro is a truly remarkable font face! :-)

            – Mico
            16 hours ago











          • I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

            – Mico
            15 hours ago






          • 1





            @Mico Thanks. Neat trick — how do you do that?

            – Thérèse
            15 hours ago






          • 1





            I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

            – Mico
            14 hours ago
















          6












          6








          6







          Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:



          documentclass{article}
          usepackage{fontspec,luacode}
          setmainfont{P22 Hoy Pro}[
          Contextuals=Alternate,
          Ligatures=Rare]
          % https://tex.stackexchange.com/a/120762:
          begin{luacode}


            documentdata       = documentdata or { }

          local stringformat = string.format
          local texsprint = tex.sprint
          local slot_of_name = luaotfload.aux.slot_of_name

          documentdata.fontchar = function (chr)
          local chr = slot_of_name(font.current(), chr, false)
          if chr and type(chr) == "number" then
          texsprint
          (stringformat ([[char"%X]], chr))
          end
          end


          end{luacode}
          deffontchar#1{directlua{documentdata.fontchar "#1"}}
          begin{document}
          fontchar{N_B}: This is P22 Hoy Pro.
          end{document}


          output






          share|improve this answer















          Even among commercial fonts with many unusual ligatures, this ligature is rare. The only one in my large collection is found in P22 Hoy Pro, and it hasn’t been made readily accessible through any defined feature:



          documentclass{article}
          usepackage{fontspec,luacode}
          setmainfont{P22 Hoy Pro}[
          Contextuals=Alternate,
          Ligatures=Rare]
          % https://tex.stackexchange.com/a/120762:
          begin{luacode}


            documentdata       = documentdata or { }

          local stringformat = string.format
          local texsprint = tex.sprint
          local slot_of_name = luaotfload.aux.slot_of_name

          documentdata.fontchar = function (chr)
          local chr = slot_of_name(font.current(), chr, false)
          if chr and type(chr) == "number" then
          texsprint
          (stringformat ([[char"%X]], chr))
          end
          end


          end{luacode}
          deffontchar#1{directlua{documentdata.fontchar "#1"}}
          begin{document}
          fontchar{N_B}: This is P22 Hoy Pro.
          end{document}


          output







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 15 hours ago









          Mico

          286k32390779




          286k32390779










          answered 17 hours ago









          ThérèseThérèse

          9,65732343




          9,65732343








          • 1





            +1. P22 Hoy Pro is a truly remarkable font face! :-)

            – Mico
            16 hours ago











          • I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

            – Mico
            15 hours ago






          • 1





            @Mico Thanks. Neat trick — how do you do that?

            – Thérèse
            15 hours ago






          • 1





            I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

            – Mico
            14 hours ago
















          • 1





            +1. P22 Hoy Pro is a truly remarkable font face! :-)

            – Mico
            16 hours ago











          • I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

            – Mico
            15 hours ago






          • 1





            @Mico Thanks. Neat trick — how do you do that?

            – Thérèse
            15 hours ago






          • 1





            I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

            – Mico
            14 hours ago










          1




          1





          +1. P22 Hoy Pro is a truly remarkable font face! :-)

          – Mico
          16 hours ago





          +1. P22 Hoy Pro is a truly remarkable font face! :-)

          – Mico
          16 hours ago













          I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

          – Mico
          15 hours ago





          I've taken the liberty of inserting some meta-code to pretty-print the Lua code chunk. Feel free to revert if it's not to your liking.

          – Mico
          15 hours ago




          1




          1





          @Mico Thanks. Neat trick — how do you do that?

          – Thérèse
          15 hours ago





          @Mico Thanks. Neat trick — how do you do that?

          – Thérèse
          15 hours ago




          1




          1





          I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

          – Mico
          14 hours ago







          I inserted the directives <!-- language: lang-lua --> and <!-- language: lang-tex --> on lines by themselves, not indented by four spaces. (I can’t remember off-hand who taught me this trick — I certainly didn’t come up with it on my own.)

          – Mico
          14 hours ago




















          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%2f483627%2fn-b-ligature-in-latex%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

          How to label and detect the document text images

          Vallis Paradisi

          Tabula Rosettana