discuss@mandoc.bsd.lv
 help / color / mirror / Atom feed
* Incorrect line width calculation in -Tlocale mode
@ 2012-08-05 12:00 Yuri Pankov
  2012-08-05 12:02 ` Yuri Pankov
  0 siblings, 1 reply; 2+ messages in thread
From: Yuri Pankov @ 2012-08-05 12:00 UTC (permalink / raw)
  To: mdocml-discuss

Hi,

mandoc seems to incorrectly calculate line widths in -Tlocale mode (the 
resulting output "brokenness" depends on terminal size, but it's almost 
always there), -Tascii always displays fine.

The source and resulting screenshots:

phoenix:yuri:~$ uname -psr
FreeBSD 10.0-CURRENT amd64
phoenix:yuri:~$ mandoc -V
mandoc 1.12.1
phoenix:yuri:~$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
phoenix:yuri:~$ stty size
23 80
phoenix:yuri:~$ cat test.1
.TH TEST 1 "Aug 8, 2012"
.sp
.LP
The \fBman\fR command is CSI-capable. However, some utilities invoked by the
\fBman\fR command, namely, \fBtroff\fR, \fBeqn\fR, \fBneqn\fR, \fBrefer\fR,
\fBtbl\fR, and \fBvgrind\fR, are not verified to be CSI-capable. Because of
this, the man command with the \fB-t\fR option can not handle non-EUC data.
Also, using the \fBman\fR command to display man pages that require special
processing through \fBeqn\fR, \fBneqn\fR, \fBrefer\fR, \fBtbl\fR, or
\fBvgrind\fR can not be CSI-capable.

The man command is CSI-capable. However, some utilities invoked by the
man command, namely, troff, eqn, neqn, refer,
tbl, and vgrind, are not verified to be CSI-capable. Because of
this, the man command with the -t option can not handle non-EUC data.
Also, using the man command to display man pages that require special
processing through eqn, neqn, refer, tbl, or
vgrind can not be CSI-capable.


phoenix:yuri:~$ mandoc -Tascii -Owidth=80 test.1 | less -ins
phoenix:yuri:~$ mandoc -Tlocale -Owidth=80 test.1 | less -ins

Results:
https://www.xvoid.org/stuff/mandoc-ascii.png
https://www.xvoid.org/stuff/mandoc-ascii.png


Same when explicitly specifying -Tutf8.
--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

* Re: Incorrect line width calculation in -Tlocale mode
  2012-08-05 12:00 Incorrect line width calculation in -Tlocale mode Yuri Pankov
@ 2012-08-05 12:02 ` Yuri Pankov
  0 siblings, 0 replies; 2+ messages in thread
From: Yuri Pankov @ 2012-08-05 12:02 UTC (permalink / raw)
  To: discuss

On Sun, 05 Aug 2012 16:00:47 +0400, Yuri Pankov wrote:
> Hi,
>
> mandoc seems to incorrectly calculate line widths in -Tlocale mode (the
> resulting output "brokenness" depends on terminal size, but it's almost
> always there), -Tascii always displays fine.
>
> The source and resulting screenshots:
>
> phoenix:yuri:~$ uname -psr
> FreeBSD 10.0-CURRENT amd64
> phoenix:yuri:~$ mandoc -V
> mandoc 1.12.1
> phoenix:yuri:~$ locale
> LANG=en_US.UTF-8
> LC_CTYPE="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_TIME="en_US.UTF-8"
> LC_NUMERIC="en_US.UTF-8"
> LC_MONETARY="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
> LC_ALL=
> phoenix:yuri:~$ stty size
> 23 80
> phoenix:yuri:~$ cat test.1
> .TH TEST 1 "Aug 8, 2012"
> .sp
> .LP
> The \fBman\fR command is CSI-capable. However, some utilities invoked by
> the
> \fBman\fR command, namely, \fBtroff\fR, \fBeqn\fR, \fBneqn\fR, \fBrefer\fR,
> \fBtbl\fR, and \fBvgrind\fR, are not verified to be CSI-capable. Because of
> this, the man command with the \fB-t\fR option can not handle non-EUC data.
> Also, using the \fBman\fR command to display man pages that require special
> processing through \fBeqn\fR, \fBneqn\fR, \fBrefer\fR, \fBtbl\fR, or
> \fBvgrind\fR can not be CSI-capable.
>
> The man command is CSI-capable. However, some utilities invoked by the
> man command, namely, troff, eqn, neqn, refer,
> tbl, and vgrind, are not verified to be CSI-capable. Because of
> this, the man command with the -t option can not handle non-EUC data.
> Also, using the man command to display man pages that require special
> processing through eqn, neqn, refer, tbl, or
> vgrind can not be CSI-capable.
>
>
> phoenix:yuri:~$ mandoc -Tascii -Owidth=80 test.1 | less -ins
> phoenix:yuri:~$ mandoc -Tlocale -Owidth=80 test.1 | less -ins
>
> Results:
> https://www.xvoid.org/stuff/mandoc-ascii.png
> https://www.xvoid.org/stuff/mandoc-ascii.png

Sorry, https://www.xvoid.org/stuff/mandoc-locale.png.

>
> Same when explicitly specifying -Tutf8.

--
 To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv

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

end of thread, other threads:[~2012-08-05 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-05 12:00 Incorrect line width calculation in -Tlocale mode Yuri Pankov
2012-08-05 12:02 ` Yuri Pankov

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