source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Clarify purpose of "lit".
Date: Wed, 15 Dec 2010 11:08:18 -0500 (EST)	[thread overview]
Message-ID: <201012151608.oBFG8IWn014095@krisdoz.my.domain> (raw)

Log Message:
-----------
Clarify purpose of "lit".

Make `Dl' and `D1' both use BLOCKQUOTE instead of DIVs.

Modified Files:
--------------
    mdocml:
        example.style.css
        mdoc_html.c

Revision Data
-------------
Index: mdoc_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_html.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.117 -r1.118
--- mdoc_html.c
+++ mdoc_html.c
@@ -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);
 }
 
Index: example.style.css
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/example.style.css,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lexample.style.css -Lexample.style.css -u -p -r1.23 -r1.24
--- example.style.css
+++ example.style.css
@@ -12,6 +12,12 @@ div.ssec-head	{ font-weight: bold; font-
 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-we
 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 link
 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. */
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2010-12-15 16:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201012151608.oBFG8IWn014095@krisdoz.my.domain \
    --to=kristaps@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).