ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bib-Module and ibid / ibidem
@ 2009-11-06 17:22 Marcel Nohl
  2009-11-06 22:14 ` Andreas Schneider
  2009-11-07  6:59 ` Taco Hoekwater
  0 siblings, 2 replies; 4+ messages in thread
From: Marcel Nohl @ 2009-11-06 17:22 UTC (permalink / raw)
  To: ntg-context

Hello,

are there any plans for the bib-module to support ibid. citation, or is
someone actually working on it at the moment? If not, is someone using
a workaround for this?

Thanks in advance,
Marcel
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bib-Module and ibid / ibidem
  2009-11-06 17:22 Bib-Module and ibid / ibidem Marcel Nohl
@ 2009-11-06 22:14 ` Andreas Schneider
  2009-11-07 12:29   ` Marcel Nohl
  2009-11-07  6:59 ` Taco Hoekwater
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schneider @ 2009-11-06 22:14 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Marcel Nohl wrote:

> Hello,
> 
> are there any plans for the bib-module to support ibid. citation, or is
> someone actually working on it at the moment? If not, is someone using
> a workaround for this?
> 
> Thanks in advance,
> Marcel

If I understand you right, you want footnote citations with a special 
handling of repeated citations? In that case I indeed have a workaround. I 
attached it to this mail.

It will print out the first citation full (alternative=data), each further 
citation short (author, year and title) and each direct repetition with 
"Ebenda" (which is the German version of "ibidem", afaics). You can ofcourse 
change these strings, they are defined at the top of the file.

Examples:
  \mycite[some_bib_entry]
  \mycite[prefix={Vgl. }, page=123, chapter={Introduction},
   suffix={some more text.}][some_bib_entry]

I hope that helps.

Best regards,
Andreas.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mycite.tex --]
[-- Type: text/x-tex; name="mycite.tex", Size: 1452 bytes --]

\def\mycite{\dodoubleempty\domycite}
\def\defaultciterepeat{Ebenda}
\def\defaultciteprefix{Vgl. }
\def\defaultcitepage{S. }
\def\defaultcitechapter{Kap. }

\def\domycite[#1][#2]{%
  \ifsecondargument%
    \getparameters[MCP][prefix=\defaultciteprefix,page=,chapter=,suffix=,#1]%
    \doinsertmycite[#2]{\MCPprefix}{%
      \expandoneargafter\doifnotempty{\MCPpage}{\ \defaultcitepage\MCPpage.}%
      \expandoneargafter\doifnotempty{\MCPchapter}{\ \defaultcitechapter\MCPchapter.}%
      \expandoneargafter\doifnotempty{\MCPsuffix}{\ \MCPsuffix}%
    }%
  \else%
    \doinsertmycite[#1]{\defaultciteprefix}{}%
  \fi%
}

\def\doinsertmycite[#1]#2#3{%
  \footnote{%
    #2%prefix
    \doifelse{\getvalue{mycitelast}}{#1}%
      {\doifemptyelse{#2}%
        {\defaultciterepeat}%
        {\expandoneargafter\lowercase{\defaultciterepeat}}%If there's a prefix, lower-case the cite-repeat string
        .%
      }%
      {\doifelse{\getvalue{mycitepast #1}}{used}%
        {\bgroup%
         \getcitedata[title][#1] to \bibtitle%
         \getcitedata[arttitle][#1] to \bibarttitle%
         \cite[alternative=authoryear][#1]. {\it\bibtitle\bibarttitle}.%
         \egroup}%
        {\cite[alternative=data][#1]}%
      }%
    #3%suffix
  }%
  \setvalue{mycitelast}{#1}%
  \setvalue{mycitepast #1}{used}%
}

%Reset last citation on page break
\appendtoks
  \global\setvalue{mycitelast}{}
\to\everyaftershipout

[-- Attachment #3: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bib-Module and ibid / ibidem
  2009-11-06 17:22 Bib-Module and ibid / ibidem Marcel Nohl
  2009-11-06 22:14 ` Andreas Schneider
@ 2009-11-07  6:59 ` Taco Hoekwater
  1 sibling, 0 replies; 4+ messages in thread
From: Taco Hoekwater @ 2009-11-07  6:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Marcel Nohl wrote:
> Hello,
> 
> are there any plans for the bib-module to support ibid. 

No, but Andreas' workaround looks pretty good.

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bib-Module and ibid / ibidem
  2009-11-06 22:14 ` Andreas Schneider
@ 2009-11-07 12:29   ` Marcel Nohl
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Nohl @ 2009-11-07 12:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Andreas Schneider schrieb:

> If I understand you right, you want footnote citations with a special
>  handling of repeated citations? In that case I indeed have a
> workaround. I attached it to this mail.

Thanks, that's exactly what I was looking for.

Marcel
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-07 12:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 17:22 Bib-Module and ibid / ibidem Marcel Nohl
2009-11-06 22:14 ` Andreas Schneider
2009-11-07 12:29   ` Marcel Nohl
2009-11-07  6:59 ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).