我正在用 LaTex 处理书目。在书目中,我们通常会引用其他书籍及其标题等。有些地方我们想要直接输入标题,而有些地方我们只想要标题的缩写形式。至于作者条目,我们可以从 .bib 文件中写入的相同数据生成简称和完整作者。但我无法对标题执行此操作。我如何从标题生成昵称。我使用的样式有问题吗?这是我的代码。
<!-- language: lang-js -->
\RequirePackage{filecontents}
\begin{filecontents*}{demo.bib}
@book{is4562000,
title={Indian Standard Plain and reinforced concrete--code of
practice (IS 456 : 2000)},
author={Cement and Concrete Sectional Committee, CED 2},
journal={New Delhi: },
year={2000},
publisher={Bureau of Indian Standards},
}
@book{aci1981aci,
title={ACI Standard Building Code Requirements for Reinforced
Concrete (ACI 318-77)},
author={{ACI Committee 318}},
series={ACI standard 318-77},
url={https://books.google.co.in/books?id=amEOfgtA-DYC},
year=1981,
publisher={American Concrete Institute},
}
@STANDARD {aci31877,
title = {ACI Standard Building Code Requirements for
Reinforced Concrete (ACI 318-77)},
organization = {American Concrete Institute},
institution = {American Concrete Institute},
author = {{ACI Committee 318}},
language = {English},
number = {ACI standard 318-77},
year = 1981
}
\end{filecontents*}
\documentclass{article}
\bibliographystyle{unsrt}
\usepackage[backend=biber]{biblatex}
\addbibresource{demo.bib}
\DeclareCiteCommand{\citepublisher}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\printlist{publisher}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
This is demo \cite{is4562000,aci1981aci,aci31877}
and the publisher of \texttt{aci1981aci} is citepublisher{aci1981aci}
and of \texttt{is4562000} \citepublisher{is4562000}.
title : \citetitle{is4562000}\\
\textbf{Enteres from @Book}\\
\textbf{Author shortname:} \citeauthor*{is4562000}
\textbf{Author Fullname:} \citeauthor{is4562000}\\
\textbf{Entries from @standard}
\cite{aci31877}
\textbf{@Standard title}= \citetitle{aci31877}
\textbf{@Standard author}= \citeauthor{aci31877}
\textbf{@Standard shortauthor}= \citeauthor*{aci31877}
\textbf{@Standard year}= \citeyear{aci31877}
\printbibliography
\end{document}
输出:
答案1
重复我的回答LaTeX 社区:
您只需要定义简称作者和简称标题,biblatex 会默认打印它们。
%\RequirePackage{filecontents}
\begin{filecontents*}{demo.bib}
@book{is4562000,
title={Indian Standard Plain and reinforced concrete--code of
practice (IS 456~:~2000)},
shorttitle = {IS 456~:~2000},
author={{Cement and Concrete Sectional Committee, CED 2}},
shortauthor={{CED 2}},
location={New Delhi},
journal={New Delhi},% A book cannot be published
% in a journal, that doesn't make any sense
year={2000},
publisher={Bureau of Indian Standards},
}
@book{aci1981aci,
title={ACI Standard Building Code Requirements for Reinforced
Concrete (ACI 318-77)},
author={{ACI Committee 318}},
series={ACI standard 318-77},
url={https://books.google.co.in/books?id=amEOfgtA-DYC},
year=1981,
publisher={American Concrete Institute},
}
@STANDARD {aci31877,
title = {ACI Standard Building Code Requirements for
Reinforced Concrete (ACI 318-77)},
shorttitle = {ACI 318-77},
organization = {American Concrete Institute},
institution = {American Concrete Institute},
author = {{ACI Committee 318}},
language = {English},
number = {ACI standard 318-77},%that
% doesn't seem to be a proper number either
year = 1981
}
\end{filecontents*}
\documentclass{article}
%\usepackage[autostyle]{csquotes}
%\bibliographystyle{unsrt}%JB: Tht doesn't make any sense with biblatex
\usepackage[backend=biber]{biblatex}
\addbibresource{demo.bib}
\DeclareCiteCommand{\citepublisher}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\printlist{publisher}}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
Just citing the title: (\citetitle{is4562000})
Just citing the title: \citetitle{aci31877}
just citing the author: \citeauthor{is4562000}
just citing the author: \citeauthor{aci31877}
\printbibliography
\end{document}
答案2
扫描 biblatex 文档(使用 texlive2015 中的 texdoc),没有任何简称字段。据说,您可以想象具有长标题或短标题的替代书目条目,并在决定使用哪一个时使用这些条目。问题将处理你的 bib 文件中的重复项。