Cyrillic letters and Russian hyphenation in Plain XeTeX
up vote
3
down vote
favorite
What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules?
Ideally i would like to not have to specify anything in the source files, but to get new commands rxetex
and ramsxetex
to compile sources in Russian.
fonts xetex plain-tex format-files
add a comment |
up vote
3
down vote
favorite
What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules?
Ideally i would like to not have to specify anything in the source files, but to get new commands rxetex
and ramsxetex
to compile sources in Russian.
fonts xetex plain-tex format-files
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules?
Ideally i would like to not have to specify anything in the source files, but to get new commands rxetex
and ramsxetex
to compile sources in Russian.
fonts xetex plain-tex format-files
What is the simplest method to tell XeTeX (not XeLaTeX) to use a font with Cyrillic letters and to apply Russian hyphenation rules?
Ideally i would like to not have to specify anything in the source files, but to get new commands rxetex
and ramsxetex
to compile sources in Russian.
fonts xetex plain-tex format-files
fonts xetex plain-tex format-files
edited Jun 12 '15 at 17:06
erreka
3,335928
3,335928
asked Jun 9 '15 at 11:42
Alexey
6701624
6701624
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
Replace the preloaded cm text fonts with Unicode aware ones, and use them in your documents. Asumming that you have a working XeTeX installation, try the following:
Install the OTF version of the cm-unicode set of fonts into your system. You can download them from CTAN.
Run
fc-cache
on a terminal to update the font database cache.Copy the following code into
cmunfonts.tex
, and input this file at the beginning of your document.
message{cm unicode fonts!}
fonttenrm="[cmunrm]" at 10 pt% roman text
fontsevenrm="[cmunrm]" at 7pt
fontfiverm="[cmunrm]" at 5pt
fonttenbf="[cmunbx]" at 10pt % boldface extended
fontsevenbf="[cmunbx]" at 7pt
fontfivebf="[cmunbx]" at 5pt
fonttentt="[cmunbtl]" at 10pt % typewriter
fonttensl="[cmunsl]" at 10pt % slanted roman
fonttenit="[cmunti]" at 10pt % text italic
endinput
Now try to xetex yourfile
and see if that works.
In general, you will need to substitute the default 7bit cm text fonts with unicode text fonts in all your font definitions in your input files.
Now, to use russian hyphenation you need to use a format different than plain.fmt: that's untouchable. I recommend to you to install hyplain, the russian loader, and the hyphenation patterns (from hyph-utf8
package) from CTAN; check the documentation for hyplain (it's two pages), and at the appropriate place in the hylang.tex
file, add russian as follows:
input unicode-letters
definelanguage{ru}{RU}{loadhyph-ru}
refinelanguage{ru}{RU}{hyphenmins{2}{2}frenchspacing}{nonfrenchspacing}
addaliasruss{ru}{RU}
Make the format running xetex -ini *hyplain
, and call xetex ^&hyplain yourfile
and it will compile with cyrillic and russian hyphenation.
Then you can make a batch file or bash script rxetex
to include the line xetex ^&hyplain %1 %2 %3 %4 %5 %6
to run your russian enabled xetex in a prompt.
I'm sorry, but I can see no way you may bypass the process of learning how to make a format.
Nice to see that there are people usinghyplain
.;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
There's no need to define thosepreloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.
– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do withbar
command in math mode and withamsppt
AMSTeX package -- if i remove one or the other, there is no error.
– Alexey
Jun 20 '15 at 21:40
|
show 9 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
Replace the preloaded cm text fonts with Unicode aware ones, and use them in your documents. Asumming that you have a working XeTeX installation, try the following:
Install the OTF version of the cm-unicode set of fonts into your system. You can download them from CTAN.
Run
fc-cache
on a terminal to update the font database cache.Copy the following code into
cmunfonts.tex
, and input this file at the beginning of your document.
message{cm unicode fonts!}
fonttenrm="[cmunrm]" at 10 pt% roman text
fontsevenrm="[cmunrm]" at 7pt
fontfiverm="[cmunrm]" at 5pt
fonttenbf="[cmunbx]" at 10pt % boldface extended
fontsevenbf="[cmunbx]" at 7pt
fontfivebf="[cmunbx]" at 5pt
fonttentt="[cmunbtl]" at 10pt % typewriter
fonttensl="[cmunsl]" at 10pt % slanted roman
fonttenit="[cmunti]" at 10pt % text italic
endinput
Now try to xetex yourfile
and see if that works.
In general, you will need to substitute the default 7bit cm text fonts with unicode text fonts in all your font definitions in your input files.
Now, to use russian hyphenation you need to use a format different than plain.fmt: that's untouchable. I recommend to you to install hyplain, the russian loader, and the hyphenation patterns (from hyph-utf8
package) from CTAN; check the documentation for hyplain (it's two pages), and at the appropriate place in the hylang.tex
file, add russian as follows:
input unicode-letters
definelanguage{ru}{RU}{loadhyph-ru}
refinelanguage{ru}{RU}{hyphenmins{2}{2}frenchspacing}{nonfrenchspacing}
addaliasruss{ru}{RU}
Make the format running xetex -ini *hyplain
, and call xetex ^&hyplain yourfile
and it will compile with cyrillic and russian hyphenation.
Then you can make a batch file or bash script rxetex
to include the line xetex ^&hyplain %1 %2 %3 %4 %5 %6
to run your russian enabled xetex in a prompt.
I'm sorry, but I can see no way you may bypass the process of learning how to make a format.
Nice to see that there are people usinghyplain
.;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
There's no need to define thosepreloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.
– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do withbar
command in math mode and withamsppt
AMSTeX package -- if i remove one or the other, there is no error.
– Alexey
Jun 20 '15 at 21:40
|
show 9 more comments
up vote
3
down vote
Replace the preloaded cm text fonts with Unicode aware ones, and use them in your documents. Asumming that you have a working XeTeX installation, try the following:
Install the OTF version of the cm-unicode set of fonts into your system. You can download them from CTAN.
Run
fc-cache
on a terminal to update the font database cache.Copy the following code into
cmunfonts.tex
, and input this file at the beginning of your document.
message{cm unicode fonts!}
fonttenrm="[cmunrm]" at 10 pt% roman text
fontsevenrm="[cmunrm]" at 7pt
fontfiverm="[cmunrm]" at 5pt
fonttenbf="[cmunbx]" at 10pt % boldface extended
fontsevenbf="[cmunbx]" at 7pt
fontfivebf="[cmunbx]" at 5pt
fonttentt="[cmunbtl]" at 10pt % typewriter
fonttensl="[cmunsl]" at 10pt % slanted roman
fonttenit="[cmunti]" at 10pt % text italic
endinput
Now try to xetex yourfile
and see if that works.
In general, you will need to substitute the default 7bit cm text fonts with unicode text fonts in all your font definitions in your input files.
Now, to use russian hyphenation you need to use a format different than plain.fmt: that's untouchable. I recommend to you to install hyplain, the russian loader, and the hyphenation patterns (from hyph-utf8
package) from CTAN; check the documentation for hyplain (it's two pages), and at the appropriate place in the hylang.tex
file, add russian as follows:
input unicode-letters
definelanguage{ru}{RU}{loadhyph-ru}
refinelanguage{ru}{RU}{hyphenmins{2}{2}frenchspacing}{nonfrenchspacing}
addaliasruss{ru}{RU}
Make the format running xetex -ini *hyplain
, and call xetex ^&hyplain yourfile
and it will compile with cyrillic and russian hyphenation.
Then you can make a batch file or bash script rxetex
to include the line xetex ^&hyplain %1 %2 %3 %4 %5 %6
to run your russian enabled xetex in a prompt.
I'm sorry, but I can see no way you may bypass the process of learning how to make a format.
Nice to see that there are people usinghyplain
.;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
There's no need to define thosepreloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.
– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do withbar
command in math mode and withamsppt
AMSTeX package -- if i remove one or the other, there is no error.
– Alexey
Jun 20 '15 at 21:40
|
show 9 more comments
up vote
3
down vote
up vote
3
down vote
Replace the preloaded cm text fonts with Unicode aware ones, and use them in your documents. Asumming that you have a working XeTeX installation, try the following:
Install the OTF version of the cm-unicode set of fonts into your system. You can download them from CTAN.
Run
fc-cache
on a terminal to update the font database cache.Copy the following code into
cmunfonts.tex
, and input this file at the beginning of your document.
message{cm unicode fonts!}
fonttenrm="[cmunrm]" at 10 pt% roman text
fontsevenrm="[cmunrm]" at 7pt
fontfiverm="[cmunrm]" at 5pt
fonttenbf="[cmunbx]" at 10pt % boldface extended
fontsevenbf="[cmunbx]" at 7pt
fontfivebf="[cmunbx]" at 5pt
fonttentt="[cmunbtl]" at 10pt % typewriter
fonttensl="[cmunsl]" at 10pt % slanted roman
fonttenit="[cmunti]" at 10pt % text italic
endinput
Now try to xetex yourfile
and see if that works.
In general, you will need to substitute the default 7bit cm text fonts with unicode text fonts in all your font definitions in your input files.
Now, to use russian hyphenation you need to use a format different than plain.fmt: that's untouchable. I recommend to you to install hyplain, the russian loader, and the hyphenation patterns (from hyph-utf8
package) from CTAN; check the documentation for hyplain (it's two pages), and at the appropriate place in the hylang.tex
file, add russian as follows:
input unicode-letters
definelanguage{ru}{RU}{loadhyph-ru}
refinelanguage{ru}{RU}{hyphenmins{2}{2}frenchspacing}{nonfrenchspacing}
addaliasruss{ru}{RU}
Make the format running xetex -ini *hyplain
, and call xetex ^&hyplain yourfile
and it will compile with cyrillic and russian hyphenation.
Then you can make a batch file or bash script rxetex
to include the line xetex ^&hyplain %1 %2 %3 %4 %5 %6
to run your russian enabled xetex in a prompt.
I'm sorry, but I can see no way you may bypass the process of learning how to make a format.
Replace the preloaded cm text fonts with Unicode aware ones, and use them in your documents. Asumming that you have a working XeTeX installation, try the following:
Install the OTF version of the cm-unicode set of fonts into your system. You can download them from CTAN.
Run
fc-cache
on a terminal to update the font database cache.Copy the following code into
cmunfonts.tex
, and input this file at the beginning of your document.
message{cm unicode fonts!}
fonttenrm="[cmunrm]" at 10 pt% roman text
fontsevenrm="[cmunrm]" at 7pt
fontfiverm="[cmunrm]" at 5pt
fonttenbf="[cmunbx]" at 10pt % boldface extended
fontsevenbf="[cmunbx]" at 7pt
fontfivebf="[cmunbx]" at 5pt
fonttentt="[cmunbtl]" at 10pt % typewriter
fonttensl="[cmunsl]" at 10pt % slanted roman
fonttenit="[cmunti]" at 10pt % text italic
endinput
Now try to xetex yourfile
and see if that works.
In general, you will need to substitute the default 7bit cm text fonts with unicode text fonts in all your font definitions in your input files.
Now, to use russian hyphenation you need to use a format different than plain.fmt: that's untouchable. I recommend to you to install hyplain, the russian loader, and the hyphenation patterns (from hyph-utf8
package) from CTAN; check the documentation for hyplain (it's two pages), and at the appropriate place in the hylang.tex
file, add russian as follows:
input unicode-letters
definelanguage{ru}{RU}{loadhyph-ru}
refinelanguage{ru}{RU}{hyphenmins{2}{2}frenchspacing}{nonfrenchspacing}
addaliasruss{ru}{RU}
Make the format running xetex -ini *hyplain
, and call xetex ^&hyplain yourfile
and it will compile with cyrillic and russian hyphenation.
Then you can make a batch file or bash script rxetex
to include the line xetex ^&hyplain %1 %2 %3 %4 %5 %6
to run your russian enabled xetex in a prompt.
I'm sorry, but I can see no way you may bypass the process of learning how to make a format.
edited Jun 20 '15 at 21:32
Alexey
6701624
6701624
answered Jun 9 '15 at 18:22
erreka
3,335928
3,335928
Nice to see that there are people usinghyplain
.;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
There's no need to define thosepreloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.
– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do withbar
command in math mode and withamsppt
AMSTeX package -- if i remove one or the other, there is no error.
– Alexey
Jun 20 '15 at 21:40
|
show 9 more comments
Nice to see that there are people usinghyplain
.;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
There's no need to define thosepreloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.
– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do withbar
command in math mode and withamsppt
AMSTeX package -- if i remove one or the other, there is no error.
– Alexey
Jun 20 '15 at 21:40
Nice to see that there are people using
hyplain
. ;-)
– egreg
Jun 9 '15 at 19:42
Nice to see that there are people using
hyplain
. ;-)
– egreg
Jun 9 '15 at 19:42
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
@egreg Do you think is it possible to dispense with the preloaded fonts in the code above? —And yes, hyplain is a nice hack!
– erreka
Jun 9 '15 at 19:47
1
1
There's no need to define those
preloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.– egreg
Jun 9 '15 at 19:54
There's no need to define those
preloaded
fonts: you can't store OpenType fonts in the format anyway, so you don't save time by defining those fonts: indeed, you lose some because you load fonts that probably you won't use.– egreg
Jun 9 '15 at 19:54
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
Make sure you convert your input files to utf8 before trying to compile them. Files encoded in cp1251 will likely choke xetex.
– erreka
Jun 9 '15 at 22:15
xetex myfile
does not work, i get ! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do with bar
command in math mode and with amsppt
AMSTeX package -- if i remove one or the other, there is no error.– Alexey
Jun 20 '15 at 21:40
xetex myfile
does not work, i get ! Internal error: bad native font flag in 'map_char_to_glyph'
. The error has to do with bar
command in math mode and with amsppt
AMSTeX package -- if i remove one or the other, there is no error.– Alexey
Jun 20 '15 at 21:40
|
show 9 more comments
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f249357%2fcyrillic-letters-and-russian-hyphenation-in-plain-xetex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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