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.










share|improve this question


















  • 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

















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.










share|improve this question


















  • 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















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.










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 11 at 22:31









pluton

7,949960130




7,949960130








  • 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
















  • 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










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












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.






share|improve this answer





















  • Thanks. I should have guess but the error message disturbed me a bit.
    – pluton
    Nov 12 at 8:28











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',
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
});


}
});














draft saved

draft discarded


















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

























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.






share|improve this answer





















  • Thanks. I should have guess but the error message disturbed me a bit.
    – pluton
    Nov 12 at 8:28















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.






share|improve this answer





















  • Thanks. I should have guess but the error message disturbed me a bit.
    – pluton
    Nov 12 at 8:28













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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

鏡平學校

ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

Why https connections are so slow when debugging (stepping over) in Java?