ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Andreas Schneider <aksdb@gmx.de>
To: ntg-context@ntg.nl
Cc: Steffen Wolfrum <context@st.estfiles.de>
Subject: Re: bib module (again)
Date: Thu, 7 Jul 2011 23:50:09 +0200	[thread overview]
Message-ID: <208745380.20110707235009@gmx.de> (raw)
In-Reply-To: <1B24B404-4233-41E3-A474-4F129A54ACB4@st.estfiles.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 1362 bytes --]

On Thursday, July 7, 2011 22:41 Steffen Wolfrum wrote:
> Hi Stefan,

> thanks for the note. Unfortunately Andreas' module doesn't work anymore.

> I had a correspondence with him on that in April this year: 
> he could reproduce the error, but had no idea what the reason might be,
> resp. what changes in MkIV now cause a conflict with his module.

> Maybe Hans knows?

> Steffen

After  a  lot of work with ConTeXt the past few weeks, I had some more
thoughts  on  possible  causes  for  this problem. I finally found the
culprits:

\expandoneargafter doesn't seem to be around anymore ... it works fine
without, though.

\doifnotempty  doesn't quite seem to work (the way I intend it to), so
I replaced them with \doifnot{...}{}{...}

I  attached  the  current "module" (yes, it's not really a module, but
it's  slightly  more convenient to use that way ... the whole thing is
nothing more than a workaround anyway).

I  hope  I  haven't  killed  any functionality while toying around and
hunting the bug, but at least my Diploma Thesis looks still right when
processed with that "module".

Since  I currently don't use that module actively, I will probably not
enhance  or  otherwise  improve  it.  So  if  anyone  else  feels like
providing a better solution for the Ibidem-problem: please do!

-- 
Best Regards,
Andreas

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: t-mycite.tex --]
[-- Type: text/x-tex; name="t-mycite.tex", Size: 1573 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=,repeat=,#2]%
    \doinsertmycite[#1]{\MCPprefix}{%
      \doifnot{\MCPpage}{}{\ \defaultcitepage\MCPpage.}%
      \doifnot{\MCPchapter}{}{\ \defaultcitechapter\MCPchapter.}%
      \doifnot{\MCPsuffix}{}{\ \MCPsuffix}%
    }%
  \else%
    \doinsertmycite[#1]{\defaultciteprefix}{}%
  \fi%
}

\def\doinsertmycite[#1]#2#3{%
  \footnote{%
    \doifelse{\MCPrepeat}{yes}{\global\setvalue{mycitelast}{#1}}{\doif{\MCPrepeat}{no}{\global\setvalue{mycitelast}{}}}%
    #2\doifnot{#2}{}{\strut}%prefix
    \doifelse{\getvalue{mycitelast}}{#1}%
      {\doifelse{#2}{}%
        {\defaultciterepeat}%
        {\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
    \global\setvalue{mycitelast}{#1}%
    \global\setvalue{mycitepast #1}{used}%
  }%
}

%Reset last citation on page break (which we check when placing footnotes)
\appendtoks
  \doifnoteonsamepageelse[footnote]{}{\global\setvalue{mycitelast}{}}
\to\everyinsidenoteinsert

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2125 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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
___________________________________________________________________________________

  reply	other threads:[~2011-07-07 21:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06  9:00 Steffen Wolfrum
2011-07-06  9:19 ` Taco Hoekwater
2011-07-06  9:38   ` Steffen Wolfrum
2011-07-06  9:47     ` Taco Hoekwater
2011-07-06 10:03       ` Steffen Wolfrum
2011-07-06 10:47         ` Hans Hagen
2011-07-07  9:25           ` Steffen Wolfrum
2011-07-07 13:18             ` Stefan Müller
2011-07-07 20:41               ` Steffen Wolfrum
2011-07-07 21:50                 ` Andreas Schneider [this message]
2011-07-15  9:02                   ` Steffen Wolfrum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=208745380.20110707235009@gmx.de \
    --to=aksdb@gmx.de \
    --cc=context@st.estfiles.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).