[O] Exporting to LaTeX to use it with \input
Hi, I would like to have a main text of the document in LaTeX and only some parts as org files (using tables and babel functionality). Then these files I want to export to .tex files and include to the main tex file with \input{myorgfile1}. My question: is it possible to export to LaTeX without preamble and postable? Or how to automatically get rid of this redundant text to use it in \input? Thanks in advance, Seweryn
[O] How to export results to latex?
Hello! I have test1.org file (see below [1]) which I want to export to latex. However when exporting to latex (both using org-export and org-export-dispatch), the content of RESULTS is missing in the resulting test1.tex (see below [2]). What is the reason for that? One year ago when exporting the same file with :results org replace the output was wrapped with begin_org ... end_org now it is wrapped with begin_src org ... then the export to latex gives verbatim or lstlisting environments... Any hints what to do to get the previous behaviour? test1.org contents: #-- #+title: Testing org export to latex #+STARTUP: showall #+OPTIONS: toc:nil creator:nil * Headline - first list item foo bar #+begin_src emacs-lisp :exports results :results drawer replace (let ((t1 )) ;; (setq t1 (concat t1 (format - foo \n\n$a = \\unit[%.3f]{m}$\n\n 3.0))) (setq t1 (concat t1 (format - bar \n\n$b = \\unit[%.3f]{m}$\n\n 6.0))) (concat t1)) #+end_src #+RESULTS: :RESULTS: - second list item $a = \unit[3.000]{m}$ - third list item $b = \unit[6.000]{m}$ :END: # [2] test1.tex: % Created 2013-01-18 Fri 16:21 \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[a4paper,left=1.8cm,right=1.8cm,top=1.8cm,bottom=1.8cm]{geometry} \usepackage[dvips]{graphicx} \usepackage{url} \usepackage{xcolor} \usepackage{units} \usepackage[breaklinks=true]{hyperref} \usepackage{amsmath} \title{Testing org export to latex} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={}} \begin{document} \maketitle \section{Headline} \label{sec-1} \begin{itemize} \item first list item \end{itemize} foo bar \end{document}
[Orgmode] Re: [BUG] - error when compiling org sources from git
Carsten Dominik carsten.dominik at gmail.com writes: Me bad, this is fixed now. Thanks, you are more than quick! :) Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: repo.or.cz down
it's up again. Cheers ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: repo.or.cz down
Giovanni Ridolfi giovanni.ridolfi at yahoo.it writes: Seweryn Kokot sewkokot at gmail.com writes: The http://repo.or.cz seems to be down it's up again. http://orgmode.org is up but the web interface of the git repo: http://repo.or.cz/w/org-mode.git is down Unfortunately I do not have whois so I can't say if orgmode.org has the same IP of the git repo. It seems that the server http://repo.or.cz/w/org-mode.git was up just for a moment since I managed to pull the latest org-mode version, now it's down again. Regards, Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Hi, It need to attach a function to C-c C-c keybinding when exporting a table in orgtbl-mode so would be nice to have orgtbl-ctrl-c-ctrl-c-hook similar to org-ctrl-c-ctrl-c-hook. Or are there any other ways to do it? Thanks, Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Carsten Dominik carsten.dominik at gmail.com writes: On Nov 17, 2010, at 9:19 AM, Seweryn Kokot wrote: Hi, It need to attach a function to C-c C-c keybinding when exporting a table in orgtbl-mode so would be nice to have orgtbl-ctrl-c-ctrl-c-hook similar to org-ctrl-c-ctrl-c-hook. This is a reasonable request - please make me a patch. See the following patch. It seems to work in my case, but please correct it if necessary because I don't know if (run-hook-with-args-until-success 'orgtbl- ctrl-c-ctrl-c-hook) line is in the right place. Regards, Seweryn --- h:/org-mode/lisp/org-table.el 2010-11-16 11:17:36.0 +0100 +++ h:/org-mode/lisp/org-table-new.el 2010-11-17 10:07:34.0 +0100 @@ -48,6 +48,15 @@ (defvar org-export-html-table-tag) ; defined in org-exp.el (defvar constants-unit-system) +(defvar orgtbl-ctrl-c-ctrl-c-hook nil + Hook for functions attaching themselves to `C-c C-c'. +This can be used to add additional functionality to the C-c C-c key which +executes context-dependent commands. +Each function will be called with no arguments. The function must check +if the context is appropriate for it to act. If yes, it should do its +thing and then return a non-nil value. If the context is wrong, +just do nothing and return nil.) + (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) Non-nil means use the optimized table editor version for `orgtbl-mode'. In the optimized version, the table editor takes over all simple keys that @@ -3729,7 +3738,8 @@ (call-interactively 'org-table-recalculate) (org-table-maybe-recalculate-line)) (call-interactively 'org-table-align) - (orgtbl-send-table 'maybe)) + (orgtbl-send-table 'maybe) + (run-hook-with-args-until-success 'orgtbl-ctrl-c-ctrl-c-hook)) ((eq action 'recalc) (save-excursion (beginning-of-line 1) Diff finished. Wed Nov 17 10:08:00 2010 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Carsten Dominik carsten.dominik at gmail.com writes: I am a bit confused by this patch. You do call the hook after C-c C-c has done its thing. Which is OK, but this is not what the documentation in your hook variable says. That documentation seems to have been copied from the normal ctrl-c-ctrl-c hook, and these hooks are used in a different way: They establish *alternative* functionality to the normal C-c C-c actions. So if any of the hook functions returns a non-nil value, the normal C-c C-c functionality will *not* be executed. So what are your true intentions, and can you make code and documentation macht up? Thank for you help. Indeed, the previous patch was confusing. I've done a new patch below. Is it correct now? regards, Seweryn --- h:/org-mode/lisp/org-table.el 2010-11-16 11:17:36.0 +0100 +++ h:/org-mode/lisp/org-table-new.el 2010-11-17 10:54:22.0 +0100 @@ -48,6 +48,11 @@ (defvar org-export-html-table-tag) ; defined in org-exp.el (defvar constants-unit-system) +(defvar orgtbl-ctrl-c-ctrl-c-hook nil + Hook for functions attaching themselves to `C-c C-c'. +This can be used to add additional functionality after the table is sent +to the receiver position.) + (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) Non-nil means use the optimized table editor version for `orgtbl-mode'. In the optimized version, the table editor takes over all simple keys that @@ -3729,7 +3734,8 @@ (call-interactively 'org-table-recalculate) (org-table-maybe-recalculate-line)) (call-interactively 'org-table-align) - (orgtbl-send-table 'maybe)) + (orgtbl-send-table 'maybe) + (run-hooks 'orgtbl-ctrl-c-ctrl-c-hook)) ((eq action 'recalc) (save-excursion (beginning-of-line 1) Diff finished. Wed Nov 17 10:54:46 2010 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Carsten Dominik carsten.dominik at gmail.com writes: Should the be run only if the sending was successful? Or also for tables where have no ORGTBD SEND statement? We could make orgtbl-send-table return a value indicating if sending has taken place. We might want to call the hook orgtbl-after-send-table-hook... Yes, in my case I need to modify the exported table only if sending has taken place. And agree that the orgtbl-after-send-table-hook name is better. Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Carsten Dominik carsten.dominik at gmail.com writes: Should the be run only if the sending was successful? Or also for tables where have no ORGTBD SEND statement? We could make orgtbl-send-table return a value indicating if sending has taken place. We might want to call the hook orgtbl-after-send-table-hook... What about this patch? --- h:/org-mode/lisp/org-table.el 2010-11-16 11:17:36.0 +0100 +++ h:/org-mode/lisp/org-table-new.el 2010-11-17 13:35:58.0 +0100 @@ -48,6 +48,12 @@ (defvar org-export-html-table-tag) ; defined in org-exp.el (defvar constants-unit-system) +(defvar orgtbl-after-send-table-hook nil + Hook for functions attaching to `C-c C-c', if the table is sent. +This can be used to add additional functionality after the table is sent +to the receiver position, othewise, if table is not sent, the functions +are not run.) + (defcustom orgtbl-optimized (eq org-enable-table-editor 'optimized) Non-nil means use the optimized table editor version for `orgtbl-mode'. In the optimized version, the table editor takes over all simple keys that @@ -3726,10 +3732,11 @@ (goto-char action) (org-table-maybe-eval-formula) (if arg - (call-interactively 'org-table-recalculate) - (org-table-maybe-recalculate-line)) + (call-interactively 'org-table-recalculate) + (org-table-maybe-recalculate-line)) (call-interactively 'org-table-align) - (orgtbl-send-table 'maybe)) + (when (orgtbl-send-table 'maybe) + (run-hooks 'orgtbl-after-send-table-hook))) ((eq action 'recalc) (save-excursion (beginning-of-line 1) @@ -3943,7 +3950,10 @@ (orgtbl-send-replace-tbl name txt)) (setq ntbl (1+ ntbl))) (message Table converted and installed at %d receiver location%s - ntbl (if ( ntbl 1) s ) + ntbl (if ( ntbl 1) s )) + (if ( ntbl 0) + t + nil (defun org-remove-by-index (list indices optional i0) Remove the elements in LIST with indices in INDICES. Diff finished. Wed Nov 17 13:38:17 2010 ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: [REQUEST] orgtbl-ctrl-c-ctrl-c-hook
Carsten Dominik carsten.dominik at gmail.com writes: this is good, I have applied the patch. The only change I made was to return the number of sent tables instead of t. Thanks for the patch, and thanks for going through iterations to get this right. Hi Carsten, My pleasure :-) This was my first patch, so next time it should go smoother. Thanks for guidance. Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Difference if exporting a table to latex
Hello, First I had a table code | M_r | /33.22/ | /code in an .org file and exporting the table to latex gave the following \begin{center} \begin{tabular}{ll} M$_r$\emph{33.22} \\ \end{tabular} \end{center} Then as I needed more control so I moved to a .tex file. This time, using a radio table, the converted table is quite different i.e. no $$ around _r, and no \emph env. code % BEGIN RECEIVE ORGTBL test1 \begin{tabular}{ll} M_r /33.22/ \\ \end{tabular} % END RECEIVE ORGTBL test1 \begin{comment} #+ORGTBL: SEND test1 orgtbl-to-latex | M_r | /33.22/ | \end{comment} /code Is it a bug in `orgtbl-to-latex' or how I can get the same behaviour as in exporting from an .org file? ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org tables - modified field
Hi, I have the following table #+TBLNAME: table_three |+| | 1 | 2 | |+| | 2.00 | *4.00* | | *4.00* | #ERROR | |+| #+TBLFM: @2$1...@1$1;%.2f::@2$2...@1$2;*%.2f*::@3$1...@2$1;*%.2f*::@3$2...@2 $2;*%.2f* in which I would like to have some fields bold in org buffer and latex export \begin{center} \begin{tabular}{rl} \hline 12 \\ \hline 2.00\textbf{4.00} \\ \textbf{4.00}\#ERROR\\ \hline \end{tabular} \end{center} However, since the field B3 refers to the field B2 which is not exactly a number, I get an error. Would it be possible to reuse the field B2 in another formula, somehow? Best regards, Seweryn ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] problem in highlighting fields in a remote table
Hi, I have two tables - the second one refers with formulas to the first table. #+TBLNAME: table_one |---+---| | 1 | 2 | |---+---| | 3 | 4 | |---+---| #+TBLNAME: table_two |---+---| | 1 | 2 | |---+---| | 6 | 8 | |---+---| #+TBLFM: @2$1=2*remote(table_one, A2)::@2$2=2*remote(table_one, B2) Being in the second table and using the C-c ' editing of formulas, refering to a field in the first table with a formula e.g. A2 = 100*(remote(tblname, A2)) highlights A2 field in the second table and not in the first one. Is it a limitation or a bug? Thank you. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to say Footnotes on other languages
Carsten Dominik [EMAIL PROTECTED] writes: Hi, For the export setup, I need to know what Footnotes means in other languages. Could some of you please complete the following table? (defcustom org-export-language-setup Polish version (pl Autor Data Przypis) -- regards, Seweryn ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: How to say Footnotes on other languages
Carsten Dominik [EMAIL PROTECTED] writes: Hi Seweryn, there is one word missing, I don't know which one, either Table of Contents, or Footnotes. Sorry for the missing Table of Contents which is Spis treści (pl Autor Data Spis treści Przypis) It's in latin-2 thanks -- regards, Seweryn ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-plot (generating graphs from org-mode)
Hi Eric, I just want to ask if it is necessary to redefine 'debug' function in org-plot.el? Because when I put the following lines into .emacs file: (require 'org-plot) (add-hook 'org-mode-hook (lambda () (local-set-key (kbd \M-\C-g) 'org-plot/gnuplot))) whenever I invoke an error, instead of getting *Backtrace* buffer I get a strange message in the echo line. -- regards, Seweryn Kokot ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] how to extract start time and end time from the CLOCK: property
I would like to have a list of actions with starting and ending times and with duration. Now I have the column view as follows #+BEGIN: columnview :hlines 1 :id global | Action | start - end, duration | duration | |+-+--| | * 17-08-2008 | | 3:38 | | ** DONE task1 | [2008-08-17 nie 09:03]--[2008-08-17 nie 10:04] = 1:01 | 1:01 | | ** DONE task2 | [2008-08-17 nie 10:05]--[2008-08-17 nie 10:35] = 0:30 | 0:30 | #+END: #+COLUMNS: %25ITEM(Action) %55CLOCK(start - end, duration) %8CLOCKSUM(duration) but I would like something like this #+BEGIN: columnview :hlines 1 :id global | Action | start | end| duration | |+++--| | * 17-08-2008 |||3:38 | | ** DONE task1 | 09:03 | 10:04 |1:01 | | ** DONE task2 | 10:05 | 10:35 |0:30 | #+END: #+COLUMNS: %25ITEM(Action) %8CLOCK[start] %8CLOCK[end] %8CLOCKSUM(duration) In other words it would be nice to extract starting time and ending time from the time range in the CLOCK property so that it would be possible to insert them in two separate columns in a column view and in a dynamic block. Any ideas? regards, Seweryn Kokot ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] another way of inserting effort estimates
Hello, When I want to insert effort estimates, I type for example 0:20 or 1:40 or cycle the allowed values of Effort properties. Would it be possible to have something similar to the date/time prompts, and instead of typing in the Effort property 0:20 or 1:40, just to type 20m or 1h40m or (1h40)? Where m stands for minutes and h for hour. The reason for this is that I moved the colon somewhere else on my keyboard and now it is not easily available. regards, Seweryn ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] org-mode-abbrevs-table and text-mode-abbrevs-table
Hello, I would like to have the same abbrevs in org-mode and text-mode. I defined text-mode-abbrev-table, but the abbrevs are invisible in org-mode. I know that message-mode inherits abbrevs from text-mode and it would be nice to have the same behaviour for org-mode. Any idea how to solve the problem? Best regards. Seweryn Kokot ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Electric insert of headline stars
Piotr Zielinski [EMAIL PROTECTED] writes: which of course doesn't normally work, hence this elisp code. (defun local-org-insert-stars () (interactive) (when (looking-back ^ * (point-at-bol)) (replace-string * nil (point-at-bol) (point))) (insert *)) (define-key org-mode-map * 'local-org-insert-stars) Very nice idea! A minor inconvenience is a warning when compiling the code .emacs:2604:30:Warning: `replace-string' used from Lisp code That command is designed for interactive use only. How to get rid of this? regards, -- Seweryn Kokot ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Electric insert of headline stars
Piotr Zielinski [EMAIL PROTECTED] writes: On 25/10/2007, Seweryn Kokot [EMAIL PROTECTED] wrote: A minor inconvenience is a warning when compiling the code First, here's the version after Bastien's and Carsten's comments: (defun local-org-insert-stars () (interactive) (when (looking-back ^ + (point-at-bol)) (replace-string * nil (point-at-bol) (point))) (org-self-insert-command 1)) .emacs:2604:30:Warning: `replace-string' used from Lisp code That command is designed for interactive use only. How to get rid of this? This is what I came up with after following the suggestion from the manual, but it looks complicated to me, so I don't really like it: (defun local-org-insert-stars () (interactive) (when (looking-back ^ + (point-at-bol)) (save-excursion (while (search-backward (point-at-bol) t) (replace-match * nil t (org-self-insert-command 1)) It seems that the line (when (looking-back ^ + (point-at-bol)) is not required in the second version. And for me it's better to add and extra whitespace to directly type a heading name. I don't know if the line (insert ) is correct in this case or it should be replaced with something (org-self-insert-command x)? (defun ks-org-insert-stars () (interactive) (save-excursion (while (search-backward (point-at-bol) t) (replace-match * nil t))) (org-self-insert-command 1) (insert )) Anyway I prefer the version without a warning and it is politically correct according to the manual :) -- Seweryn Kokot ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode