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}

ここに画像の説明を入力してください

ここに画像の説明を入力してください

ページ番号にはそんなことはしないでください。

関連情報