Commit 5584091f authored by Axel Sommerfeldt's avatar Axel Sommerfeldt

newfloat: Starred variant of \listofwhatever added

This fixes #52
parent 98248cef
......@@ -9,7 +9,7 @@ source/*.toc
issues/gitlab/*.aux
issues/gitlab/*.hd
issues/gitlab/*.idx
issues/gitlab/*.log
issues/gitlab/*.lo*
issues/gitlab/*.out
issues/gitlab/*.pdf
issues/gitlab/*.rcd
......
==========================================================================
The `caption' package bundle
Release XXXX-XX-XX
Release 2019-08-28
Copyright (C) 1994-2019 Axel Sommerfeldt (axel.sommerfeldt@f-m.fm)
License: LPPL = LaTeX Project Public Licence
......
% SX: Remove List of [newfloat] from TOC
% 2019-04-03
% https://gitlab.com/axelsommerfeldt/caption/issues/52
% https://tex.stackexchange.com/questions/176418/remove-list-of-newfloat-from-toc
%
% Since newfloat claims to be adapted to memoir it should offer a starred variant of \listofwhatever as well.
\documentclass[a4paper,twoside]{memoir}
\usepackage{newfloat}
\DeclareFloatingEnvironment{dirfigure}
\begin{document}
\tableofcontents*
\listoffigures*
\listofdirfigures*
\chapter{bah}
\begin{dirfigure}
bah
\caption{bah}
\end{dirfigure}
\begin{figure}
bah
\caption{bah}
\end{figure}
\end{document}
......@@ -25,7 +25,7 @@
% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%
% \fi
% \CheckSum{1391}
% \CheckSum{1397}
%
% \iffalse
%<*driver>
......@@ -533,7 +533,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{newfloat}[2019/08/25 v1.1f Defining new floating environments (AR)]
\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
% \end{macrocode}
%
% \begin{macro}{\newfloat@Info}
......@@ -751,14 +751,21 @@
%
% \begin{macro}{\newfloat@listof}
% \changes{v1.1}{2013/04/27}{Revised}
% \changes{v1.1g}{2019/08/28}{Starred variant added}
% |\newfloat@listof|\marg{float type}\\
% typesets the list, using |\listoffigure| with patched list name and file extension.
% \begin{macrocode}
\newcommand*\newfloat@listof[1]{%
\@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}}
\@ifstar
{\newfloat@list@of{#1}*}%
{\newfloat@list@of{#1}\relax}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\newfloat@list@of[1]{%
\@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}}
% \end{macrocode}
% \begin{macrocode}
\newcommand*\newfloat@list@of[2]{%
\newcommand*\newfloat@list@of@[3]{%
\begingroup
\expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
\def\ext@figure{#2}%
......@@ -767,7 +774,7 @@
\let\newfloat@listoftoc\listoftoc
\def\listoftoc##1{\newfloat@listoftoc{#2}}%
\@nameuse{newfloat@listof#1@hook}%
\listoffigures
\listoffigures#3%
\endgroup}
% \end{macrocode}
% \end{macro}
......
......@@ -37,7 +37,7 @@
%% caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{newfloat}[2019/08/25 v1.1f Defining new floating environments (AR)]
\ProvidesPackage{newfloat}[2019/08/28 v1.1g Defining new floating environments (AR)]
\newcommand*\newfloat@Info[1]{%
\PackageInfo{newfloat}{#1}}
\newcommand*\newfloat@InfoNoLine[1]{%
......@@ -127,8 +127,12 @@
\noexpand\g@addto@macro\noexpand#1{\@cdr#2\@nil}}%
\newfloat@tempa}
\newcommand*\newfloat@listof[1]{%
\@expandtwoargs\newfloat@list@of{#1}{\@nameuse{ext@#1}}}
\newcommand*\newfloat@list@of[2]{%
\@ifstar
{\newfloat@list@of{#1}*}%
{\newfloat@list@of{#1}\relax}}
\newcommand*\newfloat@list@of[1]{%
\@expandtwoargs\newfloat@list@of@{#1}{\@nameuse{ext@#1}}}
\newcommand*\newfloat@list@of@[3]{%
\begingroup
\expandafter\let\expandafter\listfigurename\csname list#1name\endcsname
\def\ext@figure{#2}%
......@@ -137,7 +141,7 @@
\let\newfloat@listoftoc\listoftoc
\def\listoftoc##1{\newfloat@listoftoc{#2}}%
\@nameuse{newfloat@listof#1@hook}%
\listoffigures
\listoffigures#3%
\endgroup}
\newcommand*\newfloat@setoptions{%
\@ifstar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment