hyphenrules does not break words
Following the code used both here and here, using hyphenrules
should inform polyglossia
about breaking points within a word. The following code does not break the word in question. Why not? What can I do? I'm using version 1.43 of polyglossia
.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
end{document}
hyphenation polyglossia
add a comment |
Following the code used both here and here, using hyphenrules
should inform polyglossia
about breaking points within a word. The following code does not break the word in question. Why not? What can I do? I'm using version 1.43 of polyglossia
.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
end{document}
hyphenation polyglossia
2
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you trynonderivational
you get all the break points you wish for.
– moewe
Feb 16 at 20:03
add a comment |
Following the code used both here and here, using hyphenrules
should inform polyglossia
about breaking points within a word. The following code does not break the word in question. Why not? What can I do? I'm using version 1.43 of polyglossia
.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
end{document}
hyphenation polyglossia
Following the code used both here and here, using hyphenrules
should inform polyglossia
about breaking points within a word. The following code does not break the word in question. Why not? What can I do? I'm using version 1.43 of polyglossia
.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
end{document}
hyphenation polyglossia
hyphenation polyglossia
asked Feb 16 at 18:49
SverreSverre
10.8k948148
10.8k948148
2
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you trynonderivational
you get all the break points you wish for.
– moewe
Feb 16 at 20:03
add a comment |
2
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you trynonderivational
you get all the break points you wish for.
– moewe
Feb 16 at 20:03
2
2
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you try
nonderivational
you get all the break points you wish for.– moewe
Feb 16 at 20:03
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you try
nonderivational
you get all the break points you wish for.– moewe
Feb 16 at 20:03
add a comment |
2 Answers
2
active
oldest
votes
TeX doesn't hyphenate words that contain a hyphen (precisely the current hyphenchar
for the current font).
You can define a macro for this:
newcommand{hy}{-nobreakhspace{0pt}}
The nobreak
(that is, penalty10000
) disallows a break at the hspace
, which on the other hand allows hyphenation for the following word part.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
makeatletter % babel has `allowhyphens
providecommand{allowhyphens}{ifvmodeelsenobreakhskipz@skipfi}
makeatother
newcommand{hy}{-allowhyphens}
begin{document}
parbox{0pt}{hspace{0pt}nonhy derivational}
end{document}
Here I use a safer definition, that does nothing if allowhyphens
happens to be found in vertical mode. It is essentially the same as in babel
.
Note that de-ri-va-tio-nal
is very wrong for English hyphenation rules.
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
In AmEnglishderivation
hyphenates asder-i-va-tion
, according to Merriam-Webster. In BrEnglish it should bede-riv-a-tion
– egreg
Feb 18 at 16:50
add a comment |
In German language this is a well known problem, because german language contains a lot of concatenated words, single words divided by -
. For example: Baden-Württemberg
.
If you need hyphenation in the single words you need to add local hyphenations with -
.
In your case change non-derivational
to non-de-ri-va-tio-nal
.
Please see the following MWE
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
No - in word:
parbox{0pt}{hspace{0pt}nonderivational}
With local hyphenations texttt{-}:
parbox{0pt}{hspace{0pt}non-de-ri-va-tio-nal}
end{document}
and its result:
add a comment |
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
});
}
});
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%2f475241%2fhyphenrules-does-not-break-words%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
TeX doesn't hyphenate words that contain a hyphen (precisely the current hyphenchar
for the current font).
You can define a macro for this:
newcommand{hy}{-nobreakhspace{0pt}}
The nobreak
(that is, penalty10000
) disallows a break at the hspace
, which on the other hand allows hyphenation for the following word part.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
makeatletter % babel has `allowhyphens
providecommand{allowhyphens}{ifvmodeelsenobreakhskipz@skipfi}
makeatother
newcommand{hy}{-allowhyphens}
begin{document}
parbox{0pt}{hspace{0pt}nonhy derivational}
end{document}
Here I use a safer definition, that does nothing if allowhyphens
happens to be found in vertical mode. It is essentially the same as in babel
.
Note that de-ri-va-tio-nal
is very wrong for English hyphenation rules.
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
In AmEnglishderivation
hyphenates asder-i-va-tion
, according to Merriam-Webster. In BrEnglish it should bede-riv-a-tion
– egreg
Feb 18 at 16:50
add a comment |
TeX doesn't hyphenate words that contain a hyphen (precisely the current hyphenchar
for the current font).
You can define a macro for this:
newcommand{hy}{-nobreakhspace{0pt}}
The nobreak
(that is, penalty10000
) disallows a break at the hspace
, which on the other hand allows hyphenation for the following word part.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
makeatletter % babel has `allowhyphens
providecommand{allowhyphens}{ifvmodeelsenobreakhskipz@skipfi}
makeatother
newcommand{hy}{-allowhyphens}
begin{document}
parbox{0pt}{hspace{0pt}nonhy derivational}
end{document}
Here I use a safer definition, that does nothing if allowhyphens
happens to be found in vertical mode. It is essentially the same as in babel
.
Note that de-ri-va-tio-nal
is very wrong for English hyphenation rules.
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
In AmEnglishderivation
hyphenates asder-i-va-tion
, according to Merriam-Webster. In BrEnglish it should bede-riv-a-tion
– egreg
Feb 18 at 16:50
add a comment |
TeX doesn't hyphenate words that contain a hyphen (precisely the current hyphenchar
for the current font).
You can define a macro for this:
newcommand{hy}{-nobreakhspace{0pt}}
The nobreak
(that is, penalty10000
) disallows a break at the hspace
, which on the other hand allows hyphenation for the following word part.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
makeatletter % babel has `allowhyphens
providecommand{allowhyphens}{ifvmodeelsenobreakhskipz@skipfi}
makeatother
newcommand{hy}{-allowhyphens}
begin{document}
parbox{0pt}{hspace{0pt}nonhy derivational}
end{document}
Here I use a safer definition, that does nothing if allowhyphens
happens to be found in vertical mode. It is essentially the same as in babel
.
Note that de-ri-va-tio-nal
is very wrong for English hyphenation rules.
TeX doesn't hyphenate words that contain a hyphen (precisely the current hyphenchar
for the current font).
You can define a macro for this:
newcommand{hy}{-nobreakhspace{0pt}}
The nobreak
(that is, penalty10000
) disallows a break at the hspace
, which on the other hand allows hyphenation for the following word part.
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
makeatletter % babel has `allowhyphens
providecommand{allowhyphens}{ifvmodeelsenobreakhskipz@skipfi}
makeatother
newcommand{hy}{-allowhyphens}
begin{document}
parbox{0pt}{hspace{0pt}nonhy derivational}
end{document}
Here I use a safer definition, that does nothing if allowhyphens
happens to be found in vertical mode. It is essentially the same as in babel
.
Note that de-ri-va-tio-nal
is very wrong for English hyphenation rules.
answered Feb 16 at 22:12
egregegreg
722k8719143214
722k8719143214
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
In AmEnglishderivation
hyphenates asder-i-va-tion
, according to Merriam-Webster. In BrEnglish it should bede-riv-a-tion
– egreg
Feb 18 at 16:50
add a comment |
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
In AmEnglishderivation
hyphenates asder-i-va-tion
, according to Merriam-Webster. In BrEnglish it should bede-riv-a-tion
– egreg
Feb 18 at 16:50
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
I looked up in Bringhurst to find out about hyphenation rules in English, but he doesn't give them. What is wrong about it, by the way?
– Sverre
Feb 18 at 16:30
1
1
In AmEnglish
derivation
hyphenates as der-i-va-tion
, according to Merriam-Webster. In BrEnglish it should be de-riv-a-tion
– egreg
Feb 18 at 16:50
In AmEnglish
derivation
hyphenates as der-i-va-tion
, according to Merriam-Webster. In BrEnglish it should be de-riv-a-tion
– egreg
Feb 18 at 16:50
add a comment |
In German language this is a well known problem, because german language contains a lot of concatenated words, single words divided by -
. For example: Baden-Württemberg
.
If you need hyphenation in the single words you need to add local hyphenations with -
.
In your case change non-derivational
to non-de-ri-va-tio-nal
.
Please see the following MWE
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
No - in word:
parbox{0pt}{hspace{0pt}nonderivational}
With local hyphenations texttt{-}:
parbox{0pt}{hspace{0pt}non-de-ri-va-tio-nal}
end{document}
and its result:
add a comment |
In German language this is a well known problem, because german language contains a lot of concatenated words, single words divided by -
. For example: Baden-Württemberg
.
If you need hyphenation in the single words you need to add local hyphenations with -
.
In your case change non-derivational
to non-de-ri-va-tio-nal
.
Please see the following MWE
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
No - in word:
parbox{0pt}{hspace{0pt}nonderivational}
With local hyphenations texttt{-}:
parbox{0pt}{hspace{0pt}non-de-ri-va-tio-nal}
end{document}
and its result:
add a comment |
In German language this is a well known problem, because german language contains a lot of concatenated words, single words divided by -
. For example: Baden-Württemberg
.
If you need hyphenation in the single words you need to add local hyphenations with -
.
In your case change non-derivational
to non-de-ri-va-tio-nal
.
Please see the following MWE
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
No - in word:
parbox{0pt}{hspace{0pt}nonderivational}
With local hyphenations texttt{-}:
parbox{0pt}{hspace{0pt}non-de-ri-va-tio-nal}
end{document}
and its result:
In German language this is a well known problem, because german language contains a lot of concatenated words, single words divided by -
. For example: Baden-Württemberg
.
If you need hyphenation in the single words you need to add local hyphenations with -
.
In your case change non-derivational
to non-de-ri-va-tio-nal
.
Please see the following MWE
documentclass{article}
usepackage{polyglossia}
setmainlanguage{english}
begin{hyphenrules}{english}
hyphenation{de-ri-va-tio-nal}
hyphenation{non-de-ri-va-tio-nal}
end{hyphenrules}
begin{document}
parbox{0pt}{hspace{0pt}non-derivational}
No - in word:
parbox{0pt}{hspace{0pt}nonderivational}
With local hyphenations texttt{-}:
parbox{0pt}{hspace{0pt}non-de-ri-va-tio-nal}
end{document}
and its result:
edited Feb 16 at 21:43
answered Feb 16 at 21:38
KurtKurt
38k847162
38k847162
add a comment |
add a comment |
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.
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%2f475241%2fhyphenrules-does-not-break-words%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
2
Isn't this the standard 'LaTeX won't hyphenate words already containing a hyphen' issue (cf. tex.stackexchange.com/q/2706/35864)? If you try
nonderivational
you get all the break points you wish for.– moewe
Feb 16 at 20:03