lilypond-devel
[Top][All Lists]
Advanced

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

Re: Code examples in docs


From: Urs Liska
Subject: Re: Code examples in docs
Date: Fri, 8 Apr 2016 00:54:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0


Am 07.04.2016 um 11:11 schrieb Carl Sorensen:
> On 4/7/16 12:11 AM, "address@hidden on behalf of Urs Liska" <address@hidden 
> on behalf of
> address@hidden> wrote:
>
>> However, when *deleting* the .py and .pyc files an error was triggered,
>> when lilypond-book tries to import book_html.
>>
>> Looking further into it I realized:
>> - book_base keeps an array with "formatters"
>> - upon importing any specific book_X it registers an instance of the
>> formatter class in book_base
>> - So if book_html is empty no HTML formatter is registered with
>> lilypond-book
>>
>> This is why there is no error with the empty file.
>> However, this isn't an answer to my question yet. If the HTML formatter
>> is *not* used to produce the HTML included in the doc pages, what else?
>>
>> Any further ideas?
> What about if you delete python/out and redo make doc?
>
> Just wondering if there's something wrong with the build script that
> python/out isn't properly recreated when python/*.py changes.  In my
> setup, python/*.py is not executable, but python/out/*.py is.  So make is
> apparently copying the .py files, setting them executable, and creating
> the .pyc files.

Hm, I've did a rebuild from scratch and immediately emptied the two
book_html.py files, and *now* I got an error upon trying to create the
HTML files. So while I think it wasn't related to the scripts itself it
had to do with the state of my build directory.

> Again, untested.  But I have done a grep for blockquote and it only shows
> up in book_html.py as far as I can see.  So I think it must be
> book_html.py.

I finally found out where the code in book_html.py actually leads to.
With some brute force I  took care of replacing the snippet and image
with a paragraph that I could then grep in the rendered docs. And it
ended up exclusively in the lilypond-book regtests.

So obviously the book_XXX.py files are really for lilypond-book and
don't have anything to do with the building of LilyPond docs.

Which brings us back to the original issue: Where is the code that
generates the blockquotes with the LilyPond code snippets and images?

Probably David's pointer to texi2html is plausible, but I must say
reading through lilypond-texi2html.init doesn't really help. The
references to <blockquote> that David found obviously don't point to
LilyPond examples but rather to @example. And the rest of that file is
definitely not related to LilyPond code examples.

So it is really strange, I'm completely at a loss to find out where to
start looking further ...

Urs

>
> Thanks,
>
> Carl
>




reply via email to

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