Hyperref bug with a def
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
The following very MWE shows the issue, which disappears when the call to hyperref is commented:
documentclassarticle
defntextuptiny N
defttextuptiny T
usepackagehyperref
begindocument
$_t$
$_t$
$_t$
$_t$
enddocument
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:
documentclassarticle
defntextuptiny N
defttextuptiny T
usepackagehyperref
begindocument
$_t$
$_t$
$_t$
$_t$
enddocument
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 hadusepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.
– moewe
9 hours ago
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:
documentclassarticle
defntextuptiny N
defttextuptiny T
usepackagehyperref
begindocument
$_t$
$_t$
$_t$
$_t$
enddocument
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:
documentclassarticle
defntextuptiny N
defttextuptiny T
usepackagehyperref
begindocument
$_t$
$_t$
$_t$
$_t$
enddocument
However, it compiles fine when hyperref
is called before the two def
.
hyperref
hyperref
asked 9 hours ago
pluton
7,834960128
7,834960128
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 hadusepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.
– moewe
9 hours ago
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 hadusepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.
– moewe
9 hours ago
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 usepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.– moewe
9 hours ago
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 usepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.– moewe
9 hours ago
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 begindocument
> 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.
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 begindocument
> 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.
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 begindocument
> 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.
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 begindocument
> 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 begindocument
> 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 9 hours ago
egreg
696k8518483111
696k8518483111
add a comment |
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%2f459528%2fhyperref-bug-with-a-def%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
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 hadusepackagehyperrefnewcommandttextuptiny T
, you would have gotten an error.– moewe
9 hours ago