Re: [NTG-context] Bibliography -- complete inline citations in footnotes

2011-04-01 Thread Steffen Wolfrum
Hi Andreas,

does this module not work with current beta?
Or did I miss something?


 \expandoneargafter 
  \lowercase {\defaultciterepeat }
\secondoftwoarguments #1#2->#2
  
 ...er \lowercase {\defaultciterepeat }}
  .
\firstoftwoarguments #1#2->#1
 
\@@ddfootnotetitle ...te [alternative=data][key]}}
  \expandoneargafter \doifno...
\dododescriptioncomponent ...onparameter \c!title 
  }}}\endgroup \fi \fi \fi \...
...
l.35 ...=1.5, suffix={Some manual inserted text.}]
  
? 
Process aborted



Steffen


Am 21.01.2010 um 12:22 schrieb Andreas Schneider:

> I did assemble such a solution (with much help from Hans and Wolfgang). It's 
> not enough to put it into a complete module yet (although I will probably do 
> that sometime soon) and it currently only works with a recent beta of MkIV. 
> (It can also be changed easily to work with MkII, but it won't correctly 
> recognize repeating citations over page breaks ... long story ;-))
> 
> Just put the attached file into the same dir (or near) your document where 
> you want to use it and include it with "\module[mycite]".
> 
> To use it simply replace \cite[key] with something like \mycite[key]
> [page=123, chapter=1.5, suffix={Some manual inserted text.}]
> These three parameters are each optional.
> Since I wrote this for a German document, you may also want to modify the 
> strings in the head of t-mycite.tex. ("Ebenda" = "Ibidem", "S." = Page, 
> "vgl." = compare/reference, "Kap." = chapter)
> 
> Best Regards,
> Andreas.___

___
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
___


Re: [NTG-context] Bibliography -- complete inline citations in footnotes

2010-01-21 Thread Andreas Schneider
Piotr Lesnicki wrote:

> Hi,
> I'm new to ConTeXt and I'm greatly appreciating the rejuvenation it
> brings me in typesetting after several years using LaTeX.
> 
> I'm confronted to a few little problems though, the main one being
> that I'd need to have references both in the footnotes and at the end
> of a document. Under LaTeX I found that the "inlibib" package is doing
> exactly that, inserting some "ibid" and "op.cit." when required for
> repeting references. After reading the bibmod-doc, I thought I would
> temporarly solve the problem by simply using
> \setuppublications[refcommand=data] which I thought would put the
> reference in the same format as in the bibliography, but it doesn't
> compile.
> 
> Does any one have a solution?
> 
> 
> Piotr

Hi Piotr,

I did assemble such a solution (with much help from Hans and Wolfgang). It's 
not enough to put it into a complete module yet (although I will probably do 
that sometime soon) and it currently only works with a recent beta of MkIV. 
(It can also be changed easily to work with MkII, but it won't correctly 
recognize repeating citations over page breaks ... long story ;-))

Just put the attached file into the same dir (or near) your document where 
you want to use it and include it with "\module[mycite]".

To use it simply replace \cite[key] with something like \mycite[key]
[page=123, chapter=1.5, suffix={Some manual inserted text.}]
These three parameters are each optional.
Since I wrote this for a German document, you may also want to modify the 
strings in the head of t-mycite.tex. ("Ebenda" = "Ibidem", "S." = Page, 
"vgl." = compare/reference, "Kap." = chapter)

Best Regards,
Andreas.\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=,#2]%
\doinsertmycite[#1]{\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 (which we check when placing footnotes)
\appendtoks
  \doifnoteonsamepageelse[footnote]{}{\global\setvalue{mycitelast}{}}
\to\everyinsidenoteinsert
___
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
___


[NTG-context] Bibliography -- complete inline citations in footnotes

2010-01-20 Thread Piotr Lesnicki
Hi,
I'm new to ConTeXt and I'm greatly appreciating the rejuvenation it
brings me in typesetting after several years using LaTeX.

I'm confronted to a few little problems though, the main one being
that I'd need to have references both in the footnotes and at the end
of a document. Under LaTeX I found that the "inlibib" package is doing
exactly that, inserting some "ibid" and "op.cit." when required for
repeting references. After reading the bibmod-doc, I thought I would
temporarly solve the problem by simply using
\setuppublications[refcommand=data] which I thought would put the
reference in the same format as in the bibliography, but it doesn't
compile.

Does any one have a solution?


Piotr
___
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
___