emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] wide images in LaTex and HTML export


From: John Hendy
Subject: Re: [O] wide images in LaTex and HTML export
Date: Mon, 13 Jan 2014 09:03:40 -0600

On Mon, Jan 13, 2014 at 2:27 AM, Peter Salazar <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]