Problem with Polyglossia setting textgreek after update to TeX Live 2018

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











up vote
2
down vote

favorite












I used to set an specific font for greek text using polyglossia with newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face.



After I updated to TeX Live 2018 all my documents wouldn't compile anymore throwing the error:




LaTeX error: "xparse/command-already-defined" Command 'textgreek' already defined! For immediate help type H .




This is truly unfortunate, because that means the update breaks compatibility to a couple of hundred of my documents. However, my questions are:



  1. What happened in polyglossia, that I cant use the above mentioned

    command anymore, to set the font for a specific language?

  2. How am I supposed to do this now?

  3. How could I make my old documents compile again the easiest way?

By the way, I am using polyglossia due to its compatibility with XeLaTeX. Here is a minimal not working example:



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument









share|improve this question



















  • 3




    the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
    – David Carlisle
    51 mins ago






  • 2




    fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
    – moewe
    48 mins ago






  • 2




    Use newfontfamilygreekfont to specify a font for Greek text.
    – moewe
    45 mins ago










  • @moewe Thanks for explaining!
    – user5950
    41 mins ago






  • 2




    textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
    – egreg
    16 mins ago














up vote
2
down vote

favorite












I used to set an specific font for greek text using polyglossia with newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face.



After I updated to TeX Live 2018 all my documents wouldn't compile anymore throwing the error:




LaTeX error: "xparse/command-already-defined" Command 'textgreek' already defined! For immediate help type H .




This is truly unfortunate, because that means the update breaks compatibility to a couple of hundred of my documents. However, my questions are:



  1. What happened in polyglossia, that I cant use the above mentioned

    command anymore, to set the font for a specific language?

  2. How am I supposed to do this now?

  3. How could I make my old documents compile again the easiest way?

By the way, I am using polyglossia due to its compatibility with XeLaTeX. Here is a minimal not working example:



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument









share|improve this question



















  • 3




    the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
    – David Carlisle
    51 mins ago






  • 2




    fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
    – moewe
    48 mins ago






  • 2




    Use newfontfamilygreekfont to specify a font for Greek text.
    – moewe
    45 mins ago










  • @moewe Thanks for explaining!
    – user5950
    41 mins ago






  • 2




    textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
    – egreg
    16 mins ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I used to set an specific font for greek text using polyglossia with newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face.



After I updated to TeX Live 2018 all my documents wouldn't compile anymore throwing the error:




LaTeX error: "xparse/command-already-defined" Command 'textgreek' already defined! For immediate help type H .




This is truly unfortunate, because that means the update breaks compatibility to a couple of hundred of my documents. However, my questions are:



  1. What happened in polyglossia, that I cant use the above mentioned

    command anymore, to set the font for a specific language?

  2. How am I supposed to do this now?

  3. How could I make my old documents compile again the easiest way?

By the way, I am using polyglossia due to its compatibility with XeLaTeX. Here is a minimal not working example:



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument









share|improve this question















I used to set an specific font for greek text using polyglossia with newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face.



After I updated to TeX Live 2018 all my documents wouldn't compile anymore throwing the error:




LaTeX error: "xparse/command-already-defined" Command 'textgreek' already defined! For immediate help type H .




This is truly unfortunate, because that means the update breaks compatibility to a couple of hundred of my documents. However, my questions are:



  1. What happened in polyglossia, that I cant use the above mentioned

    command anymore, to set the font for a specific language?

  2. How am I supposed to do this now?

  3. How could I make my old documents compile again the easiest way?

By the way, I am using polyglossia due to its compatibility with XeLaTeX. Here is a minimal not working example:



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument






xetex polyglossia greek






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 48 mins ago

























asked 55 mins ago









user5950

725522




725522







  • 3




    the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
    – David Carlisle
    51 mins ago






  • 2




    fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
    – moewe
    48 mins ago






  • 2




    Use newfontfamilygreekfont to specify a font for Greek text.
    – moewe
    45 mins ago










  • @moewe Thanks for explaining!
    – user5950
    41 mins ago






  • 2




    textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
    – egreg
    16 mins ago












  • 3




    the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
    – David Carlisle
    51 mins ago






  • 2




    fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
    – moewe
    48 mins ago






  • 2




    Use newfontfamilygreekfont to specify a font for Greek text.
    – moewe
    45 mins ago










  • @moewe Thanks for explaining!
    – user5950
    41 mins ago






  • 2




    textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
    – egreg
    16 mins ago







3




3




the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
– David Carlisle
51 mins ago




the text<language> commands are defined by polyglossia to define language switches, so you shouldn't define them to be font commands,
– David Carlisle
51 mins ago




2




2




fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
– moewe
48 mins ago




