5

Ok guys, here comes a really tough one, so I don't need an expert, but a superhero. I need to customize my idem/ibidem to match these possibilities:

  • Same bibentry, same page -> Ibid. [without printing the page number]
  • Same bibentry, different page -> Ivi, pagenumber
  • Same author, different work -> ID. and what follows

I almost got there, but the footnote 2 of my MWE should be: 2. Ibid.

Perhaps I should introduce a new command which basically is: if there is an ibidem with the same page cited, print Ibid. and kill the pagenumber. The problem is that I have no idea about how to explain it to mr. LaTeX.

I'd appreciate very much any help on this hell issue

MWE:

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\begin{filecontents}{archivio.bib}

@article{Ben:Mat,
    Author = {Lise {Bender Jørgensen}},
    Journal = {Antiquité Tardive},
    Pages = {87-99},
    Title = {A Matter of Material: Changes in Textiles from Roman Sites in Egypt's Eastern Desert},
    Volume = {11},
    Year = {2004}}

@book{Jor:For,
    Address = {København},
    Author = {Lise {Bender Jørgensen}},
    Publisher = {Nordiske Fortidsminder},
    Title = {Forhistoriske textiler i Skandinavien},
    Year = {1986}}

\end{filecontents}

\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}

%%% bibliografia
\usepackage[babel,italian=guillemets]{csquotes}
\usepackage{xpatch}     
\usepackage[    style=verbose-trad2,            
            language=italian,
            useprefix=true,                 
            firstinits=true,    
            citepages=omit,                 
            backend=biber,  
        ]{biblatex} 

\DefineBibliographyStrings{italian}{%                           Customizza Idem
  idem   = {\textsc{id}},
  ibidem = {Ivi},
}

%Idem appears on the second occurrence of the author name
\xpatchbibmacro{author}{\printnames{author}}{\iffootnote{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}{\usebibmacro{cite:idem}}{\printnames{author}}}{\printnames{author}}}{}{}
\xpatchbibmacro{editor}{\printnames{editor}}{\iffootnote{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}{\usebibmacro{cite:idem}}{\printnames{editor}}}{\printnames{editor}}}{}{}
\xpatchbibmacro{translator}{\printnames{translator}}{\iffootnote{\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}{\usebibmacro{cite:idem}}{\printnames{translator}}}{\printnames{translator}}}{}{}


\addbibresource{archivio.bib}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

First citation\footcite[88]{Ben:Mat}\\
I'citing the same page I need an \textit{ibidem}\footcite[88]{Ben:Mat} and no page number printed \\
Now I'm citing a different page, so I need \textit{Ivi}\footcite[87]{Ben:Mat}. \\
Here I'm citing just the same author, and I'd need \textsc{id.}\footcite{Jor:For}

\printbibliography

\end{document}
  • 1
    What does "Ivi" stand for? – thymaro Mar 6 '18 at 19:39
  • It's old italian and it means "here" – Teodoro Mar 9 '18 at 10:30
5

The ibidpage option can almost do that. We just need to define the two new strings and use those. You also need to patch slightly different macros for the idem.

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Ben:Mat,
  Author = {Bender Jørgensen, Lise},
  Journal = {Antiquité Tardive},
  Pages = {87-99},
  Title = {A Matter of Material: Changes in Textiles from Roman Sites in Egypt's Eastern Desert},
  Volume = {11},
  Year = {2004},
}

@book{Jor:For,
  Address = {København},
  Author = {Bender Jørgensen, Lise},
  Publisher = {Nordiske Fortidsminder},
  Title = {Forhistoriske textiler i Skandinavien},
  Year = {1986},
}
\end{filecontents}

\documentclass[11pt, openany]{book}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{italian}
\setotherlanguages{latin, english, french}

\usepackage[autostyle,italian=guillemets]{csquotes}
\usepackage{xpatch}     
\usepackage[style=verbose-trad2,            
            language=italian,
            useprefix=true,                 
            giveninits=true,    
            citepages=omit,                 
            backend=biber,  
            ibidpage=true,
        ]{biblatex} 

\NewBibliographyString{ibidemloccit,ibidemnoloccit}
\DefineBibliographyStrings{italian}{%
  idem           = {\textsc{id}},
  ibidemloccit   = {\mkbibemph{\autocap{i}bid\adddot}},
  ibidemnoloccit = {Ivi},
}

\xpatchbibmacro{author}
  {\printnames{author}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
       {\usebibmacro{cite:idem}}
       {\printnames{author}}}
     {\printnames{author}}}
  {}{}
\xpatchbibmacro{bbx:editor}
  {\printnames{editor}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{editor}}}
     {\printnames{editor}}}
  {}{}
\xpatchbibmacro{bbx:translator}
  {\printnames{translator}}
  {\iffootnote
     {\ifthenelse{\ifciteidem\AND\NOT\boolean{cbx:noidem}}
        {\usebibmacro{cite:idem}}
        {\printnames{translator}}}
     {\printnames{translator}}}
  {}{}

\renewbibmacro*{cite:ibid}{%
  \printtext{%
    \bibhyperlink{cite\csuse{cbx@lastcite@\thefield{entrykey}}}{%
      \ifloccit
        {\bibstring[\mkibid]{ibidemloccit}%
         \global\toggletrue{cbx:loccit}}
        {\bibstring[\mkibid]{ibidemnoloccit}}}}}

\addbibresource{\jobname.bib}
\begin{document}
First citation\footcite[88]{Ben:Mat}\\
I'm citing the same page I need an \textit{ibidem}\footcite[88]{Ben:Mat} and no page number printed \\
Now I'm citing a different page, so I need \textit{Ivi}\footcite[87]{Ben:Mat}. \\
Here I'm citing just the same author, and I'd need \textsc{id.}\footcite{Jor:For}

\printbibliography
\end{document}

enter image description here

| improve this answer | |
  • The answer works perfectly in verbose-trad2. I'm actually using ext-verbose-trad1, where the patch seems not to apply. How to apply it also in the style I'm using? – Paolo Polesana Aug 31 at 17:18
  • @PaoloPolesana Edit your question tex.stackexchange.com/q/560415/35864 with a proper example that reproduces the screenshot you are showing in the question and we can reopen it. – moewe Aug 31 at 17:40
  • I just edited the old question tex.stackexchange.com/q/560415/35864 – Paolo Polesana Sep 1 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.