2

This the first question about this package.

The aeb-minitoc package used to build a table of contents. here is the link:https://www.ctan.org/tex-archive/macros/latex/contrib/aeb-minitoc

The code written below is an example of a package. but I got a File `aeb-minitoc.sty' not found. \usepackage *** I use Texlive distribution

\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}
5
  • 2
    the package is in miktex but not texlive so if you are using texlive you will need to get it from ctan and generate the .sty file by running tex on the provided .ins file Jan 30, 2021 at 9:35
  • I downloaded the Zip file, then I run the files, but the error is still Jan 30, 2021 at 9:41
  • 2
    You have to put the resulting .sty file in the working directory of your project, or put it somewhere else where TeX finds it.
    – Skillmon
    Jan 30, 2021 at 9:43
  • 1
    well do you have a aeb-minitoc.sty file now and did you put it where tex can find it (eg the same directory as your document) ? Jan 30, 2021 at 9:43
  • 1
    I have no idea what you mean by notebook? you should have downloaded two files aeb-minitoc.ins and aeb-minitoc.dtx if you run pdflatex aeb-minitoc.ins it will generate aeb-minitoc.sty put that file in the same directory as your document.. Jan 30, 2021 at 15:21

1 Answer 1

2

My answer on my question. The above code need to aeb-minitoc.sty file. so I got the aeb-minitoc.sty directly from https://github.com/MEGA65/mega65-user-guide/blob/master/aeb-minitoc.sty

then I put the aeb-minitoc.sty file with the above code file in same folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .