多次引用標準(歐洲規範)但不同的部分

多次引用標準(歐洲規範)但不同的部分

因此,我想在沒有大量參考書目的情況下參考歐洲規範中的幾個部分。今天,我正在為我需要引用的標準中的每個部分創建一個新的 @standard,這當然會在參考書目中生成 15 個引用。

例子

如[1]和[2]所述,[3]中參數的選擇...

參考書目

[1] SS-EN 1992-1-1 歐洲規範第 4.5.6.7 節

[2] SS-EN 1992-1-1 歐洲規範第 4.5.6.8 節

[3] SS-EN 1992-1-1 歐洲規範第 4.5.6.9 節

這就是我想要實現的目標:

例子

如 [1a] 和 [1b] 所述,[1c] 中參數的選擇...

參考書目

[1] SS-EN 1992-1-1 歐洲規範

    (a) 第 4.5.6.7 節

    (b) 第 4.5.6.8 節

    (c) 第 4.5.6.9 節

有什麼好的辦法嗎?

答案1

歡迎來到 TeX.SE!

前段時間面臨一個非常類似的問題,我在高度讚賞的幫助下修改了@set處理方法biblatex莫埃韋得到以下結果:

在此輸入影像描述

使用以下解決方案調整我之前評論中提到的答案這個問題和主要部分這個答案根據您的需要,您可以使用以下內容:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=numeric-comp,mcite,subentry,sorting=nty,sortsets=true]{biblatex}
\usepackage{enumitem}

\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{default}{family-given}
\DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}

