[O] call_*() is not working inside #+DATE
The following used to work for me in the past: #+NAME: date #+BEGIN_SRC sh :results silent :exports results :tangle no date #+END_SRC #+TITLE: Sample #+AUTHOR: Me #+DATE: call_date() and I saw the output of the shell command "date" when exporting the file to LaTeX. However does not work for the current HEAD of the Git repository. Using git-bisect, I discovered that the culprit is commit 85ff663, i.e. my code above works for commit 85ff663^ but fails for commit 85ff663. Commit 85ff663 was a pretty large commit and, besides that, the new code introduced by it was posteriorly changed, so it is hard to find where the bug comes from. Could someone more acquainted with the code try to look at this bug, please? Thanks, Rafael Laboissière
Re: [O] koma letter export receiver address
Hi Rasmus, Thanks for your help. Here's my .emacs: #+BEGIN_SRC emacs-lisp (require 'org) (add-to-list 'load-path "~/.emacs.d/lisp/vendor/org-mode/contrib/lisp") (require 'ox-koma-letter) #+END_SRC M-x org-version produces: Org-mode version 8.3.3 (release_8.3.3-640-g2b3c72 @ /usr/local/share/emacs/site-lisp/org/) Please find attach the file "test.org" and "test.pdf" produced by hitting C-c C-e C-s k o. Thanks, York On Sun, Mar 6, 2016 at 2:06 PM, Rasmus wrote: > York Zhao writes: > >> Dear org-mode koma letter developers, >> >> I just noticed that when using org koma letter export, the receiver's address >> has been moved from left side to page center. Is this the new default or an >> introduced bug? If it's the new default, how do I change it back to the old >> behavior? > > I guess it would depend on the style/LCO files you are using. There > should be no such change. > > Could you share an example which produces the wrong pdf when starting > Emacs without your configuration, i.e. start Emacs as "emacs -q" and load > ox-koma-letter. > > Thanks, > Rasmus > > -- > Dung makes an excellent fertilizer > > test.org Description: Binary data test.pdf Description: Adobe PDF document
Re: [O] How to export casual letter without from and to address?
Thank you very much Eric S Fraga, H. Dieter Wilhelm, Marcin Borkowski, Nick Dokos and Rasmus for helping me with this! I finally took Nick Dokos's approach, and solved the problem! Here's what I did that worked: 1. In my .emacs, I added: #+BEGIN_SRC emacs-lisp (add-to-list 'org-latex-classes '("letter" "\\documentclass[12pt]{letter} \\usepackage{fullpage} \\usepackage{setspace}")) #+END_SRC 2. In org-mode buffer, I had the following: \\ * Letter to Flora on 2016-03-05 :PROPERTIES: :EXPORT_LATEX_CLASS: letter :EXPORT_LATEX_HEADER: \signature{York} :EXPORT_DATE: 2016-03-05 Saturday :EXPORT_OPTIONS: title:nil toc:nil :END: \begin{letter}{} \opening{Hi Flora,\\} Blah blah blah! \closing{Regards,} \end{letter} 3. C-c C-e l o exporting to PDF 4. Print out the PDF file Thanks again,\\ York On Sun, Mar 6, 2016 at 2:04 PM, Rasmus wrote: > York Zhao writes: > >> Hi list, >> >> I've been wondering for a while that when using org-mode to write letters, >> how >> do you export casual a letter that doesn't have from address and to address? > > If you really, really want to use ox-koma-letter couldn't you just set the > addresses to @@latex:\mbox{}@@ or something similar? > > I think a better solution is just to use ox-latex. > > Rasmus > > -- > Dobbelt-A > >
[O] org-babel C math.h issue
Hi, I'm a new org user, and I'm sorry if I'm missing something obvious. When executing a C code snippet with org-babel, that contains a math function, I get the famous "undefined reference" errors. I tried adding ":flags -lm", but that doesn't help. Looking at the code, it seems the -lm flag is inserted in the wrong place, before the source file. An easy change would be in line 147 of ob-C.el version 8.3.4-634, moving "flags" to after the source file. This seems to work, but I don't know if it would break anything else. A minimal working example, attached, includes the following snippet: #+BEGIN_SRC C :includes '( ) :flags -lm int i=9; printf("%d\n",(int)sqrt(i)); #+END_SRC Note the issue disappears if constants are directly used rather than variables, presumably because the function call is optimized away entirely. Any thoughts are appreciated. Oz testC.org Description: Binary data
Re: [O] Orgtbl: edit table like code, in a separate buffer?
Hi Rafael On Fri, Mar 4, 2016 at 6:17 PM, Rafael Ramirez Morales wrote: > I was wondering if it was technically possible to invoke a separate buffer > to edit a table in org mode. > > My working scenario is a table with several columns with limited width so as > to edit a buffer with org-startup-indented on. I would like to achieve > something like what is done with source blocks: upon invoking a command, the > table would open in a separate buffer, with indent (i.e. visual > line-wrapping) option off and that ignores column width limits. > > Is there any way to achieve this? Not in the way that you describe. As a workaround you could temporarily remove the narrowing cookies <10>. Take care of not breaking a TBLFM when moving a whole row with all cookies out of the table, in this case e. g. keep an empty row. > Is there another way to go about this problem? There is "C-u C-u C-c `" (`org-table-edit-field') to fully view and optionally edit field by field one field at a time in a separate window described in (info "(org) Built-in table editor"). Michael
Re: [O] Bug: incorrect export for LaTeX [8.2.10 (release_8.2.10 @ c:/emacs25-91/share/emacs/25.0.91/lisp/org/)]
On 2016-03-02, at 22:20, Rasmus wrote: >> Fair enough. Do you have a proposal for deeply nested headlines (or >> items)? > > Use this header: > > #+options: h:0 > #+latex_header: \usepackage{enumitem} > #+latex_header: \setlistdepth{9} > #+latex_header: \setlist[enumerate]{label=(\arabic*)} > > > I don’t think we need to do anything. If we wanted to support this we’d > probably need to load enumerate (which is not a bad package...). We have > worse offenders of manual config. Local TOCs spring to mind. > http://orgmode.org/org.html#fn-113 I've just seen this thread, and decided to chime in. I think that the situation is fine: such deep nesting of lists should be _actively discouraged_ IMHO. While list support in LaTeX is IMO suboptimal (to say the least), and enumitem is a must for me in most of my documents, four levels of nesting is even too many (by a factor of 2). My opinion is that base LaTeX should limit the nesting to two levels, and a special package (like enumitem) should be needed to cater for those really strange documents that need more. (Yes, they do exist, but are very rare I believe.) > Rasmus Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University
Re: [O] Bug: incorrect export for LaTeX [8.2.10 (release_8.2.10 @ c:/emacs25-91/share/emacs/25.0.91/lisp/org/)]
Nick Dokos writes: > Sorry, I missed your suggestion. If it has to be anywhere, I thought > what I suggested was the most natural place (I took a look at your > suggestion and I still have a slight preference for "Header and > Sectioning"), but I'm not doing the work: feel free to go whichever way > you think is best. I read the copies sent to my email before checking to Gmane/NNTP. Anyway, let's see what Nicolas or "9661031" prefers. Rasmus -- Need more coffee. . .
Re: [O] Bug: incorrect export for LaTeX [8.2.10 (release_8.2.10 @ c:/emacs25-91/share/emacs/25.0.91/lisp/org/)]
Rasmus writes: > Nick Dokos writes: > >> Nicolas Goaziou writes: >> >>> Hello, >>> >>> Rasmus writes: >>> I don’t think we need to do anything. >>> >>> Don't do anything? OK, done. >>> If we wanted to support this we’d probably need to load enumerate (which is not a bad package...). We have worse offenders of manual config. Local TOCs spring to mind. http://orgmode.org/org.html#fn-113 >>> >>> Even if it isn't supported (I let you decide about it), It could be >>> documented somewhere, if only as a FAQ, or even in the LaTeX export >>> section of the manual. >>> >> >> I suggest a footnote in (info "(org) Header and Sectioning") > > Oh, I didn't see this Nick. Do you prefer this location to the suggestion > I made in another post in this thread? > Sorry, I missed your suggestion. If it has to be anywhere, I thought what I suggested was the most natural place (I took a look at your suggestion and I still have a slight preference for "Header and Sectioning"), but I'm not doing the work: feel free to go whichever way you think is best. -- Nick
Re: [O] Bug: incorrect export for LaTeX [8.2.10 (release_8.2.10 @ c:/emacs25-91/share/emacs/25.0.91/lisp/org/)]
Nick Dokos writes: > Nicolas Goaziou writes: > >> Hello, >> >> Rasmus writes: >> >>> I don’t think we need to do anything. >> >> Don't do anything? OK, done. >> >>> If we wanted to support this we’d probably need to load enumerate >>> (which is not a bad package...). We have worse offenders of manual >>> config. Local TOCs spring to mind. http://orgmode.org/org.html#fn-113 >> >> Even if it isn't supported (I let you decide about it), It could be >> documented somewhere, if only as a FAQ, or even in the LaTeX export >> section of the manual. >> > > I suggest a footnote in (info "(org) Header and Sectioning") Oh, I didn't see this Nick. Do you prefer this location to the suggestion I made in another post in this thread? Thanks, Rasmus -- Bang bang
Re: [O] koma letter export receiver address
York Zhao writes: > Dear org-mode koma letter developers, > > I just noticed that when using org koma letter export, the receiver's address > has been moved from left side to page center. Is this the new default or an > introduced bug? If it's the new default, how do I change it back to the old > behavior? I guess it would depend on the style/LCO files you are using. There should be no such change. Could you share an example which produces the wrong pdf when starting Emacs without your configuration, i.e. start Emacs as "emacs -q" and load ox-koma-letter. Thanks, Rasmus -- Dung makes an excellent fertilizer
Re: [O] How to export casual letter without from and to address?
York Zhao writes: > Hi list, > > I've been wondering for a while that when using org-mode to write letters, how > do you export casual a letter that doesn't have from address and to address? If you really, really want to use ox-koma-letter couldn't you just set the addresses to @@latex:\mbox{}@@ or something similar? I think a better solution is just to use ox-latex. Rasmus -- Dobbelt-A
Re: [O] How to export casual letter without from and to address?
Marcin Borkowski writes: > On 2016-03-05, at 19:56, Eric S Fraga wrote: > >> On Saturday, 5 Mar 2016 at 10:47, York Zhao wrote: Why use a letter exporter (koma?) if you don't want something that looks like a letter? >>> >>> I wanted it to be a letter in all aspects, except that it doesn't have the >>> "from >>> address" and "to address" in the header. More specifically, I want my letter >>> looks like: >>> >>> Hi Flora, >>> >>> Blah blah blah! >>> >>> Regards, >>> >>> York >>> simply write it as a normal org document and export it to pdf or odt or whatever you wish to send. >>> >>> The problem is, it seems to me that to export to pdf, LaTeX export is the >>> only >>> way to go. But then you would have to choose a document class. Obviously you >>> can't use "article", nor "book". So my question may probably rephrase as: >>> which >>> latex document class do you use to export the letter "as is"? >> >> Ah, okay, I see. Well, you could try something along the lines of: >> >> #+begin_src org >> ,#+title: >> ,#+author: >> ,#+date: >> ,#+options: toc:nil num:nil >> ,* >> Hi Flora >> >> Blah blah blah! >> >> Regards, >> >> # leave some room for signature >> \vspace*{1.5cm} >> >> York >> #+end_src >> >> where the headline has a space after the "*". You might want to play >> with parindent and parskip LaTeX variables if you don't like the >> default. >> >> Alternatively, there may be other LaTeX styles that could give you what >> you want with a little customisation although probably unlikely. For >> instance, have a look at http://www.latextemplates.com/ and maybe create >> your own using the custom class example? > > You could also stick something like > > \let\maketitle=\relax This only works in latex. A backend-agnostic solution could be: #+options: title:nil Though maybe it's undesirable in some other aspect. Rasmus -- May the Force be with you
Re: [O] Bug: incorrect export for LaTeX [8.2.10 (release_8.2.10 @ c:/emacs25-91/share/emacs/25.0.91/lisp/org/)]
Nicolas Goaziou writes: > Hello, > > Rasmus writes: > >> I don’t think we need to do anything. > > Don't do anything? OK, done. > >> If we wanted to support this we’d probably need to load enumerate >> (which is not a bad package...). We have worse offenders of manual >> config. Local TOCs spring to mind. http://orgmode.org/org.html#fn-113 > > Even if it isn't supported (I let you decide about it), It could be > documented somewhere, if only as a FAQ, or even in the LaTeX export > section of the manual. > > WDYT? I would be happy with simply documenting this limitation and documenting a solution, e.g. using enumitem one. Enumitem is a wonderful package, but I see no reason to add it as a standard package because of this. Do any of you have a place in mind where we could add this to the manual? How about the "Plain lists in LaTeX export". I propose the following change. WDYT? Can I commit/push? modified doc/org.texi @@ -12297,12 +12297,30 @@ the @LaTeX{} @code{\includegraphics} macro will be commented out. Plain lists accept two optional attributes: @code{:environment} and @code{:options}. The first one allows the use of a non-standard environment -(e.g., @samp{inparaenum}). The second one specifies additional arguments for +(e.g., @samp{itemize*} of @samp{enumitem}). The second one specifies additional arguments for that environment. @example -#+ATTR_LATEX: :environment compactitem :options [$\circ$] -- you need ``paralist'' package to reproduce this example. +#+latex_header: \usepackage[inline]{enumitem} +Some ways to say "Hello": +#+ATTR_LATEX: :environment itemize* :options [label={}, itemjoin={,}, itemjoin*={, and}] +- Hola +- Bonjour +- Guten Tag +@end example + +By default, @LaTeX{} only support four level of nesting for lists. If deeper +nesting is needed, the @samp{enumitem} @LaTeX{} package could be employed, as +shown in this example: +@example +\usepackage{enumitem} +\renewlist{itemize}{itemize}{9} +\setlist[itemize]{label=$\circ$} +- one + - two +- three + - four +- five @end example Rasmus -- A page of history is worth a volume of logic
Re: [O] Example of Make file for Org Mode LaTeX to pdf
On Friday, 4 Mar 2016 at 23:43, Robert Love wrote: > Does anyone have a make file example that has emacs load an .org file, > process it into LaTeX and export as PDF, all from the command line > without the user doing anything more than type ‘make’? All examples > appreciated. I don't a makefile but I do have a single shell command that exports my agenda to an ics file for uploading to google's calendar: --8<---cut here---start->8--- emacs -Q --batch --debug-init \ --directory=${HOME}/s/emacs \ --load=custom.el \ --load=esf-org.el --visit=${DIARY}.org --eval='(org-icalendar-export-to-ics)' --8<---cut here---end--->8--- HTH -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55
Re: [O] Example of Make file for Org Mode LaTeX to pdf
* Export org-files using a Makefile #+BEGIN_SRC makefile :tangle Makefile pdf: rm -f make-org.pdf emacs -batch make-org.org -f org-latex-export-to-pdf open make-org.pdf #+END_SRC works for me. Robert Love writes: > Does anyone have a make file example that has emacs load an .org file, > process it into LaTeX and export as PDF, all from the > command line without the user doing anything more than type ‘make’? All > examples appreciated. > > — > Bob Love > "Insisting on perfect safety is for people who don't have the balls to live > in the real world." -- Mary Shafer, NASA Dryden -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] Example of Make file for Org Mode LaTeX to pdf
Hello Bob, Robert Love writes: > Does anyone have a make file example that has emacs load an .org file, > process it into LaTeX and export as PDF, all from the command line > without the user doing anything more than type ‘make’? All examples > appreciated. Fraid I don't have a makefile but I do have a CMakeLists.txt that CMake uses to generate a makefile. This method uses a CMake module called UseLATEX.cmake to generate the PDF. I haven't used it for a couple of years so it might be a bit outdated. The CMakeLists.txt also contains an example of how to generate all the R graphics for the document. If it looks a bit over complicated for your requirements perhaps just looking at the line that contains "COMMAND emacs" would be useful for you. Hopefully someone else will show a nice, simple, self-contained example. Myles #+BEGIN_SRC sh :tangle CMakeLists.txt cmake_minimum_required(VERSION 2.8) project(thesis NONE) include(/usr/share/cmake-2.8/Modules/UseLATEX.cmake) # Set R executable set(R_COMPILE "/usr/bin/Rscript") # Set the location of data files ##set(DATA_DIR data) # Set the location of the directory for image files set(IMAGE_DIR graphicsauto) # Get a list of R files file(GLOB_RECURSE R_FILES "R/*.R") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/R DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}) foreach(file ${R_FILES}) message("processing ${file}") get_filename_component(basename "${file}" NAME_WE) # Command to run R if(R_COMPILE) message("Adding ... ${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R") add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R # ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${DATA_DIR} COMMAND ${R_COMPILE} ARGS ${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps ) message("Running ${R_COMPILE} ${CMAKE_CURRENT_BINARY_DIR}/R/${basename}.R ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps") endif(R_COMPILE) # Make a list of all R files (for ADD_LATEX_DOCUMENT depend) set(ALL_R_FILES ${ALL_R_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${IMAGE_DIR}/${basename}.eps ) endforeach(file) # --- export mainThesis.org --- latex_get_output_path(OUTPUT_DIR) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/mainThesis.org DESTINATION ${OUTPUT_DIR}/ ) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/thesis.el DESTINATION ${OUTPUT_DIR}/ ) add_custom_target( orgfile ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mainThesis.org ) add_custom_target( elfile ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/thesis.el ) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mainThesis.tex COMMAND emacs -Q --batch --eval \"(progn (add-to-list 'load-path (expand-file-name \\"~/.emacs.d/plugins/org-mode/lisp/\\")) (add-to-list 'load-path (expand-file-name \\"~/.emacs.d/plugins/org-mode/contrib/lisp/\\" t)) (require 'org) (require 'ox) (require 'org-exp) (require 'org-inlinetask) (require 'ob-plantuml) (setq org-plantuml-jar-path \\"/home/myles/Downloads/plantuml.jar\\") (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (sh . t) (plantuml . t))) (setq org-confirm-babel-evaluate nil) (setq org-latex-listings 'minted) (setq org-latex-with-hyperref nil) (add-to-list 'org-latex-packages-alist '(\\"\\" \\"minted\\")) (add-to-list 'org-latex-classes '(\\"mynewthesis\\" \\"\\documentclass[11pt]{mythesis}\\" (\\"\\chapter{%s}\\" . \\"\\chapter*{%s}\\") (\\"\\section{%s}\\" . \\"\\section*{%s}\\") (\\"\\subsection{%s}\\" . \\"\\subsection*{%s}\\") (\\"\\subsubsection{%s}\\" . \\"\\subsubsection*{%s}\\") (\\"\\paragraph{%s}\\" . \\"\\paragraph*{%s}\\"))) (setq org-export-with-todo-keywords nil) (load-library \\"/home/myles/lib/lisp/my-export.e
[O] Example of Make file for Org Mode LaTeX to pdf
Does anyone have a make file example that has emacs load an .org file, process it into LaTeX and export as PDF, all from the command line without the user doing anything more than type ‘make’? All examples appreciated. — Bob Love "Insisting on perfect safety is for people who don't have the balls to live in the real world." -- Mary Shafer, NASA Dryden
Re: [O] How to export casual letter without from and to address?
York Zhao writes: >> Yeah, this works really convenient and near automatic, I'm also using org for >> corporate meeting minutes, reports and statistics to the tax authority >> (besides Koma letters of course ;-) > > Same here, using org-mode for everything. But have you ever needed to print > out > a letter without "from address" and "to address"? In my case, I just needed to > print a note, sign it, and pass it to somebody on a regular basis! It doesn't > make sense having to always print my home address and her address at the > beginning because it's just a casual note. When it's *not* a real letter you shouldn't use scrlttr2 as the document class! I suggest to have a look at the KOMA scrpage2 documentation, with this style you have more control of the content and can create your own *high-class* notes style. Hope that helps Dieter > Thanks, > > York > > On Sat, Mar 5, 2016 at 6:22 AM, H. Dieter Wilhelm > wrote: >> Eric S Fraga writes: >> >>> On Friday, 4 Mar 2016 at 22:36, York Zhao wrote: Please share how you write notes (casual letter without "from address" and "to address") in Emacs org-mode, print out and give to somebody. >>> >>> If you don't have the usual elements of a letter, it is not really a >>> letter so simply write it as a normal org document and export it to pdf >>> or odt or whatever you wish to send. org itself doesn't care! In other >>> words, why use a letter exporter (koma?) if you don't want something >>> that looks like a letter? >> >> Yeah, this works really convenient and near automatic, I'm also using >> org for corporate meeting minutes, reports and statistics to the tax >> authority (besides Koma letters of course ;-). >> >> -- >> Best wishes >> H. Dieter Wilhelm >> Kelkheim, Germany >> >> > > -- Best wishes H. Dieter Wilhelm Kelkheim, Germany