Linux RCU subsystem development
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Joel Fernandes <joel@joelfernandes.org>,
	Jonathan Corbet <corbet@lwn.net>,
	rcu@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST
Date: Tue, 30 Jul 2019 22:33:21 -0300	[thread overview]
Message-ID: <20190730223321.73f909f2@coco.lan> (raw)
In-Reply-To: <20190731010623.GN14271@linux.ibm.com>

Em Tue, 30 Jul 2019 18:06:24 -0700
"Paul E. McKenney" <paulmck@linux.ibm.com> escreveu:

> On Tue, Jul 30, 2019 at 09:47:22PM -0300, Mauro Carvalho Chehab wrote:
> > Em Tue, 30 Jul 2019 17:04:55 -0700
> > "Paul E. McKenney" <paulmck@linux.ibm.com> escreveu:

> > > This appears to come from Documentation/output/latex/RCU.tex.
> > > There is nevertheless an RCU.pdf in this directory.  It is not
> > > bad, but has a figure full of XML on PDF page 21.  And a few later
> > > on as well.  
> > 
> > PDF output is indeed an issue. The way it works is that it first
> > generates a LaTeX and then it uses texlive to produce the PDF. 
> 
> Would it be fair to say that html output is what is currently supported,
> and that PDF output is a future thing?

Sure.

Anyway, if you want to fix PDF later, I suspect that simply adding:

	.. cssclass:: longtable

Before each quiz table should be enough to fix, as the tables there seem
to be simple enough. 

After fixed, the PDF and LaTeX output are usually decent.

> > > On the HTML side, the quick quizzes have immediately visible answers,
> > > which defeats the purpose.  The original HTML used a white font,
> > > so that you selected the answer with your mouse to make it visible.
> > >
> > > Can something similar be done with Sphinx?  Another approach is to
> > > gather the answers into a separate file and link to them.  
> > 
> > Yeah, I guess you used a css style that would make the answer visible
> > when the mouse is inside it on your original lwn.net set of articles. 
> > 
> > Sphinx has a directive to use css, so, the short answer is: yes, you
> > can. 
> > 
> > For html, you would need to add a css specific for the RCU quiz,
> > placing it under Documentation/sphinx directory. Then, use the
> >  ".. css" directive to handle that.
> > 
> > You should notice, however, that this will be ignored for 
> > LaTeX/pdf output.
> > 
> > I guess you can place this on another file, or perhaps place at the
> > end of the document, having a link for the quiz answers. 
> > 
> > Another alternative would be to make the answer as a footnote.  
> 
> Making it CSS for HTML and a footnote for PDF seems eminently
> reasonable to me!

You should either do CSS or PDF, as otherwise you will end with dirty
hacks like:

.. only:: html

	<some quiz table with answers using css>

.. only: latex

	<some quiz table with answers using footnotes>

E. g. you'll need to place the quiz twice, making it harder to maintain
and messier.

Btw, the LaTeX may also parse a css tag, processing it via some custom
macro (with should be added at Documentation/conf.py.

> > > I believe that Joel already noted that internal links are not working.
> > > The external links that I tried work just fine, though.  As do the
> > > links from the table of contents.  
> > 
> > Yeah. Funny enough, when I tested here, they worked fine. Maybe
> > this is due to the Sphinx version I used here at the time I wrote
> > it.
> > 
> > Anyway, Joel already submitted a patch addressing this one.   
> 
> And it works for me, anyway!  ;-)

Great!

Thanks,
Mauro

      reply	other threads:[~2019-07-31  1:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26 12:51 [PATCH v2 00/26] ReST conversion of text files without .txt extension Mauro Carvalho Chehab
2019-07-26 13:05 ` Mauro Carvalho Chehab
     [not found] ` <8444797277eea7be474f40625bb190775a9cee33.1564145354.git.mchehab+samsung@kernel.org>
     [not found]   ` <20190726162002.GA146401@google.com>
     [not found]     ` <20190726140028.38abb5fa@coco.lan>
2019-07-26 17:55       ` [PATCH v2 25/26] docs: rcu: convert some articles from html to ReST Joel Fernandes
2019-07-26 18:45         ` Mauro Carvalho Chehab
2019-07-26 18:02   ` Joel Fernandes
2019-07-26 19:14     ` Mauro Carvalho Chehab
2019-07-30 22:06       ` Joel Fernandes
2019-07-30 21:22   ` Paul E. McKenney
2019-07-30 21:50     ` Joel Fernandes
2019-07-30 22:00       ` Mauro Carvalho Chehab
2019-07-30 22:21         ` Joel Fernandes
2019-07-30 23:00           ` Mauro Carvalho Chehab
2019-07-30 23:15             ` Joel Fernandes
2019-07-30 21:50     ` Mauro Carvalho Chehab
2019-07-30 23:37       ` Paul E. McKenney
2019-07-31  0:04         ` Paul E. McKenney
2019-07-31  0:47           ` Mauro Carvalho Chehab
2019-07-31  1:06             ` Paul E. McKenney
2019-07-31  1:33               ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730223321.73f909f2@coco.lan \
    --to=mchehab+samsung@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jiangshanlai@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=paulmck@linux.ibm.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox