Hyperref bug with a def
up vote
2
down vote
favorite
The following very MWE shows the issue, which disappears when the call to hyperref is commented:
documentclass{article}
defn{textup{tiny N}}
deft{textup{tiny T}}
usepackage{hyperref}
begin{document}
${}_{t}$
$_{t}$
${}_{t}$
$_t$
end{document}
However, it compiles fine when hyperref
is called before the two def
.
hyperref
add a comment |
up vote
2
down vote
favorite
The following very MWE shows the issue, which disappears when the call to hyperref is commented:
documentclass{article}
defn{textup{tiny N}}
deft{textup{tiny T}}
usepackage{hyperref}
begin{document}
${}_{t}$
$_{t}$
${}_{t}$
$_t$
end{document}
However, it compiles fine when hyperref
is called before the two def
.
hyperref
4
hyperref
or one of the packages it loads redefinest
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to usenewcommand
. If you hadusepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.
– moewe
Nov 11 at 22:36
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
The following very MWE shows the issue, which disappears when the call to hyperref is commented:
documentclass{article}
defn{textup{tiny N}}
deft{textup{tiny T}}
usepackage{hyperref}
begin{document}
${}_{t}$
$_{t}$
${}_{t}$
$_t$
end{document}
However, it compiles fine when hyperref
is called before the two def
.
hyperref
The following very MWE shows the issue, which disappears when the call to hyperref is commented:
documentclass{article}
defn{textup{tiny N}}
deft{textup{tiny T}}
usepackage{hyperref}
begin{document}
${}_{t}$
$_{t}$
${}_{t}$
$_t$
end{document}
However, it compiles fine when hyperref
is called before the two def
.
hyperref
hyperref
asked Nov 11 at 22:31
pluton
7,949960130
7,949960130
4
hyperref
or one of the packages it loads redefinest
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to usenewcommand
. If you hadusepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.
– moewe
Nov 11 at 22:36
add a comment |
4
hyperref
or one of the packages it loads redefinest
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to usenewcommand
. If you hadusepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.
– moewe
Nov 11 at 22:36
4
4
hyperref
or one of the packages it loads redefines t
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to use newcommand
. If you had usepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.– moewe
Nov 11 at 22:36
hyperref
or one of the packages it loads redefines t
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to use newcommand
. If you had usepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.– moewe
Nov 11 at 22:36
add a comment |
1 Answer
1
active
oldest
votes
up vote
4
down vote
accepted
If you use newcommand
instead of def
, you'll clearly see the source of the problem:
! LaTeX Error: Command t already defined.
Or name end... illegal, see p.192 of the manual.
The t
command is defined in the LaTeX Internal Character Representation for the “tie accent” and hyperref
assumes this is the meaning of t
. Since it has to do several patches for its working, you end up with t
being essentially redefined to its original meaning, which can be seen if you add showt
after begin{document}
> t=macro:
->PD1-cmd t PD1t .
Without your redefinition and without hyperref
, you'd get
> t=macro:
->OML-cmd t OMLt .
which is essentially the same (the encoding name may change when show
is used for technical reasons which are beyond the scope of this answer).
Moral: don't use def
if you don't know precisely what you're doing. And never redefine a command with renewcommand
if you don't know precisely about it.
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
If you use newcommand
instead of def
, you'll clearly see the source of the problem:
! LaTeX Error: Command t already defined.
Or name end... illegal, see p.192 of the manual.
The t
command is defined in the LaTeX Internal Character Representation for the “tie accent” and hyperref
assumes this is the meaning of t
. Since it has to do several patches for its working, you end up with t
being essentially redefined to its original meaning, which can be seen if you add showt
after begin{document}
> t=macro:
->PD1-cmd t PD1t .
Without your redefinition and without hyperref
, you'd get
> t=macro:
->OML-cmd t OMLt .
which is essentially the same (the encoding name may change when show
is used for technical reasons which are beyond the scope of this answer).
Moral: don't use def
if you don't know precisely what you're doing. And never redefine a command with renewcommand
if you don't know precisely about it.
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
add a comment |
up vote
4
down vote
accepted
If you use newcommand
instead of def
, you'll clearly see the source of the problem:
! LaTeX Error: Command t already defined.
Or name end... illegal, see p.192 of the manual.
The t
command is defined in the LaTeX Internal Character Representation for the “tie accent” and hyperref
assumes this is the meaning of t
. Since it has to do several patches for its working, you end up with t
being essentially redefined to its original meaning, which can be seen if you add showt
after begin{document}
> t=macro:
->PD1-cmd t PD1t .
Without your redefinition and without hyperref
, you'd get
> t=macro:
->OML-cmd t OMLt .
which is essentially the same (the encoding name may change when show
is used for technical reasons which are beyond the scope of this answer).
Moral: don't use def
if you don't know precisely what you're doing. And never redefine a command with renewcommand
if you don't know precisely about it.
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
add a comment |
up vote
4
down vote
accepted
up vote
4
down vote
accepted
If you use newcommand
instead of def
, you'll clearly see the source of the problem:
! LaTeX Error: Command t already defined.
Or name end... illegal, see p.192 of the manual.
The t
command is defined in the LaTeX Internal Character Representation for the “tie accent” and hyperref
assumes this is the meaning of t
. Since it has to do several patches for its working, you end up with t
being essentially redefined to its original meaning, which can be seen if you add showt
after begin{document}
> t=macro:
->PD1-cmd t PD1t .
Without your redefinition and without hyperref
, you'd get
> t=macro:
->OML-cmd t OMLt .
which is essentially the same (the encoding name may change when show
is used for technical reasons which are beyond the scope of this answer).
Moral: don't use def
if you don't know precisely what you're doing. And never redefine a command with renewcommand
if you don't know precisely about it.
If you use newcommand
instead of def
, you'll clearly see the source of the problem:
! LaTeX Error: Command t already defined.
Or name end... illegal, see p.192 of the manual.
The t
command is defined in the LaTeX Internal Character Representation for the “tie accent” and hyperref
assumes this is the meaning of t
. Since it has to do several patches for its working, you end up with t
being essentially redefined to its original meaning, which can be seen if you add showt
after begin{document}
> t=macro:
->PD1-cmd t PD1t .
Without your redefinition and without hyperref
, you'd get
> t=macro:
->OML-cmd t OMLt .
which is essentially the same (the encoding name may change when show
is used for technical reasons which are beyond the scope of this answer).
Moral: don't use def
if you don't know precisely what you're doing. And never redefine a command with renewcommand
if you don't know precisely about it.
answered Nov 11 at 22:37
egreg
703k8618753154
703k8618753154
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
add a comment |
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
Thanks. I should have guess but the error message disturbed me a bit.
– pluton
Nov 12 at 8:28
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f459528%2fhyperref-bug-with-a-def%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
4
hyperref
or one of the packages it loads redefinest
. I suggest you take a different name for you macro, one letter names are always tightly contested and therefore dangerous. BTW: This is one of the reasons why it makes sense to (1) load all packages before you define custom commands and apply other (re-)definitions and (2) to usenewcommand
. If you hadusepackage{hyperref}newcommandt{textup{tiny T}}
, you would have gotten an error.– moewe
Nov 11 at 22:36