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

Hidden \includegraphics[]{} latex call #340

Closed
kapilsh opened this issue Jul 19, 2016 · 6 comments · Fixed by #1024
Closed

Hidden \includegraphics[]{} latex call #340

kapilsh opened this issue Jul 19, 2016 · 6 comments · Fixed by #1024

Comments

@kapilsh
Copy link

kapilsh commented Jul 19, 2016

I was trying to override the report.tplx template to add a cover page to it.

I had to use \includegraphics with width and height that equaled the page width and page height.

However, due to the code below:

\let\Oldincludegraphics\includegraphics
% Set max figure width to be 80% of text width, for now hardcoded.
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=.8\maxwidth]{#1}}

the command was hidden.

I had to dig through the code to figure out that I could call \Oldincludegraphics.

@mpacer
Copy link
Member

mpacer commented Aug 22, 2016

This was introduced in #178 as a way of making the default \includegraphics command print figures specifically that would not span the page.

It may be possible to use \xparse to make this customisable, but it is nontrivial to make it the standard \includegraphics work with arguments while also having this nicer default.

Perhaps some mention of this should be added to the documentation? @willingc where in the documentation would you think this would most appropriately fit?

@mpacer mpacer added this to the 5.1 milestone Aug 22, 2016
@mpacer mpacer modified the milestones: 5.1, 5.2 Jan 22, 2017
@JosefAssad
Copy link

This trips up quite a few other things one might be doing with a LaTeX nbconvert template. I just ran into this issue now while setting a background png for all pages. It looks to me like any package calling \includegraphics is keeling over and dying.

@mpacer
Copy link
Member

mpacer commented May 24, 2017

I'm still not sure how to resolve this. One possibility would be to create a custom filter for the pandoc to LaTeX conversion? @takluyver do you have any thoughts?

@mpacer mpacer modified the milestones: 5.3, 5.2 May 24, 2017
@takluyver
Copy link
Member

Maybe we could put the conflicting code in our template (the code @kapilsh identified) into its own block, so that custom templates can override that specifically.

@mpacer mpacer modified the milestones: 5.3, 5.4 Aug 26, 2017
@blink1073 blink1073 modified the milestones: 5.4, 5.5 Aug 29, 2018
@MSeal
Copy link
Contributor

MSeal commented Apr 23, 2019

No one is pushing implementation here. Removing milestone until someone actively picks it up.

@MSeal MSeal removed this from the 5.5 milestone Apr 23, 2019
@t-makaro
Copy link
Contributor

Dev note: This tex.stackexchange might help. Apparently, \setkeys can be used to set defaults. I will try it out when I have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants