You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Following the discussion in #127 (changing bibmarks when \nonumcitations is set), I can now get the desired format, but sometimes I need \cite output to be slightly different. For instance, sometimes I want to cite inside parenthesis, so I would like to remove the parenthesis surrounding bibmark's number and add a comma. So in the MWE below:
test.tex:
\fontfam[LMfonts]
\nonumcitations
\bibtexhook{
\def\_createbibmark #1;#2,#3;#4,#5;#6,#7;#8,#9\_fin{%
\ifx ^#8^%
\ifx ^#6^%
\ifx ^#4^#2%
\else #2, and #4\fi
\else #2, #4, and #6\fi
\else #2, et al.\fi
\space (#1)%
}
}
\_def\cite[#1]{{\_citeA#1,,,\_printsavedcites}}
Some discussion (\cite[ref]).
\bigskip
\usebib/s (simple) bibsample
\bye
bibsample.bib:
@ARTICLE{ref,
title="title",
author="Name1, Surname1 and Name2, Surname2",
year="2023"
}
We get Some discussion (Name1, and Name2 (2023)), but I would like to create another macro (for this situation only) that generates Some discussion (Name1, and Name2, 2023). Is there a recommended way to tackle this? I tried this trick with lists, \directlua, and \replstring, but I couldn't succeed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi. Following the discussion in #127 (changing bibmarks when
\nonumcitations
is set), I can now get the desired format, but sometimes I need\cite
output to be slightly different. For instance, sometimes I want to cite inside parenthesis, so I would like to remove the parenthesis surrounding bibmark's number and add a comma. So in the MWE below:test.tex:
bibsample.bib:
We get
Some discussion (Name1, and Name2 (2023))
, but I would like to create another macro (for this situation only) that generatesSome discussion (Name1, and Name2, 2023)
. Is there a recommended way to tackle this? I tried this trick with lists,\directlua
, and\replstring
, but I couldn't succeed.Beta Was this translation helpful? Give feedback.
All reactions