Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I can not get "in collaboration with" for @ inproceedings entry because it concerns the work and not the article as I would.

@INPROCEEDINGS{roure07,
  author = {Réjane Roure},
  title = {Armes et têtes coupées au Cailar (Gard): premier éléments de réflexion
    sur un dépôts rituel en Gaule méditerranéenne},
  booktitle = {L'âge du Fer dans l'arc jurassien et ses marges : dépôts, lieux sacrés
    et territorialité à l'âge du Fer : actes du XXIX\ieme{} colloque
    international de l'AFEAF, volume 2},
  year = {2007},
  editor = {{\relax Ph}ilippe Barral and Alain Daubigney and Cynthia Dunning
    and Gilbert Kaenel and Marie-Jeanne Roulière-Lambert},
  pages = {653-658},
  address = {Besançon},
  publisher = {Presses universitaires de Franche-Comté},
  editora = {Henri Duday},
  editoratype = {collaborator},
  eventdate = {2005-05},
  owner = {Axel},
  timestamp = {2014.03.06},
  venue = {Bienne}
}

A beautiful screenshot will be more understandable than my ridiculous english enter image description here

\documentclass[12pt]{report}                                                        %type de document+ police
\usepackage{fontspec}
\usepackage{xunicode}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}

\usepackage{polyglossia}
\setdefaultlanguage{french}
%\setmonofont[Scale=0.75]{DejaVu Sans Mono}
\setotherlanguage[variant=ancient]{greek}
\setotherlanguage{english}
\usepackage{xpatch}

