페이지 번호 정렬을 취소하고 알고리즘 목록에서 점을 제거합니다.

페이지 번호 정렬을 취소하고 알고리즘 목록에서 점을 제거합니다.

나는고전론테마를 사용하고 있으며 알고리즘 목록을 표 및 그림 목록과 동일한 형식으로 만들려고 합니다. 패키지를 사용하고 있습니다 algorithm2e. 현재 모습은 다음과 같습니다.

여기에 이미지 설명을 입력하세요

나는에 대한 답변을 시도했습니다이 질문하지만 작동하지 않습니다. 아마도 패키지를 algorithm대신 사용하기 때문일 것입니다. 허용된 답변을 사용하여 알고리즘 목록은 그림 목록의 이름을 사용하지만 아무것도 나열하지 않습니다.여기에 이미지 설명을 입력하세요

다른 대답은 전혀 아무것도 바꾸지 않습니다.

classicthesis 템플릿이 방대하기 때문에 최소한의 작업 예제를 어떻게 제공해야 할지 모르겠습니다... 다음 코드는 classicthesis.styclassicthesis 템플릿의 원본 파일을 사용하여 문제를 재현합니다.

\documentclass{scrreprt}

\usepackage{classicthesis}
\usepackage{algorithm2e}

\begin{document}

\listoftables
\listofalgorithms

\newpage

Here is Algorithm \ref{alg:some_alg}.

\begin{algorithm}
    \For{something}{
        something else
    }
    \caption{Some algorithm.}\label{alg:some_alg}
\end{algorithm}

Here is Table \ref{tab:some_table}.

\begin{table}
    \centering
    \begin{tabular}{cc}
    some line & some content \\
    some other line & some other content \\
    \end{tabular}
    \caption{Some table.}
    \label{tab:some_table}
\end{table}

\end{document}

알고리즘 테이블에서 점을 제거하고 페이지 번호 정렬을 취소하여 위의 테이블 목록처럼 보이도록 하고 싶습니다.

답변1

핵심은 tocloft 명령입니다 \newlistof. 실제 포맷은 에 의해 수행됩니다 \l@algocf.

\documentclass{scrreprt}

\usepackage{classicthesis}
\usepackage{algorithm2e}

\makeatletter
\newlistof{algorithms}{loa}{\listalgorithmcfname}%
    \renewcommand{\cftalgorithmsleader}{\hspace{1.5em}}%
    \renewcommand{\cftalgorithmsafterpnum}{\cftparfillskip}%
    \renewcommand{\cftalgorithmspresnum}{\algorithmcfname~}%
    \newlength{\algorithmslabelwidth}%
    \settowidth{\algorithmslabelwidth}{\cftalgorithmspresnum~999}%
    \addtolength{\algorithmslabelwidth}{2.5em}%
    \cftsetindents{algorithms}{0em}{\algorithmslabelwidth}%
    \let\l@algocf\l@algorithms
\makeatother

\begin{document}

\listoftables
\listofalgorithms

\newpage

Here is Algorithm \ref{alg:some_alg}.

\begin{algorithm}
    \For{something}{
        something else
    }
    \caption{Some algorithm.}\label{alg:some_alg}
\end{algorithm}

Here is Table \ref{tab:some_table}.

\begin{table}
    \centering
    \begin{tabular}{cc}
    some line & some content \\
    some other line & some other content \\
    \end{tabular}
    \caption{Some table.}
    \label{tab:some_table}
\end{table}

\end{document}

관련 정보