public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Images at the Tops of Pages
@ 2019-06-11 16:38 Craig Parker
       [not found] ` <330f4296-ada7-c183-9102-f14ff358f69a-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Craig Parker @ 2019-06-11 16:38 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Converting from md to pdf, with a latex template, I can get images into 
my document with the graphicx package. But, they're always  at the tops 
of pages, regardless of where they fall in the markdown. So, I'll have a 
heading, then some text, then an image, but in the pdf, the image will 
come before the heading, at the top of a page. I've tried dorking with 
\pagebreak, but got nowhere.


Any ideas?

-- 
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/330f4296-ada7-c183-9102-f14ff358f69a%40linuxacademy.com.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Images at the Tops of Pages
       [not found] ` <330f4296-ada7-c183-9102-f14ff358f69a-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
@ 2019-06-11 17:17   ` John MacFarlane
       [not found]     ` <m2imtc3uta.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2019-06-11 17:17 UTC (permalink / raw)
  To: Craig Parker, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


An image in a a paragraph by itself gets treated as a
figure (implicit_figures extension).  Figures in LaTeX
will "float" for better layout.

If you don't want this, you can disable the
implicit_figures extension (-f
markdown-implicit_figures) or make sure that the
image isn't the only thing in the paragraph, e.g.
by inserting a nonbreaking space after it.

Craig Parker <craigp-UzRat0APdLvLPIzirxu/xA@public.gmane.org> writes:

> Converting from md to pdf, with a latex template, I can get images into 
> my document with the graphicx package. But, they're always  at the tops 
> of pages, regardless of where they fall in the markdown. So, I'll have a 
> heading, then some text, then an image, but in the pdf, the image will 
> come before the heading, at the top of a page. I've tried dorking with 
> \pagebreak, but got nowhere.
>
>
> Any ideas?
>
> -- 
> 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/330f4296-ada7-c183-9102-f14ff358f69a%40linuxacademy.com.
> For more options, visit 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/m2imtc3uta.fsf%40johnmacfarlane.net.
For more options, visit https://groups.google.com/d/optout.


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

* Re: Images at the Tops of Pages
       [not found]     ` <m2imtc3uta.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-06-11 20:57       ` Craig Parker
       [not found]         ` <a20de249-3601-1d83-7f95-6ec3b1f05549-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Craig Parker @ 2019-06-11 20:57 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I think I solved it with something in the template:

\makeatletter
\def\ScaleWidthIfNeeded{%
  \ifdim\Gin@nat@width>\linewidth
     \linewidth
   \else
     \Gin@nat@width
   \fi
}
\def\ScaleHeightIfNeeded{%
   \ifdim\Gin@nat@height>0.9\textheight
     0.9\textheight
   \else
     \Gin@nat@width
   \fi
}
\makeatother

\setkeys{Gin}{width=\ScaleWidthIfNeeded,height=\ScaleHeightIfNeeded,keepaspectratio}%

\usepackage{float}
\floatplacement{figure}{H}

On 6/11/19 1:17 PM, John MacFarlane wrote:
> An image in a a paragraph by itself gets treated as a
> figure (implicit_figures extension).  Figures in LaTeX
> will "float" for better layout.
>
> If you don't want this, you can disable the
> implicit_figures extension (-f
> markdown-implicit_figures) or make sure that the
> image isn't the only thing in the paragraph, e.g.
> by inserting a nonbreaking space after it.
>
> Craig Parker <craigp-UzRat0APdLvLPIzirxu/xA@public.gmane.org> writes:
>
>> Converting from md to pdf, with a latex template, I can get images into
>> my document with the graphicx package. But, they're always  at the tops
>> of pages, regardless of where they fall in the markdown. So, I'll have a
>> heading, then some text, then an image, but in the pdf, the image will
>> come before the heading, at the top of a page. I've tried dorking with
>> \pagebreak, but got nowhere.
>>
>>
>> Any ideas?
>>
>> -- 
>> 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/330f4296-ada7-c183-9102-f14ff358f69a%40linuxacademy.com.
>> For more options, visit 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/a20de249-3601-1d83-7f95-6ec3b1f05549%40linuxacademy.com.
For more options, visit https://groups.google.com/d/optout.


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

* Images at the Bottoms of Pages
       [not found]         ` <a20de249-3601-1d83-7f95-6ec3b1f05549-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
@ 2019-06-12  1:39           ` Craig Parker
  0 siblings, 0 replies; 4+ messages in thread
From: Craig Parker @ 2019-06-12  1:39 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

\rfoot{\includegraphics[width=0.25\textwidth]{images/LA-Logo-Horizontal-NVY-Web.png}\vspace{-.5cm} 
\thepage}


That's what's in my latex template. I'm trying to bump the page number 
up, but I can only bump the page number AND the image up. I've tried a 
\vspace before both the \includegraphics and the \thepage, but that 
didn't work either.

I also tried sticking the image in a cfoot and right aligning it, but I 
couldn't get that working either. I'm not sure it'd have been "right" 
enough anyway.


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

end of thread, other threads:[~2019-06-12  1:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 16:38 Images at the Tops of Pages Craig Parker
     [not found] ` <330f4296-ada7-c183-9102-f14ff358f69a-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
2019-06-11 17:17   ` John MacFarlane
     [not found]     ` <m2imtc3uta.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-06-11 20:57       ` Craig Parker
     [not found]         ` <a20de249-3601-1d83-7f95-6ec3b1f05549-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
2019-06-12  1:39           ` Images at the Bottoms " Craig Parker

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).