![](https://secure.gravatar.com/avatar/4d93e6d89c1355aade84cc5c1d6a2065.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Idris Samawi Hamid wrote:
Another issue:
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. ------- I've made a change to the representation of authors (there is now one or two extra sets of braces around each author), and this causes the crash. It turns out to be a problem with the core macro \addtocommalist, that I don't know how to fix. Minimal demonstration of problem/bug: \def\acommalist{} \addtocommalist{{stuff with braces}}\acommalist Q for Hans: The way my data representation is written now, I need to be able to add the following three types of elements as well as stuff without braces: {author} % stands for one author {authora},{authorb} % stands for two authors {authora},{} % stands for author et. al. is that doable eventually, or should I implement another presentation altogether? Cheers, Taco
participants (3)
-
Idris Samawi Hamid
-
Taco Hoekwater
-
Thomas A. Schmitz