executablebooks / sphinx-tabs

Tabbed views for Sphinx
https://sphinx-tabs.readthedocs.io
MIT License
263 stars 67 forks source link

sphinx-tabs handling in LaTeX output #150

Open ronstone2000 opened 2 years ago

ronstone2000 commented 2 years ago

I am assessing sphinx-tabs for use in a workflow that must support PDF as well as HTML. I don't see explicit documentation of PDF support, but looking at past posts, some people seem to have requested formatting/ordering improvements to the PDF output, implying that some sort of rendering is provided. However, when I use

sphinx-build -b latex ...

no tabbed content is passed through. I have set

sphinx_tabs_valid_builders = ['latex']

Can someone clarify the level/type of LaTeX support? Specifically, I would want to linearize the output so that tabs and subtabs are converted to headers+content.

If LaTeX is not supported, I would like to request it as an enhancement and can follow up to start a discussion of what features would make sense for the community.

ronstone2000 commented 2 years ago

Can anyone provide guidance on this? Thanks.

OptimizationModels commented 1 year ago

Any solution to this? tabs produce quite unsatisfactory LaTeX documents....

foster999 commented 1 year ago

LaTeX/PDF support is minimal at best - I think we test a pdf build using rhinotype, which just writes the tab names and content in plain text.

I'd be happy to try and improve this, but would need a clear description of what you want the output to look like for each of the current tab types. I don't have experience using LaTeX, so it would be great if you could also provide a demo document and build instructions for me to test with. Sound good?

Edit: collating the requirements through a discussion also sounds like a great idea :)

OptimizationModels commented 1 year ago

tmp.pdf Thanks David for your quick and kind reply to my comment. I will try to explain my use case here. I wrote a book with sphinx and would like to produce a pdf too.

If you look at the html output https://webgol.dinfo.unifi.it/OptimizationModels/LinearModels.html you will see three tabs very well organized.

If I generate a pdf, however, I get what you see in the attachment. In practice I get a paragraph start with three lines: AMPL Julia Pyomo followed by three different listings with no mention of the tab name (AMPL/Julia/Pyomo) in their caption). It would be enough, for me, to remove the three tab names from the Latex output (AMP,Julia, Pyomo) and to add them as a caption in the displayed figures . E.g., Listing 1 (AMPL): Al6061.dat

What is your opinion? thank you and all my best regards fabio

On Fri, 3 Mar 2023 at 18:51, David Foster @.***> wrote:

LaTeX/PDF support is minimal at best - I think we test a pdf build using rhinotype, which just writes the tab names and content in plain text.

I'd be happy to try and improve this, but would need a clear description of what you want the output to look like for each of the current tab types. I don't have experience using LaTeX, so it would be great if you could also provide a demo document and build instructions for me to test with. Sound good?

— Reply to this email directly, view it on GitHub https://github.com/executablebooks/sphinx-tabs/issues/150#issuecomment-1453887334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVJM6HPERZQ43KPQ75BDAALW2IVSHANCNFSM5QMR7E4A . You are receiving this because you commented.Message ID: @.***>

-- http://www.airoconference.it/ods2022/

Fabio Schoen http://webgol.dinfo.unifi.it/who-we-are/fabio-schoen/ Professor of Operations Research http://www.scienceofbetter.org/ Coordinator of the PhD program in Information Engineering http://informationengineering.dinfo.unifi.it/ GOL http://webgol.dinfo.unifi.it/ / Dip. Ingegneria dell'Informazione http://www.dinfo.unifi.it/ - Univ. di Firenze http://www.unifi.it/ via di S.Marta 3, 50139 FIRENZE (Italy) http://maps.google.it/maps?f=q&source=s_q&hl=it&geocode=&q=via+di+S.Marta+3,+50139+FIRENZE+%28Italy%29&aq=&sll=43.773668,11.26929&sspn=0.010443,0.01929&ie=UTF8&hq=&hnear=Via+di+Santa+Marta,+3,+50139+Firenze,+Toscana&z=16 Tel: +39 055 275 8512

Adjunct professor of Operations Management New York University http://www.nyu.edu/ (Florence campus villa La Pietra http://www.nyu.edu/global/lapietra/)

https://webgol.dinfo.unifi.it [image: Fabio Schoen - Google Scholar] https://scholar.google.it/citations?user=wYmt8csAAAAJ&hl=it [image: Fabio Schoen - Linkedin] https://www.linkedin.com/in/fabioschoen/ my public calendar https://calendar.google.com/calendar/embed?src=t2qhhqunll2imfrlev263lqu50%40group.calendar.google.com&ctz=Europe%2FRome