\makeatletter
\DeclareEntryOption[string]{multivolumehead}{\def\xs@mv@head{#1}}
\define@key{xs@multivolume}{multivolumehead}{\def\xs@mv@head{#1}}

\DeclareBibliographyDriver{multivolumechild}{%
    \ifboolexpr{
      test {\ifnamesequal{author}{savedauthor}}
      or
      test {\ifnameundef{author}}
    }
      {\nopunct}
      {\printnames{author}%
       \newunit\newblock}%
    \iffieldundef{volume}
      {}
      {\printfield{volume}%
       \printfield{part}%
       \newunit\newblock}%
    \usebibmacro{title}%
    \newunit\newblock
    \ifboolexpr{
      test {\ifnamesequal{editor}{savededitor}}
      or
      test {\ifnameundef{editor}}
     }{}
      {\usebibmacro{byeditor+others}%
       \newunit\newblock}%
    \ifboolexpr{
      test {\iflistsequal{location}{savedlocation}}
      or
      test {\iflistundef{location}}
     }{}
      {\printlist{location}}%<- typo
    \ifboolexpr{
      test {\iflistsequal{publisher}{savedpublisher}}
      or
      test {\iflistundef{publisher}}
    } {\setunit*{\addcomma\space}}%
      {\setunit*{\addcolon\space}%
       \printlist{publisher}%
       \setunit*{\addcomma\space}}%
    \newunit\newblock%
    \ifboolexpr{
      test {\iffieldsequal{year}{savedyear}}
      or
      test {\iffieldundef{year}}
     }{}
      {\printdate%
       \newunit\newblock}%
    \ifboolexpr{
      test {\iffieldsequal{isbn}{savedisbn}}
      or
      not togl {bbx:isbn}
     }{}
      {\printfield{isbn}}%
    \newunit\newblock%
    \usebibmacro{chapter+pages}%
  }

\DeclareBibliographyDriver{set}{%
  \edef\xs@mv@set{\abx@field@entrykey}%
  \ifboolexpr{
    test {\ifundef{\xs@mv@head}}
    or
    test {\ifblank{\xs@mv@head}}
    }
    {\entryset{}{}%
     \newunit\newblock
     \usebibmacro{setpageref}%
     \finentry}
    {\entrydata*{\xs@mv@head}{\usedriver{}{\abx@field@entrytype}\finentrypunct%
       % reload the set so we can access the header via saved
       \entrydata*{\xs@mv@set}{
         % don't issue \leavevmode inside here
         \let\blx@leavevmode\relax
         \setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}%
         \begin{itemize}[label={\printfield{entrysetcount})},labelindent=0.5\labelnumberwidth,labelsep=1ex,itemindent=0pt,leftmargin=*]
         \entryset{\item \ifcsdef{blx@bbx@multivolume\abx@field@savedentrytype}
           {\edef\abx@field@entrytype{multivolume\abx@field@savedentrytype}}
           {\message{^^Jxs Warning: BibliographyDriver blx@bbx@multivolume@\abx@field@entrytype\space undefined
                     ^^J** Using fallback driver multivolumechild
                     ^^J** If you get unexpected entries in the bibliography consider to create a new BibliographyDriver multivolume@\abx@field@savedentrytype.}%
            \def\abx@field@entrytype{multivolumechild}}}{}%
         \finentrypunct\end{itemize}\nopunct}}%
     \newunit\newblock
     \usebibmacro{setpageref}%
     \finentry}}

\newcounter{cbx@tempcntc}% no. of entrysetcounts we skipped
\newcounter{cbx@tempcntd}% 'predicted' entrysetcount
\renewbibmacro*{cite:init}{%
  \global\boolfalse{cbx:parens}%
  \global\undef\cbx@lasthash
  \global\undef\cbx@lastnumber
  \global\undef\cbx@lastprefix
  \global\undef\cbx@lastcount
  \setcounter{cbx@tempcnta}{0}%
  \setcounter{cbx@tempcntb}{-2}%
  \setcounter{cbx@tempcntc}{0}%
  \setcounter{cbx@tempcntd}{-1}}

\newcommand*{\cbx@iflabelnumberequalslast}{%
  \iffieldequals{labelnumber}{\cbx@lastnumber}}

\newcommand*{\cbx@iflabelprefixequalslast}{%
  \ifundef\cbx@lastprefix
    {\iffieldundef{labelprefix}
       {\@firstoftwo}
       {\@secondoftwo}}
    {\iffieldequals{labelprefix}{\cbx@lastprefix}
       {\@firstoftwo}
       {\@secondoftwo}}}

\newcommand*{\cbx@iflabelequalslast}{%
  \iffieldequals{labelnumber}{\cbx@lastnumber}
    {\cbx@iflabelprefixequalslast
       {\@firstoftwo}
       {\@secondoftwo}}
    {\@secondoftwo}}

\renewbibmacro*{cite:comp:inset}{%
  \stepcounter{cbx@tempcntd}%
  \cbx@iflabelequalslast
    {}
    {\usebibmacro{cite:dump}%
     \ifnumgreater{\value{cbx@tempcntb}}{-1}
       {\multicitedelim}
       {}}%
  \printtext[bibhyperref]{%
    \cbx@iflabelequalslast
      {}
      {\setcounter{cbx@tempcntd}{-1}%
       \printfield{labelprefix}%
       \printfield{labelnumber}%
       \savefield{labelprefix}{\cbx@lastprefix}%
       \savefield{labelnumber}{\cbx@lastnumber}}%
    \ifnumequal{\thefield{entrysetcount}}{\value{cbx@tempcntd}}
      {\savefield{entrykey}{\cbx@lastkey}%
       \savefield{entrysetcount}{\cbx@lastcount}%
       \stepcounter{cbx@tempcntc}}
      {\usebibmacro{cite:dump}%
       \ifnumgreater{\value{cbx@tempcntd}}{0}
         {\multicitedelim}
         {}%
       \printfield{entrysetcount}}}%
    \setcounter{cbx@tempcntd}{\thefield{entrysetcount}}%
    \setcounter{cbx@tempcntb}{-1}}

\renewbibmacro*{cite:dump}{%
  \ifnumgreater{\value{cbx@tempcntc}}{0}
    {\ifnumgreater{\value{cbx@tempcntc}}{1}
       {\bibrangedash}
       {\multicitedelim}%
     \bibhyperref[\cbx@lastkey]{%
       \printtext[entrysetcount]{\cbx@lastcount}}}
    {}%
  \setcounter{cbx@tempcntc}{0}%
  \ifnumgreater{\value{cbx@tempcnta}}{0}
    {\ifnumgreater{\value{cbx@tempcnta}}{1}
       {\bibrangedash}
       {\multicitedelim}%
     \bibhyperref[\cbx@lastkey]{%
       \ifdef\cbx@lastprefix
         {\printtext[labelprefix]{\cbx@lastprefix}}
         {}%
       \printtext[labelnumber]{\cbx@lastnumber}}%
     \global\undef\cbx@lastprefix}
    {}%
  \setcounter{cbx@tempcnta}{0}}
\makeatother

\renewcommand{\entrysetpunct}{\finentrypunct}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Reference{ISO:a,
  crossref = {ISO:base},
  title    = {section 4.5.6.7},
  options  = {dataonly},
}
@Reference{ISO:b,
  crossref = {ISO:base},
  title    = {section 4.5.6.8},
  options  = {dataonly},
}
@Reference{ISO:c,
  crossref = {ISO:base},
  title    = {section 4.5.6.9},
  options  = {dataonly},
}
@Reference{ISO:base,
  title    = {SS-EN 1992-1-1 eurocode},
  options  = {dataonly},
}
@Set{ISO,
  entryset = {ISO:a,ISO:b,ISO:c},
  options  = {multivolumehead=ISO:base},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
As described in \cite{ISO:a} and \cite{ISO:b} the chose of parametes in \cite{ISO:c}, all those are part of \cite{ISO}.

Furthermore multiple cites in one \verb+\cite+ command like \verb+\cite{ISO:a,ISO:c,ISO:b}+ are compressed to \cite{ISO:a,ISO:c,ISO:b}.

\printbibliography
\end{document}

注意,如果不使用則\cite{ISO}必須添加\nocite{},否則會失敗。

相關內容