Problem with Polyglossia setting textgreek after update to TeX Live 2018
Clash 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:
- What happened in polyglossia, that I cant use the above mentioned
command anymore, to set the font for a specific language? - How am I supposed to do this now?
- 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
add a comment |Â
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:
- What happened in polyglossia, that I cant use the above mentioned
command anymore, to set the font for a specific language? - How am I supposed to do this now?
- 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
3
thetext<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 ofnewfontfamilycmd
recently, earlier the command would not check ifcmd
was already defined, it would simply overwrite the command. Nownewfontfamilycmd
checks ifcmd
is defined and errors if that is the case. Sincepolyglossia
definestextgreek
you get an error now.
– moewe
48 mins ago
2
Usenewfontfamilygreekfont
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 generallytext...
commands require an argument, whereas the syntax for choosing a font family defined withnewfontfamilyfooFont
isfoo text
, notfootext
.
– egreg
16 mins ago
add a comment |Â
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:
- What happened in polyglossia, that I cant use the above mentioned
command anymore, to set the font for a specific language? - How am I supposed to do this now?
- 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
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:
- What happened in polyglossia, that I cant use the above mentioned
command anymore, to set the font for a specific language? - How am I supposed to do this now?
- 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
xetex polyglossia greek
edited 48 mins ago
asked 55 mins ago
user5950
725522
725522
3
thetext<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 ofnewfontfamilycmd
recently, earlier the command would not check ifcmd
was already defined, it would simply overwrite the command. Nownewfontfamilycmd
checks ifcmd
is defined and errors if that is the case. Sincepolyglossia
definestextgreek
you get an error now.
– moewe
48 mins ago
2
Usenewfontfamilygreekfont
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 generallytext...
commands require an argument, whereas the syntax for choosing a font family defined withnewfontfamilyfooFont
isfoo text
, notfootext
.
– egreg
16 mins ago
add a comment |Â
3
thetext<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 ofnewfontfamilycmd
recently, earlier the command would not check ifcmd
was already defined, it would simply overwrite the command. Nownewfontfamilycmd
checks ifcmd
is defined and errors if that is the case. Sincepolyglossia
definestextgreek
you get an error now.
– moewe
48 mins ago
2
Usenewfontfamilygreekfont
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 generallytext...
commands require an argument, whereas the syntax for choosing a font family defined withnewfontfamilyfooFont
isfoo text
, notfootext
.
– 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
add a comment |Â
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
@egreg makes an important point in the comments under the question. Withsetfontfamilytextgreek
the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means thattextgreekÀάνÄα ῥεῖ – Alles fließt.
with olderfontspec
orsetfontfamily
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
add a comment |Â
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
@egreg makes an important point in the comments under the question. Withsetfontfamilytextgreek
the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means thattextgreekÀάνÄα ῥεῖ – Alles fließt.
with olderfontspec
orsetfontfamily
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
add a comment |Â
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
@egreg makes an important point in the comments under the question. Withsetfontfamilytextgreek
the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means thattextgreekÀάνÄα ῥεῖ – Alles fließt.
with olderfontspec
orsetfontfamily
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
add a comment |Â
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
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
edited 18 mins ago
answered 34 mins ago
moewe
79.1k797300
79.1k797300
@egreg makes an important point in the comments under the question. Withsetfontfamilytextgreek
the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means thattextgreekÀάνÄα ῥεῖ – Alles fließt.
with olderfontspec
orsetfontfamily
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
add a comment |Â
@egreg makes an important point in the comments under the question. Withsetfontfamilytextgreek
the font will leak out and change everything in the current group since font families are defined as switches and not macros. Which means thattextgreekÀάνÄα ῥεῖ – Alles fließt.
with olderfontspec
orsetfontfamily
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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 ofnewfontfamilycmd
recently, earlier the command would not check ifcmd
was already defined, it would simply overwrite the command. Nownewfontfamilycmd
checks ifcmd
is defined and errors if that is the case. Sincepolyglossia
definestextgreek
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 generallytext...
commands require an argument, whereas the syntax for choosing a font family defined withnewfontfamilyfooFont
isfoo text
, notfootext
.– egreg
16 mins ago