Login  Register

Re: Embed man pages in a book

Posted by mojavelinux on Aug 26, 2016; 11:22am
URL: https://discuss.asciidoctor.org/Embed-man-pages-in-a-book-tp4906p4922.html

Of course, if Pygments or Rouge supported source highlighting of a typeset man page, then it would be as simple as:

:source-highlighter: rouge

[source,man]
----
include::ls.man[]
----

But there's no available lexer atm. But that is a route you could take. It's pretty easy to match the headings and options in a typeset man page. You can use the vim highlighter as a starting point. See https://github.com/vim/vim/blob/master/runtime/syntax/man.vim

-Dan

On Fri, Aug 26, 2016 at 5:13 AM, Dan Allen <[hidden email]> wrote:

On Fri, Aug 26, 2016 at 5:12 AM, Dan Allen <[hidden email]> wrote:
COMMAND=$1

Here you put your man page name, such as:

COMMAND=ls


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux