ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* RE: bib module: \setupcite macro
@ 2005-10-03 13:12 Idris Samawi Hamid
  0 siblings, 0 replies; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-03 13:12 UTC (permalink / raw)


Hi Thomas,

>===== Original Message From "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de> 
=====
>Just add an extra pair of braces:
>
>\def\citeyear[#1]{%
>   {{\cite[year]}[#1]%
>   }%
>}

Ok, does not crash but now I lose the reference completely in the output-(

Best
Idris

================================================
% output=pdf interface=en

\setupwhitespace[big]

\usemodule[bib]

\setuppublications[alternative=apa]
\setuppublications[autohang=yes]
\setuppublications[numbering=no]
\setuppublications[criterium=cite]
\setuppublications[sorttype=bbl]
%
%\setuppublicationlist[totalnumber={},samplesize=,author={\invertedauthor}]

\def\citeyear[#1]{%
  {{\cite[year]}[#1]%
  }%
}

\input test-bib.bbl

\starttext

\dots as Afghani points out \citeyear[afghani60].

\section{References}{\tfx\setupinterlinespace
{\placepublications}}

\stoptext
================================================

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: bib module: \setupcite macro
@ 2005-10-03 13:23 Idris Samawi Hamid
  0 siblings, 0 replies; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-03 13:23 UTC (permalink / raw)


>===== Original Message From Taco Hoekwater <taco@elvenkind.com> =====
>> Please forgive my cluelessness, but what is "year compression" and how do I
>> turn it on?
>
>   \setupcite[year][compress=yes]

Great, it works now! Thnx for the full explanation as well-)

>PS I've seen the rest of your comments as well, but no chance
>of doing something with them today.

:-(

Ok, but I hope/pray that, at least, I don't have to make more clones of the 
t-bib module; journal is due to the publisher next tuesday (or I'm a dead 
man)...

Thnx again for all of your help.

Best
Idris

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: bib module: \setupcite macro
@ 2005-10-03 13:01 Idris Samawi Hamid
  2005-10-03 13:09 ` Taco Hoekwater
  0 siblings, 1 reply; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-03 13:01 UTC (permalink / raw)


Hi Taco,

>===== Original Message From Taco Hoekwater <taco@elvenkind.com> =====
>> My definition for \citeyear crashes. This used to work-)
>
>First: this problem is caused by the fact that year
>citations are by default uncompressed. if year compression
>is turned on, then different code is used, and the problem
>never happens.

Please forgive my cluelessness, but what is "year compression" and how do I 
turn it on?

Best
Idris

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: bib module: \setupcite macro
@ 2005-10-02 23:12 Idris Samawi Hamid
  0 siblings, 0 replies; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-02 23:12 UTC (permalink / raw)


I thought it was my macro but the following fails also:

==========================================
\starttext

\dots as Afghani points out \cite[year][afghani60].

\section{References}{\tfx\setupinterlinespace
{\placepublications}}

\stoptext
==========================================

Best
Idris

==========================================
==========================================
Another issue:

My definition for \citeyear crashes. This used to work-)

\def\citeyear[#1]{%
  {\cite[year][#1]%
  }%
}

log:

==========================================
! You can't use `macro parameter character #' in horizontal mode.
\p!doifinstringelse ...tringelse \@EA ##\@EA 1#1##
                                                  2##3\war {\unless \if
##2@...

\rawdodoifinsetelse ...ingelse \@@@instring {,#1,}
                                                  \@EA \firstoftwoarguments
..

\addtocommalist #1#2->\rawdoifinsetelse {#1}#2
                                              \resetglobal {\dodoglobal
\ede...

\donormalbibauthoryear ...yauthor }\thebibauthors
                                                  \@EA \doglobal \@EA
\addto...

\next1 #1,->\donormalbibauthoryear {#1}
                                       \doprocesscommaitem
\doprocesscommalist ...item \gobbleoneargument #1,
                                                  ]\relax \global \advance
\...
..
l.24 \dots as Afghani points\citeyear[afghani60]
==========================================

See attached test file test-bib-year.tex.

Best
Idris

=============test-bib-year.tex===============
% output=pdf interface=en

\setupwhitespace[big]

\usemodule[bib]

\setuppublications[alternative=apa]
\setuppublications[autohang=yes]
\setuppublications[numbering=no]
\setuppublications[criterium=cite]
\setuppublications[sorttype=bbl]

\setuppublicationlist[totalnumber={},samplesize=,author={\invertedauthor}]

\def\citeyear[#1]{%
  {\cite[year][#1]%
  }%
}

\input test-bib.bbl

\starttext

\dots as Afghani points out\citeyear[afghani60].

\cite[afghani60]

\section{References}{\tfx\setupinterlinespace
{\placepublications}}

\stoptext
========================================

==============test-bib.bbl==============
\startpublication[k=afghani60,
                  t=book,
                  a=Afgh\=an\=i,
                  y=1960,
                  s=]
\author[]{Sa\high{c}\=id}[]{}{Al-Afgh\=an\=i}
\title{Asw\=aqu \~al-\high{c}Arab f\=i
    \~al-J\=ahiliyya\~h wa \~al-Isl\=am}
\pubname{D\=aru \~al-Fikr}
\city{Damascus}
\pubyear{1960}
\stoppublication
========================================

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

^ permalink raw reply	[flat|nested] 8+ messages in thread
* bib module: \setupcite macro
@ 2005-10-02 23:01 Idris Samawi Hamid
  2005-10-03  6:04 ` Thomas A. Schmitz
  2005-10-03  8:36 ` Taco Hoekwater
  0 siblings, 2 replies; 8+ messages in thread
From: Idris Samawi Hamid @ 2005-10-02 23:01 UTC (permalink / raw)


Another issue:

My definition for \citeyear crashes. This used to work-)

\def\citeyear[#1]{%
  {\cite[year][#1]%
  }%
}

log:

==========================================
! You can't use `macro parameter character #' in horizontal mode.
\p!doifinstringelse ...tringelse \@EA ##\@EA 1#1##
                                                  2##3\war {\unless \if 
##2@...

\rawdodoifinsetelse ...ingelse \@@@instring {,#1,}
                                                  \@EA \firstoftwoarguments 
...

\addtocommalist #1#2->\rawdoifinsetelse {#1}#2
                                              \resetglobal {\dodoglobal 
\ede...

\donormalbibauthoryear ...yauthor }\thebibauthors
                                                  \@EA \doglobal \@EA 
\addto...

\next1 #1,->\donormalbibauthoryear {#1}
                                       \doprocesscommaitem
\doprocesscommalist ...item \gobbleoneargument #1,
                                                  ]\relax \global \advance 
\...
...
l.24 \dots as Afghani points\citeyear[afghani60]
==========================================

See attached test file test-bib-year.tex.

Best
Idris

=============test-bib-year.tex===============
% output=pdf interface=en

\setupwhitespace[big]

\usemodule[bib]

\setuppublications[alternative=apa]
\setuppublications[autohang=yes]
\setuppublications[numbering=no]
\setuppublications[criterium=cite]
\setuppublications[sorttype=bbl]
%
%\setuppublicationlist[totalnumber={},samplesize=,author={\invertedauthor}]

\def\citeyear[#1]{%
  {\cite[year][#1]%
  }%
}

\input test-bib.bbl

\starttext

\dots as Afghani points\citeyear[afghani60].

\cite[afghani60]

\section{References}{\tfx\setupinterlinespace
{\placepublications}}

\stoptext
========================================

==============test-bib.bbl==============
\startpublication[k=afghani60,
                  t=book,
                  a=Afgh\=an\=i,
                  y=1960,
                  s=]
\author[]{Sa\high{c}\=id}[]{}{Al-Afgh\=an\=i}
\title{Asw\=aqu \~al-\high{c}Arab f\=i
    \~al-J\=ahiliyya\~h wa \~al-Isl\=am}
\pubname{D\=aru \~al-Fikr}
\city{Damascus}
\pubyear{1960}
\stoppublication
========================================

============================
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

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

end of thread, other threads:[~2005-10-03 13:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-03 13:12 bib module: \setupcite macro Idris Samawi Hamid
  -- strict thread matches above, loose matches on Subject: below --
2005-10-03 13:23 Idris Samawi Hamid
2005-10-03 13:01 Idris Samawi Hamid
2005-10-03 13:09 ` Taco Hoekwater
2005-10-02 23:12 Idris Samawi Hamid
2005-10-02 23:01 Idris Samawi Hamid
2005-10-03  6:04 ` Thomas A. Schmitz
2005-10-03  8:36 ` 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).