在 .bib 註釋中提供自訂間距

在 .bib 註釋中提供自訂間距

我正在創建一個帶註釋的參考書目(IEEE 風格),註釋需要採用特定格式:左對齊,每個段落都應該縮排。我沒有時間為任何類型的論文/期刊編寫自訂格式化程序,因此我結合了最新的IEEEtran.bstIEEE註釋由 Titus Barik 撰寫mystyle.bst

問題是我無法在註釋字段中添加額外的空格,我嘗試了\hspace, ~, \,的各種組合\indent,這似乎只會刪除下一個單字。

main.tex:

\documentclass[11pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[top=2cm,bottom=2cm,left=1cm,right=1cm]{geometry}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{setspace}

\begin{document}
\doublespacing
\nocite{*}
\bibliographystyle{mystyle}
\bibliography{annot}
\end{document}

一個簡短的例子annot.bib,縮排在該部分不起作用annote

@INBOOK{6284438,
  author={S. {Ullman}},
  booktitle={{The Interpretation of Visual Motion}}, 
  title={{The Interpretation of Structure from Motion}}, 
  year={1979},
  volume={},
  number={},
  pages={133-175},
  keywords={},
  doi={},
  ISSN={},
  publisher={MITP},
  isbn={9780262257121},
  url={https://ieeexplore.ieee.org/document/6284438},
  annote = {
    This paragraph is indented via the style file
    \newline This works, but not indented
    \newline ~~~~This doesn't work
  }
}

摘錄自mystyle.bst, indentation using 的~作品在這裡(並且它顯然只適用於註釋的第一段):

% annotation addition
FUNCTION {format.annotate}
{ annote empty$
    { "" }
    { "\begin{flushleft}~~~~~~~~"
        annote
        * "\end{flushleft}" *
    }
    if$
}

答案1

我發現星號命令不會被忽略,因此解決方案是在適當的情況下添加以下內容:

\hspace*{1em}

相關內容