如何像許多哲學論文中那樣標記引文?

如何像許多哲學論文中那樣標記引文?

在許多哲學論文中,對挑選出來進行分析的論文進行標記是常見的做法,如下所示:

在此輸入影像描述

看起來這種效果是透過定義類似引用的環境來實現的。有沒有內建這樣環境的包?如果沒有,有人可以幫我設計一個這樣的環境嗎?我是 TeX 新手。在我看來,它幾乎就像一個 itemize 環境,但標籤沒有設置在最左邊。謝謝!

答案1

enumitem您可以透過定義一個enumerate名為例如的新環境來對套件執行此操作sensitive,每次使用它時都會恢復該環境,如下所示:

\newlist{sensitive}{enumerate}{1}
\setlist[sensitive]{resume, label=(\textsc{Sensitive}$_\arabic*$), labelindent=\parindent, leftmargin=*}

然後使用

\begin{sensitive}
...
\end{sensitive}

微量元素:

\documentclass{article}

\usepackage{enumitem}

\newlist{sensitive}{enumerate}{1}
\setlist[sensitive]{resume, label=(\textsc{Sensitive}$_\arabic*$), labelindent=\parindent, leftmargin=*}

\begin{document}

Finally, notions of sensitivity also extend to probabilistic knowledge. For instance,
Nozick 1981 states the following sensitivity condition on knowledge:
\begin{sensitive}
  \item\label{sensitive1} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if $p$ 
    weren't true and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$ wouldn't
    believe, via $M$, that $p$.
\end{sensitive}
The advocate of probabilistic knowledge may endorse the following deflationist variant of \ref{sensitive1}:
\begin{sensitive}
  \item\label{sensitive2} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if it were
    not the case that $p$ and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$
    wouldn't believe, via $M$, that $p$.
\end{sensitive}
Here again, the expressivist may capture the spirit of a statement concerning the truth
\end{document} 

輸出:

在此輸入影像描述


編輯

否則,您可以定義一個名為例如的單一新enumerate環境,mylist並在本機定義標籤以及何時恢復它,就像

\begin{mylist}[resume, label=(\textsc{Frequentist}$_\arabic*$)]

微量元素:

\documentclass{article}
\usepackage{enumitem}

\newlist{mylist}{enumerate}{1}
\setlist[mylist]{labelindent=\parindent, leftmargin=*}

\begin{document}

Finally, notions of sensitivity also extend to probabilistic knowledge. For instance,
Nozick 1981 states the following sensitivity condition on knowledge:
\begin{mylist}[label=(\textsc{Sensitive}$_\arabic*$)]
  \item\label{sensitive1} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if $p$
    weren't true and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$ wouldn't
    believe, via $M$, that $p$.
\end{mylist}
The advocate of probabilistic knowledge may endorse the following deflationist variant of \ref{sensitive1}:
\begin{mylist}[resume, label=(\textsc{Sensitive}$_\arabic*$)]
  \item\label{sensitive2} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if it were
    not the case that $p$ and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$
    wouldn't believe, via $M$, that $p$.
\end{mylist}
Here again, the expressivist may capture the spirit of a statement concerning the truth
\begin{mylist}[label=(\textsc{Frequentist}$_\arabic*$)]
  \item\label{frequentist1} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if $p$
    weren't true and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$ wouldn't
    believe, via $M$, that $p$.
\end{mylist}
The advocate of probabilistic knowledge may endorse the following deflationist variant of \ref{frequentist1}:
\begin{mylist}[resume, label=(\textsc{Frequentist}$_\arabic*$)]
  \item\label{frequentist2} $S$ knows, via method (or way of believing) $M$, that $p$ only if: if it were
    not the case that $p$ and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$
    wouldn't believe, via $M$, that $p$.
\end{mylist}
Here again, the expressivist may capture the spirit of a statement concerning the truth
\end{document} 

輸出:

在此輸入影像描述

答案2

您可以為此定義一個個人環境:

\documentclass{article}
\usepackage{hyperref}

\makeatletter
\newlength{\lquotelabelwidth}
\newlength{\lquote@label@temp}
\AtEndDocument{%
  \write\@auxout{\string\global\string\lquotelabelwidth=\the\lquote@label@temp\relax}%
}

