Login  Register

Re: Implementing the equivalent of LaTeX \lstinline

Posted by mojavelinux on Jan 13, 2021; 8:48pm
URL: https://discuss.asciidoctor.org/Implementing-the-equivalent-of-LaTeX-lstinline-tp8444p8445.html

The issue you are looking for is this one:

https://github.com/asciidoctor/asciidoctor/issues/1043

It discusses the current state of the requirements and design and offers proposals for how to implement it in the meantime.

Best Regards,

-Dan

On Wed, Jan 13, 2021 at 7:35 AM rkeryell [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello!
We are working on translating a big LateX specification https://www.khronos.org/registry/SYCL/specs/sycl-2020-provisional.pdf to AsciiDoctor and the results is now quite good in HTML and PDF except for a missing feature we use a lot: \lstinline to insert source code with highlighting.

\lstinline (described on page 4 of http://mirrors.ctan.org/macros/latex/contrib/listings/listings.pdf) provides 2 different syntax:
- \lstinline{some code}
- and when the code has some {} in it: \lstinline|some code|, where "|" is actually any character not appearing in "some code".

What is the simplest way to have this feature?

Generalizing [source] to allow a non-block interface, such as:
  some text [source]{some code} and [source]|some code| some text
?
Not clear to me how to do this by looking at asciidoctor/lib/asciidoctor/parser.rb where the parser assume this is in a block...

This problem has been already mentioned in https://discuss.asciidoctor.org/Passing-options-to-configuring-source-highlighters-tp8047.html

Thank you.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Implementing-the-equivalent-of-LaTeX-lstinline-tp8444.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux