[O] [patch] Need test: New path which is used to preview latex fragements
this is the patch v4, and I think that it's not an experimental toy any more (may be it's a toy :-), for its using range), if you are interested in it and have time, please test it. the most user I think is the CJK people who use xetex... From 0be0b1d4fed65a5329bf98e6a3cfb0c3d2171e2a Mon Sep 17 00:00:00 2001 From: FengShu tuma...@gmail.com Date: Fri, 23 Mar 2012 16:05:37 +0800 Subject: [PATCH] This is a experimental toy ,which use '(car org-latex-to-pdf-process) and imagemagick to convert latex fragements into pngfiles,and then insert them into the editing buffer,you can use it to preview latex formula and so on. the converting path is latex-pdf-png,which is different from the org default path: latex-dvi-png --- lisp/org-exp.el | 16 +++-- lisp/org-html.el |1 + lisp/org-latex.el | 76 +++- lisp/org.el | 164 - 4 files changed, 208 insertions(+), 49 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 1ce..0317539 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -537,12 +537,15 @@ This option can also be set with the +OPTIONS line, e.g. \LaTeX:mathjax\. Allowed values are: -nilDon't do anything. -verbatim Keep everything in verbatim -dvipng Process the LaTeX fragments to images. - This will also include processing of non-math environments. -t Do MathJax preprocessing if there is at least on math snippet, - and arrange for MathJax.js to be loaded. +nil Don't do anything. +verbatimKeep everything in verbatim +dvipng Process the LaTeX fragments to images. +This will also include processing of non-math environments. +imagemagick Convert the LaTeX fragments to pdf with program: +'(car org-latex-to-pdf-process), And then use +imagemagick convert pdf to png +t Do MathJax preprocessing if there is at least on math snippet, +and arrange for MathJax.js to be loaded. The default is nil, because this option needs the `dvipng' program which is not available on all systems. @@ -552,6 +555,7 @@ is not available on all systems. (const :tag Do not process math in any way nil) (const :tag Obsolete, use dvipng setting t) (const :tag Use dvipng to make images dvipng) + (const :tag Use imagemagick to make images imagemagick) (const :tag Use MathJax to display math mathjax) (const :tag Leave math verbatim verbatim))) diff --git a/lisp/org-html.el b/lisp/org-html.el index 2de2ea9..15a6c3e 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -685,6 +685,7 @@ The default is an extended format of the ISO 8601 specification. ((eq (plist-get parameters :LaTeX-fragments) 'verbatim) 'verbatim) ((eq (plist-get parameters :LaTeX-fragments) 'mathjax ) 'mathjax) ((eq (plist-get parameters :LaTeX-fragments) t) 'mathjax) + ((eq (plist-get parameters :LaTeX-fragments) 'imagemagick ) 'imagemagick) ((eq (plist-get parameters :LaTeX-fragments) 'dvipng ) 'dvipng) (t nil (goto-char (point-min)) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index a733f31..5f2258a 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -631,12 +631,21 @@ allowed. The default we use here encompasses both. (defcustom org-latex-to-pdf-process '(pdflatex -interaction nonstopmode -output-directory %o %f pdflatex -interaction nonstopmode -output-directory %o %f -pdflatex -interaction nonstopmode -output-directory %o %f) - Commands to process a LaTeX file to a PDF file. -This is a list of strings, each of them will be given to the shell -as a command. %f in the command will be replaced by the full file name, %b -by the file base name (i.e. without extension) and %o by the base directory -of the file. +pdflatex -interaction nonstopmode -output-directory %o %f +(pdflatex -interaction nonstopmode -output-directory %o %f)) + Commands to process a LaTeX file to a PDF file and +commands to process latex fragments to pdf files +This is a list of strings and a sub-list, the strings of the sub-list +is used to convert latex fragments in editing org buffer which will +be converted to png files and inserted into the editing buffer for +previewing. each of strings (list or sublist) will be given to the +shell as a command. %f in the command will be replaced by the full +file name, %b by the file base name (i.e. without extension) and %o +by the base directory of the file. + +; If having no sublist, the default command which is used to convert +; latex fragments in editing buffer for previewing will be the first +; string of list (No code available at this time!) The reason why this is a list is that it usually takes several runs of `pdflatex', maybe mixed with a call to `bibtex'. Org does not have a clever @@ -661,30 +670,37 @@
Re: [O] [OT] Issue with exported html on webserver
Why on earth would anybody set it up so that all web pages are interpreted as php pages? Seems crazy to me, but I'm probably naive. Nick Apparently, so they can get by with typing ? ... ? instead of ?php ... ?. HTML doesn't care, and PHP predates XML, so I imagine it's a legacy of early shortcuts that were unproblematic at the time. But if people R 2 lazy 2 type 3 xtra chars, why not just use Perl? :) Yours, Christian
Re: [O] Tikz--LaTeX/HTML
Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) | contents | #+end_src ` Regards, Andreas
Re: [O] Error 500 with org2blog with wordpress
On Sat, Mar 17, 2012 at 12:58 AM, Achim Gratz strom...@nexgo.de wrote: Alvar Maciel alvarmac...@gmail.com writes: I'm a begginer so... be nice with me please. I manage to use org-mode for almost all my daily work. I'm trying to post to my blog (worpdtess 3.3.1) from org-mode using org2blog. But when I try to post something I get an 500 error. this is the output of emacs mini-buffer progn: Error during request: 500 Can you give me any clue to solve this HTTP error 500 is an internal server error (due to misconfiguration or other problems). You have to solve the problem on the server, not the client. I would suspect that xml-rpc is not enabled [1] on your blog. -- Puneeth [1] - http://www.cmmourik.com/enable-wordpress-xml-rpc-remote-publishing-interface
Re: [O] [OT] Issue with exported html on webserver
Hi Nick, Nick Dokos wrote: Why on earth would anybody set it up so that all web pages are interpreted as php pages? Seems crazy to me, but I'm probably naive. The problem can be a config which applies on a too wide range of directories. An easy way to circumvent this is: #+begin_src emacs-lisp ;; XML encoding (setq org-export-html-xml-declaration '((html . !-- xml version=1.0 encoding=utf-8 --))) #+end_src This eliminates the =T_STRING= error and you have a page that will still pass W3C validation... And, this way, you don't care about what the IT department does or needs to do. Best regards, Seb -- Sebastien Vauban
[O] Beamer export formatting clashes with URL link
Hi, I just wanted to center and italicize a web URL in Beamer export. First attempt, using /blah/, failed: #+LaTeX: \begin{center} / http://www.celemony.com/cms / #+LaTeX: \end{center} Beamer export interpreted the extra slashes as part of the text to center, rather than a formatting indication. So then I tried: #+LaTeX: \begin{center} \emph{ http://www.celemony.com/cms #+LaTeX: } \end{center} ... which then turned into the following ugliness in the tex file: \begin{center} \emph{ [[http://www.celemony.com/cms][http://www.celemony.com/cms]] } \end{center} So my question is -- is there any way to write a URL so that it exports as text rather than dropping in the underlying bracket-y stuff? For now, I've removed the http:// part and the slide display is okay, but I think there should be a way to write the entire URL. Suggestions? Thanks, James -- James Harkins /// dewdrop world jamshar...@dewdrop-world.net http://www.dewdrop-world.net Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal. -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks
[O] [BUG] html export and org results block and indentation
Hi all, I experience problems when exporting the following to html, as a spuriuos line ORG-ORG-START is inserted after the results block: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results org :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) | contents | #+end_src ` This seems to disappear when I remove the indentation: , | * Tikz test 2 | #+name: contents2 | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results org :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) | contents2 | #+end_src ` Regards, Andreas
Re: [O] Tikz--LaTeX/HTML
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Sorry, sent with wrong version, see below: Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) here it should have been :results org | contents | #+end_src ` Regards, Andreas Best, Andreas PS: BTW, it requires tons of header arguments. These can be split over several lines: , | * Tikz test | #+name: contents | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) | #+header: :results latex | #+begin_src latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) | #+header: :results org :file test.png | #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 | #+header: :fit yes :noweb yes :headers '(\\usepackage{tikz}) | #+begin_src latex | contents | #+end_src `
Re: [O] Remaining Work Report
On Sat, 24 Mar 2012 19:58:46 +0530, Manish said: Unlike your example I made heavy use of inline tasks and also wanted heading numbers instead of asterisks, so that the final table looks like a table of contents with estimated times remaining. I had to do some more things to achieve this and can elaborate if you like. This is a very nice solution. Please do elaborate on the other steps when you have time. Cheers! -- Manish I hope this is not too OT for the OP. The functions I used are in the attached file and used like this: #+BEGIN: columnview-toc :id file:myfile.org #+END: And that gives you a TOC plus inline tasks and times. The accumulation of inline task times didn't work until a patch was applied by Bastian at the weekend. The solution uses the older org-export-as-ascii which is why I had not shared it until now, but if someone has the time... Myles myfuncs.el Description: application/emacs-lisp
Re: [O] [OT] Issue with exported html on webserver
Hi, Sebastien Vauban wrote: Nick Dokos wrote: Why on earth would anybody set it up so that all web pages are interpreted as php pages? Seems crazy to me, but I'm probably naive. The problem can be a config which applies on a too wide range of directories. An easy way to circumvent this is: #+begin_src emacs-lisp ;; XML encoding (setq org-export-html-xml-declaration '((html . !-- xml version=1.0 encoding=utf-8 --))) #+end_src Missing escaping of slashes... Best regards, Seb -- Sebastien Vauban
Re: [O] Remaining Work Report
Hi Myles, Myles English wrote: On Sat, 24 Mar 2012 19:58:46 +0530, Manish said: Unlike your example I made heavy use of inline tasks and also wanted heading numbers instead of asterisks, so that the final table looks like a table of contents with estimated times remaining. I had to do some more things to achieve this and can elaborate if you like. This is a very nice solution. Please do elaborate on the other steps when you have time. Cheers! -- Manish I hope this is not too OT for the OP. The functions I used are in the attached file and used like this: #+BEGIN: columnview-toc :id file:myfile.org #+END: And that gives you a TOC plus inline tasks and times. The accumulation of inline task times didn't work until a patch was applied by Bastian at the weekend. The solution uses the older org-export-as-ascii which is why I had not shared it until now, but if someone has the time... Thanks for all the information you've sent. I've not had the time yet to dig into it. I'll clearly do, and report any trouble. Thanks a lot. Best regards, Seb -- Sebastien Vauban
[O] Plotting (with gnuplot) using dates timestamps
Hello, I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | #+begin_src gnuplot :var data=data-table reset set title Consommation Électrique set size ratio square set xlabel Date set yrange [6800:9100] set ylabel HP set ytics nomirror set y2range [8000:12000] set y2label HC set y2tics nomirror set style data points plot data using 1:2 axis x1y1 title 'HP', \ data using 1:3 axis x1y2 title 'HC' #+end_src Thanks, Alan
Re: [O] Plotting (with gnuplot) using dates timestamps
On 03/26/2012 09:37 AM, Alan Schmitt wrote: Hello, I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? I've found gnuplot's date support to be torment. You might want to investigate using R for these tasks: R understands what a date is at a fundamental level, and doesn't give you any crap about it. Better still, once you climb over the activation energy of changing graphing idioms, a huge vista of new capabilities are open to you. - Allen S. Rout
Re: [O] Org Babel C/C++
Applied, Thanks! Daimrod daim...@gmail.com writes: Hi, I've made a small patch to ob-C.el so it now includes the current directory to the list of directories to be searched for header files. Without this, I cannot include a local header file because the compilation happens in /tmp and thus gcc or g++ doesn't search for header files in the directory I currently work. diff --git a/lisp/ob-C.el b/lisp/ob-C.el index f1525aa..4f33fc4 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -96,15 +96,14 @@ or `org-babel-execute:C++'. (progn (with-temp-file tmp-src-file (insert full-body)) (org-babel-eval - (format %s -o %s %s %s -I \%s\ + (format %s -o %s %s %s (cond ((equal org-babel-c-variant 'c) org-babel-C-compiler) ((equal org-babel-c-variant 'cpp) org-babel-C++-compiler)) (org-babel-process-file-name tmp-bin-file) (mapconcat 'identity (if (listp flags) flags (list flags)) ) - (org-babel-process-file-name tmp-src-file) - (file-name-directory (expand-file-name (buffer-file-name + (org-babel-process-file-name tmp-src-file)) ((lambda (results) (org-babel-reassemble-table (if (member vector (cdr (assoc :result-params params))) -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [babel] BUG in call lines
Hi, Thanks for reporting this bug. I've just pushed up a patch. Cheers, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Hi all, there seems to be a bug in call lines: Suppose, I have a src block with two parameters: #+name: insert_hline #+header: :var fulltable=mytable() :var after_row=1 #+begin_src emacs-lisp (let ((rrr (cons (quote hline) fulltable)) (bottomrows (nthcdr after_row fulltable)) (toprows (reverse (nthcdr (- (length fulltable) after_row) (reverse fulltable) (setcdr rrr bottomrows) (setcdr (nthcdr (- after_row 1) fulltable) rrr) fulltable) #+end_src As first argument I would like to pass the results of a second source block: #+name: mytable #+begin_src R data.frame(par=1:3, val=1:3) #+end_src #+results: mytable | 1 | 1 | | 2 | 2 | | 3 | 3 | So, what I do is: #+call: insert_hline(fulltable=mytable(),after_row=1) :hlines yes :colnames no #+results: insert_hline(fulltable=mytable() | 1 | 1 | |---+---| | 2 | 2 | | 3 | 3 | But the #+results: name is shortened. So, the following won't produce another results block, but wrongly update the block above: #+call: insert_hline(fulltable=mytable(),after_row=2) :hlines yes :colnames no The problem seems to be the ) within the parameter list stopping some parsing. Note: This works as expected #+call: insert_hline[:var fulltable=mytable() :var after_row=1]() :hlines yes :colnames no #+results: insert_hline[:var fulltable=mytable() :var after_row=1]() | 1 | 1 | |---+---| | 2 | 2 | | 3 | 3 | #+call: insert_hline[:var fulltable=mytable() :var after_row=2]() :hlines yes :colnames no #+results: insert_hline[:var fulltable=mytable() :var after_row=2]() | 1 | 1 | | 2 | 2 | |---+---| | 3 | 3 | Regards, Andreas -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] org-mime-htmlize and org-preview-latex-fragment
Uwe Brauer o...@mat.ucm.es writes: On Thu, 22 Mar 2012 23:34:08 +0100, Uwe Brauer o...@mat.ucm.es wrote: Now org-mime-htmlize allows me to htmlize a message buffer but seems not to work with org-preview-latex-fragment either the png is not exported or I obtain an error message of the sort: Unknown conversion type nil for latex fragments. I am very confused the code in question contains a line of the sort: (org-export-with-LaTeX-fragments dvipng) Uwe Brauer So the functionality seems to be implemented? This functionality certainly used to work (and was one of my main reasons for using org-mime-htmlize). There is a new error in the `org-export-string' function when `org-export-with-LaTeX-fragments' is set to dvipng which is causing export to fail. To exercise this bug run the following elisp snippet. (let ((org-export-with-LaTeX-fragments dvipng)) (org-export-string A fraction $\\frac{1}{2}$. 'html /tmp/)) Which throws the following error. org-format-latex: Unknown conversion type nil for latex fragments Once this bug is fixed the use of LaTeX to generated inline images with Org-mime should work once again. Best, -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] babel for maxima
Neuwirth Erich erich.neuwi...@univie.ac.at writes: I have a suggestion for the maxima mode in org-babel. I am using Emacs on a Mac which means that some hint work differently. The standard distribution of Maxima for the mac does not have a command 'maxima' anywhere on the path. The way to start character mode maxima from a shell is using /Applications/Maxima.App/Contents/Resources/maxima.sh Maxima itself brings an emacs mode with the standard distribution, and in maxima mode for Emacs he maxima command can be configured by using (setq maxima-command /Applications/Maxima.app/Contents/Resources/maxima.sh) in .emacs So it makes sense that maxima mode in org does (require 'maxima) and then uses maxima-command when it defines the function (defun org-babel-execute:maxima I hope this is a reasonable suggestion. This is a very reasonable suggestion. I've just added a new custom variable named `org-babel-maxima-command' to ob-maxima.el. This variable will default to the value of maxima-command if it is already defined or simply maxima otherwise, however it can be set in your configuration. Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] org-babel tangling + ascii export
Yes this is possible, see the org argument to the comment header argument http://orgmode.org/manual/comments.html. Cheers, Ilya Shlyakhter ilya_...@alum.mit.edu writes: Is it possible to combine org-babel tangling with ASCII export, so that the tangled file would have ALL of the Org-file's content as comments (preserving indentation etc as the ASCII export does), with the code blocks inserted as non-comments? Basically I want to write the program in literate-programming form in Org mode, but be able to export it into an executable form that's independent of Org but still has all the information (not just the text immediately before each code block). Thanks for help, ilya -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Problem with BEGIN_SRC export-as-html
I believe that if htmlize.el is not available code blocks default to pre class=example on HTML export because Org-mode is not able to fortify the source code. I would suggest either installing htmlize.el explicitly or switching to a newer version of Emacs in which it is included by default. Cheers, Nick Dokos nicholas.do...@hp.com writes: lowstz low...@gmail.com wrote: #+BEGIN_SRC C #include stdio.h int main(void) { printf(Hello, World!\n); } #+END_SRC It work well in emacs, but when I run export as html the part of BEGIN_SRC / END_SRC generate pre class=example, it same with the BEGIN_EXAMPLE / END_EXAMPLE I cannot reproduce this. I get (both with my normal startup and with a minimal .emacs): , | pre class=src src-Cspan style=color: #b0c4de;#include/span span style=color: #ffa07a;lt;stdio.hgt;/span | | span style=color: #98fb98;int/span span style=color: #b2dfee;main/span(span style=color: #98fb98;void/span)#160; | { | printf(span style=color: #ffa07a;Hello, World!/span\n); | } | /pre ` Have you activated C as a babel language? Maybe some some initialization is interfering: try with emacs -q and a minimal .emacs (search the list archives for examples), although the fact that (iiuc) things worked before you reinstalled emacs and fedora, seems to point to some more basic misconfiguration (maybe you are picking up pieces of the org mode distributed with the platform emacs?). Just guessing here. GNU Emacs 24.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.4) of 2012-01-24 Org-mode version 7.8.06 (release_7.8.06.110.g2756.dirty) (my org-mode version includes half a dozen local modifications). Nick -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Plotting (with gnuplot) using dates timestamps
Hi Alan On Mon, Mar 26, 2012 at 15:37, Alan Schmitt alan.schm...@polytechnique.org wrote: I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | Did you try this? set timefmt [%Y-%m-%d Michael
Re: [O] Plotting (with gnuplot) using dates timestamps
On Mon, 2012-03-26 at 15:37 +0200, Alan Schmitt wrote: Hello, I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | In straight gnuplot, I would do something like the following: gnuplot set xdata time gnuplot set timefmt '[%Y-%m-%d %a]' then, plot. Steven -- --- Steven Buczkowski PhD Candidate - Atmospheric Physics UMBC Physics Dept 1000 Hilltop Circle Baltimore, MD 21250 Email: sbuczkow...@umbc.edu Cell: 413-687-9102 (No texts. Email instead.) 2m/70cm: KB3RRJ (147.135+[156.7]/448.275-[156.7]) Smoke Signal: Two long, Two short. I'll send a rider. ---
Re: [O] [OT] Issue with exported html on webserver
Hi Seb, On Mon, Mar 26, 2012 at 14:58, Sebastien Vauban wxhgmqzgw...@spammotel.com wrote: Hi, Sebastien Vauban wrote: Nick Dokos wrote: Why on earth would anybody set it up so that all web pages are interpreted as php pages? Seems crazy to me, but I'm probably naive. The problem can be a config which applies on a too wide range of directories. An easy way to circumvent this is: #+begin_src emacs-lisp ;; XML encoding (setq org-export-html-xml-declaration '((html . !-- xml version=1.0 encoding=utf-8 --))) #+end_src Missing escaping of slashes... This works like a charm. :) Thank you so much. -- Suvayu Open source is the future. It sets us free.
Re: [O] Plotting (with gnuplot) using dates timestamps
Steven Buczkowski steven.buczkow...@gmail.com wrote: On Mon, 2012-03-26 at 15:37 +0200, Alan Schmitt wrote: Hello, I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | In straight gnuplot, I would do something like the following: gnuplot set xdata time gnuplot set timefmt '[%Y-%m-%d %a]' The set xdata time line is indeed what makes the difference: without it, gnuplot doesn't know that this is a time series. But there are some additional details: when babel prepares the data, the data file that will be fed to gnuplot ends up like this (not sure this is documented though): , | 2011-08-20-00:00:00 68158399 | 2011-08-29-00:00:00 68408438 | 2011-09-11-00:00:00 69468552 | 2011-12-11-00:00:00 78059603 | 2012-03-04-00:00:00 880010826 | 2012-03-11-00:00:00 887610930 | 2012-03-25-00:00:00 901511121 ` so the script should look something like this: --8---cut here---start-8--- reset set xdata time set timefmt %Y-%m-%d-%H:%M:%S set format x %Y-%m-%d set xrange [2011-08-01:2012-04-01] set title Consumption set size ratio square set xlabel Date set yrange [6800:9100] set ylabel HP set ytics nomirror set y2range [8000:12000] set y2label HC set y2tics nomirror set style data points plot data using 1:2 axis x1y1 title 'HP', \ data using 1:3 axis x1y2 title 'HC' --8---cut here---end---8--- BTW, going into gnuplot and saying help time/date helps :-) I have trouble navigating the gnuplot help system, but I think it is complete. Nick
Re: [O] Assigning results to variables
Erich Neuwirth erich.neuwi...@univie.ac.at writes: Thanks, that is exactly what I need. Perhaps this trick could explicitly mentioned in the documentation. It is, see http://orgmode.org/manual/var.html. -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] Symbol's function definition is void: org-string-nw-p
Morning everyone, I tried updating orgmode through apt-get last night but found M-x org-version reporting 6.36c not one of the more recent versions so I reinstalled by hand this morning from the 7.8.06 tar archive at orgmode.org. Both installations seemed to run without incident but, now, when I try to activate a capture task, I get the following error: Symbol's function definition is void: org-string-nw-p I see where this variable is used in several of the orgmode .el files but don't see where it gets set or how that relates to my capture setup. So far, everything but my capture templates seem to work just as they did on Saturday so something is different as a result one of the two upgrade attempts. I just don't see what. I am running orgmode under GNU emacs 23.1.1 and Ubuntu 10.04 M-x org-version still reports version 6.36c but the files in /usr/local/share/emacs/site-lisp are all timestamped for this morning's update to 7.8 ** .emacs capture template snippet ** (setq org-directory ~/org/) ;;; capture templates (setq org-capture-templates '((t Todo entry (file+headline (concat org-directory /Refile.org) Tasks) * TODO %?\n %i\n) (c Call entry (file+headline (concat org-directory /Refile.org) Phone Calls) * CALL %?\n %i\n) (e Email entry (file+headline (concat org-directory /Refile.org) Emails) * EMAIL %?\n %i\n) (j Journal entry (file+datetree (concat org-directory /Journal.org)) * %?\nEntered on %U\n %i\n))) * Any pointers or advice to get this back up and running would be greatly appreciated. thanks! steven -- --- Steven Buczkowski PhD Candidate - Atmospheric Physics UMBC Physics Dept 1000 Hilltop Circle Baltimore, MD 21250 Email: sbuczkow...@umbc.edu Cell: 413-687-9102 (No texts. Email instead.) 2m/70cm: KB3RRJ (147.135+[156.7]/448.275-[156.7]) Smoke Signal: Two long, Two short. I'll send a rider. ---
Re: [O] [babel] Call lines with their own results
Hi Andreas, Currently call the behavior you mention below, in which call line results are named by their arguments and are not unique, is the implemented behavior. I agree that it would be preferable to switch to a system in which each call line was given it's own results, however I am not able to make this change right now (although it is on my TODO list). I think for now a workaround like the one you suggest below (or maybe using an id header argument) is probably your best bet. Best, Andreas Leha andreas.l...@med.uni-goettingen.de writes: Hi all, Is there a way to force #+call line to have their own results block? Or what is the best practice to achieve that? I remember that there was a thread on this recently... Example: #+name: sampleblock #+begin_src R :colnames yes data.frame(par=1, val=1) #+end_src I can call this block: #+call: sampleblock() #+results: sampleblock() | 1 | 1 | Now, I want to call this block with different arguments, but instead of placing the results here, the result block above gets updated. #+call: sampleblock() :colnames yes Note: I can cheat to achieve this, but is this the best way? #+call: sampleblock(execute=!) :colnames yes #+results: sampleblock(execute=!) | par | val | |-+-| | 1 | 1 | -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] org - deck.js?
Yagnesh Raghava Yakkala yagn...@live.com writes: Hello Matt, Matt Price mopto...@gmail.com writes: Hi folks, has anyone had any luck converting org files to deck.js? I'm working on a presentation for tomorrow... and wondering if html5-slideshow is still the best export path. Thanks folks!! I am not really answering your question. I had a terrible experience last month, where I took org to html path (Since I needed to show some gif files). The slides' width and height are changed when displaying by the projector and slides stretched out of the screen. Just a word of caution. I'm also not answering your question, but I use org-s5 [1] to export Org-mode files to html for presentations and it works well for me. Best, matt Footnotes: [1] https://github.com/eschulte/org-S5 -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] org-babel tangling + ascii export
Yes this is possible, see the org argument to the comment header argument http://orgmode.org/manual/comments.html. Right, I saw that, but it has the following limitation: The text is picked from the leading context of the tangled code and is limited by the nearest headline or source block as the case may be. I want all text from the Org file included, not just leading context up to nearest headline. I also want the hierarchical structure of the included text preserved, as done by ASCII export. (E.g. I want to include high-level documentation and description, as goes at the top of an elisp file, and which can be broken into sections/subsections/etc -- not just local documentation before a given code block). Is that possible? thanks, ilya On Mon, Mar 26, 2012 at 7:22 AM, Eric Schulte eric.schu...@gmx.com wrote: Yes this is possible, see the org argument to the comment header argument http://orgmode.org/manual/comments.html. Cheers, Ilya Shlyakhter ilya_...@alum.mit.edu writes: Is it possible to combine org-babel tangling with ASCII export, so that the tangled file would have ALL of the Org-file's content as comments (preserving indentation etc as the ASCII export does), with the code blocks inserted as non-comments? Basically I want to write the program in literate-programming form in Org mode, but be able to export it into an executable form that's independent of Org but still has all the information (not just the text immediately before each code block). Thanks for help, ilya -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Plotting (with gnuplot) using dates timestamps
On 26 mars 2012, at 16:37, Nick Dokos wrote: Steven Buczkowski steven.buczkow...@gmail.com wrote: On Mon, 2012-03-26 at 15:37 +0200, Alan Schmitt wrote: Hello, I'm trying to plot the following table, but the dates part is all wrong. Is there a way to tell gnuplot what the date format is? #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | In straight gnuplot, I would do something like the following: gnuplot set xdata time gnuplot set timefmt '[%Y-%m-%d %a]' The set xdata time line is indeed what makes the difference: without it, gnuplot doesn't know that this is a time series. But there are some additional details: when babel prepares the data, the data file that will be fed to gnuplot ends up like this (not sure this is documented though): , | 2011-08-20-00:00:00 68158399 | 2011-08-29-00:00:00 68408438 | 2011-09-11-00:00:00 69468552 | 2011-12-11-00:00:00 78059603 | 2012-03-04-00:00:00 880010826 | 2012-03-11-00:00:00 887610930 | 2012-03-25-00:00:00 901511121 ` Thanks a lot for all the suggestions. The part I was missing was the preprocessing from babel. Using simply set xdata time set timefmt %Y-%m-%d did the trick. And yes: the gnuplot built-in help seems very complete. Thanks again, Alan
Re: [O] org-babel tangling + ascii export
Ilya Shlyakhter ilya_...@alum.mit.edu writes: Yes this is possible, see the org argument to the comment header argument http://orgmode.org/manual/comments.html. Right, I saw that, but it has the following limitation: The text is picked from the leading context of the tangled code and is limited by the nearest headline or source block as the case may be. I want all text from the Org file included, not just leading context up to nearest headline. The above text means per code block, so the entire file is exported. I also want the hierarchical structure of the included text preserved, as done by ASCII export. Please try to tangle the attached file, I believe it is what you want. (E.g. I want to include high-level documentation and description, as goes at the top of an elisp file, and which can be broken into sections/subsections/etc -- not just local documentation before a given code block). Is that possible? Yes. Best, #+Property: comments both #+Property: tangle example.el This is a the top of an Org-mode file. * Headline 1 This is content inside of a headline. | 1 | | 2 | | 3 | | 4 | #+begin_src emacs-lisp (message code block 1) #+end_src * Headline 2 This is content inside of a secondary headline. #+begin_src emacs-lisp (message code block 1) #+end_src thanks, ilya On Mon, Mar 26, 2012 at 7:22 AM, Eric Schulte eric.schu...@gmx.com wrote: Yes this is possible, see the org argument to the comment header argument http://orgmode.org/manual/comments.html. Cheers, Ilya Shlyakhter ilya_...@alum.mit.edu writes: Is it possible to combine org-babel tangling with ASCII export, so that the tangled file would have ALL of the Org-file's content as comments (preserving indentation etc as the ASCII export does), with the code blocks inserted as non-comments? Basically I want to write the program in literate-programming form in Org mode, but be able to export it into an executable form that's independent of Org but still has all the information (not just the text immediately before each code block). Thanks for help, ilya -- Eric Schulte http://cs.unm.edu/~eschulte/ -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] Tikz--LaTeX/HTML
On Mon, Mar 26, 2012 at 3:48 AM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Sorry, sent with wrong version, see below: Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) here it should have been :results org | contents | #+end_src ` Regards, Andreas Best, Andreas PS: BTW, it requires tons of header arguments. These can be split over several lines: , | * Tikz test | #+name: contents | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) | #+header: :results latex | #+begin_src latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) | #+header: :results org :file test.png | #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 | #+header: :fit yes :noweb yes :headers '(\\usepackage{tikz}) | #+begin_src latex | contents | #+end_src ` Thank you, Andreas. It now works as expected. I don't have any problems that I can see with repect to this ORG-ORG-START issue; the exported files I get look clean. For any in-the-dark readers coming across this thread, I needed to put #+LATEX_HEADER: \usepackage{tikz} in my file. Steve
Re: [O] Symbol's function definition is void: org-string-nw-p
Steven Buczkowski steven.buczkow...@gmail.com wrote: Morning everyone, I tried updating orgmode through apt-get last night but found M-x org-version reporting 6.36c not one of the more recent versions so I reinstalled by hand this morning from the 7.8.06 tar archive at orgmode.org. Both installations seemed to run without incident but, now, when I try to activate a capture task, I get the following error: Symbol's function definition is void: org-string-nw-p Yup: apt-get will get you an ancient org-mode release. You probably ended up with a frankenstein org-mode install with bits and pieces coming from various places: I'd suggest doing apt-get remove org-mode to get rid of the ancient version and then reinstalling from the tar file - or, perhaps even better, the git repository: most of us have found that staying on the bleeding edge is a rewarding experience (even if an occasionally bloody :-) one - but that happens only rarely). And even if you run into trouble, with git it is easy to backtrack and use an official release. Make sure to follow to the letter the installation instructions in the manual in these cases. In some cases at least M-x locate-library RET will help you find org-mode files in strange places. Also check the value of load-path carefully. And make sure that you restart emacs after changes, in order to make sure that you don't have stale configurations hanging around. Nick
Re: [O] [PATCH] Fix Org-Collector Error in Global Scope
Hi Mike, Mike McLean mike.mcl...@pobox.com writes: When calling Org-Collector with =:id global=, the call to =(org-narrow-to-subtree)= generates an error when the first line of the org file is not a header. Given that =:id global= is designed to use the entire file, the call to =(org-narrow-to-subtree)= is not even necessary. This patch skips it for global scope collector calls. I applied a variant using 'eq instead of 'equal. Next time, can you provide a full commit message and a ChangeLog entry? When patches are sent using 'git format-patch', applying them with 'git am' put the correct author of the patch. Otherwise I have to do it manually, which I sometimes forget. Thanks for the patch and your help, -- Bastien
Re: [O] postamble removal
Hi Prad, prad p...@towardsfreedom.com writes: this removes the author through a template: #+OPTIONS: :nil author:nil is there a variable to remove the entire postamble? (setq org-export-html-postamble nil) is there a way i can add things to the postamble such as a horizontal line? (setq org-export-html-postamble hr /) HTH, -- Bastien
Re: [O] Tikz--LaTeX/HTML
On Mon, Mar 26, 2012 at 9:11 AM, Steve Hafner steve.b.haf...@gmail.com wrote: On Mon, Mar 26, 2012 at 3:48 AM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Sorry, sent with wrong version, see below: Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) here it should have been :results org | contents | #+end_src ` Regards, Andreas Best, Andreas PS: BTW, it requires tons of header arguments. These can be split over several lines: , | * Tikz test | #+name: contents | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) | #+header: :results latex | #+begin_src latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) | #+header: :results org :file test.png | #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 | #+header: :fit yes :noweb yes :headers '(\\usepackage{tikz}) | #+begin_src latex | contents | #+end_src ` Thank you, Andreas. It now works as expected. I don't have any problems that I can see with repect to this ORG-ORG-START issue; the exported files I get look clean. Andreas, I just read your bug report about the ORG-ORG-START issue in which you say the problem disappears with removal of indentation, and in fact I had removed the indentation. Leaving it in I get excess junk. Steve For any in-the-dark readers coming across this thread, I needed to put #+LATEX_HEADER: \usepackage{tikz} in my file. Steve
Re: [O] Beamer export formatting clashes with URL link
Hi James, James Harkins jamshar...@gmail.com writes: I just wanted to center and italicize a web URL in Beamer export. First attempt, using /blah/, failed: #+LaTeX: \begin{center} / http://www.celemony.com/cms / #+LaTeX: \end{center} I'd suggest to simply use this: #+LaTeX: \begin{center} /[[http://www.celemony.com/cms]]/ #+LaTeX: \end{center} or this: #+BEGIN_LaTeX \begin{center} \emph{http://www.celemony.com/cms} \end{center} #+END_LaTeX HTH, -- Bastien
Re: [O] Plotting (with gnuplot) using dates timestamps
* Alan Schmitt alan.schm...@polytechnique.org wrote: Thanks a lot for all the suggestions. The part I was missing was the preprocessing from babel. Using simply set xdata time set timefmt %Y-%m-%d did the trick. I just wanted to check this out but I am not able to produce the plot :-( I just get the coordinate system but with an empty plane (no points). Can you please post the while working example (or correct my error)? Thanks! #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | #+begin_src gnuplot :var data=data-table reset set title Consommation Électrique set size ratio square set xlabel Date set xdata time set timefmt [%Y-%m-%d %a] set xrange [[2011-08-01 foo]:[2012-04-01 bar]] set yrange [6800:9100] set ylabel HP set ytics nomirror set y2range [8000:12000] set y2label HC set y2tics nomirror set style data points plot data using 1:2 axis x1y1 title 'HP', \ data using 1:3 axis x1y2 title 'HC' #+end_src -- Karl Voit Hallo, mein Name ist Web 2.0. Gib mir dein Adressbuch und lass mich Emails lesen
Re: [O] Symbol's function definition is void: org-string-nw-p
On Mon, 2012-03-26 at 11:14 -0400, Nick Dokos wrote: Steven Buczkowski steven.buczkow...@gmail.com wrote: Yup: apt-get will get you an ancient org-mode release. You probably ended up with a frankenstein org-mode install with bits and pieces coming from various places: I'd suggest doing apt-get remove org-mode to get rid of the ancient version and then reinstalling from the tar file - or, perhaps even better, the git repository: most of us have found that staying on the bleeding edge is a rewarding experience (even if an occasionally bloody :-) one - but that happens only rarely). And even if you run into trouble, with git it is easy to backtrack and use an official release. Make sure to follow to the letter the installation instructions in the manual in these cases. Yep, that's better. I had tried apt-get remove but needed to be a little more aggressive, apparently. I'm now getting far enough along in my knowledge and workflow with org-mode that I think I can start risking living on the bleeding edge. Thanks for the suggestions! steven
Re: [O] GSoC 2012 -- Elisp backend for Ragel
Hi Aurélien, thanks for your proposal. Please get in touch with me and Nicolas privately to discuss it more in depth: we are both french, that can help. As an Org maintainer, my priority is to integrate Nicolas parser, not to rewrite it. And Eric's suggestion of documenting the Org syntax thoroughly is a good one. But perhaps this doesn't match what you want to work on as a student. In any case, please feel free to share your thoughts, we can work something out. Best, -- Bastien
Re: [O] org-babel tangling + ascii export
The text is picked from the leading context of the tangled code and is limited by the nearest headline or source block as the case may be. I want all text from the Org file included, not just leading context up to nearest headline. The above text means per code block, so the entire file is exported. I also want the hierarchical structure of the included text preserved, as done by ASCII export. Please try to tangle the attached file, I believe it is what you want. Not quite: in the file you sent, This is a the top of an Org-mode file. is not included in the tangled file. Also, in the slightly expanded version of your example I'm attaching, the high-level comments at the top of the file are not included. Also, when I nest another headline inside Headline 1, only the content of that headline -- not of Headline 1 -- is included. I'm attaching the current result of tangling, as well as what I ideally want. example-idea.el was produced by doing an ASCII export, then commenting everything in it except the code blocks. The resulting file is both fully executable and contains everything from the original org file, so it stands on its own and is independent of Emacs/Org. Thanks for help, ilya #+Property: comments both #+Property: tangle example.el This is a the top of an Org-mode file. * This is some high-level documentation This file does X and Y. *** Section A High-level documentation for functionality A. *** Section B High-level documentation for functionality B. * Headline 1 This is content inside of a headline. *** And this is the info about the block. | 1 | | 2 | | 3 | | 4 | #+begin_src emacs-lisp (message code block 1) #+end_src * Headline 2 This is content inside of a secondary headline. #+begin_src emacs-lisp (message code block 1) #+end_src ;; And this is the info about the block. ;; | 1 | ;; | 2 | ;; | 3 | ;; | 4 | ;; [[git:/cvar/selection/sweep2/nsvn/Tools/org/devel2/org-mode/something.org::fix-colview-todo-by-itself@{2012-03-26}][And-this-is-the-info-about-the-block\.:1]] (message code block 1) ;; And-this-is-the-info-about-the-block\.:1 ends here ;; Headline 2 ;; This is content inside of a secondary headline. ;; [[git:/cvar/selection/sweep2/nsvn/Tools/org/devel2/org-mode/something.org::fix-colview-todo-by-itself@{2012-03-26}][Headline-2:1]] (message code block 1) ;; Headline-2:1 ends here ;; This is a the top of an Org-mode file. ;; == ;; ;; Author: Ilya Shlyakhter ;; Date: 2012-03-26 11:50:40 EDT ;; ;; ;; ;; Table of Contents ;; = ;; 1 This is some high-level documentation ;;1.1 Section A ;;1.2 Section B ;; 2 Headline 1 ;;2.1 And this is the info about the block. ;; 3 Headline 2 ;; ;; ;; 1 This is some high-level documentation ;; ;; ;; This file does X and Y. ;; ;; 1.1 Section A ;; == ;; ;; High-level documentation for functionality A. ;; ;; 1.2 Section B ;; == ;; ;; High-level documentation for functionality B. ;; ;; 2 Headline 1 ;; - ;; ;; This is content inside of a headline. ;; ;; 2.1 And this is the info about the block. ;; == ;; ;; 1 ;; 2 ;; 3 ;; 4 (message code block 1) ;; 3 Headline 2 ;; - ;; This is content inside of a secondary headline. (message code block 1)
Re: [O] GSoC 2012 -- Elisp backend for Ragel
Hi Aurélien, Aurélien Aptel aurelien.ap...@gmail.com writes: Regardless of the org-mode parser, I think I should work on the elisp backend for ragel which is something that can benefit any elisp project. Yes -- that would be great. As for the new org-mode parser, I could not find it on the repo. Could you point me to the relevant files? Is it still hand written? If so, I think it's ultimately a bad idea and it should be rewritten using ragel. I guess that's because you're not fluent in english, but this sounds a bit peremptory. We are not only interested in code, we are also interested in learning from each others. That's what make this list a nice place to live in. If you have code or explanations you want to share, please do! Best, -- Bastien
Re: [O] GSoC 2012 -- Elisp backend for Ragel
Hi Aurélien, Aurélien Aptel aurelien.ap...@gmail.com writes: I can be reached via email or irc. I plan on using a DVCS like Mercurial and publish We use git for org-mode. If you plan to contribute, I suggest you learn the basics of git -- won't be hard, given your skills. Best, -- Bastien
Re: [O] Plotting (with gnuplot) using dates timestamps
Karl Voit devn...@karl-voit.at wrote: * Alan Schmitt alan.schm...@polytechnique.org wrote: Thanks a lot for all the suggestions. The part I was missing was the preprocessing from babel. Using simply set xdata time set timefmt %Y-%m-%d did the trick. I just wanted to check this out but I am not able to produce the plot :-( I just get the coordinate system but with an empty plane (no points). Can you please post the while working example (or correct my error)? Did you try the version I posted? I believe it's a complete working example. Nick Thanks! #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | #+begin_src gnuplot :var data=data-table reset set title Consommation Electrique set size ratio square set xlabel Date set xdata time set timefmt [%Y-%m-%d %a] set xrange [[2011-08-01 foo]:[2012-04-01 bar]] set yrange [6800:9100] set ylabel HP set ytics nomirror set y2range [8000:12000] set y2label HC set y2tics nomirror set style data points plot data using 1:2 axis x1y1 title 'HP', \ data using 1:3 axis x1y2 title 'HC' #+end_src -- Karl Voit Hallo, mein Name ist Web 2.0. Gib mir dein Adressbuch und lass mich Emails lesen
[O] include Markdown files?
Hey everyone, How hard would it be to add Markdown to the list of file formats supported by #+INCLUDE? Thanks, Peter
Re: [O] Plotting (with gnuplot) using dates timestamps
On 26 mars 2012, at 17:48, Karl Voit wrote: * Alan Schmitt alan.schm...@polytechnique.org wrote: Thanks a lot for all the suggestions. The part I was missing was the preprocessing from babel. Using simply set xdata time set timefmt %Y-%m-%d did the trick. I just wanted to check this out but I am not able to produce the plot :-( I just get the coordinate system but with an empty plane (no points). Can you please post the while working example (or correct my error)? Change this set timefmt [%Y-%m-%d %a] to this set timefmt %Y-%m-%d I also don't specify the range. set xrange [[2011-08-01 foo]:[2012-04-01 bar]] Here is the full version. #+tblname: data-table | Date | HP | HC | |--++| | [2011-08-20 Sat] | 006815 | 008399 | | [2011-08-29 Mon] | 006840 | 008438 | | [2011-09-11 Sun] | 006946 | 008552 | | [2011-12-11 Sun] | 007805 | 009603 | | [2012-03-04 Sun] | 008800 | 010826 | | [2012-03-11 Sun] | 008876 | 010930 | | [2012-03-25 Sun] | 009015 | 011121 | #+begin_src gnuplot :var data=data-table reset set title Consommation Électrique set size ratio square set xlabel Date set xdata time set timefmt %Y-%m-%d set format x %Y-%m set xtics nomirror set ylabel HP set ytics nomirror set y2label HC set y2tics nomirror set style data points plot data using 1:2 with linespoints axis x1y1 title 'HP', \ data using 1:3 with linespoints axis x1y2 title 'HC' #+end_src Alan
Re: [O] Symbol's function definition is void: org-string-nw-p
Hi Steven, Steven Buczkowski steven.buczkow...@gmail.com writes: I'm now getting far enough along in my knowledge and workflow with org-mode that I think I can start risking living on the bleeding edge. The master branch of the git repo* is the development branch. You can also live on two safer branches: ~$ git checkout maint = latest public release ~$ git checkout hotfix-7.8.06 = latest release with bugfixes HTH, -- Bastien
Re: [O] Plotting (with gnuplot) using dates timestamps
* Alan Schmitt alan.schm...@polytechnique.org wrote: On 26 mars 2012, at 17:48, Karl Voit wrote: Can you please post the while working example (or correct my error)? Change this set timefmt [%Y-%m-%d %a] to this set timefmt %Y-%m-%d I also don't specify the range. set xrange [[2011-08-01 foo]:[2012-04-01 bar]] Thanks! I now understand and it works :-) -- Karl Voit
Re: [O] include Markdown files?
Hi Peter, Peter Salazar cycleofs...@gmail.com writes: How hard would it be to add Markdown to the list of file formats supported by #+INCLUDE? I don't know. Here are the steps: - learn more about org-elements.el and org-export.el by reading the files and by going through the reference documentation: http://orgmode.org/worg/dev/org-export-reference.html - implement org-markdown.el as a new export backend - allow #+INCLUDE to export file to the MarkDown backend while including them. MarkDown is actually quite high in my list of desired backends, but I cannot tell when this will be done. -- Bastien
Re: [O] Plotting (with gnuplot) using dates timestamps
On 26/03/12 18:06, Karl Voit wrote: * Alan Schmittalan.schm...@polytechnique.org wrote: On 26 mars 2012, at 17:48, Karl Voit wrote: Can you please post the while working example (or correct my error)? Change this set timefmt [%Y-%m-%d %a] to this set timefmt %Y-%m-%d I also don't specify the range. set xrange [[2011-08-01 foo]:[2012-04-01 bar]] Thanks! I now understand and it works :-) Haivng played with gnuplot recently, I would suggest that your first statement should always be reset. Otherwise you may find settings you have been trying out persist over different runs of your babel code. This can be very confusing and may lead to premature hair loss. Ian.
Re: [O] org-replace-disputed-keys not working
Hi Thorsten, Thorsten quintf...@googlemail.com writes: I'm not sure what to do about this, since I use the emacs24-starter-kit, and org-replace-disputed-keys is set in an .org file, that must be tangled before it is loaded, and I assume org.el must be loaded before any .org files can be tangled? The only solution I can think of right now is this: ~$ emacs --eval '(setq org-replace-disputed-keys t)' Maybe Eric has a better solution.. -- Bastien
Re: [O] TODO items as part of an itemized list?
Hi Richard and Nick, Nick Dokos nicholas.do...@hp.com writes: Richard Stanton stan...@haas.berkeley.edu wrote: Just one remaining problem, however. The exporter inserts a hard line-break, \\ after the first line of each of these \item entries. This is fine when there is additional text for that item, but if the TODO item is just one line, this results in unwanted extra white space being inserted between the \item entries. Yes - unfortunately it is hardwired (line 1321 of org-latex.el). AFAICT, there is no good reason for it to be included, even with additional text for the item: if one wants it, then adding one explicitly to the org file works (although the other exporters might not like that). BTW, the html exporter also adds a hardwired br/. I fixed the LaTeX exporter, it only includes the additional \\ when the subtree has some content. Thanks Richard for reporing this. -- Bastien
Re: [O] AUCTeX conflicting with org-mode
Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: I hope you see the no-win situation now (:-p), hence my apprehension about the fix earlier. That said, I guess you have two choices: 1. Leave the bug unsolved, hoping there will be a cleaner solution later. After all, there is a very simple workaround on the user side, do (load tex.el) before using org-latex. Okay, let's do this. I've marked the patch as Requesting For Comments in the patchwork: http://patchwork.newartisans.com/patch/1232/ Thanks! -- Bastien
Re: [O] Bug: Tabbing error with asterisks [7.8.03]
Hi Ken, Ken Williams ken.willi...@windlogics.com writes: I have the following document: -- #+TITLE: Test Doc #+AUTHOR: Ken Williams * Top header Top paragraph. #+begin_src R library(testthat) test_that(failures, { expect_that(6, equals(9)) expect_that(6, equals(9)) expect_that(6, equals(9)) expect_that(6, equals(9)) expect_that(6, equals(9)) }) #+end_src #+results: #+begin_example Error: Test failure in 'failures' * 6 not equal to 9 Mean relative difference: 0.333 * 6 not equal to 9 Mean relative difference: 0.333 * 6 not equal to 9 Mean relative difference: 0.333 * 6 not equal to 9 Mean relative difference: 0.333 * 6 not equal to 9 Mean relative difference: 0.333 #+end_example -- When I put the point on the top headline and hit tab, it doesn't fold the complete section, it only folds up to the line * 6 not equal to 9. So something thinks that line is a header, even though it's within a #+begin_example section. Hit C-c ' twice and you'll have commas inserted before the lines starting with an asterisk. See this footnote in the Literal example section of the manual: , |(4) Upon exit, lines starting with `*' or `#' will get a comma | prepended, to keep them from being interpreted by Org as outline nodes | or special comments. These commas will be stripped for editing with | `C-c '', and also for export. ` HTH, -- Bastien
Re: [O] AUCTeX conflicting with org-mode
Hi Bastien, On Mon, Mar 26, 2012 at 19:47, Bastien b...@gnu.org wrote: Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: I hope you see the no-win situation now (:-p), hence my apprehension about the fix earlier. That said, I guess you have two choices: 1. Leave the bug unsolved, hoping there will be a cleaner solution later. After all, there is a very simple workaround on the user side, do (load tex.el) before using org-latex. Okay, let's do this. I've marked the patch as Requesting For Comments in the patchwork: http://patchwork.newartisans.com/patch/1232/ Thanks! As I stated earlier, IMO this is the safer choice. Good to see the maintainer agrees. ;) Cheers, -- Suvayu Open source is the future. It sets us free.
[O] [babel] [bug] Header argument :file in call_ lines
Hi all, I think there is a bug in babel concerning inline source block calls. Suppose, I have a source block that generates a file: #+name: someplot #+begin_src R :results graphics :file someplot.pdf :var somemax=10 plot(1:somemax) #+end_src #+results: someplot [[file:someplot.pdf]] I am trying to set the file name when I call this source block: Like in this file: call_someplot[:results graphics :file somebiggerplot.pdf]()[:results file] where I still get the someplot.pdf as result. Note, that it functions as expected on non-inline call lines: #+call: someplot[:results graphics :file somebiggerplot.pdf]() :results file #+results: someplot[:results graphics :file somebiggerplot.pdf]() [[file:somebiggerplot.pdf]]
Re: [O] [babel] [bug] Header argument :file in call_ lines
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Hi all, I think there is a bug in babel concerning inline source block calls. Suppose, I have a source block that generates a file: #+name: someplot #+begin_src R :results graphics :file someplot.pdf :var somemax=10 plot(1:somemax) #+end_src #+results: someplot [[file:someplot.pdf]] I am trying to set the file name when I call this source block: Like in this file: call_someplot[:results graphics :file somebiggerplot.pdf]()[:results file] where I still get the someplot.pdf as result. Note, that it functions as expected on non-inline call lines: #+call: someplot[:results graphics :file somebiggerplot.pdf]() :results file #+results: someplot[:results graphics :file somebiggerplot.pdf]() [[file:somebiggerplot.pdf]] Hi Andreas, I just pushed up a fix for this issue. Thanks for reporting, -- Eric Schulte http://cs.unm.edu/~eschulte/
[O] Bug: org-display-inline-images ignores parameter beg. [7.8.03]
'org-display-inline-images' ignores the optional parameter value of 'beg'. The help says when we specify 'beg' and 'end', the function displays inline images between 'beg' and 'end'. However, it seems to display images between (point-min) and 'end'. I attach a patch to fix it. --- org.el.old 2012-03-27 00:17:14.877917316 +0900 +++ org.el 2012-03-27 00:17:34.985916876 +0900 @@ -17121,7 +17121,7 @@ (save-restriction (widen) (setq beg (or beg (point-min)) end (or end (point-max))) - (goto-char (point-min)) + (goto-char beg) (let ((re (concat \\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([^]\n]+? (substring (org-image-file-name-regexp) 0 -2) \\)\\] (if include-linked \\]))) best regards, Shoji Emacs : GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5) of 2011-08-15 on allspice, modified by Debian Package: Org-mode version 7.8.03 current state: == (setq org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-babel-load-languages '((R . t) (emacs-lisp . t) (dot . t) (ruby . t)) org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '((ruby . rb) (emacs-lisp . el)) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-src-lang-modes '((dot . graphviz-dot) (ocaml . tuareg) (elisp . emacs-lisp) (ditaa . artist) (asymptote . asy) (sqlite . sql) (calc . fundamental) (C . c) (cpp . c++)) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe) 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-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-blank-before-new-entry nil 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-mode-hook '(#[nil \300\301\302\303\304$\207 [org-add-hook change-major-mode-hook org-show-block-all append local] 5] org-babel-hide-all-hashes) org-ctrl-c-ctrl-c-hook '(my-org-toggle-inline-image my-org-toggle-preview-latex org-babel-hash-at-point org-babel-execute-safely-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp \\Shoji Nishimura\\ org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) 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-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-block nil) (comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) )
[O] Change to pdflayout.sty file to fix letter-sized orgcard
I'm not sure where to submit this but for a long time the orgcard_letter.pdf file that has been distributed with orgmode (in doc folder) has not been right. Someone else asked about this previously but there are obviously bigger fish to fry since it hasn't been resolved. Anyway, I looked into the orgcard.tex file and noticed that it references a 'letterpaper' which never seemed to get set. Looks like this should have been set in the pdflayout.sty file. So I added a line containing \letterpaper=1 after line 33 in the pdflayout.sty file (modified copy attached). Maybe there should be more to this but this allowed me to use my TeX package to generate a working US Letter paper sized version of orgcard.pdf by setting \pdflayout=(1l) in the orgcard.tex file. I thought I'd share and ask whoever maintains pdflayout.sty to consider updating it so the orgcard_letter.pdf file may in future be as originally intended. Orgmode is quite useful and I really appreciate everyone who contributes. I may subscribe to the list in the future when I have enough time to participate. Thanks for your attention. ~David % Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. % This file is part of GNU Emacs. % GNU Emacs is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 3 of the License, or % (at your option) any later version. % GNU Emacs is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % You should have received a copy of the GNU General Public License % along with GNU Emacs. If not, see http://www.gnu.org/licenses/. % This file defines `\pdflayout': % - \pdflayout=(0) is A4 portrait, % - \pdflayout=(1) is letter (US) portrait, % - \pdflayout=(0l) is A4 landscape. % - \pdflayout=(1l) is letter (US) landscape, \input ifpdf.sty \ifpdf \def\pdflayout=(#1#2){ \if0#1 % A4 \pdfpagewidth=21cm \pdfpageheight=29.7cm \else\if1#1 % Letter \pdfpagewidth=8.5in \pdfpageheight=11in \letterpaper=1 \fi\fi \if l#2 % Landscape \edef\oldwidth{\the\pdfpagewidth} \pdfpagewidth=\pdfpageheight \pdfpageheight=\oldwidth \fi } \else \def\pdflayout=(#1#2){} \fi
Re: [O] postamble removal
Bastien b...@gnu.org writes: prad p...@towardsfreedom.com writes: this removes the author through a template: #+OPTIONS: :nil author:nil is there a variable to remove the entire postamble? (setq org-export-html-postamble nil) is there a way i can add things to the postamble such as a horizontal line? (setq org-export-html-postamble hr /) thx bastien! i was hoping i could do these things through org templates rather than through the dotemacs file. for instance, i can eliminate the author because it seems author:nil will nil out the author 'variable'. is there something like this i can put into a org template for the other stuff? -- in friendship, prad
[O] link to pdf in latex export
Hi all, I have a question concerning the latex export. Suppose, I have a pdf, that I want to have a link to in the exported latex doc, not embedded as graphic: Example: #+name: produce_plot #+begin_src R :exports none :results graphics :file sth.pdf plot(1:10) plot(1:20) #+end_src The following is embedded as graphic, but I'd like to just have a link to the pdf. The plots can be found in the additional file call_produce_plot[ :results graphics :file sth.pdf]()[:results file]. How do I do that? Best, Andreas
Re: [O] Missing header line in export of tables that contain special marking characters
Hi William, William Henney when...@gmail.com writes: When I export a table that uses `!' in the first column to denote the column names, then the header line does not appear in the exported file (ascii, html, or latex). Please see the attached example org file and html output. Is this behavior intentional? Yes, this is intentional. See the docstring of `org-export-table-remove-special-lines': Remove special lines and marking characters in calculating tables. This removes the special marking character column from tables that are set up for spreadsheet calculations. It also removes the entire lines marked with `!', `_', or `^'. The lines with `$' are kept, because the values of constants may be useful to have. Can it be turned off? I tried to add a new option for this, but the option would be a bit confusing, and the cost of having it seems to high, considered how simple the workaround is.Hope you can live with it! -- Bastien
Re: [O] postamble removal
Hi Prad, prad p...@towardsfreedom.com writes: i was hoping i could do these things through org templates rather than through the dotemacs file. Well, you can bind variables in the Org file -- see #+BIND in the Org manual. for instance, i can eliminate the author because it seems author:nil will nil out the author 'variable'. is there something like this i can put into a org template for the other stuff? Hope this help -- let me know if the doc is missing something. Best, -- Bastien
Re: [O] Bug: org-display-inline-images ignores parameter beg. [7.8.03]
Hi Shoji, Shoji Nishimura nishimura.sh...@gmail.com writes: 'org-display-inline-images' ignores the optional parameter value of 'beg'. The help says when we specify 'beg' and 'end', the function displays inline images between 'beg' and 'end'. However, it seems to display images between (point-min) and 'end'. Applied, thanks. -- Bastien
[O] [Bug] regression in the latex exporter
Hi all, there seems to be a regression with the legacy latex exporter. When I export this subtree ,[ test.org subtree ] | ** Some title | | *** Something | | Some deeper thing | Foo ` this is the resultign .tex file: ,[ test.tex ] | % preamble | | \begin{document} | | \maketitle | | \setcounter{tocdepth}{3} | \tableofcontents | \vspace*{1cm} | | \subsection{Some deeper thing} | \label{sec-1-1} | | Foo | \section{Something} | \label{sec-1} | | \end{document} ` So, the subsection is placed before the section, resulting in wrong numbering. I tested with emacs -Q on emacs 2.0.94.1 and org mode 7.8.06 with last commit (2aa20d6f44ce5534f60aa82f0d281123963b246a). Regards, Andreas
Re: [O] org-replace-disputed-keys not working
Hi Thorsten, On Tue, Mar 27, 2012 at 00:08, Thorsten quintf...@googlemail.com wrote: I started the emacs-daemon with that option, but it did not help unfortunately. But it seems windmove.el only works in X11 anyway, not in console sessions? At least for me the shift character is ignored in a console session and doing C-h k for S-right gives: That is an issue with your terminal emulator. I have faced that too but haven't had time to look into it in detail. I also use windmove but with the meta (M, Alt on linux) key. This however has the disadvantage of conflicting even more with org. So I use the shift key with org. So in the end windmove works in all modes (except org) for all sessions (X and terminal), it works with hiccups with org only in an X session. These are my relevant settings: ;; navigate thru windows using M-arrow (windmove-default-keybindings 'meta) ;; Make windmove work in org-mode with 'shift as modifier: (add-hook 'org-shiftup-final-hook 'windmove-up) (add-hook 'org-shiftleft-final-hook 'windmove-left) (add-hook 'org-shiftdown-final-hook 'windmove-down) (add-hook 'org-shiftright-final-hook 'windmove-right) Hope this will help. -- Suvayu Open source is the future. It sets us free.
[O] relative links in html export
Hi, I want to include a link like this in a document intended only for html output: [[/][Front Page]] I've also tried [[http:/][Front Page]] Neither produces the result I want, which is a href=/Front Page/a Is there any way to get the latter result? Thanks, matt
[O] Problems running C code in org-mode under Windows
Here's a simple org file that's supposed to run some C code and print the result: -- * Sample C code #+name: RHS.c #+begin_src C :noweb yes :tangle RHS.c #include stdio.h main #+end_src #+name: main #+begin_src C int main(int argc, char *argv[]) { int lst[argc-1]; int i; for(i=1;iargc;i++) lst[i-1] = atoi(argv[i]); for(i=1;iargc;i++) printf(%d , lst[i-1] + 1); printf(\n); } #+end_src #+call: RHS.c[:cmdline 8 7 6]() - It works fine on my Mac, producing the result: #+RESULTS: RHS.c[:cmdline 8 7 6]() : 9 8 7 On my PC, however, running Windows Vista, the output is blank and there's a *Org-babel-error-output* buffer containing the message Access is denied. 'c:/Users/stanton/AppData/Local/Temp/babel-11948MQP/C-bin-11948Nln' is not recognized as an internal or external command, operable program or batch file. There is a file called C-bin-11948Nln in that directory, but it has length 0, suggesting that something is going wrong in the compilation process. However, I can also see potential problems with the fact that the file name does not end in .exe, so the Windows shell is not easily going to recognize it as an executable anyway. Does anyone have this running OK under Windows? Alternatively, how can I track down what's going wrong in more detail? Thanks. Richard Stanton
[O] [Request] Export comments as comments
Hello, I'm asking the following on behalf of a question[1] on Stack Overflow. Would it be possible to add the ability to export comments included in an Org file to the destination format when comments are supported, for example in LaTeX and HTML? Regards, Jonathan [1] http://stackoverflow.com/questions/9873365/export-comments-as-comments
Re: [O] link to pdf in latex export
On Mon, Mar 26, 2012 at 20:28, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: The plots can be found in the additional file call_produce_plot[ :results graphics :file sth.pdf]()[:results file]. How do I do that? I don't know about output from babel blocks, but I think you can link to a normal pdf by providing a description to the link. -- Suvayu Open source is the future. It sets us free.
Re: [O] Problems running C code in org-mode under Windows
Richard Stanton stan...@haas.berkeley.edu writes: Here's a simple org file that's supposed to run some C code and print the result: -- * Sample C code #+name: RHS.c #+begin_src C :noweb yes :tangle RHS.c #include stdio.h main #+end_src #+name: main #+begin_src C int main(int argc, char *argv[]) { int lst[argc-1]; int i; for(i=1;iargc;i++) lst[i-1] = atoi(argv[i]); for(i=1;iargc;i++) printf(%d , lst[i-1] + 1); printf(\n); } #+end_src #+call: RHS.c[:cmdline 8 7 6]() - It works fine on my Mac, producing the result: #+RESULTS: RHS.c[:cmdline 8 7 6]() : 9 8 7 On my PC, however, running Windows Vista, the output is blank and there's a *Org-babel-error-output* buffer containing the message Access is denied. 'c:/Users/stanton/AppData/Local/Temp/babel-11948MQP/C-bin-11948Nln' is not recognized as an internal or external command, operable program or batch file. There is a file called C-bin-11948Nln in that directory, but it has length 0, suggesting that something is going wrong in the compilation process. However, I can also see potential problems with the fact that the file name does not end in .exe, so the Windows shell is not easily going to recognize it as an executable anyway. Does anyone have this running OK under Windows? Alternatively, how can I track down what's going wrong in more detail? Thanks. Richard Stanton I don't have access to a windows machine so I can't debug this myself, but I would suggest stepping through the execution of the `org-babel-C-execute' function using edebug. This is done by first placing the cursor inside the `org-babel-C-execute' function, evaluating the function with C-u C-M-x, then executing a C code block. This should give you some idea of what is going wrong where. Best, -- Eric Schulte http://cs.unm.edu/~eschulte/
Re: [O] [patch] Need test: New method which is used to preview latex fragements
this is v5 patch, if you want to use it,you can apply the patch and set like this: #+begin_src emacs-lisp (setq org-create-formula-image-program 'imagemagick) (setq org-export-with-LaTeX-fragments 'imagemagick) #+end_src from cdf2a649e4a4583c855b538cac51b6257ca95817 Mon Sep 17 00:00:00 2001 From: FengShu tuma...@gmail.com Date: Fri, 23 Mar 2012 16:05:37 +0800 Subject: [PATCH] Adding new method for previewing latex fragments,which convert latex fragments into pdf files,then use imagemagick convert the pdf files into png files,and then insert them into the editing buffer for the latex fomula previewing. the converting path is latex-pdf-png,which is different from the default path: latex-dvi-png --- lisp/org-exp.el | 15 +++-- lisp/org-html.el |1 + lisp/org-latex.el | 57 +++--- lisp/org.el | 174 - 4 files changed, 205 insertions(+), 42 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 1ce..ccf2247 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -537,12 +537,14 @@ This option can also be set with the +OPTIONS line, e.g. \LaTeX:mathjax\. Allowed values are: -nilDon't do anything. -verbatim Keep everything in verbatim -dvipng Process the LaTeX fragments to images. - This will also include processing of non-math environments. -t Do MathJax preprocessing if there is at least on math snippet, - and arrange for MathJax.js to be loaded. +nil Don't do anything. +verbatimKeep everything in verbatim +dvipng Process the LaTeX fragments to images. +This will also include processing of non-math environments. +imagemagick Convert the LaTeX fragments to pdf files and then use imagemagick +convert pdf files to png files +t Do MathJax preprocessing if there is at least on math snippet, +and arrange for MathJax.js to be loaded. The default is nil, because this option needs the `dvipng' program which is not available on all systems. @@ -552,6 +554,7 @@ is not available on all systems. (const :tag Do not process math in any way nil) (const :tag Obsolete, use dvipng setting t) (const :tag Use dvipng to make images dvipng) + (const :tag Use imagemagick to make images imagemagick) (const :tag Use MathJax to display math mathjax) (const :tag Leave math verbatim verbatim))) diff --git a/lisp/org-html.el b/lisp/org-html.el index 2de2ea9..15a6c3e 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -685,6 +685,7 @@ The default is an extended format of the ISO 8601 specification. ((eq (plist-get parameters :LaTeX-fragments) 'verbatim) 'verbatim) ((eq (plist-get parameters :LaTeX-fragments) 'mathjax ) 'mathjax) ((eq (plist-get parameters :LaTeX-fragments) t) 'mathjax) + ((eq (plist-get parameters :LaTeX-fragments) 'imagemagick ) 'imagemagick) ((eq (plist-get parameters :LaTeX-fragments) 'dvipng ) 'dvipng) (t nil (goto-char (point-min)) diff --git a/lisp/org-latex.el b/lisp/org-latex.el index a733f31..51347b8 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -632,11 +632,24 @@ allowed. The default we use here encompasses both. '(pdflatex -interaction nonstopmode -output-directory %o %f pdflatex -interaction nonstopmode -output-directory %o %f pdflatex -interaction nonstopmode -output-directory %o %f) - Commands to process a LaTeX file to a PDF file. -This is a list of strings, each of them will be given to the shell -as a command. %f in the command will be replaced by the full file name, %b -by the file base name (i.e. without extension) and %o by the base directory -of the file. + Commands to process a LaTeX file to a PDF file and process latex +fragments to pdf files.By default,this is a list of strings,and each of +strings will be given to the shell as a command. %f in the command will +be replaced by the full file name, %b by the file base name (i.e. without +extension) and %o by the base directory of the file. + +If you set 'org-create-formula-image-program to 'imagemagick or +set 'org-export-with-LaTeX-fragments to 'imagemagick,You can add a +sub-list which contains your own command(s) for latex fragments +previewing,like this: + + '(\xelatex -interaction nonstopmode -output-directory %o %f\ + \xelatex -interaction nonstopmode -output-directory %o %f\ + ;; use below command(s) to convert latex fragments + (\xelatex %f\)) + +If not having any sublist ,the default command which is used to convert +latex fragments will be the first string of the list. The reason why this is a list is that it usually takes several runs of `pdflatex', maybe mixed with a call to `bibtex'. Org does not have a clever @@ -1084,22 +1097,24 @@ when PUB-DIR is set, use this as the publishing directory.