emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* wide images in LaTex and HTML export
@ 2014-01-13  8:27 Peter Salazar
  2014-01-13 15:03 ` John Hendy
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Salazar @ 2014-01-13  8:27 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

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?

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!

[-- Attachment #2: Type: text/html, Size: 1361 bytes --]

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

* Re: wide images in LaTex and HTML export
  2014-01-13  8:27 wide images in LaTex and HTML export Peter Salazar
@ 2014-01-13 15:03 ` John Hendy
  2014-01-14  9:07   ` Peter Salazar
  0 siblings, 1 reply; 3+ messages in thread
From: John Hendy @ 2014-01-13 15:03 UTC (permalink / raw)
  To: Peter Salazar; +Cc: org-mode

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!

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

* Re: wide images in LaTex and HTML export
  2014-01-13 15:03 ` John Hendy
@ 2014-01-14  9:07   ` Peter Salazar
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Salazar @ 2014-01-14  9:07 UTC (permalink / raw)
  To: John Hendy; +Cc: org-mode

[-- Attachment #1: Type: text/plain, Size: 2916 bytes --]

Thanks! That works great, though I'm finding that setting the width
manually gets it wider than \pagewidth:

#+begin_center
#+ATTR_LATEX: :height 10in :options angle=90
[[./profit-and-loss-monthly.jpg]]
#+end_center



On Mon, Jan 13, 2014 at 10:03 AM, John Hendy <jw.hendy@gmail.com> wrote:

> 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!
>

[-- Attachment #2: Type: text/html, Size: 3903 bytes --]

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

end of thread, other threads:[~2014-01-14  9:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-13  8:27 wide images in LaTex and HTML export Peter Salazar
2014-01-13 15:03 ` John Hendy
2014-01-14  9:07   ` Peter Salazar

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