调整“编号引用作为脚注”

调整“编号引用作为脚注”

我想评论一下奥黛丽的回答但我需要更多的角色并且我无法回答我自己的问题,所以让我们开始一个新的问题!

首先非常感谢您提供以下链接约瑟夫·赖特解决方案。它运行完美。(除了脚注/大脚怪问题)

根据我之前几乎相同的问题的答案,我得到了来自法国论坛的 Olivier 的提示。他建议使用布尔值(嗯,不知道这是什么?)来从通过详细生成的脚注引用中删除标题。并在最终参考书目中引用标题。

因此,使用style=citestyle=代替标题并添加这个布尔宏,我得到脚注引用为(作者/期刊/日期/页数)和最终引用为(作者/标题/期刊/日期/页数)。

现在有了两件事就完美了。

  • 如果我使用带有 DOI 或 URL 的 ref,我可以直接从 pdf 访问它们。太棒了。但是,如果我将字段 DOI 添加到 Olivier 的布尔限制中,我当然会将它们从脚注引用中删除,这正是我想要的,但链接在最终引用中不再有效?怎么回事?有什么想法吗?
  • 第二件很棒的事情是将最终参考书目中的标题作为 URL 的链接,这样我们就不会看到这些丑陋的 DOI 和 URL。这又可能吗?

好的,这就是我的问题。也许我有点挑剔(我不太清楚这里的意思),我可能会对你给我的解决方案感到满意。但是为了多学点东西...再次感谢你的帮助!

我把代码放在这里:

\documentclass{scrbook}
\usepackage[french]{babel}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage[bibstyle=chem-acs,style=numeric-comp,sorting=none,hyperref]{biblatex}
\usepackage{filecontents}

% No brackets around the number of each bibliography entry
\DeclareFieldFormat{labelnumberwidth}{#1\addperiod}

%---------------------------------------------------------------
% Essentially verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\makeatletter
\ExecuteBibliographyOptions{citetracker,sorting=none}

\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]
    {\usebibmacro{cite:init}%
        \usebibmacro{prenote}}
    {\usebibmacro{citeindex}%
        \usebibmacro{notefullcite}%
        \usebibmacro{cite:comp}}
    {}
    {\usebibmacro{cite:dump}%
        \usebibmacro{postnote}}

\newbibmacro*{notefullcite}{%
    \ifciteseen
        {}
        {\footnotetext[\thefield{labelnumber}]{%
            \usedriver{}{\thefield{entrytype}}\addperiod}}}

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
    {\usebibmacro{cite:init}%
        \let\multicitedelim=\supercitedelim
        \iffieldundef{prenote}
        {}
        {\BibliographyWarning{Ignoring prenote argument}}%
    \iffieldundef{postnote}
        {}
        {\BibliographyWarning{Ignoring postnote argument}}}
    {\usebibmacro{citeindex}%
        \usebibmacro{sfcite}%
        \usebibmacro{cite:comp}}
    {}
    {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
    \ifciteseen
        {}
        {\xappto\cbx@citehook{%
            \noexpand\footnotetext[\thefield{labelnumber}]{%
            \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
    \mkbibsuperscript{#1}%
    \cbx@citehook
    \global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
%---------------------------------------------------------------

\begin{filecontents}{\jobname.bib}
@article{ref1,
    hyphenation = {american},
    title = {Natural Products as Sources of New Drugs over the Last 25 Years},
    author = {Newman, D.J. and Cragg, G.M.},
    journal = {J. of Nat. Prod.},
    volume = {70},
    number = {3},
    pages = {461--477},
    year = {2007},
    doi = {10.1021/np068054v}}
@article{ref2,
    hyphenation = {american},
    title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},
    author = {Newman, D.J.},
    journal = {J. of Med. Chem.},
    volume = {51},
    number = {9},
    pages = {2589--2599},
    year = {2008}}
@online{ref3,
    author = {Quintin, C.},
    title = {Les eponges},
    url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},
    urldate = {2009-05-03}}
@article{Lewis2003,
    author = {Lewis, Frederick D and Zuo, Xiaobing},
    doi = {10.1021/ja035066j},
    issn = {0002-7863},
    journal = {Journal of the American Chemical Society},
    month = jul,
    number = {29},
    pages = {8806--13},
    pmid = {12862475},
    title = {{Activated decay pathways for planar vs twisted singlet phenylalkenes.}},
    url = {http://www.ncbi.nlm.nih.gov/pubmed/12862475},
    volume = {125},
    year = {2003}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\newbool{cbb}


%\DeclareFieldFormat*{doi}{\ifbool{cbb}{{#1\adddot}}{}}  % If you uncomment these doi, url or issn lines they desapear of course from the footnotes but become inactive links in the final bibliography how come ?
\DeclareFieldFormat*{title}{\ifbool{cbb}{{#1\adddot}}{}}
%\DeclareFieldFormat*{url}{\ifbool{cbb}{{#1\adddot}}{}}
%\DeclareFieldFormat*{issn}{\ifbool{cbb}{{#1\adddot}}{}}


First citation.\sfcite{ref1,ref2} \pagebreak \\
Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3} And also \sfcite{Lewis2003}


\global\booltrue{cbb}


\printbibliography


\end{document}

答案1

最近的一些变化biblatex-chem破坏了这个答案。提供的解决方案也不完整。这是更新。

\AtEveryCitekey可以使用hook 和\clearfield, \clearname,命令在引文输出中隐藏选定的书目数据\clearlist。这种方法非常灵活,并且应该能够适应软件包更新。它还使您无需编辑冗长的书目驱动程序。

title通过重新定义书目宏,可以轻松将 DOI 和 URL 嵌入到标题中。chem-acs打印标题时包含一个句号,这会导致引用中出现一些奇怪的标点符号。为了避免这种情况,我重新定义了标题格式,并在title宏中添加了一个句号来分隔文章和期刊标题。这种方法可能需要在 的后续版本中更新biblatex-chem

OP 链接的答案,使用原始脚注仍然存在问题。在这里,我定义了一个新的脚注命令,使用罗马标记来避免干扰引用脚注。一个改进是将脚注排序为更易读的方式。本主题涵盖在另一个问题

请注意babel french重新定义了脚注的外观。更改此设置需要编辑\@makefntextFB,而不是\@makefntext

\documentclass{scrbook}
\usepackage[french]{babel}
\usepackage[colorlinks=true]{hyperref}
\usepackage[style=chem-acs,hyperref=true,babel=hyphen]{biblatex}
\usepackage{filecontents}

\ExecuteBibliographyOptions{%
  citetracker=true,sorting=none,alldates=long,dateabbrev=false,%
  articletitle=true,maxcitenames=1}

% No brackets around the number of each bibliography entry
\DeclareFieldFormat{labelnumberwidth}{#1\addperiod}

% Suppress article title, doi, url, etc. in citations
\AtEveryCitekey{%
  \ifentrytype{article}
    {\clearfield{title}}
    {}%
  \clearfield{doi}%
  \clearfield{url}%
  \clearlist{publisher}%
  \clearlist{location}%
  \clearfield{note}}

% Print year instead of date, when available; make use of urldate
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\renewbibmacro*{date}{% Based on date bib macro from chem-acs.bbx
  \iffieldundef{year}
    {\ifentrytype{online}
       {\printtext[urldate]{\printurldate}}
       {\printtext[date]{\printdate}}}
    {\printfield[date]{year}}}

% Remove period from titles
\DeclareFieldFormat*{title}{#1}

% Embed doi and url in titles, when available
\renewbibmacro*{title}{% Based on title bib macro from biblatex.def
  \ifboolexpr{ test {\iffieldundef{title}}
               and test {\iffieldundef{subtitle}} }
    {}
    {\ifboolexpr{ test {\ifhyperref}
                  and not test {\iffieldundef{doi}} }
       {\href{http://dx.doi.org/\thefield{doi}}
          {\printtext[title]{%
             \printfield[titlecase]{title}%
             \setunit{\subtitlepunct}%
             \printfield[titlecase]{subtitle}}}}
       {\ifboolexpr{ test {\ifhyperref}
                     and not test {\iffieldundef{url}} }
         {\href{\thefield{url}}
            {\printtext[title]{%
               \printfield[titlecase]{title}%
               \setunit{\subtitlepunct}%
               \printfield[titlecase]{subtitle}}}}
         {\printtext[title]{%
            \printfield[titlecase]{title}%
            \setunit{\subtitlepunct}%
            \printfield[titlecase]{subtitle}}}}%
     \newunit}%
  \printfield{titleaddon}%
  \clearfield{doi}%
  \clearfield{url}%
  \ifentrytype{article}% Delimit article and journal titles with a period
    {\adddot}
    {}}

%---------------------------------------------------------------
% Essentially verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\makeatletter

\DeclareCiteCommand{\sfcite}[\cbx@superscript]%
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
      \iffieldundef{postnote}
        {}
        {\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{sfcite}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\newbibmacro*{sfcite}{%
  \ifciteseen
  {}
  {\xappto\cbx@citehook{%
   \noexpand\footnotetext[\thefield{labelnumber}]{%
     \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
  \mkbibsuperscript{#1}%
  \cbx@citehook%
  \global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty

\makeatother
%---------------------------------------------------------------

\long\def\vfootnote#1{%
  \begingroup%
  \def\thefootnote{\roman{footnote}}\footnote{#1}%
  \endgroup}

\begin{filecontents}{\jobname.bib}
@article{ref1,
  hyphenation = {american},
  title = {Natural Products as Sources of New Drugs over the Last 25 Years},
  author = {Newman, D.J. and Cragg, G.M.},
  journal = {J. of Nat. Prod.},
  volume = {70},
  number = {3},
  pages = {461--477},
  year = {2007},
  doi = {10.1021/np068054v}}
@article{ref2,
  hyphenation = {american},
  title = {Natural products as leads to potential drugs:
    {An} old process or the new hope for drug discovery?},
  author = {Newman, D.J.},
  journal = {J. of Med. Chem.},
  volume = {51},
  number = {9},
  pages = {2589--2599},
  year = {2008}}
@online{ref3,
  author = {Quintin, C.},
  title = {Les eponges},
  url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},
  urldate = {2009-05-03}}
@article{ref4,
  hyphenation = {american},
  author = {Lewis, Frederick D and Zuo, Xiaobing},
  doi = {10.1021/ja035066j},
  issn = {0002-7863},
  journal = {J. Am. Chem. Soc.},
  month = jul,
  number = {29},
  pages = {8806--13},
  pmid = {12862475},
  title = {Activated decay pathways for planar vs twisted singlet phenylalkenes},
  url = {http://www.ncbi.nlm.nih.gov/pubmed/12862475},
  volume = {125},
  year = {2003}}
@Book{Armarego2003,
  hyphenation = {british},
  title = {Purification of Laboratory Chemicals},
  publisher = {Butterworth--Heine\-mann},
  year = {2003},
  author = {Armarego, W. L. F. and Chai, Christina Lin Li},
  location = {London},
  edition = {5}}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\chapter{Title}
\null\vfill\noindent
Vanilla footnote.\vfootnote{Vanilla footnote text.}
First citation.\sfcite[cf.][461]{ref1}
Vanilla footnote.\vfootnote{Vanilla footnote text.}
First citation.\sfcite[e.g.][2589]{ref2}
First ``multi'' citation.\sfcite{ref3,Armarego2003}
\chapter{Title}
\null\vfill\noindent
Second citation.\sfcite{ref2}
Second citation.\sfcite{ref3}
Vanilla footnote.\vfootnote{Vanilla footnote text.}
Second citation.\sfcite{ref1}
First citation.\sfcite{ref4}
\printbibliography
\end{document}

第一章的输出: 在此处输入图片描述

第二: 在此处输入图片描述

参考书目如下: 在此处输入图片描述

相关内容