\newenvironment{lquote}[1]
 {%
  \settowidth\@tempdima{#1}%
  \addtolength\@tempdima{2pc}% <---------------- add here if you want more
  \ifdim\@tempdima>\lquote@label@temp
    \global\lquote@label@temp=\@tempdima
  \fi
  \list{}{%
    \leftmargin=\lquotelabelwidth
    \labelwidth=\leftmargin
  }%
  \csname phantomsection\endcsname % if hyperref is loaded
  \def\@currentlabel{#1}%
  \item[\textsc{(#1)}]%
 }
 {\endlist}

\newcommand{\lqref}[1]{\textup{\textsc{(\ref{#1})}}}
\makeatother

\begin{document}

Be careful that \lqref{murphy} holds.

Finally, notions of sensitivity also extend to probabilistic knowledge. 
For instance, Nozick 1981 states the following sensitivity condition on 
knowledge:
\begin{lquote}{Sensitive\textsubscript{1}}\label{sensitive1}
  $S$ knows, via method (or way of believing) $M$, that $p$ only if: if $p$ 
  weren't true and $S$ were to use $M$ to arrive at a belief whether (or not) 
  $p$, then $S$ wouldn't believe, via $M$, that~$p$.
\end{lquote}
The advocate of probabilistic knowledge may endorse the following deflationist 
variant of \lqref{sensitive1}:
\begin{lquote}{Sensitive\textsubscript{2}}\label{sensitive2}
  $S$ knows, via method (or way of believing) $M$, that $p$ only if: if it were
  not the case that $p$ and $S$ were to use $M$ to arrive at a belief whether 
  (or not) $p$, then $S$ wouldn't believe, via $M$, that~$p$.
\end{lquote}
Here again, the expressivist may capture the spirit of a statement concerning the truth
\begin{lquote}{Murphy}
\label{murphy}
  If something can go wrong, it will.
\end{lquote}

\end{document} 

這會在 .aux 檔案中記錄最長標籤的寬度,因此可以在下一次 LaTeX 運行時設定標籤寬度。我為括號添加了 2pc (24pt) 和更多空間,更改為您喜歡的值。

加載hyperref絕不是強制性的;我將其添加到示例中只是為了展示程式碼可以使用它。

在此輸入影像描述

答案3

這是我之前製作的版本的一個非常細微的調整(儘管必須說,尤其是對於引文)。如果mathau覺得奇怪,請將名稱更改為對您有意義的名稱。

\documentclass{article}
\usepackage{enumitem}
\makeatletter
\newcommand*{\mathau}[1]{%
  \def\tempa{#1s}%
  \newlist{\tempa}{enumerate}{1}%
  \setlist[\tempa]{label={(\MakeUppercase#1\textsubscript{\arabic*})},leftmargin=*,font=\scshape,resume,ref={\MakeUppercase#1\textsubscript{\arabic*}}}}
\makeatother
\begin{document}
\mathau{sensitive}
\begin{sensitives}
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
\end{sensitives}
Some text showing the need to disambiguate various senses of `concept'.
\mathau{concept}
\begin{concepts}
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
\end{concepts}
Further discussion getting ready to return to sensitivities.
But this turns up another sense of `concept'.
\begin{concepts}
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
\end{concepts}
Now we can return to the sensitivities.
\begin{sensitives}
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
\end{sensitives}
Commentary.
\begin{sensitives}
  \item As any dedicated reader can clearly see, the Ideal of practical reason is a representation of, as far as I know, the things in themselves; as I have shown elsewhere, the phenomena should only be used as a canon for our understanding.
\end{sensitives}

\end{document}

馬修,調整過的

答案4

卡爾科勒給出了一個更適合一致水平對齊清單標籤的答案(例如,單字「Frequentist」比單字「Sensitive」長,但它們都以相同的縮排開始)。然而,我經常對清單中的項目使用單字標籤,透過將標籤放在 的方括號內,可以更輕鬆地即時完成獨特的標籤\item[]。但是,下面的方法會對齊項目的正文,而不是項目標籤。

\documentclass{article}
\usepackage[osf]{mathpazo} 
\usepackage{enumitem}
\begin{document}
\setlist{labelwidth=7em, leftmargin=!}
Finally, notions of sensitivity also extend to probabilistic knowledge. For instance, {\scshape Nozick} 1981 states the following sensitivity condition on knowledge:
\begin{enumerate}
\item[\scshape (Sensitive\textsubscript 1)] $S$ knows, via method (or way of believing) $M$, that $p$ only if: if $p$ weren't true and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$ wouldn't believe, via $M$, that $p$.
\end{enumerate}
The advocate of probalistic knowledge may endorse the following deflationist variant of {\scshape (Sensitive\textsubscript 1)}:
\begin{enumerate}
\item[\scshape (Sensitive\textsubscript 2)] $S$ knows, via method (or way of believing) $M$, that $p$ only if: if it were not the case that $p$ and $S$ were to use $M$ to arrive at a belief whether (or not) $p$, then $S$ wouldn't believe, via $M$, that $p$.
\end{enumerate}

\end{document}

7em是透過試誤發現的,但是如果想要準確的話,7em透過計算單字標籤的長度來替換

\usepackage{calc}
%-----
\newlength\sensitive\setlength\sensitive{\widthof{\scshape (Sensitive\textsubscript 1)}}

進而

\setlist{labelwidth={\dimexpr \sensitive  +\parindent \relax}, leftmargin=!}

在此輸入影像描述

相關內容