使用 cfr-lm 提供襯裡編號

使用 cfr-lm 提供襯裡編號

我嘗試使用 pdfLaTeX 僅在正文中使用舊式數字。

看看其他問題,我想到了使用該cfr-lm包,然後嘗試在以下內容中返回襯裡數字:分段、數字計數器、標題、枚舉、腳註。

我已經這樣做了:

\documentclass[a4paper,12pt,twoside]{book}


\usepackage{cfr-lm}

\renewcommand{\thechapter}{{\fontfamily{clm}\selectfont\arabic{chapter}}}
\renewcommand{\thesection}{{\fontfamily{clm}\selectfont\arabic{chapter}.\arabic{section}}}
\renewcommand{\thesubsection}{{\fontfamily{clm}\selectfont\arabic{chapter}.\arabic{section}.\arabic{subsection}}}
\renewcommand{\thesubsubsection}{{\fontfamily{clm}\selectfont\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}}
\renewcommand{\theparagraph}{{\fontfamily{clm}\selectfont\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}}}
\renewcommand{\thesubparagraph}{{\fontfamily{clm}\selectfont\arabic{chapter}.\arabic{section}.\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}.\arabic{subparagraph}}}


\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}

\begin{document}

\chapter{test}

\section{test}

\subsection{test}

\subsubsection{test}

\subsubsection{test}

\end{document}

正如我在評論中添加的那樣,它適用於切片。

我仍在尋找其餘的想法。

答案1

從印刷師的角度來看,我認為這不是一個好主意。反正…

\documentclass[a4paper,12pt,twoside]{book}
\usepackage{cfr-lm}
\usepackage{enumitem}
\usepackage{amsmath}
\usepackage{sectsty}

\DeclareTextFontCommand{\textlstyle}{\lstyle}

\labelformat{chapter}{\textlstyle{#1}}
\labelformat{section}{\textlstyle{#1}}
\labelformat{subsection}{\textlstyle{#1}}
\labelformat{subsubsection}{\textlstyle{#1}}
\labelformat{paragraph}{\textlstyle{#1}}
\labelformat{subparagraph}{\textlstyle{#1}}
\labelformat{figure}{\textlstyle{#1}}
\labelformat{table}{\textlstyle{#1}}
\labelformat{equation}{\textlstyle{#1}}
\labelformat{enumi}{\textlstyle{#1}}

\allsectionsfont{\lstyle}
\setlist{font=\lstyle}
\makeatletter
\def\maketag@@@#1{\hbox{\m@th\normalfont\lstyle#1}}
\NewCommandCopy{\org@makecaption}{\@makecaption}
\renewcommand{\@makecaption}[2]{\org@makecaption{\textlstyle{#1}}{#2}}
\NewCommandCopy{\org@numberline}{\numberline}
\renewcommand{\numberline}[1]{\org@numberline{\textlstyle{#1}}}
\makeatother

\setcounter{tocdepth}{5}
\setcounter{secnumdepth}{5}

\begin{document}

\tableofcontents

\chapter{test}\label{A}

\section{test}\label{B}

\subsection{test}

\subsubsection{test}

\subsubsection{test}

\paragraph{test}

\subparagraph{test}

\begin{enumerate}
\item\label{C} test
\item test
\item test
\end{enumerate}

\begin{equation}\label{D}
1+1=2
\end{equation}

\begin{figure}[htp]
\caption{Test}\label{E}
\end{figure}

\begin{table}[htp]
\caption{Test}\label{F}
\end{table}

Refs: \ref{A}, \ref{B}, \ref{C}, \ref{D} and \eqref{D}, \ref{E}, \ref{F}

\end{document}

在此輸入影像描述

在此輸入影像描述

請不要對頁碼這樣做。

相關內容