public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin-apps@cygwin.com
Subject: Re: [ITP] italic-man
Date: Fri, 09 Aug 2019 20:51:00 -0000	[thread overview]
Message-ID: <d270f303-5491-5d74-5d1b-c025511bb5ed@SystematicSw.ab.ca> (raw)
In-Reply-To: <7ea1dcb2-70bc-9a74-e5a3-0be55f85d7fa@towo.net>

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

On 2019-08-09 13:31, Thomas Wolff wrote:
> Am 09.08.2019 um 20:56 schrieb Achim Gratz:
>> Jon Turney writes:
>>> This gets a GTG from me.
>>> I believe that according to our stated procedures additional approvals
>>> are required, because this package is unique to cygwin.
>> I'm not sure I remember correctly from when the discussion went on the
>> first time, but wasn't there some mumbling about this partly going into
>> groff?  If that's still the case, remind me what this would entail and
>> I'll look into it.
> There are multiple ways of activating the feature (also described in the man page).
> The previous strategy placed a shell script wrapper "groff" aside groff, so the
> groff script and groff.exe would coexist in /bin. This was tricky to install and
> particularly it reportedly did not survive a package update of groff.
> The new approach does not use this wrapper anymore. Instead it redirects nroff
> to the package-supplied iroff script by configuration in /etc/man_db.conf.

There's also use of the undocumented LESS_TERMCAP_... with GROFF_NO_SGR env vars
(see attached - must be sourced from profile or rc) to remap bold, underline,
etc. into italic and/or colour, or whatever else you want to change, in all less
output.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

[-- Attachment #2: .LESS_TERMCAP --]
[-- Type: text/plain, Size: 2157 bytes --]

#|/bin/sh
# .LESS_TERMCAP - set termcap properties  for man and other less paging
# What things in a manpage use which capabilities?
# man and less use:
# bold for headings, command synopses, and code font
# underline for proper names (for example, “termcap” and “terminfo” in the
# termcap manpage), variable names (“name”, “bp”, “id”, etc.), and type names
# in some manpages (such as dispatch_queue_create(3))
# standout for the prompt at the bottom
# It doesn’t seem like anything uses blinking.
#				termcap	terminfo  
#LESS_TERMCAP_ks=$(tput smkx)	# ks	smkx	make the keypad send commands
#LESS_TERMCAP_ke=$(tput rmkx)	# ke	rmkx	make the keypad send digits
#LESS_TERMCAP_vb=$(tput flash)	# vb	flash	emit visual bell
#LESS_TERMCAP_mb=$(tput blink)	# mb	blink	start blink
#LESS_TERMCAP_md=$(tput bold)	# md	bold	start bold
LESS_TERMCAP_md=$(tput bold)$(tput setaf 4)	# md	bold	set mode bold	4 set colour blue
#LESS_TERMCAP_mh=$(tput dim)	# mh	dim	mode half-bright
#LESS_TERMCAP_mr=$(tput rev)	# mr	rev	mode reverse video
#LESS_TERMCAP_me=$(tput sgr0)	# me	sgr0	reset attributes
#LESS_TERMCAP_so=$(tput smso)	# so	smso	start standout (reverse video)
#LESS_TERMCAP_se=$(tput rmso)	# se	rmso	stop standout
#LESS_TERMCAP_us=$(tput smul)	# us	smul	start underline
LESS_TERMCAP_us=$(tput sitm)$(tput setaf 6)	# us	smul	start underline
#LESS_TERMCAP_ue=$(tput rmul)	# ue	rmul	stop underline
LESS_TERMCAP_ue=$(tput ritm)$(tput sgr0)	# ue	rmul	stop underline
#LESS_TERMCAP_ZN=$(tput ssubm)	# ZN	ssubm	set subscript mode
#LESS_TERMCAP_ZV=$(tput rsubm)	# ZV	rsubm	reset subscript mode
#LESS_TERMCAP_ZO=$(tput ssupm)	# ZO	ssupm	set superscript mode
#LESS_TERMCAP_ZW=$(tput rsupm)	# ZW	rsupm	reset superscript mode
#LESS_TERMCAP_ZH=$(tput sitm)	# ZH	sitm	set italic mode
#LESS_TERMCAP_ZR=$(tput ritm)	# ZR	ritm	reset italic mode
#GROFF_NO_SGR=1			# for terminals
export					\
	LESS_TERMCAP_us LESS_TERMCAP_ue	\
	LESS_TERMCAP_md
#	LESS_TERMCAP_mb LESS_TERMCAP_md	\
#	LESS_TERMCAP_mr LESS_TERMCAP_mh	\
#	LESS_TERMCAP_me			\
#	LESS_TERMCAP_so LESS_TERMCAP_se	\
#	LESS_TERMCAP_ZN LESS_TERMCAP_ZV	\
#	LESS_TERMCAP_ZO LESS_TERMCAP_ZW	\
#	GROFF_NO_SGR

  reply	other threads:[~2019-08-09 20:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28  6:01 Thomas Wolff
2019-08-09 12:59 ` Jon Turney
2019-08-09 15:07   ` Ken Brown
2019-08-09 18:56   ` Achim Gratz
2019-08-09 19:31     ` Thomas Wolff
2019-08-09 20:51       ` Brian Inglis [this message]
2019-08-10  9:07         ` Thomas Wolff
2019-08-10 21:39           ` Thomas Wolff
2019-08-10 22:29           ` Brian Inglis
2019-08-11  9:33             ` Thomas Wolff
2019-08-11 16:17               ` Achim Gratz
2023-01-21 17:04 Thomas Wolff
2023-02-16 18:59 ` Jon Turney
2023-02-16 19:17   ` Thomas Wolff
2023-06-21 21:45     ` Thomas Wolff
2023-06-25 13:36       ` Jon Turney
2023-06-25 13:59         ` Thomas Wolff
2023-06-25 16:02           ` ASSI

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=d270f303-5491-5d74-5d1b-c025511bb5ed@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin-apps@cygwin.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).