
對於海報和演示文稿,由於文件較小,我希望避免將有關出版物的資訊寫入繁瑣的 bibtex 文件中,而是直接在文件中引用所有內容。例如,最後我想建立手動參考書目:
papername1 label1 description1
(文件中僅描述了論文名稱和描述)papername2 label2 description2
…
然後在文字中我想按名稱引用標籤,這可以透過例如完成\nameref{label1}
並且papername1
應該顯示。
現在,我只是在沒有標籤的情況下鍵入它,並透過手動編寫來引用papername
。
如果不查看 BibTeX 檔案就知道它是否可以與標籤一起使用,那就太酷了。很高興知道一些沒有 BibTeX 的解決方案(或至少只是自動生成的 BibTeX 文件,無需大量輸入),並且不需要在 BibTeX 約定中為某種類型的論文(例如文章、書籍)寫入變量,ETC。 。
答案1
如果您願意使用如下所示的一些預定義介面 -\paperdesc{<paper>}{<description>}
來設定您的論文描述,您可以使用它來自動更新\@currentlabel
(保存當前標籤值的巨集)。將其更新為允許您像往常一樣<paper>
使用,檢索適當的.\label
\ref
<paper>
\documentclass{article}
%\usepackage{hyperref}
\makeatletter
\newcommand{\paperdesc}[2]{%
\csname phantomsection\endcsname % If using hyperref
\def\@currentlabel{#1}% Update the current label
\textsc{#1}, % Print paper in Small Caps
#2% Print paper description
}
\makeatother
\begin{document}
See~\ref{paper:first} and~\ref{paper:third}
\begin{itemize}
\item \paperdesc{Paper 1}{Description of Paper 1} \label{paper:first}
\item \paperdesc{Paper B}{Description of Paper B}
\item \paperdesc{Paper III}{Description of Paper III} \label{paper:third}
\end{itemize}
\end{document}
如果與其他非標準文件類或套件結合使用,此解決方案可能需要更多工作。