emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Peter Salazar <cycleofsong@gmail.com>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: wide images in LaTex and HTML export
Date: Mon, 13 Jan 2014 09:03:40 -0600	[thread overview]
Message-ID: <CA+M2ft9fqPAdm71Bf-FycHs0zzX3E7Da7LZ4BMpe+64UHJTN_Q@mail.gmail.com> (raw)
In-Reply-To: <CAE+_6TwkYfJE26d+AhQGGsU_g+OUVeCnShOC-GG=hx9=XvKScQ@mail.gmail.com>

On Mon, Jan 13, 2014 at 2:27 AM, Peter Salazar <cycleofsong@gmail.com> wrote:
> Has anyone had success recently working with wide images? I have source
> documents and I'm trying to export to both LaTeX/PDF and HTML.
>
> Working from the manual, my image links look like this (the wide dimension
> becomes height when rotated):
>
> #+ATTR_LATEX: :height 9in :options angle=90 :float t
> [[file:./image-files/cash-flow-(monthly).jpg]]
>
> On the LaTeX/PDFs, the image is still coming out pretty small. Is there an
> easy way to get it to suppress the page header and ignore the top margin so
> I can get more room to work with?

Here's some ideas on the LaTeX side; I don't use HTML nearly as much...

Do you have anything setting margins in your header? I can't stand the
default LaTeX margins, so every one of my article-style documents has
the following header:
#+latex_header: \usepackage[hmargin=2.5cm,vmargin=2.5cm]{geometry}

You can also ditch the title/date with this line:
#+BIND: org-latex-title-command ""

Note that to use this, you need the following in your config (or at
least to customize it to prompt the user if using #+bind is okay):
(setq org-export-allow-bind-keywords t)

Lastly, you can remove the footer (centered page number) with setting
an empty pagestyle:
\pagestyle{empty}

Putting it all together, see what you think of this result (I get a
pretty big image, with just the heading and the image).


#+begin_src example

#+options: toc:nil
#+latex_header: \usepackage[hmargin=2.5cm,vmargin=2.5cm]{geometry}
#+BIND: org-latex-title-command ""

\pagestyle{empty}


* test

#+begin_center
#+attr_latex: :width \textwidth
[[./tux.png]]
#+end_center

#+end_src

I downloaded this image as tux.png (same directory as the test file):
http://post.putorius.net/images/originaltux.png


Hope that helps a bit,
John

>
> For HTML export, the image comes out wider than the screen on my MacBook
> 13-inch. Has anyone had success using a lightbox-style plugin with org HTML
> export? Ideally I wouldn't have to use image links with a "rel" tag, which
> would break the LaTeX images.
>
> For HTML export, does anyone have a way to automatically turn all images
> into lightbox-style image links that would expand to full screen on click?
> (Or maybe even a jQuery way to expand images on click without even using
> href links? But again, something that would do this to all images in the
> document, ideally without the need to hand-tag each image.)
>
> Thanks!

  reply	other threads:[~2014-01-13 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  8:27 wide images in LaTex and HTML export Peter Salazar
2014-01-13 15:03 ` John Hendy [this message]
2014-01-14  9:07   ` Peter Salazar

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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CA+M2ft9fqPAdm71Bf-FycHs0zzX3E7Da7LZ4BMpe+64UHJTN_Q@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=cycleofsong@gmail.com \
    --cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).