-
Notifications
You must be signed in to change notification settings - Fork 97
trouble with _repr_latex_ and nbconvert #16
Comments
P.S., I'm planning on implementing some "totally sweet horizontal rules" as part of this class 😮 |
Somehow it's working now. I think it's because I also did |
Happy you solved it by yourself ! Looking forward to "totally sweet hrules"! |
@Carreau unfortunately, I would need to have access to the preamble to include the fancy ornaments. I'm not aware of a way to do this aside from a custom template. It would be cool if objects using repr_latex could request packages to be included. Is this possible that you know of? Anyway, for a basic hrule, it's working great! |
Maybe the discussion of how HTML/JS outputs can use JS libraries without re-including them completely in each output should also try to solve for Latex outputs adding things to the preamble - they seem like similar conceptual things. The technical details may be different enough that it doesn't make sense to tackle them together, though. |
Preamble can be modified with custom exporter, and apparently our preamble comes from a specific run of pandoc, but pandoc's preamble depend on the feature you use, so it should not be a static preamble... So much fun... |
The final product 👍
|
sweet. Thanks for sharing. |
@takluyver yeah, that seems like the same kind of deal! where can I read more about progress on that? I was actually thinking I'd like to make some objects that output webgl canvases, and it'd be very nice to know about the progress on that feature. |
That one has been knocking around for a while - see jupyter/notebook#116 and jupyter/notebook#319 for more information. I think it came up again recently, but I don't know where. Another idea: maybe someone who's more versed in Latex and pandoc could create a Latex exporter that works by loading notebooks directly into pandoc, and having pandoc generate a whole Latex document at once. Currently we run pandoc on a per-cell basis to convert markdown cells to latex, and assemble it all in a template we provide. This allows for powerful customisation using the template structure, but it does make things like the preamble tricky, because pandoc expects that it can generate that as part of its conversion. It's probably worth exploring that trade-off. |
I'm using Jupyter 4.1.2.
I have a simple class designed to make a separator. This helps me stay sane with cells that have a lot of output.
Well, I'm having trouble getting nbconvert to call
Separator._repr_latex_
. Instead, in my tex output I get the__repr__
output, like this:What am I missing? I've had this problem before in other situations involving every table library I could get my hands on. Now the issue is coming up in a very clean cut circumstance!
The text was updated successfully, but these errors were encountered: