Bug 243345 - textproc/libxslt: man page is badly formatted
Summary: textproc/libxslt: man page is badly formatted
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-desktop mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-13 22:06 UTC by Lorenzo Salvadore
Modified: 2020-02-11 18:45 UTC (History)
2 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
svn-diff-man-xsltproc (11.26 KB, patch)
2020-01-14 06:10 UTC, Walter Schwarzenfeld
no flags Details | Diff
xsltproc.1.new (9.44 KB, text/plain)
2020-01-14 06:12 UTC, Walter Schwarzenfeld
no flags Details
svn-diff-man-xsltproc_v2 (11.59 KB, patch)
2020-01-14 06:34 UTC, Walter Schwarzenfeld
no flags Details | Diff
xsltproc.1.new_2 (9.43 KB, text/plain)
2020-01-14 06:34 UTC, Walter Schwarzenfeld
no flags Details
misalignment screenshot (40.77 KB, image/png)
2020-01-25 23:39 UTC, Lorenzo Salvadore
no flags Details
svn-diff-man-xsltproc_v3 (17.89 KB, patch)
2020-01-26 07:58 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-man-xsltproc_v4 (17.87 KB, patch)
2020-01-26 08:06 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-man-xsltproc_v6 (17.91 KB, patch)
2020-01-26 18:50 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-man-xsltproc_v7 (17.91 KB, patch)
2020-01-26 19:30 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer 2020-01-13 22:06:20 UTC
Running "man xsltproc" returns a man page badly formatted.

For example I see many keywords such as .HP, .PP, .RE and text is badly aligned.
On the other hand bold fonts seem to be correct.

I see the man page is correct here:
https://www.freebsd.org/cgi/man.cgi?query=xsltproc&apropos=0&sektion=0&manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html
Maybe the fact that I run 13.0-CURRENT can be part of the cause of the problem.
Comment 1 Tobias C. Berner freebsd_committer 2020-01-14 05:31:38 UTC
Moin moin 

Yeah you're right that manpage looks broken for me locally too.


mfg Tobias
Comment 2 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:10:18 UTC
Created attachment 210726 [details]
svn-diff-man-xsltproc

Trying a patch, hope it is right.
Comment 3 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:12:15 UTC
Created attachment 210727 [details]
xsltproc.1.new

Attached my new xsltproc.1, if there additional changes needed.
Comment 4 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:34:08 UTC
Created attachment 210729 [details]
svn-diff-man-xsltproc_v2

Found two errors.
Comment 5 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:34:36 UTC
Created attachment 210730 [details]
xsltproc.1.new_2
Comment 6 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:51:47 UTC
The line
 10 .TH "XSLTPROC" "1" "$Date$" "libxslt" "xsltproc Manual"

is not correct, should have the form like

.TH "XSLTPROC" "1" "$Date: 2008\-04\-21 16:28:56 +0200 (Mon, 21 Apr 2008) $" "libxslt" "xsltproc Manual"

but I don't know if the date is correct (got this from ubuntu).

Last line of the manpage shows now:

libxslt                             ==> $Date$                         XSLTPROC(1)
Comment 7 Walter Schwarzenfeld freebsd_triage 2020-01-14 06:53:19 UTC
I don't use the ubuntu manpage, I only use it as example for formatting.
Comment 8 Tobias C. Berner freebsd_committer 2020-01-25 21:20:31 UTC
Lorenzo could you please confirm whether the manpages look ok to you with Walter's patch? 

mfg Tobias
Comment 9 Lorenzo Salvadore freebsd_committer 2020-01-25 23:39:32 UTC
Created attachment 211037 [details]
misalignment screenshot

Most of the issues seem to be fixed by the patch (I tried svn-diff-man-xsltproc_v2), but there is still a pair of problems:

- text is misaligned (see screenshot attached for an example);

- a .PP survived in the See also section;

- at the center of the very last line there's the string '$Date$' instead of a date;

- in the Description section you can find a double space: 'line.  xsltproc'. I would also have avoided the last space in 'It will use the standard input if a filename provided is - .' (space between - and .) but maybe this was done on purpose.
Comment 10 Lorenzo Salvadore freebsd_committer 2020-01-25 23:42:03 UTC
About '$Date$', see also comment #6.
Comment 11 Walter Schwarzenfeld freebsd_triage 2020-01-26 07:58:52 UTC
Created attachment 211051 [details]
svn-diff-man-xsltproc_v3
Comment 12 Walter Schwarzenfeld freebsd_triage 2020-01-26 08:06:41 UTC
Created attachment 211052 [details]
svn-diff-man-xsltproc_v4
Comment 13 Walter Schwarzenfeld freebsd_triage 2020-01-26 09:39:31 UTC
If it is desired to have a more simple last line (with the date), it is easy to edit line 28 in the patch (no new patch is needed).
Comment 14 Lorenzo Salvadore freebsd_committer 2020-01-26 17:46:25 UTC
Comment on attachment 211052 [details]
svn-diff-man-xsltproc_v4

Text misalignment and .PP are fixed.

In the Description section there is still the double space: 'line.  xsltproc' between the dot and 'x'.
The space after '-' in the sentence 'It will use the standard input if a filename provided is -' has been removed, but the final dot has been lost as well.
Comment 15 Walter Schwarzenfeld freebsd_triage 2020-01-26 18:50:19 UTC
Created attachment 211071 [details]
svn-diff-man-xsltproc_v6
Comment 16 Walter Schwarzenfeld freebsd_triage 2020-01-26 18:51:07 UTC
Here is the "point" back. The error with the double space I did not found (but I don't think this is important).
Comment 17 Lorenzo Salvadore freebsd_committer 2020-01-26 19:04:05 UTC
(In reply to Walter Schwarzenfeld from comment #16)

The point is indeed back.
If you want to get rid of the double space too you can do it by replacing the new line in the source with 1 space.
I.e. change the 2 lines

document with a Stylesheet Processing Instruction, no stylesheet need to be named at the command line\.
\fBxsltproc\fR will automatically detect the included stylesheet and use it\.

into the unique line

document with a Stylesheet Processing Instruction, no stylesheet need to be named at the command line\. \fBxsltproc\fR will automatically detect the included stylesheet and use it\.

I tested by editing the installed man page and it worked that way.
Comment 18 Walter Schwarzenfeld freebsd_triage 2020-01-26 19:30:04 UTC
Created attachment 211072 [details]
svn-diff-man-xsltproc_v7

Thanks! 
Voila! Here it is.
Comment 19 Lorenzo Salvadore freebsd_committer 2020-01-26 19:44:24 UTC
Comment on attachment 211072 [details]
svn-diff-man-xsltproc_v7

Patch tested successfully :)
Comment 20 Tobias C. Berner freebsd_committer 2020-02-11 18:44:50 UTC
Thanks you two for the patch and verifying it. Committed.
Comment 21 commit-hook freebsd_committer 2020-02-11 18:45:30 UTC
A commit references this bug:

Author: tcberner
Date: Tue Feb 11 18:44:30 UTC 2020
New revision: 525884
URL: https://svnweb.freebsd.org/changeset/ports/525884

Log:
  textproc/libxslt: fix formatting of xsltproc(1)

  PR:		243345
  Submitted by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Reported by:	Lorenzo Salvadore <salvadore@freebsd.org>

Changes:
  head/textproc/libxslt/Makefile
  head/textproc/libxslt/files/patch-man-xsltproc