From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Salazar Subject: Re: wide images in LaTex and HTML export Date: Tue, 14 Jan 2014 04:07:19 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b33d0ca0005dd04efea8533 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zxz-0002HN-HP for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 04:07:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2zxx-00005k-Hc for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 04:07:23 -0500 Received: from mail-pd0-x22c.google.com ([2607:f8b0:400e:c02::22c]:36583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2zxx-0008W8-5L for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 04:07:21 -0500 Received: by mail-pd0-f172.google.com with SMTP id z10so3217734pdj.3 for ; Tue, 14 Jan 2014 01:07:19 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: org-mode --047d7b33d0ca0005dd04efea8533 Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > On Mon, Jan 13, 2014 at 2:27 AM, Peter Salazar > 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! > --047d7b33d0ca0005dd04efea8533 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks! That works great, though I'm finding that sett= ing the width manually gets it wider than \pagewidth:=A0

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



On Mon= , Jan 13, 2014 at 10:03 AM, John Hendy <jw.hendy@gmail.com>= wrote:
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<= br> default LaTeX margins, so every one of my article-style documents has
the following header:
#+latex_header: \usepackage[hmargin=3D2.5cm,vmargin=3D2.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=3D2.5cm,vmargin=3D2.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 MacBo= ok
> 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 "re= l" tag, which
> would break the LaTeX images.
>
> For HTML export, does anyone have a way to automatically turn all imag= es
> into lightbox-style image links that would expand to full screen on cl= ick?
> (Or maybe even a jQuery way to expand images on click without even usi= ng
> href links? But again, something that would do this to all images in t= he
> document, ideally without the need to hand-tag each image.)
>
> Thanks!

--047d7b33d0ca0005dd04efea8533--