groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [eqn] error: invalid input (character code 159)


From: Alejandro Colomar
Subject: Re: [eqn] error: invalid input (character code 159)
Date: Fri, 10 Mar 2023 13:17:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0

Hi Ralph,

On 3/10/23 13:08, Ralph Corderoy wrote:
> Hi Alejandro,
> 
>> To me man(1) is still a black box (I have looked at its source code
>> occasionally, but not very often), and there's no way to know what
>> it's doing, since it provides no equivalent to groff(1)'s -V.
> 
> Colin Watson's man(1) uses his libpipeline(3).
> 
>     $ PIPELINE_DEBUG=1 man ls 2>&1 >/dev/null | grep '^Starting pipeline:'
>     Starting pipeline:
>         zcat
>         [input: {0, /usr/share/man/man1/ls.1p.gz}, output: {-1, NULL}]
>     Starting pipeline:
>         zcat
>         [input: {0, /usr/share/man/man1/ls.1.gz}, output: {-1, NULL}]
>     Starting pipeline:
>         zcat
>         [input: {0, /usr/share/man/man1/ls.1.gz}, output: {-1, NULL}]
>     Starting pipeline:
>         (echo .nh && echo .de hy && echo .. && echo .na && echo .de ad && 
> echo .. && zcat)
>         [input: {0, /usr/share/man/man1/ls.1.gz}, output: {-1, NULL}]
>     Starting pipeline:
>         (cd /usr/share/man && /usr/lib/man-db/zsoelim) |
>         (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t 
> UTF-8//IGNORE) |
>         (cd /usr/share/man && preconv -e UTF-8) |
>         (cd /usr/share/man && tbl) |
>         (cd /usr/share/man && nroff -mandoc -rLL=265n -rLT=265n -Tutf8)
>         [input: {-1, NULL}, output: {-1, NULL}]
>     Starting pipeline:
>         col -b -p -x |
>         sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }'
>         [input: {-1, NULL}, output: {0, NULL}]
>     Starting pipeline:
>         zcat
>         [input: {3, NULL}, output: {-1, NULL}]
>     Starting pipeline:
>         Waiting for pipeline: zcat
>         [input: {3, NULL}, output: {-1, NULL}]
>     $

Interesting!

> 
>>>     $ groff -Tascii -kpt -V
>>>     preconv | pic | tbl | troff -Tascii | grotty
>>>     $
>>
>> Does man(1) run pic(1)?
> 
> It can do.  It sometimes reads the man page to find out the
> preprocessors to use.  Read around ‘MANROFFSEQ’ in man(1).

Hmm, then I'll add it.  Not sure if we want to really use
pic(1) in the pages, but it doesn't hurt to have it there,
and might be useful in some corner case  :)

> 
>> BTW, you may notice I added some trick to make eqn(1) fail:
>>
>> <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=e728d5d1e639e5c803a84480ad727e7b02bac222>
> 
> I'd grep for ^ as otherwise the code doesn't match the commit message.
> :-)

A bit pedantic, isn't it?  Would eqn(1) write just newlines
to stderr?  A bit gross of eqn(1), it would be :-)

But yes, I think it's interesting to have it, even if just
for preventing people from copy&pasting from there into other
situations where that might actually happen.

Thanks!

Alex 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]