未找到 aeb-minitoc 包

未找到 aeb-minitoc 包

这是有关这个包的第一个问题。

用于构建目录的 aeb-minitoc 包。这里是链接:https://www.ctan.org/tex-archive/macros/latex/contrib/aeb-minitoc

下面写的代码是一个包的示例。但我得到了一个File `aeb-minitoc.sty' not found. \usepackage ***我使用Texlive发行版

\documentclass{article}
\usepackage{xcolor}
\usepackage[linktocpage,colorlinks,bookmarksnumbered]{hyperref}
\usepackage{booktabs}
\usepackage[!nominitocs]{aeb-minitoc} % try compiling with the nominitocs option
\usepackage{ifthen}

\title{The \textsf{aeb-minitoc} Package\texorpdfstring{\\[1ex]}{: }Demo for article class}
\author{D. P. Story}

\hypersetup{%
  pdftitle={The \textsf{aeb-minitoc} Package\texorpdfstring{\\[1ex]}{: }Demo for article class},
  pdfauthor={D. P. Story},
  pdfkeywords={minitoc,latex,pdf},
  pdfsubject={package to create mini-tocs within a latex document}
}

% Try uncommenting the next line, change subsection to subsection*
% and subsubsection to subsubsection* in the minitocfmt below. What other
% changes are needed to get a good looking mini-toc?
% \setcounter{secnumdepth}{0}

\begin{minitocfmt}{\minitocFmt} %{tctta}
\@A{\FmtTOCEntry}%
\declaretocfmt{subsection}{\vspace{3pt}%
  \@W{1.55em}\@D{0em}
  \ifthenelse{\arabic{page}=\@Pg}
    {\@P{\hyperlink{\@L}{\mbox{\strut--}}\mtocgobble}}
    {}%
}
\declaretocfmt{subsubsection}{%
  \ifthenelse{\mtocref{TST}=\@E}
    {\@F{\color{blue}}}
      {\ifthenelse{\@E<\mtocref{StoNone}}
        {\sffamily}{}}%
  \@W{2.5em}\@D{1.5em}
  \ifthenelse{\arabic{page}=\@Pg}
    {\@P{\hyperlink{\@L}{\mbox{\strut--}}\mtocgobble}}
    {}
}
\end{minitocfmt}

\newcommand{\insMinitoc}[2][]{%
    \begin{center}#2
    \begin{minipage}[c]{0.8\linewidth}
    \ifMiniTocListings
      \insertminitoc[#1]\else
      \fcolorbox{blue}{yellow}{\makebox[\linewidth][c]{\textbf{A mini-toc goes here}}}\fi
    \end{minipage}
    \end{center}
}

\newcommand{\insMinitoctab}[2][]{%
    \begin{center}#2
    \begin{tabular}{c}\toprule
    \begin{minipage}[c]{0.8\linewidth}
    \ifMiniTocListings
      \insertminitoc[#1]\else
      \centering\textbf{A mini-toc goes here}\fi
    \end{minipage}\\ \bottomrule
    \end{tabular}
    \end{center}
}

\begin{document}

\maketitle

\tableofcontents

\newpage

\section{First of Many}

The topic headings of this section are listed below.


\insMinitoc{\minitocFmt}

\noindent
For long section headings to wrap around within the TOC, we need to take the hyperref option
\texttt{linktocpage}, unless \textsf{pdflatex} or \textsf{xelatex} are used.

\subsection{Now is the time for all good men to come to the aid  of their country, so it has been said}

\addtocontents{toc}{\protect\vspace{1em}\hfill
    Vertical Space\hfill\protect\vspace{1em}}

Content

% Here is a non-tricky example of the \miniorfulltoc usage
\subsection[\protect\miniorfulltoc{\protect\textbf}{For all good men}]{For all good men}

Content

\subsubsection{A subsubsection, let's make it a long subsection, shall we}\mtoclabel{TST}

Content

\subsubsection{Another one}

Content



\vfill Page break induced
\newpage

\subsection{To come to the aid}

Content

\subsubsection{A third subsubsection}

Content

\subsubsection{A fourth}

Content

\subsection{Of their country}

Content


\newpage

\section{Second to None}\mtoclabel{StoNone}

\insMinitoctab{\minitocFmt}


Content

\subsection{Peter Piper}

Content

\subsubsection{A subsubsection}

Content

\subsubsection{Another one}

Content

\vfill Page break induced
\newpage


\subsection{Picked a peck}

Content

\subsection{Of pickled peppers}

Content

% Here is the answer to the question posed in the manual. \mtocgobble is a public version of the \@gobble of latex
% These changes do not appear in the table of contents as displayed by \tableofcontents.
\subsubsection[\protect\miniorfulltoc{A \protect\emph{third} sub\protect\textcolor{blue}{sub}section \protect\textcolor{red}{$\Leftarrow$}\protect\mtocgobble}{}]{A third subsubsection}

Content

\subsubsection{A fourth}

Content

\vfill Page break induced
\newpage


\subsection[How many pecks]{How many pecks of pickled peppers}

Content

\subsection{Did Peter Piper pick?}

Content

\end{document}

答案1

我的回答是我的问题。上面的代码需要 aeb-minitoc.sty 文件。所以我aeb-minitoc.sty直接从https://github.com/MEGA65/mega65-user-guide/blob/master/aeb-minitoc.sty

然后我将 aeb-minitoc.sty 文件与上述代码文件放在同一个文件夹中。

相关内容