version 1.64, 2015/03/07 11:49:32 |
version 1.65, 2015/03/09 18:54:38 |
Line 65 static void domath(struct texi *, enum texicmd, size_t |
|
Line 65 static void domath(struct texi *, enum texicmd, size_t |
|
static void domenu(struct texi *, enum texicmd, size_t *); |
static void domenu(struct texi *, enum texicmd, size_t *); |
#endif |
#endif |
static void domultitable(struct texi *, enum texicmd, size_t *); |
static void domultitable(struct texi *, enum texicmd, size_t *); |
|
#if 0 |
|
static void donode(struct texi *, enum texicmd, size_t *); |
|
#endif |
static void doquotation(struct texi *, enum texicmd, size_t *); |
static void doquotation(struct texi *, enum texicmd, size_t *); |
static void dotable(struct texi *, enum texicmd, size_t *); |
static void dotable(struct texi *, enum texicmd, size_t *); |
static void dotop(struct texi *, enum texicmd, size_t *); |
static void dotop(struct texi *, enum texicmd, size_t *); |
Line 234 static const struct texitok __texitoks[TEXICMD__MAX] = |
|
Line 237 static const struct texitok __texitoks[TEXICMD__MAX] = |
|
{ domacro, "macro", 5 }, /* TEXICMD_MACRO */ |
{ domacro, "macro", 5 }, /* TEXICMD_MACRO */ |
{ doaccent, "=", 1 }, /* TEXICMD_MACRON */ |
{ doaccent, "=", 1 }, /* TEXICMD_MACRON */ |
{ domath, "math", 4 }, /* TEXICMD_MATH */ |
{ domath, "math", 4 }, /* TEXICMD_MATH */ |
|
#if 0 |
|
{ domenu, "menu", 4 }, /* TEXICMD_MENU */ |
|
#else |
{ doignblock, "menu", 4 }, /* TEXICMD_MENU */ |
{ doignblock, "menu", 4 }, /* TEXICMD_MENU */ |
|
#endif |
{ dosymbol, "minus", 5 }, /* TEXICMD_MINUS */ |
{ dosymbol, "minus", 5 }, /* TEXICMD_MINUS */ |
{ domultitable, "multitable", 10 }, /* TEXICMD_MULTITABLE */ |
{ domultitable, "multitable", 10 }, /* TEXICMD_MULTITABLE */ |
{ doignline, "need", 4 }, /* TEXICMD_NEED */ |
{ doignline, "need", 4 }, /* TEXICMD_NEED */ |
{ dosymbol, "\n", 1 }, /* TEXICMD_NEWLINE */ |
{ dosymbol, "\n", 1 }, /* TEXICMD_NEWLINE */ |
|
#if 0 |
|
{ donode, "node", 4 }, /* TEXICMD_NODE */ |
|
#else |
{ doignline, "node", 4 }, /* TEXICMD_NODE */ |
{ doignline, "node", 4 }, /* TEXICMD_NODE */ |
|
#endif |
{ doignline, "noindent", 8 }, /* TEXICMD_NOINDENT */ |
{ doignline, "noindent", 8 }, /* TEXICMD_NOINDENT */ |
{ dosymbol, "O", 1 }, /* TEXICMD_O */ |
{ dosymbol, "O", 1 }, /* TEXICMD_O */ |
{ dosymbol, "OE", 2 }, /* TEXICMD_OE */ |
{ dosymbol, "OE", 2 }, /* TEXICMD_OE */ |
Line 546 dodefn(struct texi *p, enum texicmd cmd, size_t *pos) |
|
Line 557 dodefn(struct texi *p, enum texicmd cmd, size_t *pos) |
|
} |
} |
break; |
break; |
} |
} |
|
|
|
if (TEXICMD_END == peekcmd(p, *pos)) { |
|
parseto(p, pos, blk); |
|
return; |
|
} |
|
|
teximacro(p, "Bd -filled -offset indent"); |
teximacro(p, "Bd -filled -offset indent"); |
parseto(p, pos, blk); |
parseto(p, pos, blk); |
teximacro(p, "Ed"); |
teximacro(p, "Ed"); |
Line 1456 doquotation(struct texi *p, enum texicmd cmd, size_t * |
|
Line 1473 doquotation(struct texi *p, enum texicmd cmd, size_t * |
|
|
|
#if 0 |
#if 0 |
static void |
static void |
|
donode(struct texi *p, enum texicmd cmd, size_t *pos) |
|
{ |
|
|
|
teximacroopen(p, "Ix"); |
|
texiputchars(p, "Node"); |
|
while (*pos < BUFSZ(p) && isspace(BUF(p)[*pos])) |
|
advance(p, pos); |
|
while (*pos < BUFSZ(p)) { |
|
if (BUF(p)[*pos] == ',') |
|
break; |
|
else if (BUF(p)[*pos] == '\n') |
|
break; |
|
texiputchar(p, BUF(p)[*pos]); |
|
advance(p, pos); |
|
} |
|
|
|
teximacroclose(p); |
|
advanceeoln(p, pos, 1); |
|
} |
|
|
|
static void |
domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
{ |
{ |
size_t start; |
size_t start, sv; |
|
|
if (NULL != p->chapters) { |
if (NULL != p->chapters) { |
doignblock(p, cmd, pos); |
doignblock(p, cmd, pos); |
Line 1467 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
Line 1505 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
|
|
advanceeoln(p, pos, 1); |
advanceeoln(p, pos, 1); |
|
|
teximacro(p, "Bl -tag -width Ds"); |
texivspace(p); |
|
teximacro(p, "Bl -tag -width Ds -compact"); |
while (*pos < BUFSZ(p)) { |
while (*pos < BUFSZ(p)) { |
/* Read to next menu item. */ |
/* Read to next menu item. */ |
while (*pos < BUFSZ(p) && ismspace(BUF(p)[*pos])) |
while (*pos < BUFSZ(p) && ismspace(BUF(p)[*pos])) |
Line 1479 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
Line 1518 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
advance(p, pos); |
advance(p, pos); |
while (*pos < BUFSZ(p) && ismspace(BUF(p)[*pos])) |
while (*pos < BUFSZ(p) && ismspace(BUF(p)[*pos])) |
advance(p, pos); |
advance(p, pos); |
start = *pos; |
sv = start = *pos; |
while (*pos < BUFSZ(p) && ':' != BUF(p)[*pos]) |
while (*pos < BUFSZ(p) && ':' != BUF(p)[*pos]) |
advance(p, pos); |
advance(p, pos); |
if (*pos == BUFSZ(p) || *pos == start) { |
if (*pos == BUFSZ(p) || *pos == start) { |
Line 1487 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
Line 1526 domenu(struct texi *p, enum texicmd cmd, size_t *pos) |
|
break; |
break; |
} |
} |
teximacroopen(p, "It"); |
teximacroopen(p, "It"); |
teximacroopen(p, "Sx"); |
teximacroopen(p, "Lkx"); |
for ( ; start < *pos; start++) |
texiputchar(p, '"'); |
|
texiputchars(p, "Node"); |
|
for (start = sv; start < *pos; start++) |
texiputchar(p, BUF(p)[start]); |
texiputchar(p, BUF(p)[start]); |
|
texiputchars(p, "\" \""); |
|
for (start = sv; start < *pos; start++) |
|
texiputchar(p, BUF(p)[start]); |
|
texiputchar(p, '"'); |
teximacroclose(p); |
teximacroclose(p); |
teximacroclose(p); |
teximacroclose(p); |
|
|