Re: [NTG-context] bib module: \setupcite macro
Hi Hans, Can you please give me some info on this? (resent from a mail I sent last two weeks ago) Cheers, Taco _________________________________ 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
Taco Hoekwater wrote:
Hi Hans,
Can you please give me some info on this?
(resent from a mail I sent last two weeks ago)
the problem is in a tets for presense: \long\def\p!doifinstringelse#1#2% ##2 can be {abc} {\long\@EA\def\@EA\pp!doifinstringelse\@EA##\@EA1#1##2##3\war % expand #1 here {\unless\if##2@}% \expanded{\pp!doifinstringelse#2#1}@@\war} % expand #2 here (here the { } spoil the arg def) i'll provide (probably ok for this situation): \def\alwaysaddtocommalist#1#2% {item} \cs {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}} (typically something that we can do better in luatex -) Hans
Hans Hagen wrote:
the problem is in a tets for presense:
\long\def\p!doifinstringelse#1#2% ##2 can be {abc} {\long\@EA\def\@EA\pp!doifinstringelse\@EA##\@EA1#1##2##3\war % expand #1 here {\unless\if##2@}% \expanded{\pp!doifinstringelse#2#1}@@\war} % expand #2 here
(here the { } spoil the arg def)
i'll provide (probably ok for this situation):
This will not work. I really did need the conditional addition, but I want to add rather weird items that would create, e.g., a commalist that looks like: \def\commalist{{{}{}},,{}{},{{},{}},{},{{}}} => {{}{}} {}{} {{},{}} {} {{}} etc. On second thought, i guess this is not reasonable, so I'll try to come up with another solution to my problem. Consider the request retracted. :-)
(typically something that we can do better in luatex -)
Most definately true. Taco
Taco Hoekwater wrote:
This will not work. I really did need the conditional addition, but I want to add rather weird items that would create, e.g., a commalist that looks like:
\def\robustdoifinsetelse#1#2% {\expanded{\convertargument#1}\to\!!stringa \expanded{\convertargument#2}\to\!!stringb \rawdoifinsetelse\!!stringa\!!stringb} \def\robustaddtocommalist#1#2% {item} \cs {\robustdoifinsetelse{#1}#2\resetglobal {\dodoglobal\edef#2{\ifx#2\empty\else#2,\fi#1}}} \def\robustpretocommalist#1#2% {item} \cs {\robustdoifinsetelse{#1}#2\resetglobal {\dodoglobal\edef#2{#1\ifx#2\empty\else,#2\fi}}} Hans
participants (2)
-
Hans Hagen
-
Taco Hoekwater