Document Classes ⇒ Memoir Short List of Figures
Memoir Short List of Figures
I realy like the appearance of the short list of contents, introduced in the memoir manual. What I want is a short list of figures command changing the LoF style similarly. Centered captions followed by page numbers, without these dots.
I was trying to adopt the code of the short toc command, but it didn't work out.
It's beyond my capabilities to write such code.
Has anyone here already done this or knows how to do it?
Thx
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Memoir Short List of Figures
please post a minimal working example showing the aspect of the short table of contents that you want to imitate.
Memoir Short List of Figures
Code: Select all
\documentclass [a4paper,11pt,oneside]{memoir}
\setsecnumdepth{section}
\setcounter{tocdepth}{3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Short and long ToC
\makeatletter
\newcommand*{\setupshorttoc}{%
\renewcommand*{\contentsname}{Short contents}
\let\oldchangetocdepth\changetocdepth
\let\oldprecistoctext\precistoctext
\renewcommand{\precistoctext}[1]{}
\let\oldcftchapterfillnum\cftchapterfillnum
\renewcommand*{\changetocdepth}[1]{}
\setcounter{tocdepth}{0}% chapters
\renewcommand*{\cftchapterfont}{\hfill\sffamily}
\renewcommand*{\cftchapterpagefont}{\normalfont}
\renewcommand*{\cftchapterleader}{ \textperiodcentered\space}
\renewcommand*{\cftchapterafterpnum}{\cftparfillskip}
%% \setpnumwidth{0em}
%% \setpnumwidth{1.5em}
\renewcommand*{\cftchapterfillnum}[1]{%
{\cftchapterleader}\nobreak
\hbox to 1.5em{\cftchapterpagefont ##1\hfil}\cftchapterafterpnum\par}
\setrmarg{0.3\textwidth}
\setlength{\unitlength}{\@tocrmarg}
\addtolength{\unitlength}{1.5em}
\let\oldcftpartformatpnum\cftpartformatpnum
\renewcommand*{\cftpartformatpnum}[1]{%
\hbox to\unitlength{{\cftpartpagefont ##1}}}
\let\oldcftbookformatpnum\cftbookformatpnum
\renewcommand*{\cftbookformatpnum}[1]{%
\hbox to\unitlength{{\cftbookpagefont ##1}}}}
\newcommand*{\setupparasubsecs}{%
\let\oldnumberline\numberline
\renewcommand*{\cftsubsectionfont}{\itshape}
\renewcommand*{\cftsubsectionpagefont}{\itshape}
\renewcommand{\l@subsection}[2]{
\ifnum\c@tocdepth > 1\relax
\def\numberline####1{\textit{####1}~}%
\leftskip=\cftsubsectionindent
\rightskip=\@tocrmarg
%% \advance\rightskip 0pt plus \hsize % uncomment this for raggedright
%% \advance\rightskip 0pt plus 2em % uncomment this for semi-ragged
\parfillskip=\fill
\ifhmode ,\ \else\noindent\fi
\ignorespaces
{\cftsubsectionfont ##1}~{\cftsubsectionpagefont##2}%
\let\numberline\oldnumberline\ignorespaces
\fi}}
\AtEndDocument{\addtocontents{toc}{\par}}%%% OK
\newcommand*{\setupmaintoc}{%
\renewcommand{\contentsname}{Inhaltsverzeichnis}
\let\changetocdepth\oldchangetocdepth
\let\precistoctext\oldprecistoctext
\let\cftchapterfillnum\oldcftchapterfillnum
\addtodef{\cftchapterbreak}{\par}{}
\renewcommand*{\cftchapterfont}{\normalfont\sffamily}
\renewcommand*{\cftchapterleader}{\sffamily\cftdotfill{\cftchapterdotsep}}
\renewcommand*{\cftchapterafterpnum}{}
\renewcommand{\cftchapterbreak}{\par\addpenalty{-\@highpenalty}}
\setpnumwidth{2.55em}
\setrmarg{3.55em}
\setcounter{tocdepth}{2}
\let\cftpartformatpnum\oldcftpartformatpnum
\addtodef{\cftpartbreak}{\par}{}
\let\cftbookformatpnum\oldcftbookformatpnum
\addtodef{\cftbookbreak}{\par}{}
}
\makeatother
\begin{document}
\setupshorttoc
\tableofcontents
\setupparasubsecs
\setupmaintoc
\tableofcontents
\setlength{\unitlength}{1pt}
%%%%%% Test
\chapter{Chaper 1}
\section{Section2}
\subsection{Subsection3}
\chapter{Chapter 2}
\section{Section2}
\section{Section1}
\end{document}
My problems: \setupshorttoc \setupparasubsecs \setupmaintoc
are connected somehow, as they don't work out on there own.
I can't understand how this code works, so I can't make my short list of figures.
Memoir Short List of Figures
e.g.
Code: Select all
\documentclass [a4paper,11pt,oneside]{memoir}
%%% short LOF
\makeatletter
\newcommand*{\setupshortlof}{%
\renewcommand*{\contentsname}{ShortLof}
\let\oldchangelofdepth\changelofdepth
\let\oldprecisloftext\precisloftext
\renewcommand{\precisloftext}[1]{}
\let\oldcftchapterfillnum\cftchapterfillnum
% \renewcommand*{\changelofdepth}[1]{}
%\setcounter{tocdepth}{0}% chapters
\renewcommand*{\cftchapterfont}{\hfill\sffamily}
\renewcommand*{\cftchapterpagefont}{\normalfont}
\renewcommand*{\cftchapterleader}{ \textperiodcentered\space}
\renewcommand*{\cftchapterafterpnum}{\cftparfillskip}
}
\makeatother
\begin{document}
\clearpage
\setupshortlof
\listoffigures
\end{document}
Memoir Short List of Figures
Code: Select all
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Short LoF
\makeatletter
\newcommand*{\setupshortlof}{%
\renewcommand*{\listfigurename}{ShortLoF}
%\let\oldchangelofdepth\changelofdepth
%\let\oldcftfigurefillnum\cftfigurefillnum
\renewcommand*{\cftfigurefont}{\hfill\sffamily}
\renewcommand*{\cftfigurepagefont}{\normalfont}
\renewcommand*{\cftfigureleader}{ \textperiodcentered\space}
\renewcommand*{\cftfigureafterpnum}{\cftparfillskip}
\renewcommand*{\cftfigurefillnum}[1]{%
{\cftfigureleader}\nobreak
\hbox to 1.5em{\cftfigurepagefont ##1\hfil}\cftfigureafterpnum\par}
\setrmarg{0.3\textwidth}
\setlength{\unitlength}{\@tocrmarg}
\addtolength{\unitlength}{1.5em}
\let\oldcftpartformatpnum\cftpartformatpnum
\renewcommand*{\cftpartformatpnum}[1]{%
\hbox to\unitlength{{\cftpartpagefont ##1}}}
\let\oldcftbookformatpnum\cftbookformatpnum
\renewcommand*{\cftbookformatpnum}[1]{%
\hbox to\unitlength{{\cftbookpagefont ##1}}}
}
\makeatother
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Memoir Short List of Figures
Then please mark the topic (not the last post) accordingly as written in Section 3 of the Board Rules (to bread before posting).Pete82 wrote:Solution: […]
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10