* New Exporter html - latex - beamer @ 2013-03-15 20:55 Robert Eckl 2013-03-15 21:21 ` Marcin Borkowski 2013-03-17 13:18 ` Eric S Fraga 0 siblings, 2 replies; 8+ messages in thread From: Robert Eckl @ 2013-03-15 20:55 UTC (permalink / raw) To: emacs-orgmode Both, the old and the new Exporter are brilliant tools, migration to the new exporter didn't make great issues. 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 #+BEGIN_SRC Org #+BEGIN_LaTeX \begin{window}[0,r,\href{http://www.link.de}{\includegraphics[width=0.28\textwidth]{path/picture}},{}] \begin{comment} #+END_LaTeX #+ATTR_HTML: alt="Objekt" title="Objektansicht" align="right" width="30%" padding="0em" padding-top="0em" [[http://www.link.de/][http://www.link.de/path/images/picture.jpg]] #+BEGIN_LaTeX \end{comment} \parbox{0.7\textwidth}{ #+END_LaTeX Any Text - item 1 - item 2 - item 3 #+BEGIN_LaTeX } \end{window} #+END_LaTeX #+END_SRC It works, but it's a bit boring. The parbox only is required with lists. Now i plan to use Beamer, possible instead of scrarctl. If I use BEAMER_col the titles ignored by beamer will exported in html - format. Perhaps someone can give me a hint how to deal with this, perhaps - a comment-environment for HTML how i used for LaTeX or - write the BMCOL-Environment manually in an LaTeX-Block? TIA, Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-15 20:55 New Exporter html - latex - beamer Robert Eckl @ 2013-03-15 21:21 ` Marcin Borkowski 2013-03-17 13:18 ` Eric S Fraga 1 sibling, 0 replies; 8+ messages in thread From: Marcin Borkowski @ 2013-03-15 21:21 UTC (permalink / raw) To: emacs-orgmode Dnia 2013-03-15, o godz. 21:55:42 Robert Eckl <eckl.r@gmx.de> napisał(a): > Both, the old and the new Exporter are brilliant tools, migration to > the new exporter didn't make great issues. > 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 > > #+BEGIN_SRC Org > #+BEGIN_LaTeX > \begin{window}[0,r,\href{http://www.link.de}{\includegraphics[width=0.28\textwidth]{path/picture}},{}] > \begin{comment} > #+END_LaTeX > #+ATTR_HTML: alt="Objekt" title="Objektansicht" align="right" > width="30%" padding="0em" > padding-top="0em" [[http://www.link.de/][http://www.link.de/path/images/picture.jpg]] > #+BEGIN_LaTeX \end{comment} > \parbox{0.7\textwidth}{ > #+END_LaTeX > Any Text > - item 1 > - item 2 > - item 3 > #+BEGIN_LaTeX > } > \end{window} > #+END_LaTeX > #+END_SRC > > It works, but it's a bit boring. The parbox only is required with > lists. > Now i plan to use Beamer, possible instead of scrarctl. > If I use BEAMER_col the titles ignored by beamer will exported in > html - format. > > Perhaps someone can give me a hint how to deal with this, perhaps > - a comment-environment for HTML how i used for LaTeX or > - write the BMCOL-Environment manually in an LaTeX-Block? This is not even a decent answer, but in a pinch you might define a yasnippet for this. (A decent answer would be to use some kind of a preprocessor, a good answer would be to use a preprocessor in Elisp, and the best answer would include its code;).) > TIA, > > Robert Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-15 20:55 New Exporter html - latex - beamer Robert Eckl 2013-03-15 21:21 ` Marcin Borkowski @ 2013-03-17 13:18 ` Eric S Fraga 2013-03-19 19:09 ` Robert Eckl 1 sibling, 1 reply; 8+ messages in thread From: Eric S Fraga @ 2013-03-17 13:18 UTC (permalink / raw) To: Robert Eckl; +Cc: emacs-orgmode Robert Eckl <eckl.r@gmx.de> 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"? -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0-pre-107-g91a6ca ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-17 13:18 ` Eric S Fraga @ 2013-03-19 19:09 ` Robert Eckl 2013-03-19 23:36 ` cberry 2013-03-20 8:43 ` Eric S Fraga 0 siblings, 2 replies; 8+ messages in thread From: Robert Eckl @ 2013-03-19 19:09 UTC (permalink / raw) To: Eric S Fraga; +Cc: emacs-orgmode Eric S Fraga <e.fraga@ucl.ac.uk> writes: > Robert Eckl <eckl.r@gmx.de> 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. Thanks, Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-19 19:09 ` Robert Eckl @ 2013-03-19 23:36 ` cberry 2013-03-20 14:16 ` Charles Berry 2013-03-20 8:43 ` Eric S Fraga 1 sibling, 1 reply; 8+ messages in thread From: cberry @ 2013-03-19 23:36 UTC (permalink / raw) To: emacs-orgmode Robert Eckl <eckl.r@gmx.de> writes: > Eric S Fraga <e.fraga@ucl.ac.uk> writes: > >> Robert Eckl <eckl.r@gmx.de> 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 ,---- | <p> | <a href="http://my.com" alt="my altname" title="my full title" align="right" width="30%" padding="0em" padding-top="0em">my place.jpg</a> | More stuff | </p> | <ul class="org-ul"> | <li>item 1 | <ul class="org-ul"> | <li>item 1.1 | </li> | <li>item 1.2 | </li> | </ul> | </li> | </ul> `---- 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-19 23:36 ` cberry @ 2013-03-20 14:16 ` Charles Berry 2013-03-25 22:39 ` Robert Eckl 0 siblings, 1 reply; 8+ messages in thread From: Charles Berry @ 2013-03-20 14:16 UTC (permalink / raw) To: emacs-orgmode <cberry <at> ucsd.edu> writes: > > Robert Eckl <eckl.r <at> gmx.de> writes: > [snip] > I said > You might be able to do what you want with filter functions. > > > You can do that with this filter: > But you will want to add something to it to treat links without the :windowenv: tag in the normal way > ,---- > | #+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))) Replace this line: > | (if (eq backend 'latex) with these: (if (and (eq backend 'latex) (string-match ":windowenv:" link)) > | (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 > `---- then ordinary links like [[http://good.place.com][See good place]] will be handled in the usual manner by the latex backend Chuck ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-20 14:16 ` Charles Berry @ 2013-03-25 22:39 ` Robert Eckl 0 siblings, 0 replies; 8+ messages in thread From: Robert Eckl @ 2013-03-25 22:39 UTC (permalink / raw) To: emacs-orgmode Charles Berry <ccberry@ucsd.edu> writes: > <cberry <at> ucsd.edu> writes: > >> >> Robert Eckl <eckl.r <at> gmx.de> writes: >> > [snip] >> > > I said > >> You might be able to do what you want with filter functions. >> > >> >> You can do that with this filter: >> > > But you will want to add something to it to treat links without the :windowenv: > tag in the normal way > >> ,---- >> | #+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))) > > Replace this line: > >> | (if (eq backend 'latex) > > with these: > > (if (and > (eq backend 'latex) > (string-match ":windowenv:" link)) > > > >> | (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 >> `---- > > then ordinary links like > > [[http://good.place.com][See good place]] > > will be handled in the usual manner by the latex backend My response is very late, sorry. Thank you for your effort and the code. I'll try to use it, sounds good. Reading from filters on worg didn't give me any idea how to use it, but your code and explanations seems a good entry. Perhaps later i'll try to adapt that functionality to the parallel beamer/html-export. Cu, Robert ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: New Exporter html - latex - beamer 2013-03-19 19:09 ` Robert Eckl 2013-03-19 23:36 ` cberry @ 2013-03-20 8:43 ` Eric S Fraga 1 sibling, 0 replies; 8+ messages in thread From: Eric S Fraga @ 2013-03-20 8:43 UTC (permalink / raw) To: Robert Eckl; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 997 bytes --] Robert Eckl <eckl.r@gmx.de> writes: [...] > 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? You can fake what you want using columns and blocks. See attached example, both org and pdf. > 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. Yes, this is a problem. There is no easy way to select elements for export other than whole sub-trees (using tags as in :noexport:). I'm sorry I can't advise on this. I don't tend to export to more than one target for any given document. I write with the intention of exporting to latex (PDF) or html but not both from the same document. -- Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: beamertest.org --] [-- Type: text/x-org, Size: 1515 bytes --] #+title: Testing Beamer in Org #+author: Eric S Fraga #+OPTIONS: H:2 #+EXPORT_EXCLUDE_TAGS: noexport #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [presentation] #+startup: oddonly #+COLUMNS: %40ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Env Args) %4BEAMER_col(Col) %10BEAMER_extra(Extra) #+latex_header: \usepackage{tikz} * The first topic *** Nested blocks Use distillation for separation of two components. ***** The problem :BMCOL: :PROPERTIES: :BEAMER_col: 0.3 :END: ******* Model :B_example: :PROPERTIES: :BEAMER_env: example :BEAMER_act: <2-> :END: \[ y = \frac{\alpha x} {1 + (\alpha -1) x} \] ******* Goal :B_block: :PROPERTIES: :BEAMER_env: block :BEAMER_act: <3-> :END: Minimise energy consumption ***** Distillation :BMCOL:B_definition: :PROPERTIES: :BEAMER_col: 0.6 :BEAMER_env: definition :BEAMER_act: <4-> :END: #+begin_center #+attr_latex: width=0.9\textwidth [[file:~/s/figures/teaching/introduction/distillation-unit.pdf]] #+end_center \vfill ***** Approach :PROPERTIES: :BEAMER_act: <5-> :END: We can change both the number of trays and the reflux rate. [-- Attachment #3: beamertest.pdf --] [-- Type: application/pdf, Size: 108865 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-03-25 22:39 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-03-15 20:55 New Exporter html - latex - beamer Robert Eckl 2013-03-15 21:21 ` Marcin Borkowski 2013-03-17 13:18 ` Eric S Fraga 2013-03-19 19:09 ` Robert Eckl 2013-03-19 23:36 ` cberry 2013-03-20 14:16 ` Charles Berry 2013-03-25 22:39 ` Robert Eckl 2013-03-20 8:43 ` Eric S Fraga
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).