如何将书目条目的简写与文本中的首字母缩略词结合起来?

如何将书目条目的简写与文本中的首字母缩略词结合起来?

我想为下面的代码创建 \printshorthands,并将文本中使用的首字母缩略词与书目简写放在同一个列表中。有人能帮忙吗?

\documentclass[12pt]{report} 

\usepackage{fontspec}
\usepackage[hidelinks]{hyperref}

\usepackage{xunicode}
\usepackage[no-sscript]{xltxtra}
\usepackage{csquotes}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\setotherlanguages{german,english,greek,polish,russian}

\setmainfont[Mapping=tex-text]{CMU Serif}

\usepackage{setspace}
\usepackage{acronym}
\usepackage{tocloft}



\newfontfamily\greekfont[Script=Greek,Mapping=tex-text]{CMU Serif}
\newfontfamily\russianfont[Script=Cyrillic,Mapping=tex-text]{CMU Serif}



\renewcommand\cftchappresnum{\chaptername\space}
\setlength{\cftchapnumwidth}{3.5cm}


\renewcommand{\thechapter}{}
\renewcommand{\thesection}{\Roman{section}.}



\usepackage[backend=biber,style=verbose-ibid,citepages=suppress,sorting=nty,babel=other]{biblatex}

\renewcommand\mkbibnamelast[1]{\textsc{#1}}


\DefineBibliographyStrings{french}{%
  pages = {pp\adddot},
}

\newbibmacro*{cite:xref}{%
    \ifciteseen
        {\iffieldundef{shorthand}
            {\usebibmacro{cite:short}}
            {\usebibmacro{cite:shorthand}}}
        {\ifentrytype{periodical}
            {\usebibmacro{cite:short}\usebibmacro{shorthandintro}}
            {\usebibmacro{cite:full}}}}

\DeclareCiteCommand{\xrefcite}
    {}
    {\usebibmacro{cite:xref}}
    {}
    {}

\renewbibmacro*{journal}{%
    \iffieldundef{xref}
        {\iffieldundef{journaltitle}
            {}
            {\printtext[journaltitle]{%
                \printfield[titlecase]{journaltitle}%
                \setunit{\subtitlepunct}%
                \printfield[titlecase]{journalsubtitle}}}}
        {\entrydata{\thefield{xref}}{%
            \ifboolexpr{
                test {\iffieldundef{title}}
                and
                test {\iffieldundef{subtitle}}
            }
            {}
            {\printtext[title]{\printfield[titlecase]{title}%
                \setunit{\subtitlepunct}%
                \printfield[titlecase]{subtitle}}}}}}

\DeclareBibliographyDriver{article}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{bytranslator+others}%
    \newunit\newblock
    \printfield{version}%
    \newunit\newblock
    \usebibmacro{in:}%
    \ifthenelse{\ifbibliography\OR\iffieldundef{xref}}
        {\usebibmacro{journal+issuetitle}%
            \newunit
            \usebibmacro{byeditor+others}%
            \newunit
            \usebibmacro{note+pages}%
            \newunit\newblock
            \iftoggle{bbx:isbn}{\printfield{issn}}{}%
            \newunit\newblock
            \usebibmacro{doi+eprint+url}%
            \newunit\newblock
            \usebibmacro{addendum+pubstate}%
            \newunit\newblock
            \setunit{\bibpagerefpunct}\newblock
            \usebibmacro{pageref}%
            \usebibmacro{finentry}}%
        {\xrefcite{\thefield{xref}}%
            \ifciteseen{}{%
                \setunit{\addspace}%
                \usebibmacro{volume+number+eid}%
                \setunit{\addspace}%
                \usebibmacro{issue+date}}}}

\newbibmacro*{in:collection}{%
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \printfield{edition}%
    \newunit
    \iffieldundef{maintitle}{\printfield{volume}\printfield{part}}{}%
    \newunit
    \printfield{volumes}%
    \newunit\newblock
    \usebibmacro{series+number}%
    \newunit\newblock
    \usebibmacro{publisher+location+date}%
    \newunit\newblock
    \iftoggle{bbx:isbn}{\printfield{isbn}}{}}

\DeclareBibliographyDriver{incollection}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{in:}%
    \iffieldundef{xref}
        {\usebibmacro{maintitle+booktitle}%
            \newunit\newblock
            \usebibmacro{in:collection}}%
        {\ifcitation
            {\xrefcite{\thefield{xref}}}
            {\entrydata{\thefield{xref}}{%
                \usebibmacro{title}%
                \newunit\newblock
                \usebibmacro{in:collection}}}}%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}%
    \setunit{\bibpagerefpunct}\newblock
    \usebibmacro{pageref}%
    \usebibmacro{finentry}}

\newbibmacro*{in:proceedings}{%
    \usebibmacro{event+venue+date}%
    \newunit\newblock
    \usebibmacro{byeditor+others}%
    \newunit\newblock
    \iffieldundef{maintitle}{\printfield{volume}\printfield{part}}{}%
    \newunit
    \printfield{volumes}%
    \newunit\newblock
    \usebibmacro{series+number}%
    \newunit\newblock
    \printlist{organization}%
    \newunit
    \usebibmacro{publisher+location+date}%
    \newunit\newblock
    \iftoggle{bbx:isbn}{\printfield{isbn}}{}}

\DeclareBibliographyDriver{inproceedings}{%
    \usebibmacro{bibindex}%
    \usebibmacro{begentry}%
    \usebibmacro{author/translator+others}%
    \setunit{\labelnamepunct}\newblock
    \usebibmacro{title}%
    \newunit
    \printlist{language}%
    \newunit\newblock
    \usebibmacro{byauthor}%
    \newunit\newblock
    \usebibmacro{in:}%
    \iffieldundef{xref}
        {\usebibmacro{maintitle+booktitle}%
            \newunit\newblock
            \usebibmacro{in:proceedings}}%
        {\ifcitation
            {\xrefcite{\thefield{xref}}}
            {\entrydata{\thefield{xref}}{%
                \usebibmacro{title}%
                \newunit\newblock
                \usebibmacro{in:proceedings}}}}%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
    \newunit\newblock
    \printfield{note}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}%
    \setunit{\bibpagerefpunct}\newblock
    \usebibmacro{pageref}
    \usebibmacro{finentry}}


\bibliography{test}
\frenchspacing


\begin{filecontents}{\jobname.bib}

@Inproceedings{Science:Environment2000,
title = {Environmental Science and Management in Developing versus Developed Countries: education and research perspectives},
xref = {Environment2000},
author = {John Doe},
pages = {23--45},
keywords = {primary}
}

@Inproceedings{health:Environment2000,
title = {Public health: implications from a compromised environment},
xref = {Environment2000},
author = {Ho Chi Minh},
pages = {330--335},
keywords = {primary}
}

@Proceedings{Environment2000,
title = {International Conference on Environmental Pollution, Restoration, and Management},
shorthand = {ICEP},
date = {2000},
keywords = {primary}}

@InCollection{westfahl:space,
xref = {westfahl:frontier},
author = {Westfahl, Gary},
title = {The True Frontier},
subtitle = {Confronting and Avoiding the Realities of Space in American Science Fiction Films},
pages = {55--65},
keywords = {secondaire}}

@Collection{westfahl:frontier,
editor = {Westfahl, Gary},
shorthand = {FTSF},
title = {Space and Beyond},
subtitle = {The Frontier Theme in Science Fiction},
publisher = {Greenwood},
location = {Westport, Conn. and London},
date = {2000},
keywords = {secondaire}}

@Article{Episkepsis1970:1,
title = {Decide ne plus refuser},
xref = {Episkepsis},
date = {1970},
number = {1},
pages = {6--7},
keywords = {primary}}

@Article{Episkepsis1972:62,
title = {La jeunesse et la preparation},
xref = {Episkepsis},
date = {1972},
number = {62},
pages = {5--7},
keywords = {primary}}

@Article{Episkepsis2009:701,
title = {Reunion a Chambesy de la IV\textsuperscript{e} Conference},
xref = {Episkepsis},
date = {2009},
number = {701},
pages = {8--21},
keywords = {secondaire}}

@periodical{Episkepsis,
options = {skipbib=true},
title = {Episkepsis},
shorthand = {EP},
date = {1970/},
publisher = {Ceneter OPO},
address = {Chambesy--Geneve},
keywords = {primary}}

\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}

\doublespacing

\tableofcontents

\printshorthands



\renewcommand{\chaptername}{Préface}
\addtocontents{toc}{\protect\renewcommand\protect\chaptername{Préface}}
\chapter{Le choix du thème}
Balah blah blah L'Organisation des Nations unies (ONU) 
\footcite[cf.][332]{health:Environment2000}
\footcite{Science:Environment2000}


\renewcommand{\chaptername}{Introduction}
\addtocontents{toc}{\protect\renewcommand\protect\chaptername{Introduction}}
\chapter{Initiatives du PO}
\section{Les lettres du PO 1904}
Balah blah blah (ONU) 
\footcite[331]{health:Environment2000}
\footcite{westfahl:space}



\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\setcounter{chapter}{0}
\setcounter{section}{0}
\renewcommand{\chaptername}{Chapitre}
\addtocontents{toc}{\protect\renewcommand\protect\chaptername{Chapitre}}
\chapter{Les décisions des CP}
\section{Les décisions des CP de Rhodes 1964}

\footcite{westfahl:frontier}
\footcite[cf.][6]{Episkepsis1972:62}



\chapter{L'ouvre de la CIP}
\section{Les décisions de la I\textsuperscript{re} CPP}
\footcite{Episkepsis2009:701}
\footcite[7]{Episkepsis1972:62}


\chapter{Évaluation de l'œuvre accomplie et perspectives}
\section{Évaluation de l'œuvre accomplie}

\footcite{Episkepsis2009:701}
\footcite[7]{Episkepsis1972:62}

\renewcommand{\thechapter}{}
\renewcommand{\chaptername}{Conclusion}
\addtocontents{toc}{\protect\renewcommand\protect\chaptername{Conclusion}}
\chapter{}




\printbibheading[heading=bibintoc]
\printbibliography[keyword=primary,heading=subbibliography,title={Les sources principaux}]
\printbibliography[keyword=secondaire,heading=subbibliography,title={Les sources secondaires}]

\end{document}

修正后:

得到这样的列表

西格勒斯

EP Episkepsis(1970–)。

FTSF Gary W. 编辑。《太空和超越。科幻小说中的边疆主题》。康涅狄格州韦斯特波特和伦敦:格林伍德,2000 年。

GSM 移动特别集团

ICEP 环境污染、修复和管理国际会议。2000 年。

ONU 联合国组织

我不知道该使用哪个包以及如何使用。acronym或者glossaries其他的,原则上它不适合我。

谢谢

答案1

biblatex此解决方案仅解决了您关于创建文本中使用的首字母缩略词的速记列表的问题。请注意,它本质上是一种黑客行为,要求您在.bib文件中指定首字母缩略词。它也不会对超链接或页面引用进行任何花哨的操作,就像acronym包一样。

\documentclass[12pt]{report}
\usepackage{filecontents}
\usepackage[style=verbose-ibid]{biblatex}

\newbibmacro*{cite:acro}{%
    \ifciteseen
        {\printfield{shorthand}}
        {\printfield{labeltitle}\addspace\mkbibparens{\printfield{shorthand}}}}

\DeclareCiteCommand{\acro}{}{\usebibmacro{cite:acro}}{}{}

\DeclareFieldFormat[customa]{title}{#1}
\DeclareBibliographyDriver{customa}{\printfield{title}\nopunct}

\begin{filecontents}{\jobname.bib}
@Proceedings{Env,
title = {International Conference on Environmental Pollution, Restoration, and Management},
shorthand = {ICEP},
date = {2000}}

@Periodical{Epi,
title = {Episkepsis},
shorthand = {EP},
date = {1970/},
publisher = {Ceneter OPO},
address = {Chambesy--Geneve}}

@customa{ONU,
options = {skipbib=true},
title = {L'Organisation des Nations unies},
shorthand = {ONU}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
The \acro{ONU} reads \cite{Epi}. The \acro{ONU} published a talk in the \cite{Env}.
\printshorthands
\printbibliography
\end{document}

在此处输入图片描述 在此处输入图片描述

相关内容