From mboxrd@z Thu Jan 1 00:00:00 1970 From: cberry@ucsd.edu Subject: Re: New Exporter html - latex - beamer Date: Tue, 19 Mar 2013 16:36:12 -0700 Message-ID: <87620nc68j.fsf@tajo.ucsd.edu> References: <87a9q217wp.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI6Hu-0007rv-Sr for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 19:49:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UI6Hp-0000fN-HI for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 19:49:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:38579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UI6Hp-0000fF-9I for emacs-orgmode@gnu.org; Tue, 19 Mar 2013 19:49:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UI6I9-0004OX-2J for emacs-orgmode@gnu.org; Wed, 20 Mar 2013 00:50:05 +0100 Received: from tajo.ucsd.edu ([137.110.122.165]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 00:50:05 +0100 Received: from cberry by tajo.ucsd.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Mar 2013 00:50:05 +0100 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: emacs-orgmode@gnu.org Robert Eckl writes: > Eric S Fraga writes: > >> Robert Eckl writes: >> >>> I have to provide weekly newsletters in the format pdf and html. Up to >>> now i did this with exporting to scrartcl, known as koma-script. >>> Including images is a bit booring because i handle two formats, for example >> >> I am not sure what your latex bits are trying to accomplish so it's >> difficult to advise on how to achieve what you want. Maybe wrapfigure, >> which org export supports (float option, I believe, but I am not sure), >> is what you need instead of "window"? > > The latex bits are doing what they should. |-----------------------------| > I don't want the image floating, because | | > the text regularly is small. The image | | > will be placed how you can see here. |-----------------------------| > Here the text goes over the complete line - If I'm using a list i have > to put it in a parbox. The environment window is provided by package > "picinpar", seems that it not works within beamer. > > Perhaps for this yasnippet as recommended from Marcin would be usefull. > > OTOH i would like to use beamer in future, Beamer_Col does a similar > job, except of surrounding the image with text. Does Beamer provide > something like this? > > But, if i write the text for Beamer-Output, i have to handle html-output > extra. The LaTeX-package "comment" isn't provided by beamer, I don't > know neither how to comment out the HTML-Code for LaTeX-Beamer-fragments > nor how to comment out Beamer-Fragments für HTML-Export. > > Seems, Beamer+html is much more complicate than Beamer+scrartcl/article. > You might be able to do what you want with filter functions. Suppose you start with this: (Note: long lines might have been wrapped.) ,---- | #+ATTR_HTML: alt="my altname" title="my full title" align="right" width="30%" padding="0em" padding-top="0em" |[[http://my.com][my place.jpg:windowenv:]] | More stuff | - item 1 | - item 1.1 | - item 1.2 | #+LATEX: } \end(window} `---- and want to get this from latex export: ,---- | \begin{window}[0,r,\href{http://my.com}{\includegraphics[width=0.28\textwidth]{my place}},{}] | \parbox{0.7\textwidth}{ | More stuff | \begin{itemize} | \item item 1 | \begin{itemize} | \item item 1.1 | \item item 1.2 | \end{itemize} | \end{itemize} | } \end(window} `---- and this from html ,---- |

| my place.jpg | More stuff |

|
    |
  • item 1 |
      |
    • item 1.1 |
    • |
    • item 1.2 |
    • |
    |
  • |
`---- You can do that with this filter: ,---- | #+BEGIN_SRC emacs-lisp | (defun filter-links-windowized (link backend info) | "Rid :windowenv: from LINK desc and format per BACKEND. Ignore INFO." | (let ((clean-string (replace-regexp-in-string ":windowenv:" "" link))) | (if (eq backend 'latex) | (let ((wprefix "\\begin{window}[0,r,") | (wpostfix"}},{}]\n\\parbox{0.7\\textwidth}{") | (repstrng | "\\1{\\\\includegraphics[width=0.28\\\\textwidth]\\2}")) | (concat wprefix | (file-name-sans-extension | (replace-regexp-in-string | "\\([^}]*}\\)\\({.*}\\)" | repstrng | clean-string)) | wpostfix)) | clean-string))) | #+end_src `---- which you install with this line: ,---- | #+begin_src emacs-lisp :eval never | (add-to-list 'org-export-filter-link-functions 'filter-links-windowized) | #+END_SRC `---- Then run the new exporter. What you want yas to provide is something like ,---- | #+ATTR_HTML: alt="" title="" align= ... | | #+LATEX: } \end(window} `---- if you like to use C-c C-l to enter the link - just remember to add the :windowenv: after the link description. or ,---- | #+ATTR_HTML: alt="my altname" title="my full title" align= ... | [[ ][ :windowenv:]] | | #+LATEX: } \end(window} `---- if you don't use C-c C-l. HTH, Chuck