fontspec changed the behaviour of newfontfamilycmd recently, earlier the command would not check if cmd was already defined, it would simply overwrite the command. Now newfontfamilycmd checks if cmd is defined and errors if that is the case. Since polyglossia defines textgreek you get an error now.
– moewe
48 mins ago




2




2




Use newfontfamilygreekfont to specify a font for Greek text.
– moewe
45 mins ago




Use newfontfamilygreekfont to specify a font for Greek text.
– moewe
45 mins ago












@moewe Thanks for explaining!
– user5950
41 mins ago




@moewe Thanks for explaining!
– user5950
41 mins ago




2




2




textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
– egreg
16 mins ago




textgreek is (and has always been) a bad name for a font family selection command, because generally text... commands require an argument, whereas the syntax for choosing a font family defined with newfontfamilyfooFont is foo text, not footext.
– egreg
16 mins ago










1 Answer
1






active

oldest

votes

















up vote
5
down vote



accepted










fontspec recently changed the behaviour of newfontfamily. newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier newfontfamily would behave like setfontfamily behaves now. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation).



As David Carlisle explains in the comments textgreek is a command defined by polyglossia to typeset Greek. (polyglossia defines text<language> for all loaded languages. See also p. 5 of the polyglossia documentation.)



So when you get to



newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face


new versions of fontspec throw an error, because textgreek is already defined. Older version of fontspec will have overwritten polyglossia's definition of textgreek, which probably meant that you did not actually get proper language switching.



The correct way to specify the font for Greek is by redefining greekfont. See also pp. 6-7 of the polyglossia documentation.



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilygreekfont[Ligatures=TeX]Linux Libertine O

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument


You could also use babel instead of polyglossia. babel supports LuaLaTeX and XeLaTeX and is actively being developed. (polyglossia development seems to have stalled recently.) For western languages with Latin scripts, polyglossia is barely better than babel. For Greek babel also gives very good results.



documentclass[a4paper,10pt,twoside]memoir
usepackagefontspec
usepackage[polutonikogreek,german]babel
babelfontrmLatin Modern Roman
babelfont[polutonikogreek]rmLinux Libertine O

begindocument
foreignlanguagepolutonikogreekπάντα ῥεῖ – Alles fließt.
enddocument


The output of both examples is the same



πάντα ῥεῖ – Alles fließt.






share|improve this answer






















  • @egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
    – moewe
    9 mins 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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
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%2f455788%2fproblem-with-polyglossia-setting-textgreek-after-update-to-tex-live-2018%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
5
down vote



accepted










fontspec recently changed the behaviour of newfontfamily. newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier newfontfamily would behave like setfontfamily behaves now. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation).



As David Carlisle explains in the comments textgreek is a command defined by polyglossia to typeset Greek. (polyglossia defines text<language> for all loaded languages. See also p. 5 of the polyglossia documentation.)



So when you get to



newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face


new versions of fontspec throw an error, because textgreek is already defined. Older version of fontspec will have overwritten polyglossia's definition of textgreek, which probably meant that you did not actually get proper language switching.



The correct way to specify the font for Greek is by redefining greekfont. See also pp. 6-7 of the polyglossia documentation.



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilygreekfont[Ligatures=TeX]Linux Libertine O

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument


You could also use babel instead of polyglossia. babel supports LuaLaTeX and XeLaTeX and is actively being developed. (polyglossia development seems to have stalled recently.) For western languages with Latin scripts, polyglossia is barely better than babel. For Greek babel also gives very good results.



documentclass[a4paper,10pt,twoside]memoir
usepackagefontspec
usepackage[polutonikogreek,german]babel
babelfontrmLatin Modern Roman
babelfont[polutonikogreek]rmLinux Libertine O

begindocument
foreignlanguagepolutonikogreekπάντα ῥεῖ – Alles fließt.
enddocument


The output of both examples is the same



πάντα ῥεῖ – Alles fließt.






share|improve this answer






















  • @egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
    – moewe
    9 mins ago















up vote
5
down vote



accepted










fontspec recently changed the behaviour of newfontfamily. newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier newfontfamily would behave like setfontfamily behaves now. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation).



As David Carlisle explains in the comments textgreek is a command defined by polyglossia to typeset Greek. (polyglossia defines text<language> for all loaded languages. See also p. 5 of the polyglossia documentation.)



So when you get to



newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face


new versions of fontspec throw an error, because textgreek is already defined. Older version of fontspec will have overwritten polyglossia's definition of textgreek, which probably meant that you did not actually get proper language switching.



The correct way to specify the font for Greek is by redefining greekfont. See also pp. 6-7 of the polyglossia documentation.



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilygreekfont[Ligatures=TeX]Linux Libertine O

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument


