public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Beamer not scaling image up
@ 2017-10-31 17:51 John Muccigrosso
       [not found] ` <e5b4440f-6061-4562-807b-cd0751139431-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: John Muccigrosso @ 2017-10-31 17:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 914 bytes --]

I've got a Beamer presentation (converted from markdown) that has an 
on-line image with very high resolution that I have no control over. The 
result is that the PDF has a very small image in it. Beamer seems to ignore 
my attempts to set a size attribute for the image.

Any easy way around this? Is it a bug?

Thanks.

(Still on 1.19.2.4)

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e5b4440f-6061-4562-807b-cd0751139431%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1399 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found] ` <e5b4440f-6061-4562-807b-cd0751139431-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-10-31 18:12   ` John MACFARLANE
  2017-10-31 20:16     ` John Muccigrosso
  0 siblings, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-10-31 18:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Try with pandoc 2.  And if it still doesn't work, give us
exact instructions for reproducing the issue.

+++ John Muccigrosso [Oct 31 17 10:51 ]:
>   I've got a Beamer presentation (converted from markdown) that has an
>   on-line image with very high resolution that I have no control over.
>   The result is that the PDF has a very small image in it. Beamer seems
>   to ignore my attempts to set a size attribute for the image.
>   Any easy way around this? Is it a bug?
>   Thanks.
>   (Still on 1.19.2.4)
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/e5b4440f-6061-4562-
>   807b-cd0751139431%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/e5b4440f-6061-4562-807b-cd0751139431-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-10-31 18:12   ` John MACFARLANE
@ 2017-10-31 20:16     ` John Muccigrosso
       [not found]       ` <33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: John Muccigrosso @ 2017-10-31 20:16 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1378 bytes --]

Here's the precise image I'm using in two versions, with and without a 
width attribute:

![Obverse: Junius Brutus](http:
//numismatics.org/collectionimages/19001949/1944/1944.100.4554.obv.width350.jpg)

-----

![Obverse: Junius Brutus](http://numismatics.org/collectionimages/19001949/1944/1944.100.4554.obv.width350.jpg){ 
width=700px }

beamer just gives the same size image no matter what I set the width at.

Note that while the image has a width of 350px, its resolution is a 
ridiculous 2785ppi, which yields a print width of about ⅛ of an inch. 
Beamer prints it at that size, but html, for another example, will use the 
700px I set (and ignores the native resolution even without the attribute).


PS I just realized this, but my beamer PDF pages are all 5.04x3.78".

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-ad1e-ab78f8f3a0eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3600 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]       ` <33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-10-31 21:12         ` John MACFARLANE
  2017-10-31 21:36           ` John Muccigrosso
  2017-11-28  7:28           ` Denis José Navas Vega
  0 siblings, 2 replies; 23+ messages in thread
From: John MACFARLANE @ 2017-10-31 21:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Try specifying both a width and a height. That worked
for me.  I have no idea why you need both in this case,
though...maybe a LaTeX expert could help.

\includegraphics[width=14cm,height=14cm]{1944.100.4554.obv.width350.jpg}

works

but

\includegraphics[width=14cm]{1944.100.4554.obv.width350.jpg}

doesn't.

+++ John Muccigrosso [Oct 31 17 13:16 ]:
>   Here's the precise image I'm using in two versions, with and without a
>   width attribute:
>   ![Obverse: Junius
>   Brutus](http://numismatics.org/collectionimages/19001949/1944/1944.100.
>   4554.obv.width350.jpg)
>   -----
>   ![Obverse: Junius
>   Brutus](http://numismatics.org/collectionimages/19001949/1944/1944.100.
>   4554.obv.width350.jpg){ width=700px }
>   beamer just gives the same size image no matter what I set the width
>   at.
>   Note that while the image has a width of 350px, its resolution is a
>   ridiculous 2785ppi, which yields a print width of about ⅛ of an inch.
>   Beamer prints it at that size, but html, for another example, will use
>   the 700px I set (and ignores the native resolution even without the
>   attribute).
>   PS I just realized this, but my beamer PDF pages are all 5.04x3.78".
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-
>   ad1e-ab78f8f3a0eb%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20171031211224.GA52352%40protagoras.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-10-31 21:12         ` John MACFARLANE
@ 2017-10-31 21:36           ` John Muccigrosso
       [not found]             ` <237d93a6-5d81-4a7b-8f5f-4cc679da89e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-11-28  7:28           ` Denis José Navas Vega
  1 sibling, 1 reply; 23+ messages in thread
From: John Muccigrosso @ 2017-10-31 21:36 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1884 bytes --]

On Tuesday, October 31, 2017 at 5:12:10 PM UTC-4, John MacFarlane wrote:
>
> Try specifying both a width and a height. That worked 
> for me.  I have no idea why you need both in this case, 
> though...maybe a LaTeX expert could help. 
>
> \includegraphics[width=14cm,height=14cm]{1944.100.4554.obv.width350.jpg} 
>
> works 
>
> but 
>
> \includegraphics[width=14cm]{1944.100.4554.obv.width350.jpg} 
>
> doesn't. 
>

Yes, that does work for me (writing in markdown), but I'd have said that 
the actual bug (or maybe just a missing feature) is not scaling the image 
*up* when necessary. (The size seems to work by applying the smaller 
number, btw.)

I also tried setting --dpi, but that didn't have any effect either unless 
the image had attributes set and then only that image was affected by the 
new dpi. Even then, the dpi affected the size of the image, regardless of 
whether that scaled it off the page (which maybe is reasonable behavior).

Maybe I'm unusual, but when I'm doing a slideshow, I like the images to be 
as large as they can be, keeping whatever caption there might be. This 
behavior seems to suggest that unless my images are larger than the 
available area as beamer calculates it - in which case they get scaled down 
to the maximum size that fits - they'll be smaller than than area.

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/237d93a6-5d81-4a7b-8f5f-4cc679da89e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2569 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]             ` <237d93a6-5d81-4a7b-8f5f-4cc679da89e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-11-03 20:58               ` John Muccigrosso
  0 siblings, 0 replies; 23+ messages in thread
From: John Muccigrosso @ 2017-11-03 20:58 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1489 bytes --]

I think I've solved this by changing the template so that it sets the 
height and width of images to fairly large percentages of the page 
*regardless* of their original size. Right now, the template only scales 
up, not down, via these lines:

\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\
fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\
Gin@nat@height\fi}

I've commented these out and put in this line just below them, in place of 
the corresponding original:

\setkeys{Gin}{width=\linewidth,height=0.9\textheight,keepaspectratio}

I also use the Boadilla theme which gives smaller margins, it looks like, 
at least on the left and right.

This seems to work OK with columns, too, though I haven't played around too 
much with it. In-line images require height and width attributes in order 
to work (though that may be true with the original template as well).

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/677b45e1-8d0c-4e53-bad7-4f6da21c91f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 5934 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-10-31 21:12         ` John MACFARLANE
  2017-10-31 21:36           ` John Muccigrosso
@ 2017-11-28  7:28           ` Denis José Navas Vega
       [not found]             ` <e6fc3aa0-dc22-4304-8997-58d2cc556826-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  1 sibling, 1 reply; 23+ messages in thread
From: Denis José Navas Vega @ 2017-11-28  7:28 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3621 bytes --]


Using pixels to set the width, due to the image's high ppp --as Muccigrosso 
discovered--, should produce an image of 0.22 in (600/2785). 
With LaTeX you can specify the tall AND the width, and if you want to 
preserve the image proportion its preferable to set one dimension 
(horizontal or vertical) and 'keepaspectratio' in \includegraphics[ ... ] 
instruction. The easy thing is to use 0.9\linewidth as the image width. 
This way, your image **almost allways fit** in your document (except for 
very tall images).


El martes, 31 de octubre de 2017, 15:12:10 (UTC-6), John MacFarlane 
escribió:
>
> Try specifying both a width and a height. That worked 
> for me.  I have no idea why you need both in this case, 
> though...maybe a LaTeX expert could help. 
>
> \includegraphics[width=14cm,height=14cm]{1944.100.4554.obv.width350.jpg} 
>
> works 
>
> but 
>
> \includegraphics[width=14cm]{1944.100.4554.obv.width350.jpg} 
>
> doesn't. 
>
> +++ John Muccigrosso [Oct 31 17 13:16 ]: 
> >   Here's the precise image I'm using in two versions, with and without a 
> >   width attribute: 
> >   ![Obverse: Junius 
> >   Brutus](http://numismatics.org/collectionimages/19001949/1944/1944.100. 
>
> >   4554.obv.width350.jpg) 
> >   ----- 
> >   ![Obverse: Junius 
> >   Brutus](http://numismatics.org/collectionimages/19001949/1944/1944.100. 
>
> >   4554.obv.width350.jpg){ width=700px } 
> >   beamer just gives the same size image no matter what I set the width 
> >   at. 
> >   Note that while the image has a width of 350px, its resolution is a 
> >   ridiculous 2785ppi, which yields a print width of about ⅛ of an inch. 
> >   Beamer prints it at that size, but html, for another example, will use 
> >   the 700px I set (and ignores the native resolution even without the 
> >   attribute). 
> >   PS I just realized this, but my beamer PDF pages are all 5.04x3.78". 
> > 
> >   -- 
> >   You received this message because you are subscribed to the Google 
> >   Groups "pandoc-discuss" group. 
> >   To unsubscribe from this group and stop receiving emails from it, send 
> >   an email to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To post to this group, send email to 
> >   [2]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. 
> >   To view this discussion on the web visit 
> >   [3]
> https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76- 
> >   ad1e-ab78f8f3a0eb%40googlegroups.com. 
> >   For more options, visit [4]https://groups.google.com/d/optout. 
> > 
> >References 
> > 
> >   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   2. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:> 
> >   3. 
> https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer 
> >   4. https://groups.google.com/d/optout 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e6fc3aa0-dc22-4304-8997-58d2cc556826%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 8138 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]             ` <e6fc3aa0-dc22-4304-8997-58d2cc556826-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-11-29 17:45               ` John MACFARLANE
  2017-11-30 14:54                 ` John Muccigrosso
  0 siblings, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-11-29 17:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Hm, I wonder if we should put \keepaspectratio in the
\includegraphics output by default?

+++ Denis José Navas Vega [Nov 27 17 23:28 ]:
>   Using pixels to set the width, due to the image's high ppp --as
>   Muccigrosso discovered--, should produce an image of 0.22 in
>   (600/2785).
>   With LaTeX you can specify the tall AND the width, and if you want to
>   preserve the image proportion its preferable to set one dimension
>   (horizontal or vertical) and 'keepaspectratio' in \includegraphics[ ...
>   ] instruction. The easy thing is to use 0.9\linewidth as the image
>   width. This way, your image **almost allways fit** in your document
>   (except for very tall images).
>   El martes, 31 de octubre de 2017, 15:12:10 (UTC-6), John MacFarlane
>   escribió:
>
>     Try specifying both a width and a height. That worked
>     for me.  I have no idea why you need both in this case,
>     though...maybe a LaTeX expert could help.
>     \includegraphics[width=14cm,height=14cm]{1944.100.4554.
>     obv.width350.jpg}
>     works
>     but
>     \includegraphics[width=14cm]{1944.100.4554.obv.width350.jpg}
>     doesn't.
>     +++ John Muccigrosso [Oct 31 17 13:16 ]:
>     >   Here's the precise image I'm using in two versions, with and
>     without a
>     >   width attribute:
>     >   ![Obverse: Junius
>     >   Brutus]([1]http://numismatics.org/collectionimages/19001949/
>     1944/1944.100.
>     >   4554.obv.width350.jpg)
>     >   -----
>     >   ![Obverse: Junius
>     >   Brutus]([2]http://numismatics.org/collectionimages/19001949/
>     1944/1944.100.
>     >   4554.obv.width350.jpg){ width=700px }
>     >   beamer just gives the same size image no matter what I set the
>     width
>     >   at.
>     >   Note that while the image has a width of 350px, its resolution
>     is a
>     >   ridiculous 2785ppi, which yields a print width of about ⅛ of an
>     inch.
>     >   Beamer prints it at that size, but html, for another example,
>     will use
>     >   the 700px I set (and ignores the native resolution even without
>     the
>     >   attribute).
>     >   PS I just realized this, but my beamer PDF pages are all
>     5.04x3.78".
>     >
>     >   --
>     >   You received this message because you are subscribed to the
>     Google
>     >   Groups "pandoc-discuss" group.
>     >   To unsubscribe from this group and stop receiving emails from
>     it, send
>     >   an email to [1][3]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >   To post to this group, send email to
>     >   [2][4]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>     >   To view this discussion on the web visit
>     >   [3][5]https://groups.google.com/d/msgid/pandoc-discuss/
>     33651631-7cfc-4a76-
>     >   ad1e-ab78f8f3a0eb%[6]40googlegroups.com.
>     >   For more options, visit [4][7]https://groups.google.com/
>     d/optout.
>     >
>     >References
>     >
>     >   1. mailto:[8]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >   2. mailto:[9]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>     >   3. [10]https://groups.google.com/d/
>     msgid/pandoc-discuss/33651631-7cfc-4a76-ad1e-ab78f8f3a0eb@
>     googlegroups.com?utm_medium=email&utm_source=footer
>     >   4. [11]https://groups.google.com/d/optout
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [12]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [13]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [14]https://groups.google.com/d/msgid/pandoc-discuss/e6fc3aa0-dc22-4304
>   -8997-58d2cc556826%40googlegroups.com.
>   For more options, visit [15]https://groups.google.com/d/optout.
>
>References
>
>   1. http://numismatics.org/collectionimages/19001949/1944/1944.100
>   2. http://numismatics.org/collectionimages/19001949/1944/1944.100
>   3. javascript:/
>   4. javascript:/
>   5. https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-
>   6. http://40googlegroups.com/
>   7. https://groups.google.com/d/optout
>   8. javascript:/
>   9. javascript:/
>  10. https://groups.google.com/d/msgid/pandoc-discuss/33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  11. https://groups.google.com/d/optout
>  12. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  13. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>  14. https://groups.google.com/d/msgid/pandoc-discuss/e6fc3aa0-dc22-4304-8997-58d2cc556826-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>  15. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20171129174503.GK9798%40protagoras.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-11-29 17:45               ` John MACFARLANE
@ 2017-11-30 14:54                 ` John Muccigrosso
       [not found]                   ` <ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: John Muccigrosso @ 2017-11-30 14:54 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 775 bytes --]

On Wednesday, November 29, 2017 at 12:45:20 PM UTC-5, John MacFarlane wrote:
>
> Hm, I wonder if we should put \keepaspectratio in the 
> \includegraphics output by default? 
>

Seems reasonable to me. 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1343 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                   ` <ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-11-30 17:47                     ` John MACFARLANE
  2017-12-01  0:05                     ` John MACFARLANE
  1 sibling, 0 replies; 23+ messages in thread
From: John MACFARLANE @ 2017-11-30 17:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I'll add in keepaspectratio when only a width or height is
used (but not when both are used -- that allows you to
distort the image if you want).

+++ John Muccigrosso [Nov 30 17 06:54 ]:
>   On Wednesday, November 29, 2017 at 12:45:20 PM UTC-5, John MacFarlane
>   wrote:
>
>     Hm, I wonder if we should put \keepaspectratio in the
>     \includegraphics output by default?
>
>   Seems reasonable to me.
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/ec7dbaa0-aa18-436d-
>   ae8c-52f7727ba2f9%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                   ` <ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-11-30 17:47                     ` John MACFARLANE
@ 2017-12-01  0:05                     ` John MACFARLANE
  2017-12-01 15:31                       ` John Muccigrosso
  1 sibling, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01  0:05 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I made this change but it doesn't seem to help.  Can you
test?  I still don't get scaling if I provide just one
of width or height...

+++ John Muccigrosso [Nov 30 17 06:54 ]:
>   On Wednesday, November 29, 2017 at 12:45:20 PM UTC-5, John MacFarlane
>   wrote:
>
>     Hm, I wonder if we should put \keepaspectratio in the
>     \includegraphics output by default?
>
>   Seems reasonable to me.
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/ec7dbaa0-aa18-436d-
>   ae8c-52f7727ba2f9%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01  0:05                     ` John MACFARLANE
@ 2017-12-01 15:31                       ` John Muccigrosso
       [not found]                         ` <df26d84d-2264-4a47-928c-b116bcb989bd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: John Muccigrosso @ 2017-12-01 15:31 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 844 bytes --]

On Thursday, November 30, 2017 at 7:05:49 PM UTC-5, John MacFarlane wrote:
>
> I made this change but it doesn't seem to help.  Can you 
> test?  I still don't get scaling if I provide just one 
> of width or height... 


This is consistent with your Oct 31 comment, no? 

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/df26d84d-2264-4a47-928c-b116bcb989bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1419 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                         ` <df26d84d-2264-4a47-928c-b116bcb989bd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-12-01 19:48                           ` John MACFARLANE
  2017-12-01 20:39                             ` Joost Kremers
  0 siblings, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01 19:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ John Muccigrosso [Dec 01 17 07:31 ]:
>   On Thursday, November 30, 2017 at 7:05:49 PM UTC-5, John MacFarlane
>   wrote:
>
>     I made this change but it doesn't seem to help.  Can you
>     test?  I still don't get scaling if I provide just one
>     of width or height...
>
>   This is consistent with your Oct 31 comment, no?

Yes.  I thought adding keepaspectratio would allow just
specifying one of the dimensions, but it doesn't.

Is there any point to adding keepaspectratio, then?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01 19:48                           ` John MACFARLANE
@ 2017-12-01 20:39                             ` Joost Kremers
       [not found]                               ` <87tvxachcx.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Joost Kremers @ 2017-12-01 20:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Fri, Dec 01 2017, John MACFARLANE wrote:
> +++ John Muccigrosso [Dec 01 17 07:31 ]:
>>   On Thursday, November 30, 2017 at 7:05:49 PM UTC-5, John 
>>   MacFarlane
>>   wrote:
>>
>>     I made this change but it doesn't seem to help.  Can you
>>     test?  I still don't get scaling if I provide just one
>>     of width or height...
>>
>>   This is consistent with your Oct 31 comment, no?
>
> Yes.  I thought adding keepaspectratio would allow just
> specifying one of the dimensions, but it doesn't.
>
> Is there any point to adding keepaspectratio, then?

This is what the documentation for the graphics / graphicx 
packages says about keepaspectratio:

**keepaspectratio** Boolean valued key like ‘clip’. If set to true 
then specifying both ‘width’ and ‘height’ (or ‘totalheight’) does 
not distort the figure but scales such that neither of the 
specified dimensions is _exceeded_.

Note, BTW, that in my experience, providing just width or height 
will actually scale the image properly, no need for 
keepaspectratio. Providing *both* width and height will distort 
the image if their ratio doesn't match the actual image ratio.

Also, there is an option 'scale' to \includegraphics that will 
scale the image.

HTH


-- 
Joost Kremers
Life has its moments

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/87tvxachcx.fsf%40fastmail.fm.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                               ` <87tvxachcx.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2017-12-01 21:56                                 ` John MACFARLANE
  2017-12-01 23:22                                   ` John MACFARLANE
                                                     ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01 21:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Joost Kremers [Dec 01 17 21:39 ]:
>
>On Fri, Dec 01 2017, John MACFARLANE wrote:
>>+++ John Muccigrosso [Dec 01 17 07:31 ]:
>>>  On Thursday, November 30, 2017 at 7:05:49 PM UTC-5, John   
>>>MacFarlane
>>>  wrote:
>>>
>>>    I made this change but it doesn't seem to help.  Can you
>>>    test?  I still don't get scaling if I provide just one
>>>    of width or height...
>>>
>>>  This is consistent with your Oct 31 comment, no?
>>
>>Yes.  I thought adding keepaspectratio would allow just
>>specifying one of the dimensions, but it doesn't.
>>
>>Is there any point to adding keepaspectratio, then?
>
>This is what the documentation for the graphics / graphicx packages 
>says about keepaspectratio:
>
>**keepaspectratio** Boolean valued key like ‘clip’. If set to true 
>then specifying both ‘width’ and ‘height’ (or ‘totalheight’) does not 
>distort the figure but scales such that neither of the specified 
>dimensions is _exceeded_.
>
>Note, BTW, that in my experience, providing just width or height will 
>actually scale the image properly, no need for keepaspectratio. 
>Providing *both* width and height will distort the image if their 
>ratio doesn't match the actual image ratio.

This doesn't work with pandoc, because of this line in the
template:

% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}

If you comment this out, specifying either height or width
by itself works; otherwise, you need to specify both or you
don't get any resizing.

I'm not sure how this works, maybe someone who is familiar
with this part of the template can enlighten us?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20171201215608.GA5920%40protagoras.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01 21:56                                 ` John MACFARLANE
@ 2017-12-01 23:22                                   ` John MACFARLANE
  2017-12-01 23:26                                   ` John MACFARLANE
  2017-12-01 23:48                                   ` Joost Kremers
  2 siblings, 0 replies; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01 23:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

OK, I see what's going on now.  If I comment out the line

\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}

in the template, sizing images with just one of height or
width works.

If I leave that in and replace \maxwidth and \maxheight
with \linewidth and \textheight, respectively, then it also
works.  (In this case the four lines that define \maxwidth
and \maxheight can be removed.)

However, doing this has the unwelcome consequence of
scaling all images that don't have explicit sizes
to fill the whole page.

So I think I understand what's going on now.  The
definitions

\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}

set \maxwidth and \maxheight to the normal width and height
of the particular image.  Since these are being inserted as
default values for width and height respectively, when you
just specify a width, the height is being constrained to the
natural height of the image, and because we have
'keepaspectratio', the width doesn't change either.

We need a different approach, if possible, that allows you
to set either width or height, but still rescales overly
large images to the page size.

Anyone know of a way to do this?  Or should we remove the
code that prevents images from overflowing the page?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01 21:56                                 ` John MACFARLANE
  2017-12-01 23:22                                   ` John MACFARLANE
@ 2017-12-01 23:26                                   ` John MACFARLANE
  2017-12-01 23:45                                     ` John MACFARLANE
  2017-12-01 23:48                                   ` Joost Kremers
  2 siblings, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01 23:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Oh, there's a nice solution here:
https://tex.stackexchange.com/questions/47245/set-a-maximum-width-and-height-for-an-image

\usepackage[export]{adjustbox} % loads also graphicx
\includegraphics[max height=<dimension>,max width=<dimension]{file}

but it incures a dependency on adjustbox.  Unfortunately
adjustbox is in texlive-latex-extra, which we've tried to
avoid.  But maybe we could do something conditional, so
you get the auto-scaling behavior if you have adjustbox?



^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01 23:26                                   ` John MACFARLANE
@ 2017-12-01 23:45                                     ` John MACFARLANE
  0 siblings, 0 replies; 23+ messages in thread
From: John MACFARLANE @ 2017-12-01 23:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ John MACFARLANE [Dec 01 17 15:26 ]:
>Oh, there's a nice solution here:
>https://tex.stackexchange.com/questions/47245/set-a-maximum-width-and-height-for-an-image
>
>\usepackage[export]{adjustbox} % loads also graphicx
>\includegraphics[max height=<dimension>,max width=<dimension]{file}
>
>but it incures a dependency on adjustbox.  Unfortunately
>adjustbox is in texlive-latex-extra, which we've tried to
>avoid.  But maybe we could do something conditional, so
>you get the auto-scaling behavior if you have adjustbox?

Here is what would go in the template:

\usepackage[Export]{adjustbox} % also loads graphicx
\usepackage{grffile}
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\adjustboxset{max width=\linewidth,max height=\textheight,keepaspectratio}

I think we should probably make this change, I'm only a bit
worried that the dependency on adjustbox will be a problem
for some.

Thoughts?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-01 21:56                                 ` John MACFARLANE
  2017-12-01 23:22                                   ` John MACFARLANE
  2017-12-01 23:26                                   ` John MACFARLANE
@ 2017-12-01 23:48                                   ` Joost Kremers
       [not found]                                     ` <87shcuc8lw.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2 siblings, 1 reply; 23+ messages in thread
From: Joost Kremers @ 2017-12-01 23:48 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Fri, Dec 01 2017, John MACFARLANE wrote:
> This doesn't work with pandoc, because of this line in the
> template:
>
> % Scale images if necessary, so that they will not overflow the 
> page
> % margins by default, and it is still possible to overwrite the 
> defaults
> % using explicit options in \includegraphics[width, height, 
> ...]{}
> \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
>
> If you comment this out, specifying either height or width
> by itself works; otherwise, you need to specify both or you
> don't get any resizing.
>
> I'm not sure how this works, maybe someone who is familiar
> with this part of the template can enlighten us?

This call to \setkeys sets the relevant options for all calls to 
\includegraphics in the document. You can override the options in 
a call to \includegraphics, but if you don't, you get the values 
specified in the \setkeys command.

\maxwidth and \maxheight are defined in such a way that they are 
equal to the width/height of the image or of the page, whichever 
is smaller.

So suppose you have an image that's smaller than the page and you 
want to scale it up. You specify a width that's larger than the 
image's actual width but not a height, because you want it to be 
set automatically on the basis of the image's width/height ratio. 
However, due to the \setkeys call in the template, the height will 
in fact be set to \maxheight, an 'keepaspectratio' will ensure 
that the provided width and height dimensions are not exceeded. 
The problem is that because \maxheight is equal to the image's 
actual height, the image is not scaled up.

You *can* scale an image down by providing just a width that's 
smaller than the image's width, because keepaspectratio will 
ensure that the smaller width is used and the height is adjusted 
to it. But scaling up is not possible unless you also specify a 
height.

Note that it's not necessary to provide the actual height you want 
the image to be. You can provide some very large height (say 
100cm) as long as the width is correct. keepaspectratio will 
ensure that the image isn't actually made 100cm high.

That may actually be a work-around for Pandoc: if the input file 
specifies only a width or a height but not both, just add the 
other dimension and provide a very large value.


-- 
Joost Kremers
Life has its moments


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                                     ` <87shcuc8lw.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2017-12-02  1:04                                       ` John MACFARLANE
  2017-12-02  1:32                                         ` Joost Kremers
  0 siblings, 1 reply; 23+ messages in thread
From: John MACFARLANE @ 2017-12-02  1:04 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Joost Kremers [Dec 02 17 00:48 ]:

>That may actually be a work-around for Pandoc: if the input file 
>specifies only a width or a height but not both, just add the other 
>dimension and provide a very large value.

I guess that's another way to go, though it leaves the
tex output a bit less elegant.

Do you have thoughts about this approach vs. the use of
adjustbox described in my last message on this thread?


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
  2017-12-02  1:04                                       ` John MACFARLANE
@ 2017-12-02  1:32                                         ` Joost Kremers
       [not found]                                           ` <87tvx9j4nd.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: Joost Kremers @ 2017-12-02  1:32 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Sat, Dec 02 2017, John MACFARLANE wrote:
> +++ Joost Kremers [Dec 02 17 00:48 ]:
>
>> That may actually be a work-around for Pandoc: if the input 
>> file specifies
>> only a width or a height but not both, just add the other 
>> dimension and
>> provide a very large value.
>
> I guess that's another way to go, though it leaves the
> tex output a bit less elegant.

Yes, but I just realised you shouldn't even use some arbitrary, 
very large value, because then if the user provides a width that's 
larger than the width of the page but leaves out the height, the 
image will be scaled up beyond the page.

So you'd actually have to use \linewidth or \textheight, the 
dimensions used in the definition of \maxwidth and \maxheight in 
the template. Which, I think, wouldn't be too inelegant, though 
YMMV, of course.

> Do you have thoughts about this approach vs. the use of
> adjustbox described in my last message on this thread?

If it weren't for the extra dependency, using adjustbox would 
probably be the way to go. But if you've so far managed to stay 
within some practical subset of LaTeX, then I'm not sure I'd give 
that up for what is probably a relatively minor issue.


-- 
Joost Kremers
Life has its moments


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                                           ` <87tvx9j4nd.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2017-12-02  5:02                                             ` John MacFarlane
       [not found]                                               ` <20171202050215.GA10429-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
  0 siblings, 1 reply; 23+ messages in thread
From: John MacFarlane @ 2017-12-02  5:02 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Joost Kremers [Dec 02 17 02:32 ]:
>
>On Sat, Dec 02 2017, John MACFARLANE wrote:
>>+++ Joost Kremers [Dec 02 17 00:48 ]:
>>
>>>That may actually be a work-around for Pandoc: if the input file 
>>>specifies
>>>only a width or a height but not both, just add the other 
>>>dimension and
>>>provide a very large value.
>>
>>I guess that's another way to go, though it leaves the
>>tex output a bit less elegant.
>
>Yes, but I just realised you shouldn't even use some arbitrary, very 
>large value, because then if the user provides a width that's larger 
>than the width of the page but leaves out the height, the image will 
>be scaled up beyond the page.
>
>So you'd actually have to use \linewidth or \textheight, the 
>dimensions used in the definition of \maxwidth and \maxheight in the 
>template. Which, I think, wouldn't be too inelegant, though YMMV, of 
>course.
>
>>Do you have thoughts about this approach vs. the use of
>>adjustbox described in my last message on this thread?
>
>If it weren't for the extra dependency, using adjustbox would probably 
>be the way to go. But if you've so far managed to stay within some 
>practical subset of LaTeX, then I'm not sure I'd give that up for what 
>is probably a relatively minor issue.

Yeah.  I think I'll go the way you suggest.


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: Beamer not scaling image up
       [not found]                                               ` <20171202050215.GA10429-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
@ 2017-12-02 17:26                                                 ` John Muccigrosso
  0 siblings, 0 replies; 23+ messages in thread
From: John Muccigrosso @ 2017-12-02 17:26 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 769 bytes --]

I haven't quite followed all the ins and outs here, but if this means that 
setting height and/or width to 100% results in undistorted images filling 
the relevant part of the slide, I'm good. :-)

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/528d7094-c6ce-4d8c-a829-746dd860ba4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1187 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-12-02 17:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 17:51 Beamer not scaling image up John Muccigrosso
     [not found] ` <e5b4440f-6061-4562-807b-cd0751139431-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-31 18:12   ` John MACFARLANE
2017-10-31 20:16     ` John Muccigrosso
     [not found]       ` <33651631-7cfc-4a76-ad1e-ab78f8f3a0eb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-10-31 21:12         ` John MACFARLANE
2017-10-31 21:36           ` John Muccigrosso
     [not found]             ` <237d93a6-5d81-4a7b-8f5f-4cc679da89e6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-03 20:58               ` John Muccigrosso
2017-11-28  7:28           ` Denis José Navas Vega
     [not found]             ` <e6fc3aa0-dc22-4304-8997-58d2cc556826-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-29 17:45               ` John MACFARLANE
2017-11-30 14:54                 ` John Muccigrosso
     [not found]                   ` <ec7dbaa0-aa18-436d-ae8c-52f7727ba2f9-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-30 17:47                     ` John MACFARLANE
2017-12-01  0:05                     ` John MACFARLANE
2017-12-01 15:31                       ` John Muccigrosso
     [not found]                         ` <df26d84d-2264-4a47-928c-b116bcb989bd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-12-01 19:48                           ` John MACFARLANE
2017-12-01 20:39                             ` Joost Kremers
     [not found]                               ` <87tvxachcx.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2017-12-01 21:56                                 ` John MACFARLANE
2017-12-01 23:22                                   ` John MACFARLANE
2017-12-01 23:26                                   ` John MACFARLANE
2017-12-01 23:45                                     ` John MACFARLANE
2017-12-01 23:48                                   ` Joost Kremers
     [not found]                                     ` <87shcuc8lw.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2017-12-02  1:04                                       ` John MACFARLANE
2017-12-02  1:32                                         ` Joost Kremers
     [not found]                                           ` <87tvx9j4nd.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2017-12-02  5:02                                             ` John MacFarlane
     [not found]                                               ` <20171202050215.GA10429-9Rnp8PDaXcadBw3G0RLmbRFnWt+6NQIA@public.gmane.org>
2017-12-02 17:26                                                 ` John Muccigrosso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).