Strange lines in front of the document
I want to create a document with the iodhbwm class. If I compile it the first time it works fine. But if I compile it a seccond time this lines apear at the begin of the document:
id=1,dest=636861707465722E31,srcline=235C3333346265727363687269667420617566204562656E6
id=2,dest=73656374696F6E2E312E31,srcline=235C3333346265727363687269667420617566204562
id=3,dest=73756273656374696F6E2E312E312E31,srcline=235C333334626572736368726966742061
id=4,dest=73656374696F6E2E312E32,srcline=234C697374656E
id=5,dest=73756273656374696F6
id=6,dest=73756273656374696F6E2E312E322E32,srcline=23426569737069656C2065696E6572204
id=7,dest=73756273656374696F6E2E312E322E33,srcline=23426569737069656C2065696E6572204
The log file shows the following error:
! Undefined control sequence. l.22 BKM@entry
{id=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
?
! LaTeX Error: Missing begin{document}.
See the LaTeX manual or LaTeX Companion for explanation. Type H
for immediate help. ...
l.22 BKM@entry{i
d=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
? ! Undefined control sequence. l.23 BKM@entry
{id=2,dest={73656374696F6E2E312E31},srcline={23}}{5C333334626...
I already contacted the author of the iodhbwm class. But he was not able to reproduce this error. Because of this he couldn't help me.
Now I think that it must be something else. I compile this code. It is an example from the documentation of iodhbwm.
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
I am using MikTex 2.9.6941 on Windows 7 and I reinstalled MikTex two times.
Realy interessting is, that this lines disappear if I include hyperref. But normaly the class is doing this by it self.
Do somebody know why there are this lines?
Is somebody else able to reproduce this errors?
hyperref
add a comment |
I want to create a document with the iodhbwm class. If I compile it the first time it works fine. But if I compile it a seccond time this lines apear at the begin of the document:
id=1,dest=636861707465722E31,srcline=235C3333346265727363687269667420617566204562656E6
id=2,dest=73656374696F6E2E312E31,srcline=235C3333346265727363687269667420617566204562
id=3,dest=73756273656374696F6E2E312E312E31,srcline=235C333334626572736368726966742061
id=4,dest=73656374696F6E2E312E32,srcline=234C697374656E
id=5,dest=73756273656374696F6
id=6,dest=73756273656374696F6E2E312E322E32,srcline=23426569737069656C2065696E6572204
id=7,dest=73756273656374696F6E2E312E322E33,srcline=23426569737069656C2065696E6572204
The log file shows the following error:
! Undefined control sequence. l.22 BKM@entry
{id=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
?
! LaTeX Error: Missing begin{document}.
See the LaTeX manual or LaTeX Companion for explanation. Type H
for immediate help. ...
l.22 BKM@entry{i
d=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
? ! Undefined control sequence. l.23 BKM@entry
{id=2,dest={73656374696F6E2E312E31},srcline={23}}{5C333334626...
I already contacted the author of the iodhbwm class. But he was not able to reproduce this error. Because of this he couldn't help me.
Now I think that it must be something else. I compile this code. It is an example from the documentation of iodhbwm.
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
I am using MikTex 2.9.6941 on Windows 7 and I reinstalled MikTex two times.
Realy interessting is, that this lines disappear if I include hyperref. But normaly the class is doing this by it self.
Do somebody know why there are this lines?
Is somebody else able to reproduce this errors?
hyperref
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago
add a comment |
I want to create a document with the iodhbwm class. If I compile it the first time it works fine. But if I compile it a seccond time this lines apear at the begin of the document:
id=1,dest=636861707465722E31,srcline=235C3333346265727363687269667420617566204562656E6
id=2,dest=73656374696F6E2E312E31,srcline=235C3333346265727363687269667420617566204562
id=3,dest=73756273656374696F6E2E312E312E31,srcline=235C333334626572736368726966742061
id=4,dest=73656374696F6E2E312E32,srcline=234C697374656E
id=5,dest=73756273656374696F6
id=6,dest=73756273656374696F6E2E312E322E32,srcline=23426569737069656C2065696E6572204
id=7,dest=73756273656374696F6E2E312E322E33,srcline=23426569737069656C2065696E6572204
The log file shows the following error:
! Undefined control sequence. l.22 BKM@entry
{id=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
?
! LaTeX Error: Missing begin{document}.
See the LaTeX manual or LaTeX Companion for explanation. Type H
for immediate help. ...
l.22 BKM@entry{i
d=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
? ! Undefined control sequence. l.23 BKM@entry
{id=2,dest={73656374696F6E2E312E31},srcline={23}}{5C333334626...
I already contacted the author of the iodhbwm class. But he was not able to reproduce this error. Because of this he couldn't help me.
Now I think that it must be something else. I compile this code. It is an example from the documentation of iodhbwm.
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
I am using MikTex 2.9.6941 on Windows 7 and I reinstalled MikTex two times.
Realy interessting is, that this lines disappear if I include hyperref. But normaly the class is doing this by it self.
Do somebody know why there are this lines?
Is somebody else able to reproduce this errors?
hyperref
I want to create a document with the iodhbwm class. If I compile it the first time it works fine. But if I compile it a seccond time this lines apear at the begin of the document:
id=1,dest=636861707465722E31,srcline=235C3333346265727363687269667420617566204562656E6
id=2,dest=73656374696F6E2E312E31,srcline=235C3333346265727363687269667420617566204562
id=3,dest=73756273656374696F6E2E312E312E31,srcline=235C333334626572736368726966742061
id=4,dest=73656374696F6E2E312E32,srcline=234C697374656E
id=5,dest=73756273656374696F6
id=6,dest=73756273656374696F6E2E312E322E32,srcline=23426569737069656C2065696E6572204
id=7,dest=73756273656374696F6E2E312E322E33,srcline=23426569737069656C2065696E6572204
The log file shows the following error:
! Undefined control sequence. l.22 BKM@entry
{id=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
?
! LaTeX Error: Missing begin{document}.
See the LaTeX manual or LaTeX Companion for explanation. Type H
for immediate help. ...
l.22 BKM@entry{i
d=1,dest={636861707465722E31},srcline={23}}{5C3333346265727...
? ! Undefined control sequence. l.23 BKM@entry
{id=2,dest={73656374696F6E2E312E31},srcline={23}}{5C333334626...
I already contacted the author of the iodhbwm class. But he was not able to reproduce this error. Because of this he couldn't help me.
Now I think that it must be something else. I compile this code. It is an example from the documentation of iodhbwm.
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
I am using MikTex 2.9.6941 on Windows 7 and I reinstalled MikTex two times.
Realy interessting is, that this lines disappear if I include hyperref. But normaly the class is doing this by it self.
Do somebody know why there are this lines?
Is somebody else able to reproduce this errors?
hyperref
hyperref
asked 19 hours ago
AhrtalerAhrtaler
975
975
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago
add a comment |
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago
add a comment |
3 Answers
3
active
oldest
votes
The problem is that the KOMA-classes now load bookmark if hyperref is detected. It is doing it in a AfterAtEndOfPackage
command. The iodhbwm
class loads hyperref in AtEndPreamble
, so bookmark is loaded then too and this is too late for it: bookmark can't write to the aux-file the needed line
providecommandBKM@entry[2]{}
An simple document to reproduce the problem:
documentclass{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Probably the only work-around is to prevent that bookmark is loaded:
documentclass[bookmarkpackage=false]{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Edit
A simple work-around is to load auxhook earlier:
documentclass{scrreprt}
usepackage{etoolbox,auxhook}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
I think I know what you mean. But wouldn't it help if I writedocumentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I loadbookmark
by default too?
– faltfe
16 hours ago
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading ofbookmark
it to late. The problem is, that loadingauxhook
(indirect viahyperref
) viaAtEndPreamble
does break this package and theAddLineBeginMainAux
code is never written toaux
file—not only the lines added frombookmarks
but all lines, e.g. the initialprovidecommandhyper@newdestlabel[2]{}
ofhyperref
.auxhook
is prepared to be loaded viaAtBeginDocument
but not viaAtEndPreamble
. So package authors should avoid this!
– Schweinebacke
10 hours ago
add a comment |
Thanks to answer from Ulrike the problem is a change within KOMAScript.
At the moment there is no support to pass a key value option which does not belong to the iodhbwm
class itself.
There are to possibilities to fix this issue for now. The first one is loading bookmark
in the preamble itself.
documentclass[...]{iodhbwm}
usepackage{bookmark}
The second option is to use an internal command which is used to pass options to the base class.
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
A complete example would look like
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
But please don't abuse the internal command.
1
Another possibility is to write yourself early enoughprovidecommandBKM@entry[2]{}
to the aux-file.
– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
add a comment |
The main problem is not KOMA-Script. bookmark
uses package auxhook
to write the definition of a command into the aux
-file. AddLineBeginMainAux
of auxhook
has two different modes of working:
- If
@beginmainauxhook
isrelax
, it writes immediately to theaux
-file. - If
@beginmainauxhook
is notrelax
,AddLineBeginMainAux
adds its argument to@beginmainauxhook
.
If the package is loaded via AtBeginDocument
it initializes @beginmainauxhook
with relax
. If not, it initializes it to make itself relax
and tries to patch document
to add the execution of @beginmainauxhook
just after the opening of the main aux
file.
Now, if you load hyperref
via AtEndPreamble
, hyperref
loads auxhook
and auxhook
cannot recognize, that patching of document
is to late. Because of this @beginmainauxhook
is never executed.
So the bug is, to load hyperref
via AtEndPreamble
without loading auxhook
before begin{document}
and without explicite executing @beginmainauxhook
. If you have a look into the aux
-file you will find in this case also, that the line
providecommandhyper@newdestlabel[2]{}
that hyperref
usually writes into the aux
-file (immediately after the initial relax
) is missing. This is because of not executing @beginmainauxhook
.
So I would say, this is a bug in iodhbwm
and it should be changed to load auxhook
earlier. As a workaround you can load auxhook
in the document preamble. Both would also bring back the line
providecommandhyper@newdestlabel[2]{}
into the aux
-file.
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%2f470525%2fstrange-lines-in-front-of-the-document%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is that the KOMA-classes now load bookmark if hyperref is detected. It is doing it in a AfterAtEndOfPackage
command. The iodhbwm
class loads hyperref in AtEndPreamble
, so bookmark is loaded then too and this is too late for it: bookmark can't write to the aux-file the needed line
providecommandBKM@entry[2]{}
An simple document to reproduce the problem:
documentclass{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Probably the only work-around is to prevent that bookmark is loaded:
documentclass[bookmarkpackage=false]{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Edit
A simple work-around is to load auxhook earlier:
documentclass{scrreprt}
usepackage{etoolbox,auxhook}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
I think I know what you mean. But wouldn't it help if I writedocumentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I loadbookmark
by default too?
– faltfe
16 hours ago
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading ofbookmark
it to late. The problem is, that loadingauxhook
(indirect viahyperref
) viaAtEndPreamble
does break this package and theAddLineBeginMainAux
code is never written toaux
file—not only the lines added frombookmarks
but all lines, e.g. the initialprovidecommandhyper@newdestlabel[2]{}
ofhyperref
.auxhook
is prepared to be loaded viaAtBeginDocument
but not viaAtEndPreamble
. So package authors should avoid this!
– Schweinebacke
10 hours ago
add a comment |
The problem is that the KOMA-classes now load bookmark if hyperref is detected. It is doing it in a AfterAtEndOfPackage
command. The iodhbwm
class loads hyperref in AtEndPreamble
, so bookmark is loaded then too and this is too late for it: bookmark can't write to the aux-file the needed line
providecommandBKM@entry[2]{}
An simple document to reproduce the problem:
documentclass{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Probably the only work-around is to prevent that bookmark is loaded:
documentclass[bookmarkpackage=false]{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Edit
A simple work-around is to load auxhook earlier:
documentclass{scrreprt}
usepackage{etoolbox,auxhook}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
I think I know what you mean. But wouldn't it help if I writedocumentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I loadbookmark
by default too?
– faltfe
16 hours ago
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading ofbookmark
it to late. The problem is, that loadingauxhook
(indirect viahyperref
) viaAtEndPreamble
does break this package and theAddLineBeginMainAux
code is never written toaux
file—not only the lines added frombookmarks
but all lines, e.g. the initialprovidecommandhyper@newdestlabel[2]{}
ofhyperref
.auxhook
is prepared to be loaded viaAtBeginDocument
but not viaAtEndPreamble
. So package authors should avoid this!
– Schweinebacke
10 hours ago
add a comment |
The problem is that the KOMA-classes now load bookmark if hyperref is detected. It is doing it in a AfterAtEndOfPackage
command. The iodhbwm
class loads hyperref in AtEndPreamble
, so bookmark is loaded then too and this is too late for it: bookmark can't write to the aux-file the needed line
providecommandBKM@entry[2]{}
An simple document to reproduce the problem:
documentclass{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Probably the only work-around is to prevent that bookmark is loaded:
documentclass[bookmarkpackage=false]{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Edit
A simple work-around is to load auxhook earlier:
documentclass{scrreprt}
usepackage{etoolbox,auxhook}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
The problem is that the KOMA-classes now load bookmark if hyperref is detected. It is doing it in a AfterAtEndOfPackage
command. The iodhbwm
class loads hyperref in AtEndPreamble
, so bookmark is loaded then too and this is too late for it: bookmark can't write to the aux-file the needed line
providecommandBKM@entry[2]{}
An simple document to reproduce the problem:
documentclass{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Probably the only work-around is to prevent that bookmark is loaded:
documentclass[bookmarkpackage=false]{scrreprt}
usepackage{etoolbox}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
Edit
A simple work-around is to load auxhook earlier:
documentclass{scrreprt}
usepackage{etoolbox,auxhook}
AtEndPreamble{
usepackage{hyperref}
}
begin{document}
chapter{abc}
end{document}
edited 11 hours ago
answered 16 hours ago
Ulrike FischerUlrike Fischer
188k7294673
188k7294673
I think I know what you mean. But wouldn't it help if I writedocumentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I loadbookmark
by default too?
– faltfe
16 hours ago
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading ofbookmark
it to late. The problem is, that loadingauxhook
(indirect viahyperref
) viaAtEndPreamble
does break this package and theAddLineBeginMainAux
code is never written toaux
file—not only the lines added frombookmarks
but all lines, e.g. the initialprovidecommandhyper@newdestlabel[2]{}
ofhyperref
.auxhook
is prepared to be loaded viaAtBeginDocument
but not viaAtEndPreamble
. So package authors should avoid this!
– Schweinebacke
10 hours ago
add a comment |
I think I know what you mean. But wouldn't it help if I writedocumentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I loadbookmark
by default too?
– faltfe
16 hours ago
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading ofbookmark
it to late. The problem is, that loadingauxhook
(indirect viahyperref
) viaAtEndPreamble
does break this package and theAddLineBeginMainAux
code is never written toaux
file—not only the lines added frombookmarks
but all lines, e.g. the initialprovidecommandhyper@newdestlabel[2]{}
ofhyperref
.auxhook
is prepared to be loaded viaAtBeginDocument
but not viaAtEndPreamble
. So package authors should avoid this!
– Schweinebacke
10 hours ago
I think I know what you mean. But wouldn't it help if I write
documentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
I think I know what you mean. But wouldn't it help if I write
documentclass[bookmarkpackage=false, load-dhbw-templates, auto-intro-pages = default, add-tocs-to-toc, debug, language = ngerman]{iodhbwm}
– Ahrtaler
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I load
bookmark
by default too?– faltfe
16 hours ago
Well, thanks for your example. I'll try your solution soon. Would there be any issue if I load
bookmark
by default too?– faltfe
16 hours ago
1
1
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
bookmark loads hyperref. If you load it in the preamble it could be too early - at least the language will perhaps not correctly be passed by the class - this could affect autoref.
– Ulrike Fischer
16 hours ago
@Ulrike The problem is not, that loading of
bookmark
it to late. The problem is, that loading auxhook
(indirect via hyperref
) via AtEndPreamble
does break this package and the AddLineBeginMainAux
code is never written to aux
file—not only the lines added from bookmarks
but all lines, e.g. the initial providecommandhyper@newdestlabel[2]{}
of hyperref
. auxhook
is prepared to be loaded via AtBeginDocument
but not via AtEndPreamble
. So package authors should avoid this!– Schweinebacke
10 hours ago
@Ulrike The problem is not, that loading of
bookmark
it to late. The problem is, that loading auxhook
(indirect via hyperref
) via AtEndPreamble
does break this package and the AddLineBeginMainAux
code is never written to aux
file—not only the lines added from bookmarks
but all lines, e.g. the initial providecommandhyper@newdestlabel[2]{}
of hyperref
. auxhook
is prepared to be loaded via AtBeginDocument
but not via AtEndPreamble
. So package authors should avoid this!– Schweinebacke
10 hours ago
add a comment |
Thanks to answer from Ulrike the problem is a change within KOMAScript.
At the moment there is no support to pass a key value option which does not belong to the iodhbwm
class itself.
There are to possibilities to fix this issue for now. The first one is loading bookmark
in the preamble itself.
documentclass[...]{iodhbwm}
usepackage{bookmark}
The second option is to use an internal command which is used to pass options to the base class.
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
A complete example would look like
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
But please don't abuse the internal command.
1
Another possibility is to write yourself early enoughprovidecommandBKM@entry[2]{}
to the aux-file.
– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
add a comment |
Thanks to answer from Ulrike the problem is a change within KOMAScript.
At the moment there is no support to pass a key value option which does not belong to the iodhbwm
class itself.
There are to possibilities to fix this issue for now. The first one is loading bookmark
in the preamble itself.
documentclass[...]{iodhbwm}
usepackage{bookmark}
The second option is to use an internal command which is used to pass options to the base class.
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
A complete example would look like
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
But please don't abuse the internal command.
1
Another possibility is to write yourself early enoughprovidecommandBKM@entry[2]{}
to the aux-file.
– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
add a comment |
Thanks to answer from Ulrike the problem is a change within KOMAScript.
At the moment there is no support to pass a key value option which does not belong to the iodhbwm
class itself.
There are to possibilities to fix this issue for now. The first one is loading bookmark
in the preamble itself.
documentclass[...]{iodhbwm}
usepackage{bookmark}
The second option is to use an internal command which is used to pass options to the base class.
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
A complete example would look like
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
But please don't abuse the internal command.
Thanks to answer from Ulrike the problem is a change within KOMAScript.
At the moment there is no support to pass a key value option which does not belong to the iodhbwm
class itself.
There are to possibilities to fix this issue for now. The first one is loading bookmark
in the preamble itself.
documentclass[...]{iodhbwm}
usepackage{bookmark}
The second option is to use an internal command which is used to pass options to the base class.
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
A complete example would look like
makeatletter
newcommand{iodhbwm@cls@baseclass@options}{bookmarkpackage=false}
makeatother
documentclass[
load-dhbw-templates,
auto-intro-pages = default,
add-tocs-to-toc,
debug,
language = ngerman
]{iodhbwm}
usepackage[T1]{fontenc}
dhbwsetup{%
author = my name,
thesis type = SA,
thesis title = Verwendung von iodhbwm,
student id = 12345,
institute = Masterfind Factory faltfe,
course/id = Txxxx,
supervisor = Pikachu und Enton,
processing period = {01.01.17 -- 31.01.17},
location = Dreamtown
}
begin{document}
Blinddocument
end{document}
But please don't abuse the internal command.
edited 15 hours ago
answered 15 hours ago
faltfefaltfe
32918
32918
1
Another possibility is to write yourself early enoughprovidecommandBKM@entry[2]{}
to the aux-file.
– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
add a comment |
1
Another possibility is to write yourself early enoughprovidecommandBKM@entry[2]{}
to the aux-file.
– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
1
1
Another possibility is to write yourself early enough
providecommandBKM@entry[2]{}
to the aux-file.– Ulrike Fischer
15 hours ago
Another possibility is to write yourself early enough
providecommandBKM@entry[2]{}
to the aux-file.– Ulrike Fischer
15 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
KOMA will implement a work-around.
– Ulrike Fischer
11 hours ago
add a comment |
The main problem is not KOMA-Script. bookmark
uses package auxhook
to write the definition of a command into the aux
-file. AddLineBeginMainAux
of auxhook
has two different modes of working:
- If
@beginmainauxhook
isrelax
, it writes immediately to theaux
-file. - If
@beginmainauxhook
is notrelax
,AddLineBeginMainAux
adds its argument to@beginmainauxhook
.
If the package is loaded via AtBeginDocument
it initializes @beginmainauxhook
with relax
. If not, it initializes it to make itself relax
and tries to patch document
to add the execution of @beginmainauxhook
just after the opening of the main aux
file.
Now, if you load hyperref
via AtEndPreamble
, hyperref
loads auxhook
and auxhook
cannot recognize, that patching of document
is to late. Because of this @beginmainauxhook
is never executed.
So the bug is, to load hyperref
via AtEndPreamble
without loading auxhook
before begin{document}
and without explicite executing @beginmainauxhook
. If you have a look into the aux
-file you will find in this case also, that the line
providecommandhyper@newdestlabel[2]{}
that hyperref
usually writes into the aux
-file (immediately after the initial relax
) is missing. This is because of not executing @beginmainauxhook
.
So I would say, this is a bug in iodhbwm
and it should be changed to load auxhook
earlier. As a workaround you can load auxhook
in the document preamble. Both would also bring back the line
providecommandhyper@newdestlabel[2]{}
into the aux
-file.
add a comment |
The main problem is not KOMA-Script. bookmark
uses package auxhook
to write the definition of a command into the aux
-file. AddLineBeginMainAux
of auxhook
has two different modes of working:
- If
@beginmainauxhook
isrelax
, it writes immediately to theaux
-file. - If
@beginmainauxhook
is notrelax
,AddLineBeginMainAux
adds its argument to@beginmainauxhook
.
If the package is loaded via AtBeginDocument
it initializes @beginmainauxhook
with relax
. If not, it initializes it to make itself relax
and tries to patch document
to add the execution of @beginmainauxhook
just after the opening of the main aux
file.
Now, if you load hyperref
via AtEndPreamble
, hyperref
loads auxhook
and auxhook
cannot recognize, that patching of document
is to late. Because of this @beginmainauxhook
is never executed.
So the bug is, to load hyperref
via AtEndPreamble
without loading auxhook
before begin{document}
and without explicite executing @beginmainauxhook
. If you have a look into the aux
-file you will find in this case also, that the line
providecommandhyper@newdestlabel[2]{}
that hyperref
usually writes into the aux
-file (immediately after the initial relax
) is missing. This is because of not executing @beginmainauxhook
.
So I would say, this is a bug in iodhbwm
and it should be changed to load auxhook
earlier. As a workaround you can load auxhook
in the document preamble. Both would also bring back the line
providecommandhyper@newdestlabel[2]{}
into the aux
-file.
add a comment |
The main problem is not KOMA-Script. bookmark
uses package auxhook
to write the definition of a command into the aux
-file. AddLineBeginMainAux
of auxhook
has two different modes of working:
- If
@beginmainauxhook
isrelax
, it writes immediately to theaux
-file. - If
@beginmainauxhook
is notrelax
,AddLineBeginMainAux
adds its argument to@beginmainauxhook
.
If the package is loaded via AtBeginDocument
it initializes @beginmainauxhook
with relax
. If not, it initializes it to make itself relax
and tries to patch document
to add the execution of @beginmainauxhook
just after the opening of the main aux
file.
Now, if you load hyperref
via AtEndPreamble
, hyperref
loads auxhook
and auxhook
cannot recognize, that patching of document
is to late. Because of this @beginmainauxhook
is never executed.
So the bug is, to load hyperref
via AtEndPreamble
without loading auxhook
before begin{document}
and without explicite executing @beginmainauxhook
. If you have a look into the aux
-file you will find in this case also, that the line
providecommandhyper@newdestlabel[2]{}
that hyperref
usually writes into the aux
-file (immediately after the initial relax
) is missing. This is because of not executing @beginmainauxhook
.
So I would say, this is a bug in iodhbwm
and it should be changed to load auxhook
earlier. As a workaround you can load auxhook
in the document preamble. Both would also bring back the line
providecommandhyper@newdestlabel[2]{}
into the aux
-file.
The main problem is not KOMA-Script. bookmark
uses package auxhook
to write the definition of a command into the aux
-file. AddLineBeginMainAux
of auxhook
has two different modes of working:
- If
@beginmainauxhook
isrelax
, it writes immediately to theaux
-file. - If
@beginmainauxhook
is notrelax
,AddLineBeginMainAux
adds its argument to@beginmainauxhook
.
If the package is loaded via AtBeginDocument
it initializes @beginmainauxhook
with relax
. If not, it initializes it to make itself relax
and tries to patch document
to add the execution of @beginmainauxhook
just after the opening of the main aux
file.
Now, if you load hyperref
via AtEndPreamble
, hyperref
loads auxhook
and auxhook
cannot recognize, that patching of document
is to late. Because of this @beginmainauxhook
is never executed.
So the bug is, to load hyperref
via AtEndPreamble
without loading auxhook
before begin{document}
and without explicite executing @beginmainauxhook
. If you have a look into the aux
-file you will find in this case also, that the line
providecommandhyper@newdestlabel[2]{}
that hyperref
usually writes into the aux
-file (immediately after the initial relax
) is missing. This is because of not executing @beginmainauxhook
.
So I would say, this is a bug in iodhbwm
and it should be changed to load auxhook
earlier. As a workaround you can load auxhook
in the document preamble. Both would also bring back the line
providecommandhyper@newdestlabel[2]{}
into the aux
-file.
answered 10 hours ago
SchweinebackeSchweinebacke
21.3k4474
21.3k4474
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%2f470525%2fstrange-lines-in-front-of-the-document%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
Thanks for asking. Just for further references I'll link this to github.com/faltfe/iodhbwm/issues/40
– faltfe
16 hours ago