1

When using the scrreprt class I can use the option listof=entryprefix to have "Abbildung" stand in front of the numbering in my list of figures for example. With the commands

\renewcommand*\listoflofentryname{Abb.}
\renewcommand*\listoflotentryname{Tab.}

I can change that to "Abb." for the list of figures and "Tab." for the list of tables respectively.

Now I declare a new float environment with

\usepackage{newfloat}
    \DeclareFloatingEnvironment[ % neue Float Umgebung für Gleichungen
        fileext=loe,
        listname={Formelverzeichnis},
        name=Formel,
        placement=h,
        within=chapter,
        chapterlistsgaps=off,
        ]{eq}

and add a list of equations with

\listofeqs

Is there a similar way to have "Formel" stand in front of the equations numbering in the list of equations? Or might there be a simpler way without having to declare a new float environment e.g.?

Edit: in the newfloat documentation there is an example (page 5) which uses the tocloft package, but this package seems to have some problems with the KOMA classes and without it the declaration produces an error and stops the compilation.

MWE:

\documentclass[
    listof=totoc, % "List of" in toc
    listof=entryprefix, % "List of" with entryprefix
    ]{scrreprt}

\usepackage[british, ngerman]{babel} \usepackage{booktabs} \usepackage{amsmath} \usepackage{newfloat} \DeclareFloatingEnvironment[ % new Float environment for equations fileext=loe, listname={Formelverzeichnis}, name=Formel, placement=h, within=chapter, chapterlistsgaps=off, ]{eq}

\renewcommand*\listoflotentryname{Tab.} % change entryprefix for tables

\begin{document} \tableofcontents \listoftables \listofeqs % List of Equations

\chapter{Test}

\begin{table}[h] \centering \caption[Testtabelle (Verzeichnis)]{Testtabelle} \begin{tabular}{ll}

    a & b \\

    c & d \\

    e & f

\end{tabular}   

\end{table}

\begin{eq} % Testformel \begin{subequations} \begin{align} a &= b \ b &= c. \end{align} \end{subequations} \caption[Testformel (Verzeichnis)]{Testformel} \end{eq}

\end{document}

Lukas
  • 659

1 Answers1

1

Warning/Disclaimer: The counter of the new environment eq and the counter of the equations are separate counters. So their value could be different: There could be more than one numbered equation in a eq environment or there could be a numbered equation outside of an eq environment or there could be a eq environment without a numbered equation.


To define a language depending prefix use

\newcaptionname{ngerman}{\listoflofentryname}{Abb.}
\newcaptionname{ngerman}{\listoflotentryname}{Tab.}

and

\newcaptionname{ngerman}{\listofloeentryname}{Gl.}

Additionally there is no need to load package newfloat. You can use \DeclareNewTOC provided by KOMA-Script package tocbasic. Note that tocbasic is loaded by the KOMA-Script class.

With option float a floating environment <type> (eq in the example below) is declared and with option nonfloat a non-floating environment <type>- is declared (eq- in the example below)

\documentclass[
  listof=totoc,
  listof=entryprefix,
  listof=nochaptergap,% <- added: no chapter gaps in LoF, LoT, ...
  captions=tableabove% <- added
  ]{scrreprt}
\usepackage{lipsum}% only for dummy text
\usepackage[british,ngerman]{babel}
\usepackage{booktabs}
\usepackage{amsmath}

\DeclareNewTOC[ category=float, counterwithin=chapter, float,% declares floating environment eq floatpos=ht, nonfloat,% declares non-floating environment eq- listname={Formelverzeichnis}, name=Formel, tocentrystyle=tocline, tocentrylevel:=table, tocentryindent:=table, tocentrynumwidth:=table, type=eq, ]{loe}

\newcaptionname{ngerman}{\listoflotentryname}{Tab.}% <- changed \newcaptionname{ngerman}{\listofloeentryname}{Gl.}% <- added

\begin{document} \tableofcontents \listoftables \listofeqs

\chapter{Test} \begin{table}[h] \centering \caption[Text 1 für das Tabellenverzechnis]{Text 1 über Tabelle} \begin{tabular}{ll} a & b \ c & d \ e & f \end{tabular} \end{table}

\begin{eq} \label{eq:eq1} \begin{subequations} \begin{align} a &= b \ b &= c. \end{align} \end{subequations} \caption[Testformel 1 (Verzeichnis)]{Testformel 1} \end{eq}

\chapter{Foo} \begin{table}[h] \centering \caption[Text 2 für das Tabellenverzechnis]{Text 2 über Tabelle} \begin{tabular}{ll} a & b \ c & d \ e & f \end{tabular} \end{table}

\lipsum[1-3]

\begin{eq-} \label{eq:eq2} \begin{subequations} \begin{align} a &= b \ b &= c. \end{align} \end{subequations} \caption[Testformel 2 (Verzeichnis)]{Testformel 2} \end{eq-} \lipsum \end{document}

enter image description here


If you really want to use package newfloat:

Example:

\documentclass[
  listof=totoc,
  listof=entryprefix,
  listof=nochaptergap% <- added: no chapter gaps in LoF, LoT, ...
  ]{scrreprt}
\usepackage{lipsum}% only for dummy text
\usepackage[british,ngerman]{babel}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{newfloat}
\DeclareFloatingEnvironment[ % neue Float Umgebung für Gleichungen
  fileext=loe,
  listname={Formelverzeichnis},
  name=Formel,
  placement=h,
  within=chapter,
  %chapterlistsgaps=off,
  ]{eq}

\newcaptionname{ngerman}{\listoflotentryname}{Tab.}% <- changed \newcaptionname{ngerman}{\listofloeentryname}{Gl.}% <- added

\begin{document} \tableofcontents \listoftables \listofeqs

\chapter{Test} \begin{table}[h] \centering \caption[Text 1 für das Tabellenverzechnis]{Text 1 über Tabelle} \begin{tabular}{ll} a & b \ c & d \ e & f \end{tabular} \end{table}

\begin{eq} \label{eq:eq1} \begin{subequations} \begin{align} a &= b \ b &= c. \end{align} \end{subequations} \caption[Testformel 1 (Verzeichnis)]{Testformel 1} \end{eq}

\chapter{Foo} \begin{table}[h] \centering \caption[Text 2 für das Tabellenverzechnis]{Text 2 über Tabelle} \begin{tabular}{ll} a & b \ c & d \ e & f \end{tabular} \end{table}

\lipsum[1-3] \begin{eq} \label{eq:eq2} \begin{subequations} \begin{align} a &= b \ b &= c. \end{align} \end{subequations} \caption[Testformel 2 (Verzeichnis)]{Testformel 2} \end{eq} \lipsum \end{document}

esdd
  • 85,675
  • thank you very much!

    I adapted your answer without the use of the newfloat package and it works like a charm!

    – Lukas Jun 27 '21 at 21:29
  • now I have an additional question regarding your solution with the KOMA-options (if I should rather open a new post please let me know): the equation 1.1 for example hast written (1.1) behind it, that is as I need it. If I add a caption, I just want the caption to be used for the list of equations, but it keeps displaying a bold "Gl. 1.1:" below the equation when I add '\caption[display this in list of equations]{}'. Is there a way to have a caption for the list of equations, but don't have an (empty) caption below the equation itself? – Lukas Aug 28 '21 at 10:57