[Top][All Lists]

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

Re: Manual consistency

From: Ricardo Wurmus
Subject: Re: Manual consistency
Date: Fri, 05 Jun 2020 22:16:46 +0200
User-agent: mu4e 1.4.4; emacs 26.3

Julien Lepiller <> writes:

> If there is a way to mark a sentence to wrap it into a class, we could
> also do some CSS magic with :before. That will allow us to show the
> prompt while making it non-selectable I think, which is nice visually
> and for copy-pasting. I'm not a texinfo guru though, so I don't know
> if it is feasible.

We can wrap each line in an @example with @code and then style each of
these lines.

So we would do something like this:

--8<---------------cut here---------------start------------->8---
@code{cd /tmp}
@code{tar --warning=no-timestamp -xf \
@code{mv var/guix /var/ && mv gnu /}
@end example
--8<---------------cut here---------------end--------------->8---

and then add this CSS rule:

--8<---------------cut here---------------start------------->8---
div.example pre.example code::before {
  content: "$ ";
--8<---------------cut here---------------end--------------->8---

In the manual sometimes the prompt is # (for root) and sometimes it is $
(when it’s any other user).  We cannot distinguish these cases unless we
abuse the Texinfo format by wrapping examples to allow for a more
explicit rule to match. 


reply via email to

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