Reviving this old thread: if you feel like it, please try out
https://pypi.org/project/sphinxcontrib-beamer/ which I recently developed
for my own use.
On Friday, July 28, 2017 at 11:37:48 AM UTC+2, Christoph Buchner wrote:
>
>
>
> On Thursday, 27 July 2017 09:47:50 UTC+2, jfbu wrote:
>>
>> Le 26/07/2017 à 20:09, Christoph Buchner a écrit :
>> >
>> >
>> > On Wednesday, 26 July 2017 09:30:24 UTC+2, jfbu wrote:
>> >>
>> >> ...
>> >> ! Undefined control sequence.
>> >> \FNH@spewnotes ...@gobbletwo \FNH@H@@footnotetext
>> >> ...
>> >> ! Undefined control sequence.
>> >> \capstart ->\ifcapstart \H@refstepcounter
>> >> \@captype
>> \hyper@makecurrent \@cap...
>> >> l.10520 \capstart
>> >>
>> >> ! Undefined control sequence.
>> >> \capstart ...counter \@captype \hyper@makecurrent
>> >> \@captype
>> \global \let \hc...
>> >> l.10520 \capstart
>> >>
>> >> ...
>> >> ! Package xcolor Error: Undefined color `OldLace'.
>> >>
>> >>
>> >> and then we reach
>> >>
>> >> [829] [830] [831] [832] [833] [834] [835] [836] [837] [838] [839]
>> [840]
>> >>
>> >> ! LaTeX Error: Environment theindex undefined.
>> >>
>> >
>> >
>> > Dear Jean-Francois,
>> >
>> > thank you very much for the very thorough investigation! The confusing
>> nature of the error output remind me of my past (thesis) day when I was
>> fighting with Latex. :D
>> >
>>
>> Dear Christoph
>>
>> I looked a bit more and it appears the Beamer class loads the
>> hyperref package in such a context that hyperref loading is only
>> partial. As a result, a number of hyperref macros are left
>> undefined. This explains most of the errors above, including
>> the first one with \FNH@H@@footnotetext, because that macro
>> is made an alias to the undefined \H@@footnotetext. But the
>> package footnotehyper-sphinx is fooled by the fact that the
>> Boolean \ifHy@hyperfootnotes is actually defined with value
>> \iftrue, despite hyper-footnotes related macros not being
>> defined as expected from package hyperref.
>>
>> The error with undefined color is due to the fact that
>> xcolor is already loaded by Beamer class and the subsequent
>> loading by Sphinx is ignored (and the conf.py was configured
>> to pass some option to xcolor so that it would know OldLace).
>>
>> Similarly hyperref options declared by Sphinx would be ignored
>> because they use \PassOptionsToPackage, but hyperref has
>> already been loaded by Beamer so it is too late.
>>
>> (and it has been loaded in strange way, which causes hyperref
>> to say in the log "it was stopped early")
>>
>> All of these issues could be solved by a determined LaTeX user
>> having the time.
>>
>> There remains the one of missing environment "theindex". Here
>> also it can be solved by defining it oneself.
>>
>> So with some work one can for example compile the Sphinx own
>> docs as a Beamer presentation (of about 900 slides...)
>>
>> This will have the design of a Beamer presentation but
>> the source is lacking all of the specific Beamer commands.
>>
>> It would make more sense possibly then to use rather
>> \usepackage{beamerarticle} in the preamble (I have forgotten
>> what happened when I tried[1], some of the issues above
>> were still there) rather than setting the document class
>> to beamer.
>>
>> [1] ah yes, there was also an error due to option clash for
>> package color if I remember correctly
>>
>> Anyway, if you really want to make a Beamer presentation
>> you need a Beamer writer on Sphinx side, not a LaTeX writer.
>>
>> Because you want to be able to use all commands specific
>> to a Beamer presentation.
>>
>> But the Sphinx LaTeX style file is tested and done for the
>> standard classes, as is the case of all the packages it
>> uses. It is rather surprising actually that apart from
>> the titlesec incompatibility (for which I indicated a workaround)
>> and the hyperref peculiarities and the issues with package
>> options (xcolor for example), it turns out to be almost possible
>> to use the Sphinx LaTeX writer output directly with beamer class.
>>
>> > I think for the moment I won't try to convince Sphinx of my intentions,
>> and will try to make either https://github.com/myint/rst2beamer work ("A
>> docutils script converting reStructuredText into Beamer-flavoured LaTeX."),
>> or try to find willing maintainers to fix bugs in
>> https://github.com/nyergler/hieroglyph/ (it is "recommended"/mentioned
>> in the sphinx faq, after all).
>> >
>>
>> Certainly an "rst2beamer" is better but I don't know how
>> that can be made to fit with auto-documenting Python code
>> for example; how could one use say autodoc: where will
>> it pause?
>> how will it split Python code documentation into frames ?
>> Or, would the docstrings contain the Beamer specific
>> syntax ?
>>
>
> I don't know about autodoc, I'm sure not all features are appropriate for
> a presentation.
> Other markup-to-presentation tools typically handle slide separations
> based on the section structure of the document (e.g. top-level is
> presentation title, next level presentation sections, next level slides),
> with the possibility to also use a REst transition (4+ punctuation marks)
> as a slide separator, with an empty slide title, or the title of the
> previous slide.
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/21feba3c-d6c1-4f3f-95ce-f258ffc080ae%40googlegroups.com.