Hyphenation with Babel and Polyglossia

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















I've more or less the same content, compiled with babel and polyglossia:



documentclassarticle
usepackagefontspec
usepackage[italian]babel
babelfontrm[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro

begindocument
textbfBabel

avvedutezza avanti l'articolo away ayo l'abaco l'accidente l'acerrimo adirato aedo
un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
enddocument


and



documentclassarticle
usepackagefontspec
setmainfont[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro
usepackagepolyglossia
setmainlanguage[babelshorthands=true]italian

begindocument
textbfPolyglossia

l'avvedutezza avanti l'articolo away ayo abaco l'accidente acerrimo l'adirato aedo
un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
annichilire l'aorta l'appurare acqua Aristarco artistica L'albero l'alternativa
l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia l'astrattismo atroce
un'automobile avere avicola awak ayno l'azalea l'uguaglianza un'umanità l'abecedario
accolito un'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto l'assurdo l'abaco
un elemento un'eccezionalità un'inedia un'aorta un'occasione l'Occitania l'allampanato
ampolla annoso l'inutilità l'artatamente l'astrologia l'attenzione autore avanti avventure
away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
enddocument


The result is the following one:



enter image description here



It's evident that the presence of the apostrophe inhibits hyphenation with babel.



Is there anything wrong or lacking in my code?
And how to solve? Thank you










share|improve this question


























    3















    I've more or less the same content, compiled with babel and polyglossia:



    documentclassarticle
    usepackagefontspec
    usepackage[italian]babel
    babelfontrm[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro

    begindocument
    textbfBabel

    avvedutezza avanti l'articolo away ayo l'abaco l'accidente l'acerrimo adirato aedo
    un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
    annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
    l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
    automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
    accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
    l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
    un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
    away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
    enddocument


    and



    documentclassarticle
    usepackagefontspec
    setmainfont[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro
    usepackagepolyglossia
    setmainlanguage[babelshorthands=true]italian

    begindocument
    textbfPolyglossia

    l'avvedutezza avanti l'articolo away ayo abaco l'accidente acerrimo l'adirato aedo
    un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
    annichilire l'aorta l'appurare acqua Aristarco artistica L'albero l'alternativa
    l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia l'astrattismo atroce
    un'automobile avere avicola awak ayno l'azalea l'uguaglianza un'umanità l'abecedario
    accolito un'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto l'assurdo l'abaco
    un elemento un'eccezionalità un'inedia un'aorta un'occasione l'Occitania l'allampanato
    ampolla annoso l'inutilità l'artatamente l'astrologia l'attenzione autore avanti avventure
    away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
    enddocument


    The result is the following one:



    enter image description here



    It's evident that the presence of the apostrophe inhibits hyphenation with babel.



    Is there anything wrong or lacking in my code?
    And how to solve? Thank you










    share|improve this question
























      3












      3








      3








      I've more or less the same content, compiled with babel and polyglossia:



      documentclassarticle
      usepackagefontspec
      usepackage[italian]babel
      babelfontrm[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro

      begindocument
      textbfBabel

      avvedutezza avanti l'articolo away ayo l'abaco l'accidente l'acerrimo adirato aedo
      un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
      annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
      l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
      automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
      accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
      l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
      un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
      away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
      enddocument


      and



      documentclassarticle
      usepackagefontspec
      setmainfont[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro
      usepackagepolyglossia
      setmainlanguage[babelshorthands=true]italian

      begindocument
      textbfPolyglossia

      l'avvedutezza avanti l'articolo away ayo abaco l'accidente acerrimo l'adirato aedo
      un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
      annichilire l'aorta l'appurare acqua Aristarco artistica L'albero l'alternativa
      l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia l'astrattismo atroce
      un'automobile avere avicola awak ayno l'azalea l'uguaglianza un'umanità l'abecedario
      accolito un'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto l'assurdo l'abaco
      un elemento un'eccezionalità un'inedia un'aorta un'occasione l'Occitania l'allampanato
      ampolla annoso l'inutilità l'artatamente l'astrologia l'attenzione autore avanti avventure
      away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
      enddocument


      The result is the following one:



      enter image description here



      It's evident that the presence of the apostrophe inhibits hyphenation with babel.



      Is there anything wrong or lacking in my code?
      And how to solve? Thank you










      share|improve this question














      I've more or less the same content, compiled with babel and polyglossia:



      documentclassarticle
      usepackagefontspec
      usepackage[italian]babel
      babelfontrm[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro

      begindocument
      textbfBabel

      avvedutezza avanti l'articolo away ayo l'abaco l'accidente l'acerrimo adirato aedo
      un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
      annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
      l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
      automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
      accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
      l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
      un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
      away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
      enddocument


      and



      documentclassarticle
      usepackagefontspec
      setmainfont[Ligatures=TeX,Numbers=OldStyle]Garamond Premier Pro
      usepackagepolyglossia
      setmainlanguage[babelshorthands=true]italian

      begindocument
      textbfPolyglossia

      l'avvedutezza avanti l'articolo away ayo abaco l'accidente acerrimo l'adirato aedo
      un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
      annichilire l'aorta l'appurare acqua Aristarco artistica L'albero l'alternativa
      l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia l'astrattismo atroce
      un'automobile avere avicola awak ayno l'azalea l'uguaglianza un'umanità l'abecedario
      accolito un'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto l'assurdo l'abaco
      un elemento un'eccezionalità un'inedia un'aorta un'occasione l'Occitania l'allampanato
      ampolla annoso l'inutilità l'artatamente l'astrologia l'attenzione autore avanti avventure
      away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità
      enddocument


      The result is the following one:



      enter image description here



      It's evident that the presence of the apostrophe inhibits hyphenation with babel.



      Is there anything wrong or lacking in my code?
      And how to solve? Thank you







      babel hyphenation polyglossia






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 16:42









      user41063user41063

      7401511




      7401511




















          2 Answers
          2






          active

          oldest

          votes


















          3














          The babel module for Italian should indeed set the lccode for the apostrophe U+2019.



          documentclassarticle
          usepackagefontspec
          usepackage[italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here



          Let's see that this respects language changes. Setting the lccode for French is not needed, as it is taken care of in french.ldf.



          documentclassarticle
          usepackagefontspec
          usepackage[english,french,italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          Italian: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguageitalian Italian: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          languagename

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here






          share|improve this answer

























          • For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

            – user41063
            Jan 1 at 18:54











          • @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

            – egreg
            Jan 1 at 21:55











          • the umpteenth magic of egreg ... thank you!

            – user41063
            Jan 2 at 1:34


















          2














          Better searching, I found this solution:



          lccode"2019="2019



          The Unicode right-single-quote (or apostrophe) character U+2019 has not been given a non-zero lccode, and therefore it is considered a nonletter by the hyphenation routine.



          I read too:




          Duplicating patterns is doable (if you tell me that I should do it, I
          will implement it), but seems like yet another ugly hack to me. One
          thing that I still consider clean is replacing all the "27 with "2019
          in patterns themselves and properly read the input in 8bit engines.
          But that's not the final answer since people might just as well
          complain that "27 doesn't hyphenate properly in XeTeX.



          I would much more prefer explaining to hyphenating engine that "2019
          should be treated identical to "27 if that was possible.




          However, I do not understand what in concrete should be done in order to avoid incurring the "ugly solution of duplicating patterns".



          But have we to consider this one a babel bug?






          share|improve this answer

























          • Yes, also babel should do this.

            – egreg
            Jan 1 at 16:54











          • you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

            – Ulrike Fischer
            Jan 1 at 17:09











          • inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

            – user41063
            Jan 1 at 17:20











          • then your version is very old. The current maintainer is imho Claudio Beccari.

            – Ulrike Fischer
            Jan 1 at 17:35











          • Yes, find Cbeccari!. I'll write stright to him

            – user41063
            Jan 1 at 18:50










          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%2f468148%2fhyphenation-with-babel-and-polyglossia%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









          3














          The babel module for Italian should indeed set the lccode for the apostrophe U+2019.



          documentclassarticle
          usepackagefontspec
          usepackage[italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here



          Let's see that this respects language changes. Setting the lccode for French is not needed, as it is taken care of in french.ldf.



          documentclassarticle
          usepackagefontspec
          usepackage[english,french,italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          Italian: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguageitalian Italian: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          languagename

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here






          share|improve this answer

























          • For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

            – user41063
            Jan 1 at 18:54











          • @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

            – egreg
            Jan 1 at 21:55











          • the umpteenth magic of egreg ... thank you!

            – user41063
            Jan 2 at 1:34















          3














          The babel module for Italian should indeed set the lccode for the apostrophe U+2019.



          documentclassarticle
          usepackagefontspec
          usepackage[italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here



          Let's see that this respects language changes. Setting the lccode for French is not needed, as it is taken care of in french.ldf.



          documentclassarticle
          usepackagefontspec
          usepackage[english,french,italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          Italian: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguageitalian Italian: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          languagename

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here






          share|improve this answer

























          • For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

            – user41063
            Jan 1 at 18:54











          • @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

            – egreg
            Jan 1 at 21:55











          • the umpteenth magic of egreg ... thank you!

            – user41063
            Jan 2 at 1:34













          3












          3








          3







          The babel module for Italian should indeed set the lccode for the apostrophe U+2019.



          documentclassarticle
          usepackagefontspec
          usepackage[italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here



          Let's see that this respects language changes. Setting the lccode for French is not needed, as it is taken care of in french.ldf.



          documentclassarticle
          usepackagefontspec
          usepackage[english,french,italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          Italian: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguageitalian Italian: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          languagename

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here






          share|improve this answer















          The babel module for Italian should indeed set the lccode for the apostrophe U+2019.



          documentclassarticle
          usepackagefontspec
          usepackage[italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here



          Let's see that this respects language changes. Setting the lccode for French is not needed, as it is taken care of in french.ldf.



          documentclassarticle
          usepackagefontspec
          usepackage[english,french,italian]babel
          babelfontrm[Ligatures=TeX,Numbers=OldStyle]EB Garamond

          makeatletter
          addtoextrasitalian%
          babel@savevariablelccode"2019%
          lccode"2019="2019

          makeatother

          begindocument

          Italian: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          selectlanguageitalian Italian: thelccode"2019

          selectlanguagefrench French: thelccode"2019

          selectlanguageenglish English: thelccode"2019

          languagename

          parbox0pt
          hspace0pt%
          avvedutezza avanti l'articolo away ayo l'abaco
          %l'accidente l'acerrimo adirato aedo
          %un'affranta afisico afoso l'agone ahhhh l'aiuto ajta alternativa ambedue ancora
          %annichilire aorta appurare acqua Aristarco artistica L'albero l'alternativa
          %l'enfasi l'eccezionalità l'altra l'ircocervo l'Illiria l'omeopatia astrattismo atroce
          %automobile avere avicola awak ayno l'azalea l'uguaglianza l'umanità l'abecedario
          %accoliti l'acqua l'addomesticare l'aereoplano affidare l'agone l'aiuto aja l'assurdo l'abaco
          %l'elemento l'eccezionalità l'inedia l'inutilità l'occasione l'Occitania allampanato
          %un'ampolla annoso un'aorta l'artatamente l'astrologia l'attenzione autore avanti avventure
          %away ayo azzardo L'Australia L'Europa l'uguaglianza l'umanità


          enddocument


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 1 at 21:54

























          answered Jan 1 at 17:43









          egregegreg

          712k8618923179




          712k8618923179












          • For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

            – user41063
            Jan 1 at 18:54











          • @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

            – egreg
            Jan 1 at 21:55











          • the umpteenth magic of egreg ... thank you!

            – user41063
            Jan 2 at 1:34

















          • For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

            – user41063
            Jan 1 at 18:54











          • @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

            – egreg
            Jan 1 at 21:55











          • the umpteenth magic of egreg ... thank you!

            – user41063
            Jan 2 at 1:34
















          For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

          – user41063
          Jan 1 at 18:54





          For generally this applies to both Italian and French (calt for quoteright is localized just for these two langages in many fonts), is there a way to apply your code to both languages?

          – user41063
          Jan 1 at 18:54













          @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

          – egreg
          Jan 1 at 21:55





          @user41063 I changed a bit the setting, so the original lccode is restored to what it was at language change time. It's not needed for French, because it is already taken care of.

          – egreg
          Jan 1 at 21:55













          the umpteenth magic of egreg ... thank you!

          – user41063
          Jan 2 at 1:34





          the umpteenth magic of egreg ... thank you!

          – user41063
          Jan 2 at 1:34











          2














          Better searching, I found this solution:



          lccode"2019="2019



          The Unicode right-single-quote (or apostrophe) character U+2019 has not been given a non-zero lccode, and therefore it is considered a nonletter by the hyphenation routine.



          I read too:




          Duplicating patterns is doable (if you tell me that I should do it, I
          will implement it), but seems like yet another ugly hack to me. One
          thing that I still consider clean is replacing all the "27 with "2019
          in patterns themselves and properly read the input in 8bit engines.
          But that's not the final answer since people might just as well
          complain that "27 doesn't hyphenate properly in XeTeX.



          I would much more prefer explaining to hyphenating engine that "2019
          should be treated identical to "27 if that was possible.




          However, I do not understand what in concrete should be done in order to avoid incurring the "ugly solution of duplicating patterns".



          But have we to consider this one a babel bug?






          share|improve this answer

























          • Yes, also babel should do this.

            – egreg
            Jan 1 at 16:54











          • you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

            – Ulrike Fischer
            Jan 1 at 17:09











          • inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

            – user41063
            Jan 1 at 17:20











          • then your version is very old. The current maintainer is imho Claudio Beccari.

            – Ulrike Fischer
            Jan 1 at 17:35











          • Yes, find Cbeccari!. I'll write stright to him

            – user41063
            Jan 1 at 18:50















          2














          Better searching, I found this solution:



          lccode"2019="2019



          The Unicode right-single-quote (or apostrophe) character U+2019 has not been given a non-zero lccode, and therefore it is considered a nonletter by the hyphenation routine.



          I read too:




          Duplicating patterns is doable (if you tell me that I should do it, I
          will implement it), but seems like yet another ugly hack to me. One
          thing that I still consider clean is replacing all the "27 with "2019
          in patterns themselves and properly read the input in 8bit engines.
          But that's not the final answer since people might just as well
          complain that "27 doesn't hyphenate properly in XeTeX.



          I would much more prefer explaining to hyphenating engine that "2019
          should be treated identical to "27 if that was possible.




          However, I do not understand what in concrete should be done in order to avoid incurring the "ugly solution of duplicating patterns".



          But have we to consider this one a babel bug?






          share|improve this answer

























          • Yes, also babel should do this.

            – egreg
            Jan 1 at 16:54











          • you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

            – Ulrike Fischer
            Jan 1 at 17:09











          • inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

            – user41063
            Jan 1 at 17:20











          • then your version is very old. The current maintainer is imho Claudio Beccari.

            – Ulrike Fischer
            Jan 1 at 17:35











          • Yes, find Cbeccari!. I'll write stright to him

            – user41063
            Jan 1 at 18:50













          2












          2








          2







          Better searching, I found this solution:



          lccode"2019="2019



          The Unicode right-single-quote (or apostrophe) character U+2019 has not been given a non-zero lccode, and therefore it is considered a nonletter by the hyphenation routine.



          I read too:




          Duplicating patterns is doable (if you tell me that I should do it, I
          will implement it), but seems like yet another ugly hack to me. One
          thing that I still consider clean is replacing all the "27 with "2019
          in patterns themselves and properly read the input in 8bit engines.
          But that's not the final answer since people might just as well
          complain that "27 doesn't hyphenate properly in XeTeX.



          I would much more prefer explaining to hyphenating engine that "2019
          should be treated identical to "27 if that was possible.




          However, I do not understand what in concrete should be done in order to avoid incurring the "ugly solution of duplicating patterns".



          But have we to consider this one a babel bug?






          share|improve this answer















          Better searching, I found this solution:



          lccode"2019="2019



          The Unicode right-single-quote (or apostrophe) character U+2019 has not been given a non-zero lccode, and therefore it is considered a nonletter by the hyphenation routine.



          I read too:




          Duplicating patterns is doable (if you tell me that I should do it, I
          will implement it), but seems like yet another ugly hack to me. One
          thing that I still consider clean is replacing all the "27 with "2019
          in patterns themselves and properly read the input in 8bit engines.
          But that's not the final answer since people might just as well
          complain that "27 doesn't hyphenate properly in XeTeX.



          I would much more prefer explaining to hyphenating engine that "2019
          should be treated identical to "27 if that was possible.




          However, I do not understand what in concrete should be done in order to avoid incurring the "ugly solution of duplicating patterns".



          But have we to consider this one a babel bug?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 1 at 17:09

























          answered Jan 1 at 16:48









          user41063user41063

          7401511




          7401511












          • Yes, also babel should do this.

            – egreg
            Jan 1 at 16:54











          • you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

            – Ulrike Fischer
            Jan 1 at 17:09











          • inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

            – user41063
            Jan 1 at 17:20











          • then your version is very old. The current maintainer is imho Claudio Beccari.

            – Ulrike Fischer
            Jan 1 at 17:35











          • Yes, find Cbeccari!. I'll write stright to him

            – user41063
            Jan 1 at 18:50

















          • Yes, also babel should do this.

            – egreg
            Jan 1 at 16:54











          • you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

            – Ulrike Fischer
            Jan 1 at 17:09











          • inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

            – user41063
            Jan 1 at 17:20











          • then your version is very old. The current maintainer is imho Claudio Beccari.

            – Ulrike Fischer
            Jan 1 at 17:35











          • Yes, find Cbeccari!. I'll write stright to him

            – user41063
            Jan 1 at 18:50
















          Yes, also babel should do this.

          – egreg
          Jan 1 at 16:54





          Yes, also babel should do this.

          – egreg
          Jan 1 at 16:54













          you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

          – Ulrike Fischer
          Jan 1 at 17:09





          you should probably report this to the maintainer of babel-italian. The address is in italian.ldf.

          – Ulrike Fischer
          Jan 1 at 17:09













          inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

          – user41063
          Jan 1 at 17:20





          inside that file I find only JLBraams@cistron.nl (Johannes Braams, not Brahms :) ). I'll write to him

          – user41063
          Jan 1 at 17:20













          then your version is very old. The current maintainer is imho Claudio Beccari.

          – Ulrike Fischer
          Jan 1 at 17:35





          then your version is very old. The current maintainer is imho Claudio Beccari.

          – Ulrike Fischer
          Jan 1 at 17:35













          Yes, find Cbeccari!. I'll write stright to him

          – user41063
          Jan 1 at 18:50





          Yes, find Cbeccari!. I'll write stright to him

          – user41063
          Jan 1 at 18:50

















          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%2f468148%2fhyphenation-with-babel-and-polyglossia%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 check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay