Why does a float with the [H] option not appear in as a bookmark
In the image/code below, why does Figure 1.1 does not appear in the bookmarks?All other figures appear as normal, but the figure in Chapter 1 does not appear?
Figure 1.1 is the only figure that uses [H]
. I am required to use this float specification. My code is based on this question: Custom bookmark list of figures and tables
How can I make Figure 1.1 appear in the bookmarks?
documentclass{book}
usepackage{caption}
usepackage{etoolbox}
usepackage{float}
usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
hypersetup{colorlinks,
linkcolor=blue,
linktoc=page}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
pretocmdendfigure{%
addtocontents{lofb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Figure thefigure: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendfigure failed}}
pretocmdendtable{%
addtocontents{lotb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Table thetable: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendtable failed}}
makeatother
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
label{cap:experimental}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
label{label1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1&2\
end{tabular}
caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
label{table 1}
end{table}
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
begin{figure}[ht]
centering
caption{Caption.}
label{label2}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second sectionindex{section} may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
label{figura 1}
end{figure}
word, and expand the ones already usedindex{keywords!used}.
end{document}
table-of-contents floats bookmarks
add a comment |
In the image/code below, why does Figure 1.1 does not appear in the bookmarks?All other figures appear as normal, but the figure in Chapter 1 does not appear?
Figure 1.1 is the only figure that uses [H]
. I am required to use this float specification. My code is based on this question: Custom bookmark list of figures and tables
How can I make Figure 1.1 appear in the bookmarks?
documentclass{book}
usepackage{caption}
usepackage{etoolbox}
usepackage{float}
usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
hypersetup{colorlinks,
linkcolor=blue,
linktoc=page}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
pretocmdendfigure{%
addtocontents{lofb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Figure thefigure: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendfigure failed}}
pretocmdendtable{%
addtocontents{lotb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Table thetable: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendtable failed}}
makeatother
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
label{cap:experimental}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
label{label1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1&2\
end{tabular}
caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
label{table 1}
end{table}
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
begin{figure}[ht]
centering
caption{Caption.}
label{label2}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second sectionindex{section} may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
label{figura 1}
end{figure}
word, and expand the ones already usedindex{keywords!used}.
end{document}
table-of-contents floats bookmarks
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago
add a comment |
In the image/code below, why does Figure 1.1 does not appear in the bookmarks?All other figures appear as normal, but the figure in Chapter 1 does not appear?
Figure 1.1 is the only figure that uses [H]
. I am required to use this float specification. My code is based on this question: Custom bookmark list of figures and tables
How can I make Figure 1.1 appear in the bookmarks?
documentclass{book}
usepackage{caption}
usepackage{etoolbox}
usepackage{float}
usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
hypersetup{colorlinks,
linkcolor=blue,
linktoc=page}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
pretocmdendfigure{%
addtocontents{lofb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Figure thefigure: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendfigure failed}}
pretocmdendtable{%
addtocontents{lotb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Table thetable: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendtable failed}}
makeatother
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
label{cap:experimental}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
label{label1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1&2\
end{tabular}
caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
label{table 1}
end{table}
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
begin{figure}[ht]
centering
caption{Caption.}
label{label2}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second sectionindex{section} may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
label{figura 1}
end{figure}
word, and expand the ones already usedindex{keywords!used}.
end{document}
table-of-contents floats bookmarks
In the image/code below, why does Figure 1.1 does not appear in the bookmarks?All other figures appear as normal, but the figure in Chapter 1 does not appear?
Figure 1.1 is the only figure that uses [H]
. I am required to use this float specification. My code is based on this question: Custom bookmark list of figures and tables
How can I make Figure 1.1 appear in the bookmarks?
documentclass{book}
usepackage{caption}
usepackage{etoolbox}
usepackage{float}
usepackage[pdftex, bookmarksnumbered, pagebackref, colorlinks=true, citecolor=Blue, linkcolor=DarkBlue!30!Black, urlcolor=Black,bookmarksopen]{hyperref}
hypersetup{colorlinks,
linkcolor=blue,
linktoc=page}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
pretocmdendfigure{%
addtocontents{lofb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Figure thefigure: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendfigure failed}}
pretocmdendtable{%
addtocontents{lotb}{%
protect{%
bookmark[
rellevel=1,
keeplevel,
dest=@currentHref,
]{Table thetable: @currentlabelname}}}%
}{}{errmessage{Patching noexpandendtable failed}}
makeatother
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
label{cap:experimental}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
label{label1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywordsindex{keywords} will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1&2\
end{tabular}
caption[Table caption text]{This is a table with a very long caption text
and it would be nice to use the short caption in the bookmark}
label{table 1}
end{table}
subsection{subsection}
Terms like generateindex{generate} and someindex{others}
will also show up. Terms in the index can also be
nested index{Index!nested}
begin{figure}[ht]
centering
caption{Caption.}
label{label2}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second sectionindex{section} may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
label{figura 1}
end{figure}
word, and expand the ones already usedindex{keywords!used}.
end{document}
table-of-contents floats bookmarks
table-of-contents floats bookmarks
edited 15 mins ago
Werner
445k699811686
445k699811686
asked 2 hours ago
x-rwx-rw
51818
51818
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago
add a comment |
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago
add a comment |
1 Answer
1
active
oldest
votes
You can use the following, more condensed version that taps into caption
.
documentclass{book}
usepackage{caption,xparse}
usepackage{float}
usepackage{hyperref}
hypersetup{
colorlinks,
linkcolor=blue,
linktoc=page,
bookmarksopen
}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
% Update caption at start of document to avoid conflict with caption package
AtBeginDocument{
% Store caption in oldcaption
letoldcaptioncaption
% Update caption to take optional and mandatory argument (like before)
RenewDocumentCommand{caption}{o m}{%
IfValueTF{#1}
{oldcaption[#1]{#2}}% caption[.]{..}
{oldcaption{#2}}% caption{..}
% addtocontents{<file>}{<stuff>}
% - @captype contains the name of the float (figure or table)
% - csname ext@@captypeendcsname will contain lof/lot for figures/tables
% - csname fnum@@captypeendcsname contains
% figurename~thefigure for figure, or
% tablename~thetable for table
addtocontents{csname ext@@captypeendcsname b}{%
protectbookmark[
rellevel=1,
keeplevel,
dest=@currentHref
]{csname fnum@@captypeendcsname: @currentlabelname}%
}%
}%
}
makeatletter
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywords will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1 & 2
end{tabular}
caption[Table caption text]
{This is a table with a very long caption text and it would be nice to use the short caption in the bookmark}
end{table}
subsection{subsection}
Terms like generate and some will also show up. Terms in the index can also be nested
begin{figure}[ht]
centering
caption{Caption.}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second section may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
end{figure}
word, and expand the ones already used.
end{document}
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins 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
});
}
});
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%2f476682%2fwhy-does-a-float-with-the-h-option-not-appear-in-as-a-bookmark%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
You can use the following, more condensed version that taps into caption
.
documentclass{book}
usepackage{caption,xparse}
usepackage{float}
usepackage{hyperref}
hypersetup{
colorlinks,
linkcolor=blue,
linktoc=page,
bookmarksopen
}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
% Update caption at start of document to avoid conflict with caption package
AtBeginDocument{
% Store caption in oldcaption
letoldcaptioncaption
% Update caption to take optional and mandatory argument (like before)
RenewDocumentCommand{caption}{o m}{%
IfValueTF{#1}
{oldcaption[#1]{#2}}% caption[.]{..}
{oldcaption{#2}}% caption{..}
% addtocontents{<file>}{<stuff>}
% - @captype contains the name of the float (figure or table)
% - csname ext@@captypeendcsname will contain lof/lot for figures/tables
% - csname fnum@@captypeendcsname contains
% figurename~thefigure for figure, or
% tablename~thetable for table
addtocontents{csname ext@@captypeendcsname b}{%
protectbookmark[
rellevel=1,
keeplevel,
dest=@currentHref
]{csname fnum@@captypeendcsname: @currentlabelname}%
}%
}%
}
makeatletter
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywords will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1 & 2
end{tabular}
caption[Table caption text]
{This is a table with a very long caption text and it would be nice to use the short caption in the bookmark}
end{table}
subsection{subsection}
Terms like generate and some will also show up. Terms in the index can also be nested
begin{figure}[ht]
centering
caption{Caption.}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second section may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
end{figure}
word, and expand the ones already used.
end{document}
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
add a comment |
You can use the following, more condensed version that taps into caption
.
documentclass{book}
usepackage{caption,xparse}
usepackage{float}
usepackage{hyperref}
hypersetup{
colorlinks,
linkcolor=blue,
linktoc=page,
bookmarksopen
}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
% Update caption at start of document to avoid conflict with caption package
AtBeginDocument{
% Store caption in oldcaption
letoldcaptioncaption
% Update caption to take optional and mandatory argument (like before)
RenewDocumentCommand{caption}{o m}{%
IfValueTF{#1}
{oldcaption[#1]{#2}}% caption[.]{..}
{oldcaption{#2}}% caption{..}
% addtocontents{<file>}{<stuff>}
% - @captype contains the name of the float (figure or table)
% - csname ext@@captypeendcsname will contain lof/lot for figures/tables
% - csname fnum@@captypeendcsname contains
% figurename~thefigure for figure, or
% tablename~thetable for table
addtocontents{csname ext@@captypeendcsname b}{%
protectbookmark[
rellevel=1,
keeplevel,
dest=@currentHref
]{csname fnum@@captypeendcsname: @currentlabelname}%
}%
}%
}
makeatletter
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywords will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1 & 2
end{tabular}
caption[Table caption text]
{This is a table with a very long caption text and it would be nice to use the short caption in the bookmark}
end{table}
subsection{subsection}
Terms like generate and some will also show up. Terms in the index can also be nested
begin{figure}[ht]
centering
caption{Caption.}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second section may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
end{figure}
word, and expand the ones already used.
end{document}
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
add a comment |
You can use the following, more condensed version that taps into caption
.
documentclass{book}
usepackage{caption,xparse}
usepackage{float}
usepackage{hyperref}
hypersetup{
colorlinks,
linkcolor=blue,
linktoc=page,
bookmarksopen
}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
% Update caption at start of document to avoid conflict with caption package
AtBeginDocument{
% Store caption in oldcaption
letoldcaptioncaption
% Update caption to take optional and mandatory argument (like before)
RenewDocumentCommand{caption}{o m}{%
IfValueTF{#1}
{oldcaption[#1]{#2}}% caption[.]{..}
{oldcaption{#2}}% caption{..}
% addtocontents{<file>}{<stuff>}
% - @captype contains the name of the float (figure or table)
% - csname ext@@captypeendcsname will contain lof/lot for figures/tables
% - csname fnum@@captypeendcsname contains
% figurename~thefigure for figure, or
% tablename~thetable for table
addtocontents{csname ext@@captypeendcsname b}{%
protectbookmark[
rellevel=1,
keeplevel,
dest=@currentHref
]{csname fnum@@captypeendcsname: @currentlabelname}%
}%
}%
}
makeatletter
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywords will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1 & 2
end{tabular}
caption[Table caption text]
{This is a table with a very long caption text and it would be nice to use the short caption in the bookmark}
end{table}
subsection{subsection}
Terms like generate and some will also show up. Terms in the index can also be nested
begin{figure}[ht]
centering
caption{Caption.}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second section may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
end{figure}
word, and expand the ones already used.
end{document}
You can use the following, more condensed version that taps into caption
.
documentclass{book}
usepackage{caption,xparse}
usepackage{float}
usepackage{hyperref}
hypersetup{
colorlinks,
linkcolor=blue,
linktoc=page,
bookmarksopen
}
usepackage{bookmark}
usepackage{copyrightbox}
usepackage{tcolorbox}
makeatletter
newcommand{listoffiguresbookmarks}{%
pdfbookmark[0]{listfigurename}{listoffiguresbookmark}
bookmarksetup{level=1}
@starttoc{lofb}
}
newcommand{listoftablesbookmarks}{%
pdfbookmark[0]{listtablename}{listoftablesbookmark}
bookmarksetup{level=1}
@starttoc{lotb}
}
makeatother
%%% Generate bookmarks for all figures and tables
makeatletter
% Update caption at start of document to avoid conflict with caption package
AtBeginDocument{
% Store caption in oldcaption
letoldcaptioncaption
% Update caption to take optional and mandatory argument (like before)
RenewDocumentCommand{caption}{o m}{%
IfValueTF{#1}
{oldcaption[#1]{#2}}% caption[.]{..}
{oldcaption{#2}}% caption{..}
% addtocontents{<file>}{<stuff>}
% - @captype contains the name of the float (figure or table)
% - csname ext@@captypeendcsname will contain lof/lot for figures/tables
% - csname fnum@@captypeendcsname contains
% figurename~thefigure for figure, or
% tablename~thetable for table
addtocontents{csname ext@@captypeendcsname b}{%
protectbookmark[
rellevel=1,
keeplevel,
dest=@currentHref
]{csname fnum@@captypeendcsname: @currentlabelname}%
}%
}%
}
makeatletter
AtEndDocument{%
listoffiguresbookmarks
listoftablesbookmarks
}
begin{document}
tableofcontents
chapter*{Dedicatory}
to all my family
chapter*{Abstract}
hello world
chapter{ETAPA}
this intro
section{Exp}
this Exp SECTION
subsection{Descriptión}
description subSection
begin{figure}[H]
centering
caption{F1}
copyrightbox[b]{tcbox{includegraphics[scale=0.9]{example-image-a}}}{source: na.}
end{figure}
this image
chapter{chapter}
hellow
section{Introduction}
In this example several keywords will be
used which are important and deserve to appear in
begin{table}[ht]
begin{tabular}{cc}
Header & Header \
1 & 2
end{tabular}
caption[Table caption text]
{This is a table with a very long caption text and it would be nice to use the short caption in the bookmark}
end{table}
subsection{subsection}
Terms like generate and some will also show up. Terms in the index can also be nested
begin{figure}[ht]
centering
caption{Caption.}
copyrightbox[b]{tcbox{includegraphics[width=3cm]{example-image-a}}}{fuente:fuente1}
end{figure}
clearpage
section{Second section}
This second section may include some special
hello1
begin{figure}[ht]
centering
rule{6cm}{3cm}
caption{Figure caption text}
end{figure}
word, and expand the ones already used.
end{document}
edited 5 mins ago
answered 41 mins ago
WernerWerner
445k699811686
445k699811686
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
add a comment |
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
what is the changes? thanks, Can you explain me a little, what should I increase? What should I delete?
– x-rw
37 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
@x-rw: I've added some reference in the code to the addition.
– Werner
4 mins ago
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%2f476682%2fwhy-does-a-float-with-the-h-option-not-appear-in-as-a-bookmark%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
@Kurt still does not appear, edit my question with your observation
– x-rw
2 hours ago