From c93b0a5afb0ad410fd428816113161079fd0d76c Mon Sep 17 00:00:00 2001 From: James Aylett Date: Thu, 21 Dec 2000 16:59:38 +0000 Subject: Initial checkin of xhtml backend. [originally from svn r828] --- bk_text.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bk_text.c') diff --git a/bk_text.c b/bk_text.c index aa47424..fb66dc6 100644 --- a/bk_text.c +++ b/bk_text.c @@ -15,7 +15,7 @@ typedef struct { } alignstruct; typedef struct { - int indent; + int indent, indent_code; int listindentbefore, listindentafter; int width; alignstruct atitle, achapter, *asect; @@ -56,6 +56,7 @@ static textconfig text_configure(paragraph *source) { * Defaults. */ ret.indent = 7; + ret.indent_code = 2; ret.listindentbefore = 1; ret.listindentafter = 3; ret.width = 68; @@ -77,6 +78,8 @@ static textconfig text_configure(paragraph *source) { if (source->type == para_Config) { if (!ustricmp(source->keyword, L"text-indent")) { ret.indent = utoi(uadv(source->keyword)); + } else if (!ustricmp(source->keyword, L"text-indent-code")) { + ret.indent_code = utoi(uadv(source->keyword)); } else if (!ustricmp(source->keyword, L"text-width")) { ret.width = utoi(uadv(source->keyword)); } else if (!ustricmp(source->keyword, L"text-list-indent")) { @@ -273,7 +276,7 @@ void text_backend(paragraph *sourceform, keywordlist *keywords, index *idx) { break; case para_Code: - text_codepara(fp, p->words, conf.indent, conf.width); + text_codepara(fp, p->words, conf.indent + conf.indent_code, conf.width - 2 * conf.indent_code); break; } -- cgit v1.1