How to use the standard - (hyphen) as the hyp{} command from the hyphenat package?Adequate hyphenation of...
Negative Resistance
Can I criticise the more senior developers around me for not writing clean code?
Is there really no use for MD5 anymore?
Help with my training data
What does "function" actually mean in music?
Philosophical question on logistic regression: why isn't the optimal threshold value trained?
As an international instructor, should I openly talk about my accent?
Co-worker works way more than he should
Complex numbers z=-3-4i polar form
A Note on N!
What *exactly* is electrical current, voltage, and resistance?
Will I lose my paid in full property
What to do with someone that cheated their way through university and a PhD program?
Can a stored procedure reference the database in which it is stored?
Why must Chinese maps be obfuscated?
Combinatorics problem, right solution?
Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?
Crossed out red box fitting tightly around image
Why do distances seem to matter in the Foundation world?
Why do real positive eigenvalues result in an unstable system? What about eigenvalues between 0 and 1? or 1?
How do I check if a string is entirely made of the same substring?
How much of a wave function must reside inside event horizon for it to be consumed by the black hole?
Retract an already submitted recommendation letter (written for an undergrad student)
Could moose/elk survive in the Amazon forest?
How to use the standard - (hyphen) as the hyp{} command from the hyphenat package?
Adequate hyphenation of words already containing a hyphenHyphenation problemHow to copy minus as hyphen?Problem expanding acronyms containing hyp{} in captionsHyphenat not hyphenating words with hyphens
I found this answer on http://www.oipapio.com/question-79176
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
It should allow me to use -
as hyp{}
and two --
as one -
, but when compiling it throws this error:
Package: hyphenat 2009/09/02 v2.3c hyphenation utilities
langwohyphens=language77
LaTeX Info: Redefining _ on input line 43.
)test1.tex:4: Undefined control sequence
Here is how much of TeX's memory you used:
232 strings out of 493314
This feature would be very welcomed because, in my language, I use a lot of -
(hyphens) and it is horrible to keep typing (and remembering to type) hyp{}
everywhere.
Related questions:
- Adequate hyphenation of words already containing a hyphen
- Hyphenat not hyphenating words with hyphens
- How to copy minus as hyphen?
- Problem expanding acronyms containing hyp{} in captions
- Hyphenation problem
Update
I managed to get it working after adding the expl3
package. I thought it was not required. Full example:
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
usepackage{expl3}
ExplSyntaxOn
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
ExplSyntaxOff
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
Now, by curiosity. Why I do not see much people using this trick everywhere else?
Does this command is breaking something in latex? Then, is it unadvised to use it?
errors compiling hyphenation compilation-error hyphenat
add a comment |
I found this answer on http://www.oipapio.com/question-79176
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
It should allow me to use -
as hyp{}
and two --
as one -
, but when compiling it throws this error:
Package: hyphenat 2009/09/02 v2.3c hyphenation utilities
langwohyphens=language77
LaTeX Info: Redefining _ on input line 43.
)test1.tex:4: Undefined control sequence
Here is how much of TeX's memory you used:
232 strings out of 493314
This feature would be very welcomed because, in my language, I use a lot of -
(hyphens) and it is horrible to keep typing (and remembering to type) hyp{}
everywhere.
Related questions:
- Adequate hyphenation of words already containing a hyphen
- Hyphenat not hyphenating words with hyphens
- How to copy minus as hyphen?
- Problem expanding acronyms containing hyp{} in captions
- Hyphenation problem
Update
I managed to get it working after adding the expl3
package. I thought it was not required. Full example:
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
usepackage{expl3}
ExplSyntaxOn
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
ExplSyntaxOff
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
Now, by curiosity. Why I do not see much people using this trick everywhere else?
Does this command is breaking something in latex? Then, is it unadvised to use it?
errors compiling hyphenation compilation-error hyphenat
add a comment |
I found this answer on http://www.oipapio.com/question-79176
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
It should allow me to use -
as hyp{}
and two --
as one -
, but when compiling it throws this error:
Package: hyphenat 2009/09/02 v2.3c hyphenation utilities
langwohyphens=language77
LaTeX Info: Redefining _ on input line 43.
)test1.tex:4: Undefined control sequence
Here is how much of TeX's memory you used:
232 strings out of 493314
This feature would be very welcomed because, in my language, I use a lot of -
(hyphens) and it is horrible to keep typing (and remembering to type) hyp{}
everywhere.
Related questions:
- Adequate hyphenation of words already containing a hyphen
- Hyphenat not hyphenating words with hyphens
- How to copy minus as hyphen?
- Problem expanding acronyms containing hyp{} in captions
- Hyphenation problem
Update
I managed to get it working after adding the expl3
package. I thought it was not required. Full example:
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
usepackage{expl3}
ExplSyntaxOn
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
ExplSyntaxOff
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
Now, by curiosity. Why I do not see much people using this trick everywhere else?
Does this command is breaking something in latex? Then, is it unadvised to use it?
errors compiling hyphenation compilation-error hyphenat
I found this answer on http://www.oipapio.com/question-79176
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
It should allow me to use -
as hyp{}
and two --
as one -
, but when compiling it throws this error:
Package: hyphenat 2009/09/02 v2.3c hyphenation utilities
langwohyphens=language77
LaTeX Info: Redefining _ on input line 43.
)test1.tex:4: Undefined control sequence
Here is how much of TeX's memory you used:
232 strings out of 493314
This feature would be very welcomed because, in my language, I use a lot of -
(hyphens) and it is horrible to keep typing (and remembering to type) hyp{}
everywhere.
Related questions:
- Adequate hyphenation of words already containing a hyphen
- Hyphenat not hyphenating words with hyphens
- How to copy minus as hyphen?
- Problem expanding acronyms containing hyp{} in captions
- Hyphenation problem
Update
I managed to get it working after adding the expl3
package. I thought it was not required. Full example:
documentclass[10pt,a5paper,twoside]{article}
usepackage{hyphenat}
usepackage{expl3}
ExplSyntaxOn
cs_new:Npn hyphenfix_emdash:c {---}
cs_new:Npn hyphenfix_endash:c {--}
cs_new:Npn hyphenfix_discardnext:NN #1#2{#1}
catcode`-=active
cs_new_protected:Npn -{
futurelethyphenfix_nexttokhyphenfix_i:w
}
cs_new:Npn hyphenfix_i:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
%discard the next `-` token
hyphenfix_discardnext:NN{futurelethyphenfix_nexttokhyphenfix_ii:w}
}{
% from package hyphenat
hyp
}
}
cs_new:Npn hyphenfix_ii:w {
cs_if_eq:NNTF{hyphenfix_nexttok}{-}{
hyphenfix_discardnext:NN{hyphenfix_emdash:c}
}{
hyphenfix_endash:c
}
}
ExplSyntaxOff
begin{document}
section{Show font}
Tests.
Encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding-encoding.
Encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encodinghyp{}encoding.
end{document}
Now, by curiosity. Why I do not see much people using this trick everywhere else?
Does this command is breaking something in latex? Then, is it unadvised to use it?
errors compiling hyphenation compilation-error hyphenat
errors compiling hyphenation compilation-error hyphenat
asked 4 mins ago
useruser
1,31021131
1,31021131
add a comment |
add a comment |
0
active
oldest
votes
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%2f487648%2fhow-to-use-the-standard-hyphen-as-the-hyp-command-from-the-hyphenat-packa%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f487648%2fhow-to-use-the-standard-hyphen-as-the-hyp-command-from-the-hyphenat-packa%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