按发生次数排序的子索引

按发生次数排序的子索引

在数学文档中,我有几个索引。由于我不是LaTeX程序员,我不知道如何只按出现次数对符号索引进行排序。问题按出现次数排序的符号索引 似乎只对完整索引有效,对 无效subindex。有人能帮忙吗?

最小示例:

\documentclass{scrbook}
%\usepackage[backend=biber, style=authortitle-comp]{biblatex}

\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{imakeidx}
\makeindex
\makeindex[name=s,title={Symbole}]

\begin{document}
    
\title{\Huge Grundlagen der Analysis}
\author{Heinz König}
\date{}
\publishers{herausgegeben von *** und ***}
\maketitle

\lipsum[10]
\index{Folge!Funktionenfolge}
\index{Folge!Zahlenfolge}
\index{Konvergenz}
\index[s]{$\subset$}    
\index[s]{$\notin$} 
    
\newpage
\lipsum[30]
\index{Differenzierbare Mannigfaltigkeit}
\index{Reelle Zahl}
\index[s]{$\in$}    

\newpage
\lipsum[10]
\index{Gleichmäßig stetig}
\index[s]{$\lim$}   

\newpage
\lipsum[10]
\index[s]{$\cap$}   
\index[s]{$\mathbb{N}$}

\newpage    
\lipsum[10]
\index{Limes inferior}
\index[s]{$\cup$}   
\index[s]{$\mathbb{Z}$}

\newpage
\lipsum[10]
\index{Endliches Maß}
\index[s]{$\inf$}   
\index[s]{$\mathbb{R}$}

\newpage
\lipsum[10]
\index{Häufungspunkt}
\index[s]{@$\mathbb{C}$}

\newpage    
\lipsum[10] 
\index[s]{$\sup$}
\index[s]{$\nu$}

\newpage
\index[s]{$\kappa$} 

\printindex[s]
\printindex

    
\end{document}

得出:

按页面对符号进行排序

但我想要的是 - 不改变 wordindex 的通常排序:

按出现次数对符号进行排序

答案1

已解决,使用 yannisl 的建议。

\documentclass{scrbook}
%\usepackage[backend=biber, style=authortitle-comp]{biblatex}

\usepackage{lipsum}
\usepackage{amsmath}
\usepackage{amssymb}

\usepackage{symlist}
\setlength\columnsep{30pt}

\usepackage{imakeidx}
\makeindex
\makeindex[name=s,title={Symbole}]

\begin{document}
    
    \title{\Huge Grundlagen der Analysis}
    \author{Heinz König}
    \date{}
    \publishers{herausgegeben von *** und ***}
    \maketitle
    
    \lipsum[10]
    \index{Folge!Funktionenfolge}
    \index{Folge!Zahlenfolge}
    \index{Konvergenz}
    \newsym{}{$\subset$}    
    \newsym{}{$\notin$} 
    
    \newpage
    \lipsum[30]
    \index{Differenzierbare Mannigfaltigkeit}
    \index{Reelle Zahl}
    \newsym{}{$\in$}    
    
    \newpage
    \lipsum[10]
    \index{Gleichmäßig stetig}
    \newsym{}{$\lim$}   
    
    \newpage
    \lipsum[10]
    \newsym{}{$\cap$}   
    \newsym{}{$\mathbb{N}$}
    
    \newpage    
    \lipsum[10]
    \index{Limes inferior}
    \newsym{}{$\cup$}   
    \newsym{}{$\mathbb{Z}$}
    
    \newpage
    \lipsum[10]
    \index{Endliches Maß}
    \newsym{}{$\inf$}   
    \newsym{}{$\mathbb{R}$}
    
    \newpage
    \lipsum[10]
    \index{Häufungspunkt}
    \newsym{}{$\mathbb{C}$}
    
    \newpage    
    \lipsum[10] 
    \newsym{}{$\sup$}
    \newsym{}{$\nu$}
    
    \newpage
    \newsym{}{$\kappa$} 
    
    \listofsymbols
    \printindex
    
    
\end{document}

并修改 symlist 包https://personal.utdallas.edu/~hamlen/symlist.sty

%%
%% This is file `symlist.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% symlist.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2008 by Kevin W. Hamlen
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3a of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3a or later is part of all distributions of LaTeX version
%% 2004/10/01 or later.
%% 
\usepackage{multicol}%modified
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{symlist}
  [2008/03/11 v1.1 Symbol List package]
\ProcessOptions\relax
\newcommand\LOS@symline[4]{%
  \ifx\hyper@anchor\@undefined%
    \contentsline{symbol}{\numberline{#2}{#3}}{#4}\relax%
  \else%
    \contentsline{symbol}{\numberline{#2}{#3}}{#4}{symbol.#1}%
  \fi%
}
\renewcommand{\@dotsep}{10000}%modified
\newcommand\listsymbolname{Liste der Symbole}
\newcount\LOS@cnt
\newdimen\LOS@wd
\newcommand\LOS@ext{los}
\newcommand\LOS@init[1]{%
  \long\gdef\l@symbol{\@dottedtocline{1}{0em}{#1}}%
}
\newcommand\newsym{\@ifnextchar[\LOS@@newsym\LOS@newsym}
\newcommand\LOS@newsym[2]{\LOS@@newsym[#2]{#1}{#2}}
\newcommand\LOS@@newsym{}
\def\LOS@@newsym[#1]#2#3{%
  \global\advance\LOS@cnt\@ne%
  \ifmmode%
    \settowidth\dimen@{$#1$\kern1em}%
    \expandafter\gdef%
      \csname LOS@sym@\romannumeral\LOS@cnt\endcsname##1##2{%
      \@writefile\LOS@ext{\LOS@symline{##1}{$#1$}{#2}{##2}}}%
  \else%
    \settowidth\dimen@{#1\kern1em}%
    \expandafter\gdef%
      \csname LOS@sym@\romannumeral\LOS@cnt\endcsname##1##2{%
      \@writefile\LOS@ext{\LOS@symline{##1}{#1}{#2}{##2}}}%
  \fi%
  \ifdim\dimen@>\LOS@wd\global\LOS@wd\dimen@\fi%
  \if@filesw%
    \write\expandafter\@auxout\expandafter{%
      \expandafter\noexpand\expandafter\LOS@sym\expandafter{%
      \romannumeral\LOS@cnt}{\thepage}}%
  \fi%
  \@ifundefined{hyperdef}{}%
    {\hyperdef{symbol}{\romannumeral\LOS@cnt}}%
  {#3}%
}
\newcommand\LOS@sym[2]{}
\AtBeginDocument{%
  \gdef\LOS@sym#1{\csname LOS@sym@#1\endcsname{#1}}%
  \if@filesw%
    \@temptokena{\expandafter\@writefile\expandafter\LOS@ext%
      \expandafter{\expandafter\LOS@init\expandafter{\the\LOS@wd}}}%
    \immediate\write\@auxout{\the\@temptokena}%
  \fi%
}
%modified
\ifx\chapter\undefined
  \newcommand\listofsymbols{%
    \section*{\listsymbolname}%
    \addvspace{10\p@}%
    \begin{multicols}{2}
        \@starttoc\LOS@ext%
    \end{multicols}
  }
\else
  \newcommand\listofsymbols{%    
    \chapter*{\listsymbolname}%
    \addvspace{15\p@}%
    \begin{multicols}{2}
        \@starttoc\LOS@ext%
    \end{multicols}
  }
\fi
\endinput
%%
%% End of file `symlist.sty'.

感谢您的帮助!

相关内容