diff options
| author | Simon Tatham <anakin@pobox.com> | 2001-11-24 17:50:55 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2001-11-24 17:50:55 +0000 |
| commit | 37727cf9cf399f80d8be6994f154256ac09dcfea (patch) | |
| tree | 8a5be197e7033ef6f9aaa6d3ea1c1cc3c718bb68 /contents.c | |
| parent | f18002e76ef0d9cda618ed0124d9460b7411a487 (diff) | |
| download | halibut-37727cf9cf399f80d8be6994f154256ac09dcfea.zip halibut-37727cf9cf399f80d8be6994f154256ac09dcfea.tar.gz halibut-37727cf9cf399f80d8be6994f154256ac09dcfea.tar.bz2 halibut-37727cf9cf399f80d8be6994f154256ac09dcfea.tar.xz | |
Introduce the ability to relabel a section as an `example' or
`question' or so on, using the syntax
\S{mysection}{example} An example of foobar
so that in cross-references it will be referred to as `example
5.1.2' instead of `section 5.1.2'. NOTE WELL: until now Buttress has
supported multiple section keywords using the same syntax, so that
you could xref the above section as \k{mysection} _or_ \k{example}
with the same effect. This behaviour is now revoked because I don't
think anyone was using it; if you suddenly find you're getting
undefined-keyword errors this may be why.
[originally from svn r1408]
Diffstat (limited to 'contents.c')
| -rw-r--r-- | contents.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -115,8 +115,8 @@ void number_cfg(numberstate *state, paragraph *source) { } } -word *number_mktext(numberstate *state, int para, int aux, int prev, - word **auxret, filepos fpos, int *errflag) { +word *number_mktext(numberstate *state, int para, int aux, wchar_t *category, + int prev, word **auxret, filepos fpos, int *errflag) { word *ret = NULL; word **ret2 = &ret; word **pret = &ret; @@ -127,7 +127,7 @@ word *number_mktext(numberstate *state, int para, int aux, int prev, state->chapternum++; for (i = 0; i < state->maxsectlevel; i++) state->sectionlevels[i] = 0; - dotext(&pret, state->chaptertext); + dotext(&pret, category ? category : state->chaptertext); dospace(&pret); ret2 = pret; donumber(&pret, state->chapternum); @@ -151,7 +151,7 @@ word *number_mktext(numberstate *state, int para, int aux, int prev, state->sectionlevels[level]++; for (i = level+1; i < state->maxsectlevel; i++) state->sectionlevels[i] = 0; - dotext(&pret, state->sectiontext); + dotext(&pret, category ? category : state->sectiontext); dospace(&pret); ret2 = pret; if (state->ischapter) @@ -169,7 +169,7 @@ word *number_mktext(numberstate *state, int para, int aux, int prev, state->appendixnum++; for (i = 0; i < state->maxsectlevel; i++) state->sectionlevels[i] = 0; - dotext(&pret, state->apptext); + dotext(&pret, category ? category : state->apptext); dospace(&pret); ret2 = pret; doanumber(&pret, state->appendixnum); |