% Bonnes notes, sans exposant.
\makeatletter
\renewcommand\@makefntext[1]{%
  \noindent\makebox[2em][r]{\@thefnmark.\space}#1}
\makeatother



\usepackage{microtype}  %gère la microtypo
\usepackage{csquotes}
\usepackage{shorttoc}

%%% MARGES ET INTERLIGNES
\usepackage{geometry}
    \geometry{a4paper}
    \geometry{top=2cm, bottom=2cm, left=2cm , right=2cm}

                                    %gestion interligne                                                     
\usepackage{setspace}
\onehalfspacing                                                                                         % interligne 1.5
\let\oldquotation\quotation                                                                     %Rédéfinit l'environnement quotation pour avoir un interligne de 1
\let\endoldquotation\endquotation
\renewenvironment{quotation}
{\begin{oldquotation}\singlespace}
 {\end{oldquotation}}

%MACRO
\newcommand\cad{c’est-à-dire}
\newcommand\than{« temps d'Hannibal »}
\newcommand\avjc{av. J.-C.}
\newcommand\apjc{apr. J.-C.}
\newcommand\cnrs{C.N.R.S.}
\newcommand\dgp{deuxième guerre punique}
\providecommand{\ier}{\textsuperscript{er}}
\providecommand{\iers}{\textsuperscript{ers}}
\providecommand{\iere}{\textsuperscript{ère}}
\providecommand{\ieres}{\textsuperscript{ères}}
\providecommand{\ieme}{\textsuperscript{e}}
\providecommand{\iemes}{\textsuperscript{es}}
\providecommand{\nd}{\textsuperscript{nd}}
\providecommand{\nds}{\textsuperscript{nds}}
\providecommand{\nde}{\textsuperscript{nde}}
\providecommand{\ndes}{\textsuperscript{ndes}}
\providecommand{\no}{\textsuperscript{o}}
\providecommand{\nos}{\textsuperscript{os}}

\providecommand{\mme}{M\textsuperscript{me}\space}
\providecommand{\mmes}{M\textsuperscript{mes}\space}
\providecommand{\mr}{M.\space}
\providecommand{\mrs}{MM.\space}

%%%%%%%%%%%%%%%%%% %BILIOGRAPHIE  

\usepackage[                                                                                                                %BILIOGRAPHIE
  backend=bibtex,%
  language=french,%
  style=authoryear,%
firstinits,%
   mergedate=false,%
   style=authoryear-ibid,%
   maxcitenames=2, %
   maxbibnames=999,%
]{biblatex} 

\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}
\DeclareNameAlias{sortname}{last-first}
\DeclareNameFormat{last-first}{%
  \iffirstinits
    {\usebibmacro{name:last-first}{#1}{(#4)}{#5}{#7}}
    {\usebibmacro{name:last-first}{#1}{(#3)}{#5}{#7}}%
  \usebibmacro{name:andothers}}
\renewcommand*{\labelnamepunct}{\space\textendash\space}      %tiret après le label
\renewbibmacro*{date+extrayear}{}%                                          rajoute date





\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,thesis,unpublished]
  {title}{#1} 
  \renewbibmacro{in:}{%                                                                 enlève guillemets articles
  \ifentrytype{article}
    {}
    {\printtext{\bibstring{in}\intitlepunct}}}

    \renewbibmacro*{issue+date}{%
  \printfield{issue}%
  \setunit{\addcomma\space}%
  \printdate%
  \newunit}

\renewbibmacro*{publisher+location+date}{%
  \printlist{location}%
  \setunit*{\addcomma\space}%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{begentry}{\printtext[bold]{\usebibmacro{cite}\addspace\addcolon\space}}

  %Met les abréviations des revues
\renewbibmacro*{journal}{%
  \iffieldundef{shortjournal}
    {%
      \iffieldundef{journaltitle}
        {}
        {%
          \printtext[journaltitle]
            {%
              \printfield[titlecase]{journaltitle}%
              \setunit{\subtitlepunct}%
              \printfield[titlecase]{journalsubtitle}%
             }%
         }%
    }
    {\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%
}

%Enlever le tiret lorsqu'il y a une récurrence des auteurs
%
\makeatletter
\AtEveryBibitem{%
  \global\undef\bbx@lasthash%
  \clearfield{extraalpha}}
\makeatother
% "Et al." en ITALIQUE

\renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    test \ifmorenames
  }
    {\ifnumgreater{\value{liststop}}{1}
       {\finalandcomma}
       {}%
     \andothersdelim\bibstring[\emph]{andothers}}
    {}}

 %%% Histoire des noms    et al...
\makeatletter
\renewbibmacro*{begentry}{%
  \renewcommand*{\mkbibnamelast}[1]{##1}%
  \defcounter{maxnames}{\blx@maxcitenames}%
  \printtext[bold]{\usebibmacro{cite}\addspace:\space}%
  \defcounter{maxnames}{\blx@maxbibnames}
  \renewcommand*{\mkbibnamelast}[1]{\textsc{\textnohyphenation{##1}}}}
\makeatother
    %minuscule citation
\AtBeginDocument{\renewcommand*{\mkbibnamelast}[1]{#1}}                 
%Enlève parenthèse colloque
\renewbibmacro*{event+venue+date}{                        
  \iffieldundef{eventtitle}
    {}
    {%
      \bibstring{presentedat}%
      \printfield{eventtitle}%
    }%
  \ifboolexpr{
    test {\iffieldundef{venue}}
    and
    test {\iffieldundef{eventyear}}
  }
    {}
    {\setunit*{\addspace}%
     \printtext{%
       \printfield{venue}%
       \setunit*{\addcomma\space}%
       \printeventdate}}%
  \newunit
}


    \DefineBibliographyStrings{french}{%
 byeditor = \iffieldequalstr{keywords}{source}%                         
 {Établit\space par}%
{dir\adddotspace\smartof}, 
in = {\textit{in}},%
 editor           = {dir\adddotspace},%
 editors          = {dir\adddotspace},%
 opcit = \iffieldequalstr{entrytype}{article}{art\adddotspace cit\adddot}{\emph{op\adddotspace cit}\adddot},%
idem = {\emph{idem}},%
ibidem = {\emph{ibid\adddot}},%
%pagetotal = {p\adddot},%
 %pages            = {pp\adddot},%
}
%enlève la virugule avant dir.
\makeatletter
\renewbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{editor}%
%   \setunit{\addcomma\space}% DELETED
    \setunit{\addspace}% ADDED
    \usebibmacro{bbx:savehash}}%
%     \usebibmacro{#1}% DELETED
     \printtext{\usebibmacro{#1}}% ADDED
     \clearname{editor}}
    {\global\undef\bbx@lasthash}}
\makeatother

 %%modifié book pour virgule
 \DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\labelnamepunct}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \printlist{language}%
  \newunit\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\addcomma
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

  %Change ordre des entrées pour les in quelquechoses : 
  \DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others}%
  \setunit{\space\textendash\space}\newblock
  \usebibmacro{maintitle+title}%
  \newunit\newblock   
  \usebibmacro{in:}%
 \usebibmacro{bybookauthor}%
\newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others}%
  \setunit{\space\textendash\space}\newblock
  \usebibmacro{maintitle+title}%
  \newunit\newblock   
\usebibmacro{in:}%
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\DeclareBibliographyDriver{inbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others}%
  \setunit{\space\textendash\space}\newblock
  \usebibmacro{maintitle+title}%
  \newunit\newblock   
\usebibmacro{in:}%
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}

\AtEveryBibitem{%
  \iffieldequalstr{edition}{1}
    {\clearfield{edition}}
    {\ifboolexpr{ test {\ifentrytype{proceedings}} or test {\ifentrytype{incollection}} }
       {\savefield*{edition}{\savededition}%
        \clearfield{edition}}
       {}}}

\DeclareFieldFormat[article,inbook,inproceedings,incollection]{pages}{pp\adddotspace #1}%


\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}
share|improve this question
    
So: Duday is not a 'second' author for this paper, but a mere(?) collaborator? It sounds like you're going to need to add a non-basic field for editortype. Can you provide un exemple complet minimal (or see here). –  jon Mar 6 at 20:15
    
@ Axelito I have updated my answer in the light of your additions. It would generally be helpful if you could try to edit down the example so that it is (a) a complete and compilable document and (b) as small as possible, though I appreciate that is difficult when you have such an extensively modified style. –  Paul Stanley Mar 7 at 9:47

1 Answer 1

up vote 3 down vote accepted

Caveat: I think you are using a fairly home-brewed style, which makes modifications awkward, and this is not fully tested, except on your sample .bib. I can see that some things (like the bibstrings you've used for editors) are not the same, but I hope the solution I have will work with your style, since it involves modifying a macro that I'm guessing you haven't touched -- or if you have you will be able to adapt it.

The standard Biblatex styles all assume that editora etc are associated with the journal or book, not the article, as you observe. The way these things are typeset is bound up in a particularly nicely knotted up set of macros, which I don't like to fiddle with. So there are at least two sensible ways forward:

  1. Modify the inproceedings driver, to check for an editora (or what have you) and deal with it first.

  2. Hack the author macro, so that it does the work.

Not having access to your modified drivers, I've done the second. To use this you need to put the relevant person in the namea field, and the relevant "role" in the nameatype field. I decided (arbitrarily perhaps) to prevent dashes being used if there is a collaborator (since it would be ambiguous as to whether the author was the same or both were the same, and I don't know how to hash both: a real expert might know, but it's unlikely to matter).

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@INPROCEEDINGS{roure07,
  author = {Réjane Roure},
  title = {Armes et têtes coupées au Cailar (Gard): premier éléments de réflexion
    sur un dépôts rituel en Gaule méditerranéenne},
  booktitle = {L'âge du Fer dans l'arc jurassien et ses marges : dépôts, lieux sacrés
    et territorialité à l'âge du Fer : actes du XXIX\ieme{} colloque
    international de l'AFEAF, volume 2},
  year = {2007},
  editor = {{\relax Ph}ilippe Barral and Alain Daubigney and Cynthia Dunning
    and Gilbert Kaenel and Marie-Jeanne Roulière-Lambert},
  pages = {653-658},
  address = {Besançon},
  publisher = {Presses universitaires de Franche-Comté},
  namea = {Henri Duday},
  nameatype = {collaborator},
  eventdate = {2005-05},
  owner = {Axel},
  timestamp = {2014.03.06},
  venue = {Bienne}
}
\end{filecontents}
\usepackage[style=authortitle]{biblatex}
\makeatletter
\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\printnames{author}%
        \setunit{\addcomma\space}%
        \usebibmacro{bbx:savehash}%
        \usebibmacro{authorstrg}%
        \ifnameundef{namea}
         {}
         {\setunit{\addcomma\space}%
          \global\undef\bbx@lasthash%
          \usebibmacro{authorstrg}%
          \setunit{\addspace}%
          \usebibmacro{bynameastrg}%
          \setunit{\addspace}%
          \printnames{namea}}}}
    {\global\undef\bbx@lasthash}}
\newbibmacro*{bynameastrg}{%
  \iffieldundef{nameatype}
    {}
    {\usebibmacro{bytypestrg}{namea}{editor}}}
\makeatother

\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}


\printbibliography

\end{document}

Image of output


UPDATE

In view of your various modifications (which almost amount to a new style!) I would approach things differently, though still putting the collaborator into the namea field, and the type in the nameatype field.

We define two new bibmacros to format the namea field.

 \newbibmacro{nameaname}{%
   \ifnameundef{namea}
     {}
     {\usebibmacro{bynameastrg}%
      \printnames{namea}}}

 \newbibmacro*{bynameastrg}{%
   \iffieldundef{nameatype}
     {}
     {\setunit{\addspace}%
      \usebibmacro{bytypestrg}{namea}{editor}}}

We then modify the inproceedings driver to use the namea macro immediately after printing the author.

  ...
  \usebibmacro{author/editor+others}%
  \usebibmacro{nameaname}%<--ADDED
  \setunit{\space\textendash\space}\newblock
  ...

(You might want to do that with incollection and inbook too, if needed.)

Producing the result:

revised results

On this occasion I haven't (as I originally did) modified the hashing to prevent the use of a dash for a repeated author, but you could easily add that to the nameaname macro if you wanted to.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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