aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--example.t2
-rw-r--r--fref.lex9
2 files changed, 7 insertions, 4 deletions
diff --git a/example.t b/example.t
index 98b4340..dd84a75 100644
--- a/example.t
+++ b/example.t
@@ -1,8 +1,8 @@
.SH
References
.XP
+%la Bogorodickij (1887)
%au Богородицкий, В. А.
-%al Bogorodickij
%da 1887
%ti Курс грамматики русского языка. Часть 1-ая: Фонетика
%ci Варшава
diff --git a/fref.lex b/fref.lex
index 645a2aa..ccdfff5 100644
--- a/fref.lex
+++ b/fref.lex
@@ -20,12 +20,12 @@
int a; /* Number of authors. */
char au[MAX][MAX]; /* author */
char ad[MAX]; /* internet address */
- char al[MAX]; /* TODO: alternative author name */
char bo[MAX]; /* book */
char ci[MAX]; /* city */
char da[MAX]; /* date (year) */
char ed[MAX]; /* editor */
char jo[MAX]; /* journal */
+ char la[MAX]; /* label */
char no[MAX]; /* TODO: issue number */
char pp[MAX]; /* pages */
char pu[MAX]; /* publisher */
@@ -63,12 +63,12 @@ field(char *t)
AS("au",e.au[e.a++]);
AS("ad",e.ad);
- AS("al",e.al);
AS("bo",e.bo);
AS("ci",e.ci);
AS("da",e.da);
AS("ed",e.ed);
AS("jo",e.jo);
+ AS("la",e.la);
AS("no",e.no);
AS("pp",e.pp);
AS("pu",e.pu);
@@ -90,6 +90,9 @@ entry()
#define EI(a, b) a ? a : b
+ /* Print label. */
+ pf("% = ", e.la);
+
/* Print authors. */
for(i = 0; i < e.a-2; i++)
printf("%s, ", e.au[i]);
@@ -130,12 +133,12 @@ entry()
e.a = 0;
CL(e.ad);
- CL(e.al);
CL(e.bo);
CL(e.ci);
CL(e.da);
CL(e.ed);
CL(e.jo);
+ CL(e.la);
CL(e.no);
CL(e.pp);
CL(e.pu);