How to redefine \cite to switch according to \jb@@type?
Peter Frago <[email protected]> Fri, 16 Jan 2004 08:22:20 -0800 (PST)
| Newsgroups | gmane.comp.tex.bibtex.jurabib.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
because I needed a quite strange bibtype, I just implemented my own one. The way, \cite uses that type is supposed to be different than the standard way of citation as well. I already found a way to construct that using a combination of \cite* and \citefield.
Does anyone have a clue how I could make \cite switch to the standard \cite or my new one according to the \jb@@type? Here is what I tried so far, I am well aware that in terms of style etc. this is a pretty poor and embarrassing piece of work... :-(
---------------------------------------------------------------------
\makeatletter
\let\orig@cite\cite%
%
\renewcommand*{\cite}{\@ifnextchar[{\my@cite}{\my@cite[]}}%
\newcommand*{\my@cite}{}%
\def\my@cite{\@ifnextchar[{\my@@cite}{\my@@cite[]}}%
\def\my@@cite[#1]{\@ifnextchar[{\my@@@cite[#1]}{\my@@@cite[][#1]}}%
\def\my@@@cite[#1][#2]#3{%
\ifthenelse{\equal{\jb@@type}{newtype}}{%%
\mynewcite[#1][#2]{#3}%
}{%
\orig@cite[#1][#2]{#3}%
}}%
\makeatother
---------------------------------------------------------------------
Thanks a lot for your help!
Peter
_____________________________________________________________
Aberja - Die Hybridsuchmaschine
---> http://www.Aberja.com
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/jurabib-developer/
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/