我该怎么做才能使章节的书签变粗?

我该怎么做才能使章节的书签变粗?

我该怎么做才能使章节的书签变粗体?

在此处输入图片描述

\documentclass[11pt,fleqn]{book}

\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry}
\usepackage{blindtext}
\usepackage[portuguese]{babel}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[]{hyperref}

\hypersetup
{
    hidelinks, % Remove red boxes
    bookmarksnumbered=true,
    pdfauthor={Brian Griffin},
    pdftitle={Wish it, Want it, Do it},
    pdfsubject={Self help},
    pdfkeywords={therapy,healing,chicken soup},
    pdfproducer={Penguin Publishing}
}

\renewcommand*{\thechapter}{%
  \texorpdfstring{}{\chaptername\space}\arabic{chapter}%
  \texorpdfstring{}{: }%
}
% Section numbers without prefix or the place for adding a prefix
% "Section".
\renewcommand*{\thesection}{%
  \arabic{chapter}.\arabic{section}%
}

\begin{document}

\tableofcontents

\chapter{Informações}
\blindtext

\section{Conversa informal}

\blindtext

\chapter{Caracterização}
\blindtext

\chapter{Conhecimento criativo}
\blindtext

\end{document}

答案1

答案通过campa 的评论

添加这几行我得到了解决方案:

\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}

结果

\documentclass[11pt,fleqn]{book}

\usepackage[top=3cm,bottom=3cm,left=3cm,right=3cm,headsep=10pt,a4paper]{geometry}
\usepackage{blindtext}
\usepackage[portuguese]{babel}
\usepackage{avant}
\usepackage{mathptmx}
\usepackage{microtype}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}


\usepackage{hyperref}
\hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor= ocre,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{bookmark}

\bookmarksetup{
open,
numbered,
addtohook={%
\ifnum\bookmarkget{level}=0 % chapter
\bookmarksetup{bold}%
\fi
\ifnum\bookmarkget{level}=-1 % part
\bookmarksetup{color=ocre,bold}%
\fi
}
}


\renewcommand*{\thechapter}{%
  \texorpdfstring{}{\chaptername\space}\arabic{chapter}%
  \texorpdfstring{}{: }%
}
% Section numbers without prefix or the place for adding a prefix
% "Section".
\renewcommand*{\thesection}{%
  \arabic{chapter}.\arabic{section}%
}

\begin{document}

\tableofcontents

\chapter{Informações}
\blindtext

\section{Conversa informal}

\blindtext

\chapter{Caracterização}
\blindtext

\chapter{Conhecimento criativo}
\blindtext

\end{document}

在此处输入图片描述

相关内容