I'm trying to make macro to work in biblatex edition
field.
Logic is following:
- if edition =1 there is suffix -li (1-li)
- if edition>1 and if edition<21 there is prefix me- (me-15,me-20 ..etc)
- if edition = 40,60,80,100,200,...1000 there is also prefix me-
- in other cases suffix -e (31-e, 21-e, 129-e, 1010-e)
here is a code which works:
\protected\def\mkbibmascord#1{%
\ifnum #1=1 #1-li \else %
\ifnum #1<21 %
\ifnum #1>1 me-#1 \fi \else %
\ifnum #1 = 40 me-#1 \else%
\ifnum #1 = 60 me-#1 \else%
\ifnum #1 = 80 me-#1 \else%
\ifnum #1 = 100 me-#1 \else %
\ifnum #1 = 200 me-#1 \else %
#1-e
\fi\fi\fi\fi\fi\fi\fi%
}%
\protected\def\mkbibordinal{\mkbibmascord}%
\protected\def\mkbibfemord{\mkbibmascord}%
\protected\def\mkbibneutord{\mkbibmascord}%
but how can i write general code/improve above code? (not only for 200), becouse let say for calendar there will be alot if/fi-s
\ifnum
branching is probably the best you can do.break
,and
,==' (equality) commands or
case`(like \case{n}) switch :) .. Isearch 'math in tex' but search gives just how to write mathequations, not TeX aritmetic :)...I need to learn more :)\ifnum #1<21 % me-#1 \else %