tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
* SYNOPSIS and auto-Bk
@ 2010-07-16 12:51 Kristaps Dzonsons
       [not found] ` <20100716155142.GB32289@bramka.kerhand.co.uk>
  0 siblings, 1 reply; 4+ messages in thread
From: Kristaps Dzonsons @ 2010-07-16 12:51 UTC (permalink / raw)
  To: tech, Jason McIntyre

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

Hi,

The following patch enables SYNOPSIS sections (or blocks within the nS 
register) to behave as if `Bk -words' were wrapping the entire section.

This makes for nice-looking SYNOPSIS sections where authors have omitted 
the `Bk'; however, output would differ from groff, so I'm hesitant to 
enable it.  This has been tossed around for a while.

Thoughts?  (Yes, the patch must be tweaked a bit before it's actually 
checked in.)

Kristaps

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 815 bytes --]

Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.174
diff -r1.174 mdoc_term.c
334a335,337
> 	 *
> 	 * Also let SYNPRETTY sections behave as if they were wrapped in
> 	 * a `Bk' block.
337c340
< 	if (TERMP_KEEP & p->flags) {
---
> 	if (TERMP_KEEP & p->flags || MDOC_SYNPRETTY & n->flags) {
346a350,361
> 	}
> 
> 	/*
> 	 * Since SYNPRETTY sections aren't "turned off" with `Ek', we
> 	 * have to intuit whether we should disable formatting.
> 	 */
> 
> 	if ( ! (MDOC_SYNPRETTY & n->flags)) {
> 		if (n->prev && MDOC_SYNPRETTY & n->prev->flags)
> 			p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);
> 		if (n->parent && MDOC_SYNPRETTY & n->parent->flags)
> 			p->flags &= ~(TERMP_KEEP | TERMP_PREKEEP);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-17 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-16 12:51 SYNOPSIS and auto-Bk Kristaps Dzonsons
     [not found] ` <20100716155142.GB32289@bramka.kerhand.co.uk>
2010-07-16 20:05   ` Kristaps Dzonsons
     [not found]     ` <20100716203520.GD32289@bramka.kerhand.co.uk>
2010-07-17 17:12       ` Kristaps Dzonsons
2010-07-17 18:35     ` Ingo Schwarze

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).