You could also use babel instead of polyglossia. babel supports LuaLaTeX and XeLaTeX and is actively being developed. (polyglossia development seems to have stalled recently.) For western languages with Latin scripts, polyglossia is barely better than babel. For Greek babel also gives very good results.



documentclass[a4paper,10pt,twoside]memoir
usepackagefontspec
usepackage[polutonikogreek,german]babel
babelfontrmLatin Modern Roman
babelfont[polutonikogreek]rmLinux Libertine O

begindocument
foreignlanguagepolutonikogreekπάντα ῥεῖ – Alles fließt.
enddocument


The output of both examples is the same



πάντα ῥεῖ – Alles fließt.






share|improve this answer






















  • @egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
    – moewe
    9 mins ago













up vote
5
down vote



accepted







up vote
5
down vote



accepted






fontspec recently changed the behaviour of newfontfamily. newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier newfontfamily would behave like setfontfamily behaves now. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation).



As David Carlisle explains in the comments textgreek is a command defined by polyglossia to typeset Greek. (polyglossia defines text<language> for all loaded languages. See also p. 5 of the polyglossia documentation.)



So when you get to



newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face


new versions of fontspec throw an error, because textgreek is already defined. Older version of fontspec will have overwritten polyglossia's definition of textgreek, which probably meant that you did not actually get proper language switching.



The correct way to specify the font for Greek is by redefining greekfont. See also pp. 6-7 of the polyglossia documentation.



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilygreekfont[Ligatures=TeX]Linux Libertine O

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument


You could also use babel instead of polyglossia. babel supports LuaLaTeX and XeLaTeX and is actively being developed. (polyglossia development seems to have stalled recently.) For western languages with Latin scripts, polyglossia is barely better than babel. For Greek babel also gives very good results.



documentclass[a4paper,10pt,twoside]memoir
usepackagefontspec
usepackage[polutonikogreek,german]babel
babelfontrmLatin Modern Roman
babelfont[polutonikogreek]rmLinux Libertine O

begindocument
foreignlanguagepolutonikogreekπάντα ῥεῖ – Alles fließt.
enddocument


The output of both examples is the same



πάντα ῥεῖ – Alles fließt.






share|improve this answer














fontspec recently changed the behaviour of newfontfamily. newfontfamily<cmd> now throws an error if <cmd> is defined. Earlier newfontfamily would behave like setfontfamily behaves now. It would simply overwrite the old definition of the command. (See p. 9 of the fontspec documentation).



As David Carlisle explains in the comments textgreek is a command defined by polyglossia to typeset Greek. (polyglossia defines text<language> for all loaded languages. See also p. 5 of the polyglossia documentation.)



So when you get to



newfontfamilytextgreek[Ligatures=TeX]Vusillus Old Face


new versions of fontspec throw an error, because textgreek is already defined. Older version of fontspec will have overwritten polyglossia's definition of textgreek, which probably meant that you did not actually get proper language switching.



The correct way to specify the font for Greek is by redefining greekfont. See also pp. 6-7 of the polyglossia documentation.



documentclass[a4paper,10pt,twoside]memoir
usepackagepolyglossia
setmainlanguage[spelling=old,babelshorthands=true,script=latin]german
setotherlanguage[variant=polytonic]greek
newfontfamilygreekfont[Ligatures=TeX]Linux Libertine O

begindocument
textgreekπάντα ῥεῖ – Alles fließt.
enddocument


You could also use babel instead of polyglossia. babel supports LuaLaTeX and XeLaTeX and is actively being developed. (polyglossia development seems to have stalled recently.) For western languages with Latin scripts, polyglossia is barely better than babel. For Greek babel also gives very good results.



documentclass[a4paper,10pt,twoside]memoir
usepackagefontspec
usepackage[polutonikogreek,german]babel
babelfontrmLatin Modern Roman
babelfont[polutonikogreek]rmLinux Libertine O

begindocument
foreignlanguagepolutonikogreekπάντα ῥεῖ – Alles fließt.
enddocument


The output of both examples is the same



πάντα ῥεῖ – Alles fließt.







share|improve this answer














share|improve this answer



share|improve this answer








edited 18 mins ago

























answered 34 mins ago









moewe

79.1k797300




79.1k797300











  • @egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
    – moewe
    9 mins ago

















  • @egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
    – moewe
    9 mins ago
















@egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
– moewe
9 mins ago





@egreg makes an important point in the comments under the question. With setfontfamilytextgreek the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means that textgreekπάντα ῥεῖ – Alles fließt. with older fontspec or setfontfamily would also change the font of 'Alles fließt', while in the MWE of the answer the font is not changed and stays Latin Modern.
– moewe
9 mins ago


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455788%2fproblem-with-polyglossia-setting-textgreek-after-update-to-tex-live-2018%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery