public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Craig Parker <craigp-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Images at the Tops of Pages
Date: Tue, 11 Jun 2019 16:57:24 -0400	[thread overview]
Message-ID: <a20de249-3601-1d83-7f95-6ec3b1f05549@linuxacademy.com> (raw)
In-Reply-To: <m2imtc3uta.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>

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.


  parent reply	other threads:[~2019-06-11 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 16:38 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 [this message]
     [not found]         ` <a20de249-3601-1d83-7f95-6ec3b1f05549-UzRat0APdLvLPIzirxu/xA@public.gmane.org>
2019-06-12  1:39           ` Images at the Bottoms " Craig Parker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a20de249-3601-1d83-7f95-6ec3b1f05549@linuxacademy.com \
    --to=craigp-uzrat0apdlvlpizirxu/xa@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).