
2016 年 10 月 29 日更新:我已經提供了這個問題的完整答案,以及如何在另一個問題的正文中交叉引用特定的引用如何在 LyX 中交叉引用 ERT?。
我已經有一個完整的 Word 版本的懸掛縮排參考列表,我想在 LyX 中複製它。我想要前面沒有 [數字] 的常見懸掛縮排(這是來自 APA 網站的範例):
一位專家建議我使用標籤環境,但是(i)標籤的第一個字母不是大寫字母; (ii) 標籤字母之間的間距比後續內容的間距稍寬。
然後,我在標準LyX 文檔類別而不是Classicthesis 下嘗試,雖然兩個問題(i) (ii) 都消失了,但我注意到一個新問題(iii)——如果姓氏比標籤寬度短(很常見) ,則有一個標籤與後續內容之間的間隙:
我在另一個網站上看到有人建議使用“verse”環境,但我找不到它。 (1) 它會起作用嗎? (2)如果可以的話,如何載入到Classicthesis LyX模板?
我的論文將在不到一周(31 日)內到期,因此需要緊急幫助。任何其他替代建議也非常感謝!
更新1
另一位專家建議使用描述環境。我在 Classicthesis LyX 中得到以下結果:
代碼:\begin{description} \item [{Lorem}] ipsum at nusquam appellantur his, ut eos erant homero concludaturque. Albucius appellantur deterruisset id eam, vivendum partiendo dissentiet ei ius. Vis melius facilisis ea, sea id convenire referrentur, takimata adolescens ex duo. Ei harum argumentum per. Eam vidit exerci appetere ad, ut vel zzril intellegam interpretaris. \marginpar{More dummy text.} \end{description}
在標準文件類中,問題(iii)得到了很大的緩解,但是問題(ii),即標籤字母之間的空格,以及出現了一個新問題(iv)——我想刪除描述中的粗體
代碼:
\begin{description}
\item [{Surname,}] Surname, Surname, Surname, A. 2005. This is a bibliography.
This is a bibliography. This is a bibliography. This is a bibliography.
This is a bibliography. This is a bibliography.
\item [{Sur,}] Sur, Sur, Sur, A. 2005. This is a bibliography. This is
a bibliography. This is a bibliography. This is a bibliography. This
is a bibliography. This is a bibliography.
\end{description}
我仍然更喜歡在 Classicthesis 模板中修復它的解決方案。因此,任何替代解決方案仍然受到歡迎。
更新2
透過使用 Ctrl+L 並將「Answer 1」中的相關程式碼(根據後續註解刪除 \scshape)插入到模板中,我得到以下結果:
問題一:描述標籤首字母不是大寫;問題2:描述標籤中字母之間的距離較寬。如何實現與第一張圖相同的風格(APA參考風格)?
更新3
根據答案 2,我有以下輸出:
唯一的問題是如何縮排0.5吋(1.27公分)的標準量?另一個個人問題是,當我加載“hanging”模組時,由於 TEX 容量過多,父文檔有未保存的更改,其限制為 5000。
注意:我在 LyX 中搜尋了幫助文檔,但根本找不到“hanging”,儘管它確實有一個可選的“hanging”模組。
答案1
您可以使用旨在「懸掛」段落的環境,而不是濫用description
環境來執行您的命令。例如:
\documentclass{report}
\usepackage{classicthesis}
\usepackage{hanging}
\usepackage{setspace}
% If global doublespacing:
% \doublespacing
% If only in the References environment:
\usepackage{etoolbox}
\AtBeginEnvironment{hangparas}{\doublespacing}
\AfterEndEnvironment{hangparas}{\addvspace{0.67\baselineskip}}
\begin{document}
This paragraph is only doublespaced if you use the etoolbox method to
activate double-spacing within the \verb|hangparas| environment. If
you simply use the \verb|\doublespacing| command, this paragraph will
also be double-spaced.
\begin{hangparas}{1cm}{1}% `1cm` sets the hang amount; `1` says to hang lines after the first line in each paragraph
Holosko, M. J. (2006). \emph{Primer for Critiquiing Social Research:
A Student Guide.} Belmont, CA: Brooks/Cole.
Shear, K., Frank, E., Houck, P. R., \& Reynolds, C. F. (2005).
Treatment of complicated grief: A randomized controlled
trial. \emph{The Journal of American Medical Association},
\emph{293}(21), 2601--2608.
\end{hangparas}
This paragraph is only doublespaced if you use the etoolbox method to
activate double-spacing within the \verb|hangparas| environment. If
you simply use the \verb|\doublespacing| command, this paragraph will
also be double-spaced.
\end{document}
答案2
我還提出了兩種基於itemize
和 的克隆的解決方案description
:
\documentclass{report}
\usepackage{classicthesis}
\usepackage{enumitem}
\usepackage{titlecaps}
\usepackage{etoolbox}
\newlist{biblistI}{itemize}{1}
\setlist[biblistI]{label = {}, labelsep =\fontdimen2\font, wide = 0pt, leftmargin =1.667\parindent}%
\newlist{biblistD}{description}{1}
\setlist[biblistD]{font =\mdseries\normalfont\titlecap, labelsep =\fontdimen2\font}%
\BeforeBeginEnvironment{biblistD}{\renewcommand{\descriptionlabel}[1]{#1}}
\begin{document}
\begin{biblistI}%
\item[Lorem, Ipsum (2016)] at nusquam appellantur his, ut eos erant homero concludaturque.
Albucius appellantur deterruisset id eam, vivendum partiendo dissentiet
ei ius. Vis melius facilisis ea, sea id convenire referrentur, takimata
adolescens ex duo. Ei harum argumentum per. Eam vidit exerci appetere
ad, ut vel zzril intellegam interpretaris. \marginpar{More dummy text.} \end{biblistI}
\begin{biblistD}%
\item[Lorem, Ipsum (2016)] at nusquam appellantur his, ut eos erant homero concludaturque.
Albucius appellantur deterruisset id eam, vivendum partiendo dissentiet
ei ius. Vis melius facilisis ea, sea id convenire referrentur, takimata
adolescens ex duo. Ei harum argumentum per. Eam vidit exerci appetere
ad, ut vel zzril intellegam interpretaris. \marginpar{More dummy text.}
\end{biblistD}
\end{document}
答案3
我提出以下簡化答案(基於專家的第二個答案)以及解決「掛起」模組引起的衝突的解決方案:
- 不要刪除 Bibliography.lyx 中的原始乳膠程式碼。文件->設定->模組,如果您還沒有這樣做,請載入「可自訂清單枚舉」模組。
2:貼上
\usepackage{etoolbox}
\AfterEndEnvironment{hangparas}{\addvspace{0.67\baselineskip}}
\usepackage[notquote]{hanging}
進入 Bibliography.lyx 和 classicthesis.lyx 的 Document->Setting->LaTeX 前言。
重要提示1:不要從“文件”->“設定”->“模組”載入“掛起”模組,因為一旦您合併整個論文,它會導致超出容量的問題。
3:在Bibliography.lyx的正文中,在頁面頂部(必須在原始程式碼之上,否則不起作用),輸入“Ctrl+L”創建Latex程式碼視窗或ERT,貼上\renewcommand{\bibname}{References}
4:透過下拉選單列左上角的選項,將文件環境更改為“Chapter*”(不要選擇“Chapter”,而是選擇帶有星號的這個)
5:輸入“Enter”,“Ctrl+L”建立另一個Latex程式碼窗口,將以下內容貼到視窗中:
\begin{hangparas}{1.27cm}{1}
Surname, Surname, Surname, A. 2005. This is a bibliography. This is
a bibliography. This is a bibliography. This is a bibliography. This
is a bibliography. This is a bibliography.
\end{hangparas}
重要提示2:對於下一篇文章,請重複步驟2,即「Ctrl+L」再次建立Latex程式碼視窗。
重要提示3:如果你想在正文中進行超引用(即當你點擊它時,它會跳到參考文獻列表中引用的具體位置)引用,請參閱我對這個問題的回答如何在 LyX 中交叉引用 ERT?。
評論:此解決方案適合擁有 Microsoft Word 版本的現有參考清單的人。由於“所見即所得”,它可以在 lyX 中輕鬆編輯;它仍然具有正確的頁碼;它在 Contents.lyx(或 TOC)中列為“參考文獻”+可點擊的頁碼。注意參考文獻首頁頁碼在最下方,與古典論文風格一致。頁首和頁碼將像往常一樣從第二頁開始出現在頁面頂部。