PDF bookmarks don't get proper formatting
In my document, I have two chapter titles with em
commands and ---
dashes, which get correctly converted to italics and em-dash in the text. But the PDF bookmarks are not created properly:
em
: if I use syntaxem{text}
, bookmark is created with only text (as expected). If I use{em text}
, this entire string is used as-is in PDF bookmark.
---
: conversion to em-dash never occurs.
How can I get em
and ---
properly in PDF bookmarks? I don't need the bookmark gets styled. Below a code sample and screenshot (in SumatraPDF):
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
chapter[title={{em Chapter} --- a note}]
Some paragraph.
section{{em A year from monday} --- from John Cage}
Some paragraph.
chapter[title={em{Chapter} --- another note}]
Some paragraph.
section{em{Silence} --- from John Cage}
Some paragraph.
stoptext
Screenshot (note bookmarks with ---
and em
appearing):
pdf context bookmarks
New contributor
|
show 1 more comment
In my document, I have two chapter titles with em
commands and ---
dashes, which get correctly converted to italics and em-dash in the text. But the PDF bookmarks are not created properly:
em
: if I use syntaxem{text}
, bookmark is created with only text (as expected). If I use{em text}
, this entire string is used as-is in PDF bookmark.
---
: conversion to em-dash never occurs.
How can I get em
and ---
properly in PDF bookmarks? I don't need the bookmark gets styled. Below a code sample and screenshot (in SumatraPDF):
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
chapter[title={{em Chapter} --- a note}]
Some paragraph.
section{{em A year from monday} --- from John Cage}
Some paragraph.
chapter[title={em{Chapter} --- another note}]
Some paragraph.
section{em{Silence} --- from John Cage}
Some paragraph.
stoptext
Screenshot (note bookmarks with ---
and em
appearing):
pdf context bookmarks
New contributor
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, usetexorpdfstring{LaTeX document text}{PDF bookmarks text}
from thehyperref
package.
– siracusa
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format useshyperref
at all, but you're right about the possible issues with markup inbookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly
– Christian Hupfer
2 days ago
It is either{em ...}
oremph{...}
. In the second chapter you are usingem{...}
which will have the wrong behaviour.
– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those{em ... }
parts. Sorry, I'll clarify the question.
– José de Mattos Neto
2 days ago
|
show 1 more comment
In my document, I have two chapter titles with em
commands and ---
dashes, which get correctly converted to italics and em-dash in the text. But the PDF bookmarks are not created properly:
em
: if I use syntaxem{text}
, bookmark is created with only text (as expected). If I use{em text}
, this entire string is used as-is in PDF bookmark.
---
: conversion to em-dash never occurs.
How can I get em
and ---
properly in PDF bookmarks? I don't need the bookmark gets styled. Below a code sample and screenshot (in SumatraPDF):
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
chapter[title={{em Chapter} --- a note}]
Some paragraph.
section{{em A year from monday} --- from John Cage}
Some paragraph.
chapter[title={em{Chapter} --- another note}]
Some paragraph.
section{em{Silence} --- from John Cage}
Some paragraph.
stoptext
Screenshot (note bookmarks with ---
and em
appearing):
pdf context bookmarks
New contributor
In my document, I have two chapter titles with em
commands and ---
dashes, which get correctly converted to italics and em-dash in the text. But the PDF bookmarks are not created properly:
em
: if I use syntaxem{text}
, bookmark is created with only text (as expected). If I use{em text}
, this entire string is used as-is in PDF bookmark.
---
: conversion to em-dash never occurs.
How can I get em
and ---
properly in PDF bookmarks? I don't need the bookmark gets styled. Below a code sample and screenshot (in SumatraPDF):
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
chapter[title={{em Chapter} --- a note}]
Some paragraph.
section{{em A year from monday} --- from John Cage}
Some paragraph.
chapter[title={em{Chapter} --- another note}]
Some paragraph.
section{em{Silence} --- from John Cage}
Some paragraph.
stoptext
Screenshot (note bookmarks with ---
and em
appearing):
pdf context bookmarks
pdf context bookmarks
New contributor
New contributor
edited 2 days ago
New contributor
asked 2 days ago
José de Mattos Neto
677
677
New contributor
New contributor
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, usetexorpdfstring{LaTeX document text}{PDF bookmarks text}
from thehyperref
package.
– siracusa
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format useshyperref
at all, but you're right about the possible issues with markup inbookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly
– Christian Hupfer
2 days ago
It is either{em ...}
oremph{...}
. In the second chapter you are usingem{...}
which will have the wrong behaviour.
– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those{em ... }
parts. Sorry, I'll clarify the question.
– José de Mattos Neto
2 days ago
|
show 1 more comment
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, usetexorpdfstring{LaTeX document text}{PDF bookmarks text}
from thehyperref
package.
– siracusa
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format useshyperref
at all, but you're right about the possible issues with markup inbookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly
– Christian Hupfer
2 days ago
It is either{em ...}
oremph{...}
. In the second chapter you are usingem{...}
which will have the wrong behaviour.
– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those{em ... }
parts. Sorry, I'll clarify the question.
– José de Mattos Neto
2 days ago
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, use
texorpdfstring{LaTeX document text}{PDF bookmarks text}
from the hyperref
package.– siracusa
2 days ago
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, use
texorpdfstring{LaTeX document text}{PDF bookmarks text}
from the hyperref
package.– siracusa
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format uses
hyperref
at all, but you're right about the possible issues with markup in bookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly– Christian Hupfer
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format uses
hyperref
at all, but you're right about the possible issues with markup in bookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly– Christian Hupfer
2 days ago
It is either
{em ...}
or emph{...}
. In the second chapter you are using em{...}
which will have the wrong behaviour.– Henri Menke
2 days ago
It is either
{em ...}
or emph{...}
. In the second chapter you are using em{...}
which will have the wrong behaviour.– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those
{em ... }
parts. Sorry, I'll clarify the question.– José de Mattos Neto
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those
{em ... }
parts. Sorry, I'll clarify the question.– José de Mattos Neto
2 days ago
|
show 1 more comment
1 Answer
1
active
oldest
votes
To expand all macros in the bookmarks, you have to add
enabledirectives[references.bookmarks.preroll]
in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of ---
either use the Unicode character —
(U+2014 EM DASH) directly or the corresponding control sequence emdash
.
Also, when you use tagging, I think you have to use the start...stop
pairs for chapter, section, etc. At least pdfinfo
shows me wrong nesting if I don't use start...stop
.
enabledirectives[references.bookmarks.preroll]
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
startchapter[title={{em Chapter} — a note}]
Some paragraph.
startsection[title={{em A year from monday} — from John Cage}]
Some paragraph.
stopsection
stopchapter
startchapter[title={emph{Chapter} emdash another note}]
Some paragraph.
startsection[title={emph{Silence} emdash from John Cage}]
Some paragraph.
stopsection
stopchapter
stoptext
$ pdfinfo -struct-text test.pdf
Div
Sect "chapter"
Div
H (block)
"1"
H (block)
"Chapter— a note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"1.1"
H (block)
"A year from monday— from John Cage"
Div
"Some paragraph."
Sect "chapter"
Div
H (block)
"2"
H (block)
"Chapter— another note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"2.1"
H (block)
"Silence— from John Cage"
Div
"Some paragraph."
It works after usingenabledirectives
! If I'm not wrong,---
is not a font ligature, but a TeX ligature (enabled viatlig
), so I thought it was a macro internally. Anyway, justem
is corrected;---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!
– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
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
});
}
});
José de Mattos Neto is a new contributor. Be nice, and check out our Code of Conduct.
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%2f467474%2fpdf-bookmarks-dont-get-proper-formatting%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
To expand all macros in the bookmarks, you have to add
enabledirectives[references.bookmarks.preroll]
in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of ---
either use the Unicode character —
(U+2014 EM DASH) directly or the corresponding control sequence emdash
.
Also, when you use tagging, I think you have to use the start...stop
pairs for chapter, section, etc. At least pdfinfo
shows me wrong nesting if I don't use start...stop
.
enabledirectives[references.bookmarks.preroll]
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
startchapter[title={{em Chapter} — a note}]
Some paragraph.
startsection[title={{em A year from monday} — from John Cage}]
Some paragraph.
stopsection
stopchapter
startchapter[title={emph{Chapter} emdash another note}]
Some paragraph.
startsection[title={emph{Silence} emdash from John Cage}]
Some paragraph.
stopsection
stopchapter
stoptext
$ pdfinfo -struct-text test.pdf
Div
Sect "chapter"
Div
H (block)
"1"
H (block)
"Chapter— a note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"1.1"
H (block)
"A year from monday— from John Cage"
Div
"Some paragraph."
Sect "chapter"
Div
H (block)
"2"
H (block)
"Chapter— another note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"2.1"
H (block)
"Silence— from John Cage"
Div
"Some paragraph."
It works after usingenabledirectives
! If I'm not wrong,---
is not a font ligature, but a TeX ligature (enabled viatlig
), so I thought it was a macro internally. Anyway, justem
is corrected;---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!
– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
add a comment |
To expand all macros in the bookmarks, you have to add
enabledirectives[references.bookmarks.preroll]
in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of ---
either use the Unicode character —
(U+2014 EM DASH) directly or the corresponding control sequence emdash
.
Also, when you use tagging, I think you have to use the start...stop
pairs for chapter, section, etc. At least pdfinfo
shows me wrong nesting if I don't use start...stop
.
enabledirectives[references.bookmarks.preroll]
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
startchapter[title={{em Chapter} — a note}]
Some paragraph.
startsection[title={{em A year from monday} — from John Cage}]
Some paragraph.
stopsection
stopchapter
startchapter[title={emph{Chapter} emdash another note}]
Some paragraph.
startsection[title={emph{Silence} emdash from John Cage}]
Some paragraph.
stopsection
stopchapter
stoptext
$ pdfinfo -struct-text test.pdf
Div
Sect "chapter"
Div
H (block)
"1"
H (block)
"Chapter— a note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"1.1"
H (block)
"A year from monday— from John Cage"
Div
"Some paragraph."
Sect "chapter"
Div
H (block)
"2"
H (block)
"Chapter— another note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"2.1"
H (block)
"Silence— from John Cage"
Div
"Some paragraph."
It works after usingenabledirectives
! If I'm not wrong,---
is not a font ligature, but a TeX ligature (enabled viatlig
), so I thought it was a macro internally. Anyway, justem
is corrected;---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!
– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
add a comment |
To expand all macros in the bookmarks, you have to add
enabledirectives[references.bookmarks.preroll]
in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of ---
either use the Unicode character —
(U+2014 EM DASH) directly or the corresponding control sequence emdash
.
Also, when you use tagging, I think you have to use the start...stop
pairs for chapter, section, etc. At least pdfinfo
shows me wrong nesting if I don't use start...stop
.
enabledirectives[references.bookmarks.preroll]
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
startchapter[title={{em Chapter} — a note}]
Some paragraph.
startsection[title={{em A year from monday} — from John Cage}]
Some paragraph.
stopsection
stopchapter
startchapter[title={emph{Chapter} emdash another note}]
Some paragraph.
startsection[title={emph{Silence} emdash from John Cage}]
Some paragraph.
stopsection
stopchapter
stoptext
$ pdfinfo -struct-text test.pdf
Div
Sect "chapter"
Div
H (block)
"1"
H (block)
"Chapter— a note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"1.1"
H (block)
"A year from monday— from John Cage"
Div
"Some paragraph."
Sect "chapter"
Div
H (block)
"2"
H (block)
"Chapter— another note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"2.1"
H (block)
"Silence— from John Cage"
Div
"Some paragraph."
To expand all macros in the bookmarks, you have to add
enabledirectives[references.bookmarks.preroll]
in your document. I don't think you can apply ligatures in the bookmarks, because ligatures are part of the font. What you can do is, instead of ---
either use the Unicode character —
(U+2014 EM DASH) directly or the corresponding control sequence emdash
.
Also, when you use tagging, I think you have to use the start...stop
pairs for chapter, section, etc. At least pdfinfo
shows me wrong nesting if I don't use start...stop
.
enabledirectives[references.bookmarks.preroll]
setupinteraction[state=start]
placebookmarks[chapter, section][chapter, section]
setupinteractionscreen[option=bookmark]
setuptagging[state=start]
starttext
startchapter[title={{em Chapter} — a note}]
Some paragraph.
startsection[title={{em A year from monday} — from John Cage}]
Some paragraph.
stopsection
stopchapter
startchapter[title={emph{Chapter} emdash another note}]
Some paragraph.
startsection[title={emph{Silence} emdash from John Cage}]
Some paragraph.
stopsection
stopchapter
stoptext
$ pdfinfo -struct-text test.pdf
Div
Sect "chapter"
Div
H (block)
"1"
H (block)
"Chapter— a note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"1.1"
H (block)
"A year from monday— from John Cage"
Div
"Some paragraph."
Sect "chapter"
Div
H (block)
"2"
H (block)
"Chapter— another note"
Div
"Some paragraph."
Sect "section"
Div
H (block)
"2.1"
H (block)
"Silence— from John Cage"
Div
"Some paragraph."
edited 2 days ago
answered 2 days ago
Henri Menke
69.8k8155260
69.8k8155260
It works after usingenabledirectives
! If I'm not wrong,---
is not a font ligature, but a TeX ligature (enabled viatlig
), so I thought it was a macro internally. Anyway, justem
is corrected;---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!
– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
add a comment |
It works after usingenabledirectives
! If I'm not wrong,---
is not a font ligature, but a TeX ligature (enabled viatlig
), so I thought it was a macro internally. Anyway, justem
is corrected;---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!
– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
It works after using
enabledirectives
! If I'm not wrong, ---
is not a font ligature, but a TeX ligature (enabled via tlig
), so I thought it was a macro internally. Anyway, just em
is corrected; ---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!– José de Mattos Neto
2 days ago
It works after using
enabledirectives
! If I'm not wrong, ---
is not a font ligature, but a TeX ligature (enabled via tlig
), so I thought it was a macro internally. Anyway, just em
is corrected; ---
still shows as three hyphens. But at least I can use the symbol directly, as you explained. Thank you!– José de Mattos Neto
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
@JosédeMattosNeto A ligature is a ligature and will only be applied when a font is rendered which will never take place for a bookmark.
– Henri Menke
2 days ago
add a comment |
José de Mattos Neto is a new contributor. Be nice, and check out our Code of Conduct.
José de Mattos Neto is a new contributor. Be nice, and check out our Code of Conduct.
José de Mattos Neto is a new contributor. Be nice, and check out our Code of Conduct.
José de Mattos Neto is a new contributor. Be nice, and check out our Code of Conduct.
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%2f467474%2fpdf-bookmarks-dont-get-proper-formatting%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
I'm not sure if the PDF format even supports markup in bookmarks, but if you just want to get rid of the LaTeX commands there, use
texorpdfstring{LaTeX document text}{PDF bookmarks text}
from thehyperref
package.– siracusa
2 days ago
@siracusa: I am no ConTeXt user, but I doubt that this format uses
hyperref
at all, but you're right about the possible issues with markup inbookmark
. Only a few styles are possible for bookmark contents, such as bold or color, and it depends on the pdf viewer if this markup is displayed correctly– Christian Hupfer
2 days ago
It is either
{em ...}
oremph{...}
. In the second chapter you are usingem{...}
which will have the wrong behaviour.– Henri Menke
2 days ago
@ChristianHupfer You can choose between two styles, italic and bold, but they apply to the entry as a whole. Also style and color are only available from PDF 1.4 onwards and marked optional, so support is probably limited to Adobe Reader.
– Henri Menke
2 days ago
@ChristianHupfer I didn't want to style the bookmark itself. I just wanted to get a clean bookmark, without those
{em ... }
parts. Sorry, I'll clarify the question.– José de Mattos Neto
2 days ago