Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reST container directive for latex output #1336

Open
shimizukawa opened this issue Jan 3, 2015 · 7 comments
Open

reST container directive for latex output #1336

shimizukawa opened this issue Jan 3, 2015 · 7 comments

Comments

@shimizukawa
Copy link
Member

Hi,

reST container directive does not work for latex output.

A patch to solve the issue is attached.

Regards,
Camille


@shimizukawa
Copy link
Member Author

From Florian Oppermann on 2014-02-18 13:35:53+00:00

I added another three lines of code for generating labels for the :name: option. Unfortunately I don't know how to convert the node.get('names') to a proper reference identifier. Therefore I used node.get('ids') which contains the parsed name but also contains identifiers from ordinary labels. This leads to multiple labels when a container gets a label not via :name:. It was the best solution I could find quickly.

#!python

ids = node.get('ids', [])
for Id in ids:
  self.body.append( '\n' + self.hypertarget(Id) )

@tk0miya
Copy link
Member

tk0miya commented Mar 6, 2016

I salvaged the patch file from bitbucket:
latexContainer.patch
Uploaded using ZenHub.io

@kenmorse
Copy link

What is the status of this issue? Would be great if the container directive worked for latex (PDF) as well as for HTML output.

@tk0miya
Copy link
Member

tk0miya commented Jul 19, 2020

I salvaged the patch file again: latexContainer.patch.gz

This expands the container node to \begin{%s} and \end{%} macro. I'm afraid that this breaks PDF build for users who uses container directives suddenly. To apply, or not to apply. That is a question.

@kenmorse
Copy link

@tk0miya - First, do no harm?

@tk0miya
Copy link
Member

tk0miya commented Jul 19, 2020

If applied, you MUST add a LaTeX macro for container classes if you're using. If not, LaTeX failed to build PDF.

@dham
Copy link
Contributor

dham commented May 3, 2021

I think #9166 provides a solution to this without the problem identified by @tk0miya above.

@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants