Sorry, I don't have good example to do that...

2018-06-03 16:43 GMT+09:00 Reza Roodsari <[email protected]>:
> I've been trying to figure out an easy way of using cpp (#ifdef, #ifndef,
> ...) in the Makefile, but can't figure it out. Since sphinx-build does it's
> own recursive decent and finds all the targets (.rst files) we just have
> rule in the Makefile. So if I modify the rule and run cpp before calling
> sphinx-build, only my first file is preprocessed. I did look at the sphinx
> templates, but I don't think jinja templates is what I want.
>
> So can you point to an example, or add some detail on how we can use cpp to
> preprocess .rst files before sphinx-build renders them?
> Thanks in advance
>
> On Thursday, May 17, 2018 at 7:19:11 AM UTC-7, Komiya Takeshi wrote:
>>
>> Hi,
>>
>> Unfortunately the "only" directive does not support control sections.
>> It is well known restriction.
>> There are no way to omit sections. Please use preprocessors (ex. cpp,
>> php).
>>
>> Thanks,
>> Takeshi KOMIYA
>>
>> 2018-05-17 1:48 GMT+09:00 Erin Kelly <[email protected]>:
>> > I have a document that starts like this:
>> >
>> > .. only:: latex
>> >
>> >    ===============
>> >     Introduction
>> >    ===============
>> >
>> >    .. include:: introduction.txt
>> >
>> >
>> > =======================
>> > Product requirements
>> > =======================
>> >
>> > There are several requirements for creating Oobleck. A reference diagram
>> > and
>> > more information about each can be found below.
>> >
>> > When I build this to HTML, instead of naming the page "Product
>> > requirements"
>> > it names the page "Introduction". This page title is displayed in the
>> > browser tab label and in the Previous/Next navigation.
>> >
>> > Have I done something wrong, or is this possibly a bug?
>> >
>> > Is there a way to explicitly set this text for this page?
>> >
>> > Background information:
>> >
>> > The reason I am doing this is to have a more graceful introductory
>> > content
>> > when building the same source as PDF and as HTML.
>> >
>> > In HTML I want to have introductory text on the same page as the main
>> > table
>> > of contents. But if I put it there and then build latexpdf, that
>> > introductory text appears after the table of contents pages and before
>> > the
>> > first chapter, with no headings and on a page by itself.
>> >
>> > So I put the introductory text in a separate file and use the .. only::
>> > directive to call it where it belongs in each format.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "sphinx-users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to [email protected].
>> > To post to this group, send email to [email protected].
>> > Visit this group at https://groups.google.com/group/sphinx-users.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to