Re: [O] Help with sharing emacs-org presentation
Thanks, Jens, for your comment! I understand your point of view! My point is that Org mode is not ubiquitous and most people (esp. non-programmers) do not use emacs. But I do concur that Org mode is great for collaboration IF a team can agree to using it. Thanks for your interesting references! I am glad to learn about "single source" and OER. Your OER material looks fascinating: I don't know that .org file can be rendered instantaneously as HTML on GitLab. ~ Feiming On Wed, Oct 31, 2018 at 2:39 AM Jens Lechtenboerger < lech...@wi.uni-muenster.de> wrote: > On 2018-10-25, Feiming Chen wrote: > > > I gave a talk on emacs-org in a local workshop (Government Advances > > in Statistical Programming) in Washington D.C. yesterday. I'd like to > > share the slides and org source file with the community (see attached). > > Thanks for sharing! > > I wonder why you stress the following: > - Not good for collaborative use (unlike Microsoft Office). > - Good for private, non-collaborative use. > > My view is the opposite: Org mode is excellent for collaboration as > it is plain text, suitable for diff/merge in Git repositories. > Thanks to the separation of contents from style, > cross-organizational collaboration is possible, which I find *very* > hard with any office tool: Changing a document master leads to all > kinds of layout destruction. Switching to a different corporate > identity is just hard with what-you-see-is-what-you-get tools. > > In contrast, Org mode can be a basis for what is called Single > Sourcing [1] in the context of technical writing. > > You can see my approach towards Open Educational Resources with Org > mode at [2]. > > Best wishes > Jens > > [1] http://rockley.com/articles/Single_Sourcing_and_Technology.pdf > [2] https://gitlab.com/oer/OS >
Re: [O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11]
Hi Eric: Thanks a lot for your advice! It works for me now after I press C-c C-c on the #+PROPERTY line. It seems all my previous attempts fail because I didn't do C-c C-c. It would be nice if org can notice something changes in the header lines and do automatic refreshing when exporting. But anyway, the manual update C-c C-c works great as long as I can remember to do it. Thanks! Sincerely, Feiming Chen From: Eric Schulte eric.schu...@gmx.com To: Feiming Chen feimingc...@yahoo.com Cc: emacs-orgmode@gnu.org Sent: Fri, August 31, 2012 12:58:23 PM Subject: Re: [O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11] Feiming Chen feimingc...@yahoo.com writes: HI Eric: Thanks a lot! But I am still having trouble with some buffer-wide header arguments. In particular, I could not have the following code working as expected: #+PROPERTY: :eval no * test 3: Buffer-wide header arguments are NOT effective #+begin_src R :exports both print(pi) #+end_src I am getting the result printed even though I turned the evaluation off. It seems I could not turn off the evaluation with :eval no in the buffer-wide header argument. Could you help? Hi Feiming, I apologize. I gave you bad advice in my previous email. Please use the #+PROPERTY: setting as in your original email and as described in the Org-mode manual. Do *not* add a leading : to header argument names as I suggested. The following two Org-mode files both work as expected locally. If a buffer-wide header argument doesn't seem to be active, you can activate it by pressing C-c C-c on the #+PROPERTY: line. Cheers, Sincerely, Feiming Chen From: Eric Schulte eric.schu...@gmx.com To: Feiming Chen feimingc...@yahoo.com Cc: emacs-orgmode@gnu.org Sent: Thu, August 30, 2012 11:53:44 AM Subject: Re: [O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11] Feiming Chen feimingc...@yahoo.com writes: Hi: Could anyone help with the following problem? Please see the attached file a.org with its text export a.txt (from C-c C-e a). Replace #+PROPERTY: exports both #+PROPERTY: results output with #+PROPERTY: :exports both #+PROPERTY: :results output Best, -- Eric Schulte http://cs.unm.edu/~eschulte
Re: [O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11]
HI Eric: Thanks a lot! But I am still having trouble with some buffer-wide header arguments. In particular, I could not have the following code working as expected: #+PROPERTY: :eval no * test 3: Buffer-wide header arguments are NOT effective #+begin_src R :exports both print(pi) #+end_src I am getting the result printed even though I turned the evaluation off. It seems I could not turn off the evaluation with :eval no in the buffer-wide header argument. Could you help? Sincerely, Feiming Chen From: Eric Schulte eric.schu...@gmx.com To: Feiming Chen feimingc...@yahoo.com Cc: emacs-orgmode@gnu.org Sent: Thu, August 30, 2012 11:53:44 AM Subject: Re: [O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11] Feiming Chen feimingc...@yahoo.com writes: Hi: Could anyone help with the following problem? Please see the attached file a.org with its text export a.txt (from C-c C-e a). Replace #+PROPERTY: exports both #+PROPERTY: results output with #+PROPERTY: :exports both #+PROPERTY: :results output Best, -- Eric Schulte http://cs.unm.edu/~eschulte
[O] Bug: BABEL Buffer-wide header arguments are NOT effective [7.8.11]
Hi: Could anyone help with the following problem? Please see the attached file a.org with its text export a.txt (from C-c C-e a). Test 1 is using buffer-wide header arguments BUT the evaluation result is not inserted into the exported file. I am following the Org Manual section 14.8.1 (Using header arguments). Test 2 is using code block specific header arguments and works as expected. For this test, I start emacs with emacs -Q, use org-version 7.8.11, and enabled Org Confirm Babel Evaluate and add R to Org Babel Load Languages. Thanks a lot for your help! Sincerely, Feiming Chen Emacs : GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2012-08-13 on fmc.work Package: Org-mode version 7.8.11 current state: == (setq org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-confirm-babel-evaluate nil org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-metaup-hook '(org-babel-load-in-session-maybe) org-reveal-start-hook '(org-decrypt-entry) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '(#[nil \305\306\203 a = Author: Feiming Chen Date: 2012-08-30 11:27:38 EDT Table of Contents = 1 test 1: Buffer-wide header arguments are NOT effective 2 test 1: Code block specific header arguments are effective 1 test 1: Buffer-wide header arguments are NOT effective - print(pi) 2 test 1: Code block specific header arguments are effective - print(pi) [1] 3.141593 a.org Description: Binary data
[O] (no subject)
Sincerely, Feiming Chen
[O] Bug: html export converts to lt with #!RESULTS option [7.8.11]
Please see the attached test file (a.org), which I have tested with emacs -Q. In test 1, the html export (C-c C-e H) translates the line !-- comment -- to lt;!-- comment --gt;. In test 2, the translation is OK. I am working on a .org file where I am using R code to generate the html code, thus the #+RESULTS tag is generated by executing the R code block. I believe I don't have this problem with previous versions of org (maybe before 7.8?). Thanks a lot for your help! -- Feiming Chen -- Emacs : GNU Emacs 24.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2012-08-13 on fmc.work Package: Org-mode version 7.8.11 current state: == (setq org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-pre-tangle-hook '(save-buffer) org-occur-hook '(org-first-headline-recenter) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-metaup-hook '(org-babel-load-in-session-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-export-first-hook '(org-beamer-initialize-open-trackers) org-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-metadown-hook '(org-babel-pop-to-session-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-after-todo-state-change-hook '(org-clock-out-if-current) org-confirm-shell-link-function 'yes-or-no-p ) a.org Description: Binary data
Re: [O] org-mode S5 Presentation: How to disable mouse click for page turn so that mouse can be used to control embedded interactive chart?
Hi Eric: Thank you very much! Your solution works! Sincerely, Feiming Chen From: Eric Schulte eric.schu...@gmx.com To: Bastien b...@gnu.org Cc: Feiming Chen feimingc...@yahoo.com; emacs-orgmode@gnu.org Sent: Wed, August 1, 2012 9:40:52 AM Subject: Re: [O] org-mode S5 Presentation: How to disable mouse click for page turn so that mouse can be used to control embedded interactive chart? Bastien b...@gnu.org writes: Hi Feiming, Feiming Chen feimingc...@yahoo.com writes: I am embedding an interactive chart into org-mode S5 presentation on web browser. See this link for the presentation: http://stat.fsu.edu/~fchen/emacs-org-babel-mode/googleVis2web.html (source file: http://stat.fsu.edu/~fchen/emacs-org-babel-mode/ googleVis2web.org) This sounds like more of a general S5 question, rather than an Org-mode specific question. Once an Org-mode document has been exported to a format used by S5, all key presses and mouse click events are handled directly by the S5 library in use. I'd suggest contacting the author of S5 or asking on an S5 mailing list. After looking through the slides.js file, I think commenting out line 763 (or if you are using a different version of S5, the onclick line) may do what you want. https://github.com/eschulte/org-S5/blob/master/ui/default/slides.js#L763 Best, -- Eric Schulte http://cs.unm.edu/~eschulte
[O] org-mode S5 Presentation: How to disable mouse click for page turn so that mouse can be used to control embedded interactive chart?
Hi, I would like to ask a question. I am embedding an interactive chart into org-mode S5 presentation on web browser. See this link for the presentation: http://stat.fsu.edu/~fchen/emacs-org-babel-mode/googleVis2web.html (source file: http://stat.fsu.edu/~fchen/emacs-org-babel-mode/googleVis2web.org) However, on page 3, I could not use mouse to control the interactive chart as the mouse left-click jumps to the next page (I should be able to click the play button and watch the chart in motion). How can I disable the use of mouse to turn pages? It seems the file ui/default/slides.js is responsible for this but I do not know how to modify it. Another minor issue is that I noticed that, when I click the n letter while viewing the presentation, I am getting a lot of blocked pop-up windows (in both firefox and IE). What happened? Thanks a lot for your help! Sincerely, Feiming Chen
Re: [O] difference between #+source and #+srcname; passing parameters to Awk.
Hi Eric: Thanks a lot for your answers! Sorry for my late reply. Sincerely, Feiming Chen --- On Sun, 8/28/11, Eric Schulte schulte.e...@gmail.com wrote: From: Eric Schulte schulte.e...@gmail.com Subject: Re: [O] difference between #+source and #+srcname; passing parameters to Awk. To: Feiming Chen feimingc...@yahoo.com Cc: emacs-org-list emacs-orgmode@gnu.org Date: Sunday, August 28, 2011, 10:04 AM Feiming Chen feimingc...@yahoo.com writes: Hi, I'd like to ask two questions. 1. What's the difference between header options #+source and #+srcname? They seem to have identical utilities. No difference, these are synonyms for the same thing. 2. I'd like to pass parameters (filenames) to Awk (language) code block, but #+srcname: subset(file=~/tmp/a) #+begin_src awk #+end_src fails upon C-c C-v v (org-babel-expand-src-block) with error: wrong type argument: sequencep, file. So does: #+begin_src awk :var file=~/tmp/a #+end_src In comparison, it works with a Perl code block: #+srcname: subset(file=~/tmp/a) #+begin_src perl #+end_src Thanks a lot! This is actually a bug in ob-awk. I've just pushed up a fix so your example should work with the latest git HEAD. Thanks -- Eric -- Feiming Chen -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] difference between #+source and #+srcname; passing parameters to Awk.
Hi, I'd like to ask two questions. 1. What's the difference between header options #+source and #+srcname? They seem to have identical utilities. 2. I'd like to pass parameters (filenames) to Awk (language) code block, but #+srcname: subset(file=~/tmp/a) #+begin_src awk #+end_src fails upon C-c C-v v (org-babel-expand-src-block) with error: wrong type argument: sequencep, file. So does: #+begin_src awk :var file=~/tmp/a #+end_src In comparison, it works with a Perl code block: #+srcname: subset(file=~/tmp/a) #+begin_src perl #+end_src Thanks a lot! -- Feiming Chen
Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
Hi Eric: Thanks a lot! It would be nice if Org-Babel model could automatically add the #+ATTR_LaTeX lines (from the hint in the R code header line) during LaTeX export. Somehow I failed to compile the file on my system. It seems the line: #+ATTR_LaTeX: width=5px has corrupted the PDF file generated in R. Because after C-c C-e d, I get the following error: !pdfTeX error: pdflatex (file ./a3.pdf): PDF inclusion: required page does not exist 0 == Fatal error occurred, no output PDF file produced! and I could not open the PDF file of the R plot any more (the error message is Cannot display this page! Maybe because of a conversion failure). Attached is the simplified org file that failed on LaTeX transport on my computer. Thanks! Sincerely, Feiming Chen --- On Fri, 7/15/11, Eric Schulte schulte.e...@gmail.com wrote: From: Eric Schulte schulte.e...@gmail.com Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5] To: Feiming Chen feimingc...@yahoo.com Cc: emacs-orgmode@gnu.org Date: Friday, July 15, 2011, 9:32 AM Hi Feiming, The width and height header arguments are passed to R to affect the size of the generated file e.g., png(filename=a1.png,width=500,height=500) however they do not affect the generated latex code. Luckily Org-mode does support passing information like image width to latex figures. See my attached version of your test file which uses #+ATTR_LaTeX lines to specify the width during LaTeX export. Best -- Eric -Inline Attachment Follows- Feiming Chen feimingc...@yahoo.com writes: Hi, I like org-mode and org-babel mode very much, but recently I am having problems outputting R graphics to LaTeX report with Org-Babel mode. Attached is my test file, where I am generating 4 simple plots of different sizes and format (.png or .pdf). The HTML export is satisfactory, however, the LaTeX export (C-c C-e l) presents two problems: 1. All 4 plots have the same size (10em) which is different from the header specification and is too small. \includegraphics[width=10em]{a1.png} ... \includegraphics[width=10em]{a2.png} ... \includegraphics[width=10em]{a3.pdf} ... \includegraphics[width=10em]{a4.pdf} ... 2. While exporting to PDF file, the R code is mysteriously lost in the R execution for the PDF output of the plots and the compilation failed correspondingly: pdf(file=a3.pdf,width=5,height=5) dev.off() pdf(file=a4.pdf,width=10,height=10) dev.off() Hopefully you can replicate my errors and help me on this. Thanks a lot! Best regards, Feiming Chen Emacs : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4) of 2010-07-08 on x86-05.phx2.fedoraproject.org Package: Org-mode version 7.5 current state: == (setq org-file-apps '((auto-mode . emacs) (\\.mm\\' . default) (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s)) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-hide-block-startup t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-src-fontify-natively t org-babel-load-languages '((emacs-lisp . t) (R . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) outline-regexp \\*+ org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-reveal-start-hook '(org-decrypt-entry) org-export-first-hook '(org-beamer-initialize-open-trackers) org-format-latex-header \\documentclass{article}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage[mathscr]{eucal}\n% Feiming's Customization BEGIN\n\\usepackage[colorlinks=true]{hyperref}\n\\input{/home/chen/lib/math.tex}\n% Feiming's Customization END\n\\pagestyle{empty} % do not remove\n[PACKAGES]\n[DEFAULT-PACKAGES]\n% The settings below are copied from fullpage.sty\n\\setlength{\\textwidth}{\\paperwidth}\n\\addtolength{\\textwidth}{-3cm}\n\\setlength{\\oddsidemargin}{1.5cm}\n\\addtolength{\\oddsidemargin}{-2.54cm}\n\\setlength{\\evensidemargin}{\\oddsidemargin}\n\\setlength{\\textheight}{\\paperheight}\n\\addtolength{\\textheight}{-\\headheight}\n\\addtolength{\\textheight}{-\\headsep}\n\\addtolength{\\textheight}{-\\footskip}\n\\addtolength{\\textheight}{-3cm}\n\\setlength{\\topmargin}{1.5cm}\n\\addtolength{\\topmargin}{-2.54cm} org-startup-indented t org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook
Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
Hi Eric: Thanks a lot for your quick response! The problem is solved by adding a headline. I can now successfully generated the PDF file from LaTeX export. I agree with your point about complexity vs. convenience. Thanks again, and have a good week! Sincerely, Feiming Chen --- On Mon, 7/18/11, Eric Schulte schulte.e...@gmail.com wrote: From: Eric Schulte schulte.e...@gmail.com Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5] To: Feiming Chen feimingc...@yahoo.com Cc: Eric Schulte schulte.e...@gmail.com, emacs-orgmode@gnu.org Date: Monday, July 18, 2011, 11:36 AM Feiming Chen feimingc...@yahoo.com writes: Hi Eric: Thanks a lot! It would be nice if Org-Babel model could automatically add the #+ATTR_LaTeX lines (from the hint in the R code header line) during LaTeX export. I don't think this will happen at least in the near term, as searching out and creating/changing org export directives would be a major change to the current behavior which inserts code results, and would cross some semantic lines separating parts of Org-mode. In this case I don't think the relatively limited convenience justifies the added complexity. Somehow I failed to compile the file on my system. It seems the line: #+ATTR_LaTeX: width=5px has corrupted the PDF file generated in R. Because after C-c C-e d, I get the following error: !pdfTeX error: pdflatex (file ./a3.pdf): PDF inclusion: required page does not exist 0 == Fatal error occurred, no output PDF file produced! and I could not open the PDF file of the R plot any more (the error message is Cannot display this page! Maybe because of a conversion failure). Attached is the simplified org file that failed on LaTeX transport on my computer. I believe in this case the problem is caused by the lack of any headline levels. The LaTeX exporter can be weird about headline levels, try adding a line like * top to the org file before the code block. That fixes the problem on my system. Also, there is no way that an #+attr_latex line could affect the execution of a code block, precisely because of the simplifying separation of distinct components mentioned earlier. Best -- Eric Thanks! Sincerely, Feiming Chen --- On Fri, 7/15/11, Eric Schulte schulte.e...@gmail.com wrote: From: Eric Schulte schulte.e...@gmail.com Subject: Re: [O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5] To: Feiming Chen feimingc...@yahoo.com Cc: emacs-orgmode@gnu.org Date: Friday, July 15, 2011, 9:32 AM Hi Feiming, The width and height header arguments are passed to R to affect the size of the generated file e.g., png(filename=a1.png,width=500,height=500) however they do not affect the generated latex code. Luckily Org-mode does support passing information like image width to latex figures. See my attached version of your test file which uses #+ATTR_LaTeX lines to specify the width during LaTeX export. Best -- Eric -Inline Attachment Follows- Feiming Chen feimingc...@yahoo.com writes: Hi, I like org-mode and org-babel mode very much, but recently I am having problems outputting R graphics to LaTeX report with Org-Babel mode. Attached is my test file, where I am generating 4 simple plots of different sizes and format (.png or .pdf). The HTML export is satisfactory, however, the LaTeX export (C-c C-e l) presents two problems: 1. All 4 plots have the same size (10em) which is different from the header specification and is too small. \includegraphics[width=10em]{a1.png} ... \includegraphics[width=10em]{a2.png} ... \includegraphics[width=10em]{a3.pdf} ... \includegraphics[width=10em]{a4.pdf} ... 2. While exporting to PDF file, the R code is mysteriously lost in the R execution for the PDF output of the plots and the compilation failed correspondingly: pdf(file=a3.pdf,width=5,height=5) dev.off() pdf(file=a4.pdf,width=10,height=10) dev.off() Hopefully you can replicate my errors and help me on this. Thanks a lot! Best regards, Feiming Chen Emacs : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4) of 2010-07-08 on x86-05.phx2.fedoraproject.org Package: Org-mode version 7.5 current state: == (setq org-file-apps '((auto-mode . emacs) (\\.mm\\' . default) (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s)) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-hide-block-startup t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-src-fontify-natively t org-babel-load-languages '((emacs-lisp . t) (R . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format
[O] Bug: Org-Babel Mode R Plot Output to LaTeX File [Babel] [7.5]
Hi, I like org-mode and org-babel mode very much, but recently I am having problems outputting R graphics to LaTeX report with Org-Babel mode. Attached is my test file, where I am generating 4 simple plots of different sizes and format (.png or .pdf). The HTML export is satisfactory, however, the LaTeX export (C-c C-e l) presents two problems: 1. All 4 plots have the same size (10em) which is different from the header specification and is too small. \includegraphics[width=10em]{a1.png} ... \includegraphics[width=10em]{a2.png} ... \includegraphics[width=10em]{a3.pdf} ... \includegraphics[width=10em]{a4.pdf} ... 2. While exporting to PDF file, the R code is mysteriously lost in the R execution for the PDF output of the plots and the compilation failed correspondingly: pdf(file=a3.pdf,width=5,height=5) dev.off() pdf(file=a4.pdf,width=10,height=10) dev.off() Hopefully you can replicate my errors and help me on this. Thanks a lot! Best regards, Feiming Chen Emacs : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.21.4) of 2010-07-08 on x86-05.phx2.fedoraproject.org Package: Org-mode version 7.5 current state: == (setq org-file-apps '((auto-mode . emacs) (\\.mm\\' . default) (\\.x?html?\\' . firefox %s) (\\.pdf\\' . evince %s)) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-hide-block-startup t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-src-fontify-natively t org-babel-load-languages '((emacs-lisp . t) (R . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) outline-regexp \\*+ org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-reveal-start-hook '(org-decrypt-entry) org-export-first-hook '(org-beamer-initialize-open-trackers) org-format-latex-header \\documentclass{article}\n\\usepackage[usenames]{color}\n\\usepackage{amsmath}\n\\usepackage[mathscr]{eucal}\n% Feiming's Customization BEGIN\n\\usepackage[colorlinks=true]{hyperref}\n\\input{/home/chen/lib/math.tex}\n% Feiming's Customization END\n\\pagestyle{empty} % do not remove\n[PACKAGES]\n[DEFAULT-PACKAGES]\n% The settings below are copied from fullpage.sty\n\\setlength{\\textwidth}{\\paperwidth}\n\\addtolength{\\textwidth}{-3cm}\n\\setlength{\\oddsidemargin}{1.5cm}\n\\addtolength{\\oddsidemargin}{-2.54cm}\n\\setlength{\\evensidemargin}{\\oddsidemargin}\n\\setlength{\\textheight}{\\paperheight}\n\\addtolength{\\textheight}{-\\headheight}\n\\addtolength{\\textheight}{-\\headsep}\n\\addtolength{\\textheight}{-\\footskip}\n\\addtolength{\\textheight}{-3cm}\n\\setlength{\\topmargin}{1.5cm}\n\\addtolength{\\topmargin}{-2.54cm} org-startup-indented t org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-use-speed-commands t org-mode-hook '(turn-on-org-cdlatex (lambda nil (setq org-mouse-context-menu-function (quote org-mouse-context-menu)) (when (memq (quote context-menu) org-mouse-features) (org-defkey org-mouse-map [mouse-3] nil) (org-defkey org-mode-map [mouse-3] (quote org-mouse-show-context-menu)) ) (org-defkey org-mode-map [down-mouse-1] (quote org-mouse-down-mouse)) (when (memq (quote context-menu) org-mouse-features) (org-defkey org-mouse-map [C-drag-mouse-1] (quote org-mouse-move-tree)) (org-defkey org-mouse-map [C-down-mouse-1] (quote org-mouse-move-tree-start)) ) (when (memq (quote yank-link) org-mouse-features) (org-defkey org-mode-map [S-mouse-2] (quote org-mouse-yank-link)) (org-defkey org-mode-map [drag-mouse-3] (quote org-mouse-yank-link)) ) (when (memq (quote move-tree) org-mouse-features) (org-defkey org-mouse-map [drag-mouse-3] (quote org-mouse-move-tree)) (org-defkey org-mouse-map [down-mouse-3] (quote org-mouse-move-tree-start)) ) (when (memq (quote activate-stars) org-mouse-features) (font-lock-add-keywords nil