mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
Documentation: prettify the man page
This adds a way to re-enable justification and hyphenation for the man page (which in enabled by default in troff but then Docbook explicitly disables it). The man page looks better this way. The reason why hyphenation for man pages is disabled by Docbook is "The problem is that groff is not particularly smart about how it does hyphenation; it can end up hyphenating a lot of things that you don't want hyphenated". The reason why justification for man pages is disabled by Docbook is "justified text looks good only when it is also hyphenated. Without hyphenation, excessive amounts of space often end up getting between words, in order to "pad" lines out to align on the right margin". I carefully checked the resuling man page using both terminal output on 80 columns and the PS/PDF generated. In both cases hyphenation looks normal, i.e. I don't see any unwanted cases of extra hyphenation. Same for justification. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
69c79bb500
commit
5c6817349d
2 changed files with 8 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ $(SRC): $(FOOTER)
|
|||
%.8: %.txt
|
||||
$(call msg-gen, $@)
|
||||
$(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.8,%.xml,$@) $<
|
||||
$(Q) $(XMLTO) man --skip-validation $(patsubst %.8,%.xml,$@) 2>/dev/null
|
||||
$(Q) $(XMLTO) man -m custom.xsl $(patsubst %.8,%.xml,$@) 2>/dev/null
|
||||
|
||||
%.ps: %.8
|
||||
$(call msg-gen, $@)
|
||||
|
|
|
|||
7
Documentation/custom.xsl
Normal file
7
Documentation/custom.xsl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:param name="man.hyphenate">1</xsl:param>
|
||||
<xsl:param name="man.justify">1</xsl:param>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Loading…
Add table
Add a link
Reference in a new issue