From 14f8098a80790dfef4d10f39f0e49943128577ed Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 15 Dec 2010 16:08:18 +0000 Subject: Clarify purpose of "lit". Make `Dl' and `D1' both use BLOCKQUOTE instead of DIVs. --- example.style.css | 10 +++++++--- mdoc_html.c | 18 +++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/example.style.css b/example.style.css index 947a2546..bc93bbf3 100644 --- a/example.style.css +++ b/example.style.css @@ -1,4 +1,4 @@ -/* $Id: example.style.css,v 1.23 2010/12/15 15:59:23 kristaps Exp $ */ +/* $Id: example.style.css,v 1.24 2010/12/15 16:08:18 kristaps Exp $ */ html { min-width: 580px; width: 580px; } @@ -12,6 +12,12 @@ div.ssec-head { font-weight: bold; font-style: normal; } /* Sub-sections (Ss). * div.ssec-body { } div.ssec-block { } +/* General font modes. */ + +.lit { } /* "Literal" text: Dl, Li, Bf -literal, Bl -literal, Bl -unfilled. */ + +/* Context-specific modes. */ + span.addr { font-style: italic; font-weight: normal; } /* Address (Ad). */ span.arg { font-style: italic; font-weight: normal; } /* Command argument (Ar). */ span.author { } /* Author name (An). */ @@ -32,7 +38,6 @@ span.ftype { font-style: italic; font-weight: normal; } /* Function types (Ft, F span.includes { font-weight: bold; font-style: normal; } /* Header includes (In). */ span.italic { font-style: italic; font-weight: normal; } /* Generically italic (BI, IB, I). */ span.lib { } /* Library (Lb). */ -span.lit { } /* Literals (Dl). */ span.macro { font-weight: bold; font-style: normal; } /* Macro-ish thing (Fd). */ span.name { font-weight: bold; font-style: normal; } /* Name of utility (Nm). */ span.opt { } /* Options (Op, Oo/Oc). */ @@ -66,7 +71,6 @@ a.link-ref { } /* Reference section links (%Q). */ a.link-sec { } /* Section links (Sx). */ div.emph { font-style: italic; font-weight: normal; } /* Emphasis (Bl -emphasis). */ -div.lit { } /* Literal (Bf -literal, Bd -literal, Bd -unfilled). */ div.symb { font-weight: bold; font-style: normal; } /* Symbols (Bl -symbolic). */ table.footer { } /* Document footer. */ diff --git a/mdoc_html.c b/mdoc_html.c index 138e36e6..7d62474a 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.117 2010/12/15 15:59:23 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.118 2010/12/15 16:08:18 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -1133,13 +1133,17 @@ mdoc_d1_pre(MDOC_ARGS) if (MDOC_BLOCK != n->type) return(1); - /* FIXME: D1 shouldn't be literal. */ + SCALE_VS_INIT(&su, 0); + bufcat_su(h, "margin-top", &su); + bufcat_su(h, "margin-bottom", &su); + PAIR_STYLE_INIT(&tag[0], h); + + if (MDOC_Dl == n->tok) { + PAIR_CLASS_INIT(&tag[1], "lit"); + print_otag(h, TAG_BLOCKQUOTE, 2, tag); + } else + print_otag(h, TAG_BLOCKQUOTE, 1, tag); - SCALE_VS_INIT(&su, INDENT - 2); - bufcat_su(h, "margin-left", &su); - PAIR_CLASS_INIT(&tag[0], "lit"); - PAIR_STYLE_INIT(&tag[1], h); - print_otag(h, TAG_DIV, 2, tag); return(1); } -- cgit v1.2.3-56-ge451