[O] Beamer framebreak

2017-01-10 Thread edgar

Hello,

I am new to org-mode, because it seems impressive, and I think that it 
will make my life much simpler. Thank you!


For the following, I am attaching example org, pdf and tex files (the 
last two generated by org-mode > export beamer PDF).


First, why does slide 3/4 contain two main headlines fit into a single 
slide?


Second, how do I force a new slide so that the "Figures" block is not 
cut-off on slide 4/4?


Third, how do I get the contents of "Description of the project" (slide 
3/4) into a block (like Concepts in slide 4/4).


I looked around and could not find my answers. Your support is much 
appreciated. Thanks.



Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Fwd: Beamer framebreak

2017-01-12 Thread edgar
Thanks Joon. Yes, I had tried, and did not work. I put it just after and 
just before    Figures  , but it does not work.



Edgar

On 2017-01-11 03:41, Joon Ro wrote:

Second, how do I force a new slide so that the "Figures" block is

not


cut-off on slide 4/4?


Try:

#+BEAMER: framebreak

Best,
Joon


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Fwd: Beamer framebreak

2017-01-14 Thread edgar

Hello eric,


Your org file layout is a little confused.  You have told org that
beamer slides (aka frames) will be level 2 headlines (so level 1
headlines become sections).  Then you, for instance, some content
directly under a level 1 headline which is ignored.  Third level
headlines will become blocks within a frame.


Oh, I didn't know that I could not put raw text after a headline in 
ox-beamer. Thanks.


Currently, it is part of the "Structure and Function" slide because 
your

figures are within a level 3 headline which is converted to a
block.  Put the figures under a second level headline instead.


Mmm... I think that this would mess up my outline. Is there a way to 
create an empty headline? or to hide it in the TOC?



Blocks are 3rd level headlines so put the contents within a 3rd level
headline.
I think that I will have to work with my outline options or something 
too.


Thanks a lot! Sorry for being so noob!



-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Fwd: Beamer framebreak

2017-01-15 Thread edgar

Hello John,


This list is amazing and very happy to help; that said, text/email is

---8< Cut off 
Yes! Thank you very much, and I'm very sorry. I really appreciate it. I 
will prepare a good example (I hope) and send it :) .



Edgar



-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Beamer framebreak

2017-01-17 Thread edgar

Date: Sun, 15 Jan 2017 10:53:27 +
From: Eric S Fraga 
To: 
Subject: Re: [O] Fwd: Beamer framebreak
Message-ID: <87tw90bnmg@ucl.ac.uk>
Content-Type: text/plain; charset="us-ascii"


If you want to use three levels as frames in some places, I would
suggest you make all frames third level.  Second level headlines then
become subsections but you can actually skip form 1st to 3rd level
headlines and the beamer export won't care, e.g.

* section
*** a frame
*** another frame
* second section
** subsection
*** frame


This sounds interesting. I will try. Thanks.



I think you'll find it easier to simply have a consistent layout across
the document.

Thanks again.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Beamer framebreak

2017-01-17 Thread edgar

Date: Sun, 15 Jan 2017 09:22:54 -0600
From: John Hendy 
To: ed...@openmail.cc
Cc: emacs-orgmode 
Subject: Re: [O] Fwd: Beamer framebreak
Message-ID:

Content-Type: text/plain; charset="utf-8"



My personal opinion is while it *looks* like it should work as this
utopian note-taking software that can also spit out presentations from
said content... it hasn't functioned like this in my experience.

Would be nice, right? :) .


- beamer_frame_level has been replaced with H:n, I believe.
   - old tutorial (mentioned):
http://orgmode.org/worg/exporters/beamer/tutorial.html
   - new tutorial (not mentioned):
http://orgmode.org/worg/exporters/beamer/ox-beamer.html

Thanks. I get confused between tutorials many times.


your'e asking why "Notes on project description" and "Notes on project
summary" are on the same slide? They are a list, not headlines, so Org
doesn't recognize them as having anything to do with frames. Org
thinks they are content (bullets).
Ok. You may not believe this, but I was confused about how headlines 
worked, and an asterisk looked like a headline to me (or something). 
Thanks.



adding content :)

"weird sounds from knee bending" is the technical term for "Oh, sh...t!"


Hope that helps some?
It is _really_ great! Thank you very much for all your effort and time 
:) ! I appreciate it a lot.



Cheers!
P.S. Sorry for the late answer. My life is a turmoil right now.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] jit-lock org-goto

2017-01-22 Thread edgar

Hello,

This is not very important, and I apologise in advance for not sending 
all the information that you may need. I was RTFM, and tried `C-c C-j' 
(`org-goto'). Instead of the desired function, I got this in my 
*Messages* stack:



Making org-startup-folded buffer-local while locally let-bound!
run-hooks: Symbol's function definition is void: latex-math-mode
Not enabling jit-lock: it does not work in indirect buffer


I don't care too much about it right now, but it would be nice to know 
why this happens. If you need more information, I can provide it. I just 
don't know what you need :) . Thanks!




-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Beamer framebreak

2017-01-28 Thread edgar

Hey Fabrice,

It's me again. I looked at your (README.org), and I finally understood 
how to force a framebreak! Thank you very much. I feel stupid, because 
it's the same solution which has been around on the Internet, but I 
finally know how to use it. For others who might be interested:


If your heading number 2 (** Heading) creates a slide (look at the 
#+OPTIONS: of your org file. If you have H:2, then this is the case. If 
you have another number after H:, it means that your slides will be 
created with that level of heading. This is all in the manual, honest!), 
then add the property for allowframebreaks,label= 
(https://bitbucket.org/rivanvx/beamer/issue/265/including-frame-label-option-stops):


#+OPTIONS: author:nil H:2
* Heading #1
** Heading #2
  :PROPERTIES:
  # The 0.8 forces the content to fit in 0.8 of the whole slide
  # (without considering navigation bars, etc.)
  :BEAMER_OPT: allowframebreaks=0.8,label=
  :END:
  Your long contents go here (and more than one slides are generated 
automatically)


So, if you try this (doesn't work):
#+OPTIONS: author:nil H:2
* Heading #1
** Heading #2
*** Heading #3
  :PROPERTIES:
  :BEAMER_OPT: allowframebreaks=0.8,label=
  :END:
  Your long contents will be cropped within a single slide

This doesn't work either:
#+OPTIONS: author:nil H:2
* Heading #1
** Heading #2
  :PROPERTIES:
  :BEAMER_OPT: allowframebreaks=0.8,label=
  :END:
*** Heading #3
  Your long contents will be cropped into more than one slide, wherein 
the first slide will possibly be the headline.


Now that I think of it, may be I should turn this into a feature 
request. Is that reasonable? (to force a framebreak when a block 
overflows a slide, resulting in cropped contents).



Edgar

On 2017-01-27 19:34, Fabrice Niessen wrote:

Hello Edgar,


I am new to org-mode, because it seems impressive, and I think that it
will make my life much simpler. Thank you!


You may -- or may not -- be interested by some kind of reference
material I wrote about Org-Beamer.

See https://github.com/fniessen/refcard-org-beamer.

Still partly a WIP, though.



-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] org-ref + ASME

2017-05-20 Thread edgar

Dear Dr. Kitchin and Org-mode mailing list,

I write to you, because I could not find a mailing list for org-ref. 
Thanks for your time.


I am just starting to use org-ref with the hope that my advisor sees the 
advantages of using Emacs (instead of the proprietary word processors). 
I'm a fan of Emacs, but not really good at Lisp (I just steal code from 
others :P ).


I have two questions.

* How to add ASME?
I want to know if there is a way to add the ASME database to org-ref.

I found this: https://github.com/jkitchin/org-ref/issues/148 which hints 
me in the right direction, but I don't know how to make it work.


I am trying with this article:
http://biomechanical.asmedigitalcollection.asme.org/article.aspx?articleid=1427237

What I do is to M-x crossref-add-bibtex-entry, yank the title and do 
RET. I get the right BibTeX entry, but org-ref sends me to:

http://biomechanical.asmedigitalcollection.asme.org/article.aspx?articleid=1427237.full.pdf

whilst the PDF is actually on
http://biomechanical.asmedigitalcollection.asme.org/data/journals/jbendy/27048/101013_1.pdf

I already have the PDF and the last digits 101013 (without _1) seem to 
be the page number.


* How do I avoid downloading the PDF?
The above leads me to the second question: if I already have the PDF, is 
there a way to prevent downloading it again? The obvious answer is: 
"Duh! just drag the PDF onto Emacs!", but if I do it like that, I get 
another issue (already reported on github).


org-ref: Version 1.0.0 (eab601)
GNU Emacs 24.4.1

Thank you in advance! :)

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] :placement documentation imprecise

2017-05-26 Thread edgar

Hello,

I have this in the documentation (M-x org-info)

#+BEGIN_QUOTE
`:float'
`:placement'
 The table environments by default are not floats in LaTeX.  To
 make them floating objects use `:float' with one of the following
 options: `sideways', `multicolumn', `t', and `nil'.  Note that
 `sidewaystable' has been deprecated since Org 8.3.  LaTeX floats
 can also have additional layout `:placement' attributes.  These
 are the usual `[h t b p ! H]' permissions specified in square
 brackets.  Note that for `:float sideways' tables, the LaTeX
 export back-end ignores `:placement' attributes.
#+END_QUOTE

But, if I use sideways alone (not sidewaystable), the table is not 
rotated.


I don't think that this is very important, but I wanted to let you know 
in case that there is some intention to fix it :) .


Thanks for Org-mode!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] :placement documentation imprecise

2017-05-27 Thread edgar
You are right. I'm sorry. It works with :float, but not with :placement. 
I misread the documentation. Thanks for the answer!


On 2017-05-26 23:52, Nicolas Goaziou wrote:

Hello,

ed...@openmail.cc writes:


But, if I use sideways alone (not sidewaystable), the table is not
rotated.


I cannot reproduce it. With the following document

  #+attr_latex: :float sideways
  | a | b |

the table is rotated, according to the following code:

  \begin{sidewaystable}[htbp]
  \centering
  \begin{tabular}{ll}
  \toprule
  a & b\\
  \bottomrule
  \end{tabular}


Regards,


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] how to replace includegraphics?

2017-05-30 Thread edgar

Hello dear list,

* Summary
I want to know if someone could tell me how to replace (the macro, 
function, string) includegraphics for something else when exporting to 
LaTeX. In my case, simplesvg.


* Why
I have my own version of the svg package (I only extracted bits and 
pieces from it long time ago), and I want to make clear for others who 
may use my files that I'm not using includesvg (I could just change the 
definition of simplesvg to includesvg).


* What I have tried
** Stealing from the webz
This does not work. I think that the list doesn't exist in org-mode 
anymore:

#+BEGIN_SRC emacs-lisp
  ;; Export svg (does not work)
  ;; 
https://lists.gnu.org/archive/html/emacs-orgmode/2013-08/msg00221.html
  ;; 
https://github.com/tsdye/tufte-org-mode/blob/master/ox-tufte-latex.el

  (defun my-svg-graphics (contents backend info)
(when (eq backend 'latex)
  (replace-regexp-in-string 
"\\`includegraphics.+\\({.+\.svg}\\)"

"simplesvg\1" contents))
)
  (add-to-list 'org-export-filter-link-functions 'my-svg-graphics)
#+END_SRC

** Looking into org (ox-latex.el)
I found this (around line 2375 in ox-latex.el):
#+BEGIN_SRC emacs-lisp
(when (equal filetype "svg")
  (setq image-code (replace-regexp-in-string "^includegraphics"
 "\\includesvg"
 image-code
 nil t))
  (setq image-code (replace-regexp-in-string "\\.svg}"
 "}"
 image-code
 nil t)))
#+END_SRC

I could just change the code here (simplesvg instead of includesvg), but 
before f\#\#cking up my system, I would like to know if there is another 
alternative.


Thanks, as always :D !

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] how to replace includegraphics?

2017-05-31 Thread edgar

Hello John,


instead of footnotes. Have you considered just changing the definition
in LaTeX instead? [1] [2]
Yes, may be the redaction of my request was not very clear, I'm sorry. I 
did not want to do that, because I foresee that someone may think that 
my \includesvg is the \includesvg from the svg package. However, the two 
do not work in the same way, and may lead to problems.


If my previous e-mail was indeed clear, may be I'm not getting what you 
are trying to say, sorry.


Thank you.


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] how to replace includegraphics?

2017-05-31 Thread edgar

This is what filters are for.  In your case `:filter-link' needs to
have a function that changes `includegraphics' to `simplesvg', if I
get what you want.


Oh! Thanks! I was unaware of this. I'll try :) .


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] exporting LaTeX to ODT with custom symbols

2017-06-03 Thread edgar

Hello hackers,

I'm having some issues when exporting to ODT, and I would like to know 
if someone can help me. I tried my best to describe the problem in the 
the attached tmp.org. I also attach a symbols.tex which has my custom 
symbols.


Thank you for any help.


Edgar


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  * Issue 1: custom symbols not exported
I am trying to export this to ODT without much
success (it exports well to PDF through LaTeX, and
the previews are fine).

This equation is exported correctly:
\[ a = 2 \]

This too.
\[ a = \frac{1}{2} \]

But this isn't.
\[ a = \deriv{x}{X} \]

The definition of deriv{}{} is in
the [[./symbols.tex][attached file]], and the preview seems to work
too (scale and symbol)

* Issue 2: when exported, resolution is unchanged
  I have tried to change the resolution of the
  exported image, but dvipng seems to disregard
  it.

* Configuration:noexport:
  I have this configuration (I just open the
  file). It asks me if I want to apply the "usafe"
  scale variable.
** Emacs configuration
   #+BEGIN_SRC emacs-lisp :results none
 (require 'package)
 (package-initialize)
 (use-package "org")
 (setq org-export-backends '(latex odt))
 (org-babel-do-load-languages 
'org-babel-load-languages  
'((shell . t)
  (emacs-lisp . t)))
   #+END_SRC
*** My system version
#+BEGIN_SRC emacs-lisp
  (org-version)
#+END_SRC

#+RESULTS:
: 9.0.7

#+BEGIN_SRC emacs-lisp
  (emacs-version)
#+END_SRC

#+RESULTS:
: GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
:  of 2015-01-11 on maritornes, modified by Debian

** Cleaning
   Before I do C-c C-e o o, I run this:
   #+BEGIN_SRC shell :results none
 rm -fr ltx{png,img}
   #+END_SRC

** General options
   - Load symbols
 #+LaTeX_HEADER: \input{./symbols.tex}

   - No table of contents
 #+OPTIONS: toc:nil
** Change the resolution of the exported equations (and previews)
   - Export (and preview) the equations as pictures
 The equation looks terrible with
 #+OPTIONS: tex:imagemagick

 There is a decent picture with dvipng, but I
 cannot improve it (uncomment if necessary)
 # #+OPTIONS: tex:dvipng

   - Improve the quality of the pictures (does not work)
 I just want to export; previewing with a
 different scale is an undesired side-effect
 # https://stackoverflow.com/a/20033865
 # Local Variables:
 # org-format-latex-options: (plist-put org-format-latex-options :scale 10 
:foreground default :background default)
 # End:

- This does not work either for the export (it
  does for preview):
 # org-format-latex-options: (:scale 10 :foreground default :background 
default)

- I have also tried with
  M-x customize-variable org-format-latex-options
% * Custom symbols **
% ***
% Change del operator to d (for maxima)
% 
http://tex.stackexchange.com/questions/178946/better-automatic-spacing-of-differential-d
\renewcommand{\d}[1]{\mathop{\mathrm{d}{#1}}\!{}}
\newcommand{\del}[1]{\d{\left(#1\right)}}
\newcommand{\diff}[2]{
  \frac{\d{}}{\d{#2}}
  \left(#1\right)}
\newcommand{\deriv}[2]{
  \frac{\del{#1}}{\d{#2}}}


Re: [O] exporting LaTeX to ODT with custom symbols

2017-06-06 Thread edgar

On 2017-06-05 07:00, ed...@openmail.cc wrote:

I managed to get the special symbols by

1. M-x customize-variable org-preview-latex-process-alist
2. Doing [Ins] into the dvipng (or imagemagick) section
3. typing :latex-header in the Key: field
4. typing "\\input{./symbols.tex}" in the Value: field



Not working for other symbols. Sorry...

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] How to export LaTeX amsmath align bmatrix to ODT?

2017-06-10 Thread edgar

Hello,

I have been making progress with my export procedure to ODT. I would 
like to know if someone knows how to export the following LaTeX block to 
ODT correctly:


\[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4 \end{bmatrix} 
\end{align}\]


\[\begin{align}  a = & 1 + 2 + 3 + 4 \\ c = &  4 \end{bmatrix} 
\end{align}\]


As always, any help is welcome :) .


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] How to export LaTeX amsmath align bmatrix to ODT?

2017-06-10 Thread edgar

On 2017-06-10 04:54, ed...@openmail.cc wrote:

Hello,

I have been making progress with my export procedure to ODT. I would
like to know if someone knows how to export the following LaTeX block
to ODT correctly:

\[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4
\end{bmatrix} \end{align}\]
https://www.vfemail.net/roundcube/?_task=mail&_action=compose&_id=289067995593b7fd683a1f#
\[\begin{align}  a = & 1 + 2 + 3 + 4 \\ c = &  4 \end{bmatrix} 
\end{align}\]


As always, any help is welcome :) .


Edgar


By the way, I tried with latexmlmath and mathtoweb.jar without success.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] How to export LaTeX amsmath align bmatrix to ODT?

2017-06-12 Thread edgar

On 2017-06-10 05:13, ed...@openmail.cc wrote:

On 2017-06-10 04:54, ed...@openmail.cc wrote:

Hello,

I have been making progress with my export procedure to ODT. I would
like to know if someone knows how to export the following LaTeX block
to ODT correctly:

\[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4
\end{bmatrix} \end{align}\]
https://www.vfemail.net/roundcube/?_task=mail&_action=compose&_id=289067995593b7fd683a1f#
\[\begin{align}  a = & 1 + 2 + 3 + 4 \\ c = &  4 \end{bmatrix} 
\end{align}\]


As always, any help is welcome :) .


Edgar


By the way, I tried with latexmlmath and mathtoweb.jar without success.


Ok. I got it (with a minor glitch). If someone can help me to get the 
right colors on the screen (my screen is black; the \tensor symbol is 
also black), I would appreciate it. Now I can export to ODT with my 
custom symbols and the bmatrix environment.


For the record, I had modified org-preview-latex-process-alist to get 
custom symbols, and this got in the way of the LaTeX bmatrix environment 
(I don't know how; I was loading a file with with :latex-header as 
"\\input{preamble.tex}").


My partial answer (it is partial, because the \tensor preview renders in 
a different color than the rest of symbols): Instead of modifying 
org-preview-latex-process-alist, the answer I modified 
org-format-tex-header. I added the following at the end of M-x 
customize-variable org-format-tex-header (I leave it here for posterity; 
I added some symbols: tensor, derivative, vector, Roman numeral, etc.)


\usepackage{stackengine}
\stackMath
% Does not work
% \newcommand\tenq[2]{%
% \def\useanchorwidth{T}%
%  \ifnum#1>1%
%
\stackunder[0pt]{\tenq[\numexpr#1-1\relax]{#2}}{\scriptscriptstyle\sim}%

%  \else%
%\stackunder[1pt]{#2}{\scriptscriptstyle\sim}%
%  \fi%
%}

% Change del operator to d
% 
http://tex.stackexchange.com/questions/178946/better-automatic-spacing-of-differential-d

\renewcommand{\d}[1]{\mathop{\mathrm{d}{#1}}\!{}}
\newcommand{\del}[1]{\d{\left(#1\right)}}
\newcommand{\diff}[2]{
  \frac{\d{}}{\d{#2}}
  \left(#1\right)}
\newcommand{\deriv}[2]{
  \frac{\del{#1}}{\d{#2}}}

% https://tex.stackexchange.com/a/229547
\renewcommand{\vec}[1]{
  \hbox{\oalign{$#1$\crcr\hidewidth$\scriptscriptstyle\sim$\hidewidth}}}
% --- Define \dvec and \ddvec for dotted and double-dotted vectors.
\newcommand{\dvec}[1]{\dot{\vec{#1}}}
\newcommand{\ddvec}[1]{\ddot{\vec{#1}}}

% 
https://tex.stackexchange.com/questions/229543/double-tilde-symbol-under-letter

\newcommand{\dtens}[1]{
  
\stackunder[0pt]{\stackunder[1pt]{#1}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}}


\newcommand{\ftens}[1]{
  
\stackunder[0pt]{\stackunder[0pt]{\stackunder[0pt]{\stackunder[1pt]{#1}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}

}

% Define \tensor and \mtensor (matrix)
\newcommand{\tensor}[1]{\dtens{#1}}
\newcommand{\tens}[1]{\ftens{#1}}

\newcommand{\mtensor}[1]{%
  \left[{\tensor{#1}}\right]}
% --- Define \dtens and \ddtens for dotted and double-dotted tensors.
\newcommand{\dtens}[1]{\dot{\tensor{#1}}}
\newcommand{\ddtens}[1]{\ddot{\tensor{#1}}}
% --- Define \dmtens and \ddmtens for dotted and double-dotted tensors.
\newcommand{\dmtens}[1]{\dot{\mtensor{#1}}}
\newcommand{\ddmtens}[1]{\ddot{\mtensor{#1}}}

% Trace
\newcommand{\Tr}[1]{\mathop{\mathrm{tr}}\!{}\left(#1\right)}

% Have a thicker line for the mean value
%\newcommand*{\mean}[1]{\overbracket[0.65pt][-1pt]{#1}}
% amssymb, amsmath
% adapt: 
http://tex.stackexchange.com/questions/22100/the-bar-and-overline-commands
\newcommand{\mean}[1]{\mkern 
3mu\overbracket[0.65pt][-1pt]{\mkern-3mu#1\mkern-3mu}\mkern 3mu}


% Roman number III
\def\III{I\hspace{-2pt}I\hspace{-2pt}I}

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] org-table export to ods/xlsx etc

2017-06-17 Thread edgar

Message: 19
Date: Fri, 16 Jun 2017 10:25:55 +
From: Uwe Brauer 
To: emacs-orgmode@gnu.org
Subject: [O] org-table export to ods/xlsx etc
Message-ID: <87fuf0i5zg@mat.ucm.es>
Content-Type: text/plain

I am sometimes in need to send my org-table spreadhseets to colleagues
who are using (sigh) excel. I thought sending csv would be enough but 
it

turns out,
I want to join you in that *deep* sigh! and thank you for your 
contribution. I may eventually have to use it.



(defun org-table-export-to-xlsx ()
  (interactive)
  (let* ((source-file  (file-name-sans-extension (buffer-file-name
(current-buffer
 (csv-file (concat source-file ".csv")))
(org-table-export csv-file "orgtbl-to-csv")
(org-odt-convert csv-file "xlsx")))


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] THANK YOU!

2017-06-17 Thread edgar
I just want to thank everyone. I really appreciate all the effort that 
everyone has put into making Emacs and Org-mode. I may be in love with 
this software!



Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] How to export LaTeX amsmath align bmatrix to ODT?

2017-06-17 Thread edgar
Check out org-format-latex-options.  I have, for the same or similar 
scenario:


#+begin_src emacs-lisp
  (setq org-format-latex-options
'(:foreground "white" :background "black" :scale 3
  :html-foreground "Black" :html-background 
"Transparent"

  :html-scale 1.0
  :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")))
#+end_src


Thanks, Eric. Unfortunately, that did not work. It does change the 
background and foreground colors, but the \tensor symbol is now 
"invisible" (it is black, and the background is also black). The rest of 
the equation looks fine.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: > Citations with org-ref in apa style)

2017-06-17 Thread edgar

Hello Lars,

I am a beginner with Emacs, so my advice may not be very good. I assume 
that you are using org-ref (I missed part of the conversation). I have 
no problems with PDF and References (well, except that I don't know how 
to set an independent headline. I know this is not clear, but I won't 
hijack your post).



If I want HTML export with citations, I need to use
`bibliography:ref.bib' at the end, where I want the list of
references. However, when exporting to pdf, it works only if I have
\printbibliography at the end. If I use bibliograph:ref.bib, I get the


In my Org file, I have this at the end:

   bibliographystyle:unsrt
   bibliography:../References.bib

 I have no #+LATEX_HEADER, but I tried this with a clean Emacs (emacs 
-Q; you may need to evaluate line by line), and it works for me:


my_file.org
=
#+BEGIN_SRC emacs-lisp
  (require 'package)
  (package-initialize)
  (require 'org)
  (require 'org-ref)
  (require 'ox-latex)

  (setq org-latex-pdf-process
'("pdflatex -interaction nonstopmode -output-directory %o %f"
  "bibtex %b"
  "pdflatex -interaction nonstopmode -output-directory %o %f"
  "pdflatex -interaction nonstopmode -output-directory %o %f"))
#+END_SRC

* My first section
  According to cite:SmartGuy17, this should work!

* I want this to say "References"
  I don't need this to say References again:
  bibliographystyle:unsrt
  bibliography:References.bib
=

References.bib
=
@article{SmartGuy17,
  author =   {A. Smart and Handsome Guy},
  title ={Enjoying Emacs and Org-mode},
  journal =  {Hacking Accounts of Freedom},
  volume =   {2},
  number =   {4},
  pages ={1858-1894},
  year = {2017},
}
=

I hope that this helps :) . Good hacking!

Org mode version 9.0.7
GNU Emacs 24.4.1
org-ref: Version 0.9.0

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] How to export LaTeX amsmath align bmatrix to ODT?

2017-06-17 Thread edgar

Message: 27
Date: Sat, 17 Jun 2017 16:56:37 +0100
From: Eric S Fraga 
To: emacs-orgmode@gnu.org
Subject: Re: [O] How to export LaTeX amsmath align bmatrix to ODT?
Message-ID: <871sqiehfu.fsf@t3610>
Content-Type: text/plain; charset="us-ascii"

Strange.  Maybe post an ECM for others to experiment with?

Hello Eric,

What is an ECM and how do I produce it? (this is a honest question).


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: Citations with org-ref in apa style)

2017-06-17 Thread edgar

Message: 25
Date: Sat, 17 Jun 2017 02:25:56 +
From: ed...@openmail.cc
To: emacs-orgmode@gnu.org
* I want this to say "References"
   I don't need this to say References again:
   bibliographystyle:unsrt
   bibliography:References.bib

Hello Lars,

I also found M-x org-ref-help useful (go to ** biblatex users).


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: > Citations with org-ref in apa style)

2017-06-21 Thread edgar

On 2017-06-18 20:38, John Kitchin wrote:

https://tex.stackexchange.com/questions/17445/how-can-i-change-the-references-to-reference-in-the-thebibliography-environm
# This makes the bibliography section title empty and un-numbered
#+latex: \renewcommand{\bibsection}{\subsection*{}}

* References
bibliographystyle:unsrt
bibliography:References.bib

Thanks, I solved it by switching to BibLaTeX, as described in M-x 
org-ref-help :)




-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] :noweb from external file

2017-06-22 Thread edgar

Hello,

I would like to know if someone knows how I can achieve something
like this (importing a block of code from another file):

Definition of the original code:

../dir1/file1.org
==
#+NAME: py-numpy
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none
import numpy as np
from matplotlib import pyplot as pl
#+END_SRC
==


I would like something like this:

../dir2/file2.org
==
#+NAME: py-noweb
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none :noweb yes
<<../dir1/file1.org::py-numpy>>
#+END_SRC
==


Right now, I can only do it like this:

../dir2/file3.org
==
#+INCLUDE: ../dir1/file1.org::py-numpy
#+NAME: py-noweb
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none :noweb yes
<>
#+END_SRC
==

I know that there is Library of Babel, but I don't know
how to use it (I installed it through ELPA). The documentation
mentions a ~doc~ directory, but I don't have such a directory in
~/.emacs.d/elpa/org-*/. Besides, it may be that I don't always
want to store my functions in the library.

Thanks!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] :noweb from external file

2017-06-24 Thread edgar

On 2017-06-22 22:08, ed...@openmail.cc wrote:


Right now, I can only do it like this:

../dir2/file3.org
==
#+INCLUDE: ../dir1/file1.org::py-numpy
#+NAME: py-noweb
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none :noweb yes
<>
#+END_SRC
==



I'm sorry. This is not working either. I am not trying to waste your 
time, I promise: it was working at some point.


Thanks again.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Fwd: Re: How to export LaTeX amsmath align bmatrix to ODT?

2017-06-24 Thread edgar

I forgot to send this to the list. Sorry.

 Original Message 
Subject: Re: How to export LaTeX amsmath align bmatrix to ODT?
Date: 2017-06-15 22:57
From: ed...@openmail.cc
To: Nicolas Goaziou 

Hello Nicolas,

Thank you for your help. My comments are under each block:

On 2017-06-14 14:10, Nicolas Goaziou wrote:

Hello,



On 2017-06-10 05:13, edgar wrote:

On 2017-06-10 04:54, edgar wrote:

Hello,

I have been making progress with my export procedure to ODT. I would
like to know if someone knows how to export the following LaTeX 
block

to ODT correctly:

\[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4
\end{bmatrix} \end{align}\]
https://www.vfemail.net/roundcube/?_task=mail&_action=compose&_id=289067995593b7fd683a1f#
\[\begin{align}  a = & 1 + 2 + 3 + 4 \\ c = &  4 \end{bmatrix}
\end{align}\]


I'm a bit lost here. In particular, I'm able to export the example 
above

out-of-the-box, provided I add "#+options: tex:dvipng" or some such in
the document.



Yes, indeed, without modifying any variable, the code exports correctly, 
but I had modified org-preview-latex-process-alist to include my 
symbols.tex file like this:


On 2017-06-05 07:00, edgar wrote:

I managed to get the special symbols by

1. M-x customize-variable org-preview-latex-process-alist
2. Doing [Ins] into the dvipng (or imagemagick) section
3. typing :latex-header in the Key: field
4. typing "\\input{./symbols.tex}" in the Value: field

After I did that, some symbols would export correctly, but others would 
not. I was not importing any LaTeX packages within that file. I use this 
file to export PDF (through LaTeX: C-c C-e l p). One of the things that 
did not work was the matrix environment. I thought that it was better to 
start a new question regarding the matrix, because I thought it was 
independent of the symbols.


This is related to the following:


For the record, I had modified org-preview-latex-process-alist to get
custom symbols, and this got in the way of the LaTeX bmatrix
environment (I don't know how; I was loading a file with
with :latex-header as "\\input{preamble.tex}").

My partial answer (it is partial, because the \tensor preview renders
in a different color than the rest of symbols): Instead of modifying
org-preview-latex-process-alist, the answer I modified
org-format-tex-header. I added the following at the end of M-x
customize-variable org-format-tex-header (I leave it here for
posterity; I added some symbols: tensor, derivative, vector, Roman
numeral, etc.)


I don't think you need to modify `org-format-latex-header' at all. 
There

is `org-latex-packages-alist' for that.
I don't really know how to modify org-latex-packages-alist to have a 
latex command like this in my tex file:


\newcommmand{\mysymbol}[1]{\mathrm{my_{#1}}}

I do have a bunch of packages with custom options over there :P !



So, is there a bug in the ODT export back-end? If so, could you post an
ECM? Loads of LaTeX code doesn't help understanding the issue.

I think that the only bug is that I don't know how to use it very well 
;) . I don't know what a ECM is :S , sorry. I typed ECM emacs on a web 
search engine, and only got ECB. Is it the same? If you are willing to 
tell me how to get one, I'll do my best.


Right now, I am having a glitch on the screen. I get some of my custom 
symbols in black (all the others are in light gray) on a black 
background (my screen has a black background; see attached picture: 
there is an I with two tildes underneath next to the p). I would like to 
know if you or someone else can help me to get a light gray on that 
symbol too. I suspect that it may have to do with the stackengine 
(LaTeX) package, because all of my other symbols are doing well. This is 
the snippet of code that I have in org-format-latex-header to define the 
\tensor symbol


\newcommand{\tensor}[1]{
  
\stackunder[0pt]{\stackunder[1pt]{#1}{\scriptscriptstyle\sim}}{\scriptscriptstyle\sim}}


I also opened a new emacs with -Q, did a (require 'org), yanked my 
configuration of org-format-latex-header and created a new Org file. 
Then, changed the theme to a dark one and I typed $\tensor{F}$ $a$. For 
the $\tensor{F}$ I get a white square with a black font face. For the 
$a$ I get the same set of colors as the theme (dark background, 
light-gray font face).


Thank you a lot for you time!


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  

org-ltximg_968041b7b2f6ea14aa6a6df6b779409cb85988b9.png
Description: Binary data


Re: [O] exporting LaTeX to ODT with custom symbols

2017-06-24 Thread edgar

On 2017-06-05 07:00, ed...@openmail.cc wrote:

On 2017-06-04 09:36, Nicolas Goaziou wrote:

You may want to try tweaking `org-preview-latex-process-alist'.


Thanks. This helped!

I leave this in case that it may be useful to others (one thing
worked, the other didn't):

I managed to get the special symbols by

1. M-x customize-variable org-preview-latex-process-alist
2. Doing [Ins] into the dvipng (or imagemagick) section
3. typing :latex-header in the Key: field
4. typing "\\input{./symbols.tex}" in the Value: field

I can also change the resolution of the pictures, if I manually set
the density in the :image-converter option, but the size changes. To
fix it, I tried by

1. adding -scale 50\% at the end of the imagemagick (convert) string
2. modifying the value of :image-size-adjust, and
3. changing the scale in org-format-latex-options

, but that did not help. I don't care too much about the resolution. I
can live with the output of dvipng.

Thanks again!


For posterity (read only if you are looking for a custom answer):

I noticed that using the :latex-header option in 
org-preview-latex-process-alist, disables the regular heading (created 
through org-format-latex-header, may be?). It replaces the heading 
(document class, packages, etc.) with whatever the :latex-header line 
states. This possibly means that one could create a custom _full_ header 
(with document class, any other package and customisation), and load it 
by means of :latex-header to see previews and exporting to ODT. This is 
just an idea. I hope it helps someone.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Fwd: Re: How to export LaTeX amsmath align bmatrix to ODT?

2017-06-26 Thread edgar

On 2017-06-25 21:11, Nicolas Goaziou wrote:
I fixed a bug in "ox-odt.el". Now, when using convertion to png, you 
can

add

 #+latex_header: \newcommmand{\mysymbol}[1]{\mathrm{my_{#1}}}

Hopefully, it should solve, at least partly, your issue.

Hey! That's great! Thank you very much.


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] :noweb from external file

2017-07-01 Thread edgar

On 2017-07-01 06:53, ed...@openmail.cc wrote:

* Contribution: Script to convert directory with source to an org-file
So, by now, everybody knows that I don't understand squat about lisp.
Yet, I created a little bash script (for which there may be an
alternative already) to convert a directory with source files (in
Python) to source blocks within an Org file. It should be easily
adaptable to other languages. I hope that it is useful to someone. See
attachment.



Oops, missed the name file in the awk line

modified   dir-to-org-babel.org
@@ -58,7 +58,7 @@ load into the Library of Babel by doing
   while IFS= read -r -d '' file; do
   # *** Print file only if it has code
   #  Get number of lines with awk
-  numl=$(awk 'END{print NR}')
+  numl=$(awk 'END{print NR}' "$file")
   if [[ "$numl" -gt 0 ]]; then
   # *** Print the file names (in quotation
   # format; with spaces like \ )

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] :noweb from external file

2017-07-01 Thread edgar

On 2017-06-24 06:03, ed...@openmail.cc wrote:

On 2017-06-22 22:08, ed...@openmail.cc wrote:


Right now, I can only do it like this:

../dir2/file3.org
==
#+INCLUDE: ../dir1/file1.org::py-numpy
#+NAME: py-noweb
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none :noweb yes
<>
#+END_SRC
==



I'm sorry. This is not working either. I am not trying to waste your
time, I promise: it was working at some point.

Thanks again.


* Contribution: Script to convert directory with source to an org-file
So, by now, everybody knows that I don't understand squat about lisp. 
Yet, I created a little bash script (for which there may be an 
alternative already) to convert a directory with source files (in 
Python) to source blocks within an Org file. It should be easily 
adaptable to other languages. I hope that it is useful to someone. See 
attachment.


* Question
The reason for which I reply to this thread is that it can serve in the 
case that one wishes to use (org-babel-lob-ingest "path/to/file.org"). I 
would like to know if loading such a file every time I start Emacs (with 
my init file) will slow the startup. Thanks, and sorry if it is a stupid 
question.


* Request (or how to, if exists)
Does anybody know how to achieve this?:
- inherit fill-column When C-c ' to edit source

  it would be nice if the new temporary buffer
  had the same fill-column as the one that
  spawns it

Thanks for this too.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  This code helps to convert a directory with Python
files into an org-mode file with code
blocks. Change the value of :dir if you want
another path. Do ~C-c C-c~ or ~C-c C-v C-e~
(~org-babel-execute-maybe~) on the next block. It
will (hopefully) generate a file named
*code-blocks.org* which you could (possibly) use to
load into the Library of Babel by doing
~M-:(org-babel-lob-ingest "path/to/file.org")~

#+HEADER: :results none
#+BEGIN_SRC bash :dir ./
  #!/bin/bash
  # * Set a general configuration
  cat << EOF > code-blocks.org;
  All my functions are in this file. If you want
  to create individual files, run
  ~M-x org-babel-tangle~.
  Make sure that there is a directory for each heading.

  ,* License
  EOF
  cat LICENSE.txt >> code-blocks.org
  cat <> code-blocks.org

  ,* Configuration   :noexport:ARCHIVE:

  When exporting, print table of contents,
  author and date
  ,#+OPTIONS: toc:t author:t date:t

  When opening this file, visually indent lines
  according to headers
  ,#+STARTUP: indent hidestars

  By default, set Python blocks to run with Python 3,
  do not evaluate when exporting (quick) and work
  in a dedicated session.
  ,#+PROPERTY: header-args:python ":python python3 :eval no-export :session


  EOF
  printf "* Code to generate this file\n" >> code-blocks.org;
  cat dir-to-org-babel.org >> code-blocks.org;
  printf "\n" >> code-blocks.org;
  # * Loop over the contents of the current
  # directory (having two nested while IFS... seemed
  # too much, but may be a more efficient way)
  for dir in *; do
  # ** Make sure that we will look into directories
  if [[ -d "$dir" ]] && [[ ! "$dir" =~ "Moose" ]]; then
  # *** Make the name of the sub-dir a heading
  printf "* $dir\n";
  # ** Loop over the files of the current sub-dir
  # https://stackoverflow.com/a/301059 this
  # is safe (requires that ~find~ can use
  # ~-print0~)
  while IFS= read -r -d '' file; do
  # *** Print file only if it has code
  #  Get number of lines with awk
  numl=$(awk 'END{print NR}')
  if [[ "$numl" -gt 0 ]]; then
  # *** Print the file names (in quotation
  # format; with spaces like \ )
  printf '** %q\n' "${file##./}" |
  sed "s-$dir/--";
  # *** Print a name for the block,
  # substitute slashes with dashes,
  # remove ./
  #  Create prototype for name
  a=py-$(printf "$file" |
sed 's_\./__g; s_/_-_g')
  #  Print name header
  printf "#+NAME: $a\n"
  # *** Print a caption for the block
  # (use same prototype as the name)
  printf "#+CAPTION: $a\n";
  # *** Print start of the block
  printf "#+BEGIN_SRC python :tangle $file\n";
  cat "$file";
  # *** Print end of block
  printf "#+END_SRC\n\n";
  else
  printf "\n";
  fi;
  done < <(#  List all files that end

[O] :noweb & library of babel

2017-07-03 Thread edgar

Hello,

I would like to know if someone can help me, please.

1. I currently have a file called
code-blocks.org. Let us say that it has something
like this:

code-blocks.org
==
* Routines
** numpy_import.py
#+NAME: py-Routines-numpy_import.py
#+CAPTION: py-Routines-numpy_import.py
#+BEGIN_SRC python :results none :noweb yes :tangle 
Routines/numpy_import.py

  # Numerical package
  import numpy as np
  # Plots
  from matplotlib import pyplot as pl
#+END_SRC

* Test
** simple.py
#+NAME: py-Test-simple_damage.py
#+CAPTION: py-Test-simple_damage.py
#+HEADER: :var fname="steps.csv"
#+HEADER: :dir "../Data/Raw"
#+HEADER: :exports none :results none
#+BEGIN_SRC python :noweb yes :tangle ./Damage/simple_damage.py :session
<>
#+END_SRC
==

2. I load it into the library of babel with
~org-babel-lob-ingest~ (~C-c C-v i~).

3. Then, I have another file called tjp.org, which
may look something like this (please, read the contents):

tjp.org
==
* My tasks
** Go here
   - [X] This is a working example

 The following block works well: I can issue
 C-c C-c, C-c C-v v and the contents are
 parsed correctly.

 #+HEADER: :exports none :results none :eval no-export
 #+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
   <>
 #+END_SRC

   - [-] This does not work

 If I do C-c in the following block

 #+HEADER: :exports none :results none :eval no-export
 #+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
   <>
 #+END_SRC

 I get an error:
 #+BEGIN_EXAMPLE
   File "", line 2
   <>
^
   SyntaxError: invalid syntax
 #+END_EXAMPLE

 If I do C-c C-v v, I see this:
 #+BEGIN_EXAMPLE
   <>
 #+END_EXAMPLE

   - [ ] If I put all the blocks in the same file,
 everything works.
==

Does anybody know what I am doing wrong? Thanks :) .


#+BEGIN_SRC elisp
  (emacs-version)
#+END_SRC

#+RESULTS:
: GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
:  of 2015-01-11 on maritornes, modified by Debian

#+BEGIN_SRC elisp
  (org-version)
#+END_SRC

#+RESULTS:
: 9.0.9

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Emacs-orgmode Digest, Vol 137, Issue 4

2017-07-05 Thread edgar

Date: Tue, 04 Jul 2017 09:54:13 +0100
From: Eric S Fraga 

I may be wrong but I thought that the library of babel provides a means
of calling (#+CALL: or inline) the codes in the library but not
necessarily use noweb to include them in other codes?


Oh! interesting. I have been calling functions like
#+BEGIN_SRC python :noweb yes :dir "../Data/Raw"
<>
#+END_SRC

with partial success (without "nesting"--calling a block with a 
reference to yet another block). I guess that "nested" calling of Noweb 
blocks is not really possible. Thank you for the answer :)


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] org-plus-contrib, where is library-of-babel.org?

2017-07-07 Thread edgar

Date: Thu, 06 Jul 2017 05:55:01 -1000
From: "Thomas S. Dye" 
Subject: Re: [O] org-plus-contrib, where is library-of-babel.org?
Message-ID: 

I'm wondering where to find library-of-babel.org in the ELPA
distribution of Org mode, org-plus-contrib.
The only thing that I could do was create a file and load it every time 
with ~org-babel-lob-ingest~. I hope that helps you, and that you get 
your answer. I am also interested to know.


P.S. sorry for my last reply to the Org-mode mailing list. I should have 
checked the subject.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] sideways table

2017-07-09 Thread edgar

Date: Fri, 07 Jul 2017 18:20:27 +0100
From: Sharon Kimble 
Subject: [O] sideways table
Message-ID: <87k23kgo4k@skimble.plus.com>

So how can I use 'sideways' with a table please? Its not clear exactly
what to do from the org-mode manual, and google doesn't provide any
solutions either.

Thanks
Sharon.
I know that this is not your question, but I suggest that you take 
another approach. You will eventually have a long table which is longer 
than a single page, and combining that with :float sideways is not going 
to help you (did not work for me in the past). I attach a working 
example that you might find useful. It includes the implementation with 
booktabs, if you want.


I think that the only thing that you are missing is loading booktabs: 
#+LATEX_HEADER: \usepackage{booktabs}


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  #+STARTUP: indent
#+LATEX_HEADER: \usepackage{tabu}
* Long portrait table
#+CAPTION: Long portrait table.
#+ATTR_LATEX: :environment longtabu :align cXX
| Symbol | Meaning   | Expression   

  |
|+---+|
|+---+|
|| *General* |  

  |
| $\Psi$ | Helmholtz free energy density | 
$\Psi_{m}\left(D_{m},I_{1},I_{3}\right) + 
\Psi_{f}\left(D_{f},D_{int},I_{4}\right) + \Psi_{m}\left(I_{1}, I_{2}, I_{3}, 
I_{4}, I_{5}, D_{int}\right) + \Psi_{D}\left(a\right)$ |

* Long landscape table
#+LATEX_HEADER: \usepackage{pdflscape}
#+BEGIN_landscape
#+CAPTION: Long landscape table
#+ATTR_LATEX: :environment longtabu :align cXX
| Symbol | Meaning   | Expression   

  |
|+---+|
|+---+|
|| *General* |  

  |
| $\Psi$ | Helmholtz free energy density | 
$\Psi_{m}\left(D_{m},I_{1},I_{3}\right) + 
\Psi_{f}\left(D_{f},D_{int},I_{4}\right) + \Psi_{m}\left(I_{1}, I_{2}, I_{3}, 
I_{4}, I_{5}, D_{int}\right) + \Psi_{D}\left(a\right)$ |
#+END_landscape

* table with colors
# https://emacs.stackexchange.com/a/30306
#+LATEX_HEADER: \usepackage[table]{xcolor}
#+CAPTION: Table with colors.
| hi   | there  |
|--+|
| this | @@latex:\cellcolor{blue!25}@@ that |
| one  | two|

* Sideways table with colors
Note that, by itself, you would need the header from [[*table with 
colors][table with
colors]]
#+CAPTION: Sideways table with colors.
#+ATTR_LATEX: :float sideways
| hi   | there  |
|--+|
| this | @@latex:\cellcolor{blue!25}@@ that |
| one  | two|

* Booktabs table
#+LATEX_HEADER: \usepackage{booktabs}
#+CAPTION: Booktabs table.
#+ATTR_LATEX: :booktabs t
| hi   | there  |
|--+|
| this | @@latex:\cellcolor{blue!25}@@ that |
| one  | two|

* Sideways table with booktabs
Remember to load booktabs as in [[*Booktabs table][Booktabs table]]
#+CAPTION: Sideways table with booktabs.
#+ATTR_LATEX: :float sideways :booktabs t
| hi   | there  |
|--+|
| this | @@latex:\cellcolor{blue!25}@@ that |
| one  | two|

* Longtabu with sideways  

[O] [Feature request] LaTeX blocks preview

2017-08-14 Thread edgar

Hello,

I would like to ask if it is possible to preview latex blocks. Something 
like this (replace EXPORT with SRC, if you wish):


#+BEGIN_EXPORT latex
\begin{align}
  I_{0}
  & > \max{(\lambda_{f}^{2})}
  \\
  & > 2^{2}
  \\
  I_{0} & > 4
\end{align}
#+END_EXPORT

to be previewed in the same way as

\begin{align}
  I_{0}
  & > \max{(\lambda_{f}^{2})}
  \\
  & > 2^{2}
  \\
  I_{0} & > 4
\end{align}

- Rationale :: the LaTeX blocks have improved highlighting and editing 
commands than pure Org-mode, they can be folded (hidden?) in Org-mode 
and some extra options can be activated when exporting. Many times, it 
is needed to preview the equations before actually exporting.


- Related ::
  - org-edit-latex-mode
There is org-edit-latex-mode, but it requires  some extra work:
1. org-edit-special (C-')
2. org-edit-latex-preview-at-point (C-c C-p C-p)
3. org-edit-src-exit (C-')

Besides, the preview does not stay in the original Org-mode buffer, 
but it's lost with step 3.


Please? Thank you!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] bibtex setup .dir-locals.el

2018-10-28 Thread edgar

Hello,

I would like to know how to set my ~References.bib~ as a dir-local 
variable for use with bibtex (org-ref, reftex). I have this in my 
~.dir-locals.el~. It keeps showing the global list of references. 
Thanks!


#+BEGIN_SRC emacs-lisp
  ;;; Directory Local Variables
  ;;; For more information see (info "(emacs) Directory Variables")

  (
   (org-mode
(reftex-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(bibtex-completion-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-bibliography-notes . 
"/Class/Biomat/Hw/Project/report-biomat.org")
(bibtex-completion-notes-path . 
"/Class/Biomat/Hw/Project/report-biomat.org")

(org-ref-pdf-directory . "/Class/Biomat/Hw/Project/Media/")
(bibtex-completion-library-path . "/Class/Biomat/Hw/Project/Media/")
)

   (bibtex-mode
(reftex-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(org-ref-default-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))
(bibtex-completion-bibliography . 
("/Class/Biomat/Hw/Project/References.bib"))


(org-ref-bibliography-notes
 .
 "/Class/Biomat/Hw/Project/report-biomat.org")

(bibtex-completion-notes-path
 .
 "/Class/Biomat/Hw/Project/report-biomat.org")

(org-ref-pdf-directory
 .
 "/Class/Biomat/Hw/Project/Media/")

(bibtex-completion-library-path
 .
 "/Class/Biomat/Hw/Project/Media/")
  )
   )
#+END_SRC

As an example:
#+BEGIN_EXAMPLE
  reftex-default-bibliography is a variable defined in ‘reftex-vars.el’.
  Its value is
  ("/Class/Biomat/Hw/Project/References.bib")
  Original value was nil
  Local in buffer report-biomat.org; global value is
  ("//Research/References.bib")

This variable’s value is directory-local, set by the file
‘/Class/Biomat/Hw/Project/.dir-locals.el’.

  Documentation:
  List of BibTeX database files which should be used if none are 
specified.

  When ‘reftex-citation’ is called from a document which has neither a
  ‘\bibliography{..}’ statement nor a ‘thebibliography’ environment,
  RefTeX will scan these files instead.  Intended for using 
‘reftex-citation’
  in non-LaTeX files.  The files will be searched along the BIBINPUTS or 
TEXBIB

  path.

  You can customize this variable.
#+END_EXAMPLE

My system
#+BEGIN_SRC emacs-lisp
  (concat
   (emacs-version) "\n"
   (org-version) "\n"
   (org-ref-version))
#+END_SRC

#+RESULTS:
: GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
:  of 2018-07-05
: 9.1.14
: org-ref: Version 1.1.1

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] bibtex setup .dir-locals.el

2018-11-01 Thread edgar

On 2018-10-31 15:27, John Kitchin wrote:

You do have to close the org-file, and then reopen it after you make
that file, and when I do that I am prompted whether to apply or ignore
the settings.


Oh! may be I need to re-open the file. I tried with reloading dir-local 
variables and reverting the buffer.



It might be simpler to just use a bibliography link in the file though:

bibliography:References.bib


Yes, I used to have \addbibresource{References.bib}, but I wanted to 
have the whole configuration on the .dir-locals.el file. I guess that 
bibliography:References.bib is more general.


Thank you very much, Dr. Kitchin!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] No LaTeX label when using :mode math #+NAME with table

2019-05-11 Thread edgar
I had to add :math-suffix  to get a label in the exported TeX 
file (shown below), otherwise, there is no label. If I am the only one 
affected, disregard this message. I may not be able to answer in some 
days.


#+NAME: tbl-arbitrary-factors
#+CAPTION: Simplification of model parameters.
#+ATTR_LATEX: :mode math :environment align* :math-suffix 
\label{tbl-arbitrary-factors}
| a_{2} = \alpha\,10^{7}   || , || 
\frac{b_{2}}{3} = a_{2}|| , || \frac{d_{2}}{6.5} 
= a_{2}  |
| c_{2} = \beta\,10^{7}|| , || 
g_{n} = \frac{g_{n}^{\max}}{1 + \beta} || , || g_{n}^{\max} = 
0.55, 0.3, 0.15 |
| k_{0}=\kappa\,\frac{10^{-9}}{\gamma_{\text{H}_{2}\text{O}}}  || , || 
\tau_{n} = \frac{\tau_{n}^{\max}}{1 + \kappa}  || , || \tau_{n}^{\max} = 
20, 100, 200 |


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Unrelated Babel blocks interfering

2019-05-23 Thread edgar

Hi!

I don't know if I am doing something wrong, if this is a feature or a 
bug. Emacs asks me to assign a value to variable "10" when running Emacs 
26.2 with GTK 3.24.8 and Org 9.1.14 in GNU/Linux (running as emacs -q). 
Try to preview (org-babel-expand-src-block C-c C-v v) the block called 
dic_max_vals2straight_line_febpts_blk.py below (seems related to the ~# 
USE 0.1 * \Psi~ part). Please, reply directly to my e-mail if you need 
more information to debug or if I am doing something terribly wrong.


#+NAME: dic_xml_get_elmtag.py
#+BEGIN_SRC python
  treetag = tree.find(elmtag)
#+END_SRC

#+NAME: dic_xml_check_empty_elmtag.py
#+BEGIN_SRC python
  if treetag is not None and treetag is not []:
#+END_SRC

#+NAME: dic_xml_assert_elmtag.py
#+BEGIN_SRC python :noweb yes
  # * Make sure that the tag (node, subtree, whatever...)
  #   exists in the XML
#+END_SRC

#+NAME: dic_max_vals2straight_line_febpts_blk.py
#+BEGIN_SRC python :noweb yes
  <>
  <>
  loaddata = treetag
  # ** Remove all pre-existing `loadcurve' (or equivalent)
  xmlset = loaddata
  [xmlset.remove(VAL) for VAL in xmlset.findall(curvetag)]

#+END_SRC

#+NAME: dic_max_vals2straight_line_disppts.py
#+BEGIN_SRC python :noweb yes
  def max_vals2straight_line_disppts(tree,
 curvetag="loadcurve",
 vals=None,
 num_pts=11):

  <>

#+END_SRC

#+HEADER: :var mu_min = # USE 0.1 * \Psi
#+HEADER: :var mu_max = # USE 10 * \Psi
#+BEGIN_SRC python :noweb yes :tangle /tmp/t.py
  # Based on 
  # 
  <>
  <>


  # Program start #

  # * Experimental part *

  <>

  # DANGER: untested
  <>

  # * Simulation part *

  # *** Read XML file

  <>

  # * Create a series of values with a preset difference
  #   between them

  <>
#+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] org-babel noweb-ref

2019-09-29 Thread edgar

Hello dear list,

First of all, this may be related:
- https://lists.gnu.org/archive/html/emacs-orgmode/2018-02/msg00300.html
- https://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00044.html

- Emacs: src_emacs-lisp{emacs-version} {{{results(=26.3=)}}}
- Org: src_emacs-lisp{org-version} {{{results(=9.1.14=)}}}
- Parabola GNU/Linux: src_bash{uname -r} {{{results(=5.2.5-gnu-1=)}}}

I prepared the following hoping that it makes the issue clear. Let me 
know :) .


#+CAPTION: This works if ~org-babel-use-quick-and-dirty-noweb-expansion~ 
is ~nil~, but I don't want to import everything from ~libraries~
#+BEGIN_SRC python :tangle routines1.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

* Explanation with example

- I noticed some differences between the output of tangling and 
previewing org-babel blocks.
- ~org-babel-use-quick-and-dirty-noweb-expansion~ interferes with 
~:noweb~ in a way that I did not expect


I want to know
1. if this is the expected behaviour
2. how I can expand a named block (which has ~#+name: tag~) which is 
inside a subtree (subheading with the ~:noweb-ref~ property)


** Option 1

Set src_emacs-lisp{(setq org-babel-use-quick-and-dirty-noweb-expansion 
nil)}


#+BEGIN_SRC python :tangle /tmp/routines1.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

- Preview shows empty lines instead of ~imp1.py~ and no ~shebang~

  #+BEGIN_SRC python



def fun1():
pass


def fun2():
pass
  #+END_SRC

- Tangled ~/tmp/routines2.py~ shows ~shebang~, but no ~imp1.py~.

  #+BEGIN_SRC python
# -*- coding: utf-8 -*-
def fun1():
pass


def fun2():
pass
  #+END_SRC


*** What I expected

1. Both Preview and tangling to have the same content
2. for ~imp1.py~ to be expanded at the top of the code as ~import numpy 
as np~.


** Option 2

src_emacs-lisp{(setq org-babel-use-quick-and-dirty-noweb-expansion t)}

#+BEGIN_SRC python :tangle /tmp/routines2.py :noweb yes :shebang # -*- 
coding: utf-8 -*-

  <>


  <>
#+END_SRC

- Preview shows

  #+BEGIN_SRC python
import numpy as np


  #+END_SRC

- Tangled ~/tmp/routines2.py~ shows

  #+BEGIN_SRC python
# -*- coding: utf-8 -*-
import numpy as np
  #+END_SRC

*** What I expected

According to the manual, ~<>~ would not be solved correctly 
(as shown), but I expected to have the ~shebang~ in the preview.


A further comment can be made about the extra space (related to 
~:noweb-sep~), but that is minor and I don't care.


** Routines
:PROPERTIES:
:header-args: :noweb-ref routines :noweb-sep "\n\n\n"
:END:

#+NAME: fun1.py
#+BEGIN_SRC python
  def fun1():
  pass
#+END_SRC

#+NAME: fun2.py
#+BEGIN_SRC python
  def fun2():
  pass
#+END_SRC

** Libraries
:PROPERTIES:
:header-args: :noweb-ref libraries
:END:

#+NAME: imp1.py
#+BEGIN_SRC python
  import numpy as np
#+END_SRC

#+NAME: imp2.py
#+BEGIN_SRC python
  import os
#+END_SRC

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] [Feature request] LaTeX blocks preview

2017-08-19 Thread edgar

On 2017-08-19 08:57, Nicolas Goaziou wrote:

It is not possible in the general case. The export block is not
guaranteed to contain a complete environment; it isn't necessarily
displayable either.


Thank you for your kind attention, anyway :) .


I think this is an acceptable workaround. I think AucTeX has its own
previewing mechanism, so step 2 may not be required.


I think that is the sole purpose of org-edit-latex-mode. It seems that 
AucTeX does not work in the org-edit-special buffer. Thanks again.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] How to call nested bash and gnuplot with babel?

2017-08-25 Thread edgar

Hello, I am trying to run a "nested" babel code with bash and gnuplot.

* Configuration
I did the test like this
#+BEGIN_SRC bash
  emacs -Q
#+END_SRC

#+BEGIN_SRC emacs-lisp
  (require 'package)
  (package-initialize)

  (require 'org)
  ;; Org mode version 9.0.9

  (org-babel-do-load-languages ; babel, for executing
 'org-babel-load-languages   ; code in org-mode.
 '((shell . t)
   (python . t)
   (emacs-lisp . t)
   (org . t)
   (gnuplot . t)))
#+END_SRC

* Original code
#+NAME: bash-tjp-displ-stress
#+HEADER: :var file1="file1.csv"
#+HEADER: :var col1="3"
#+HEADER: :var file2="file2.csv"
#+HEADER: :var col2="7"
#+HEADER: :dir "Data"
#+BEGIN_SRC bash :results value :exports code
  paste "$file1" "$file2" | awk -F',' '/^[^#]/{print $'$col1' $'$col2'}'
#+END_SRC

#+NAME: gplt-tjp-febio-results
#+CAPTION: Gnuplot to plot
#+HEADER: :var data=bash-tjp-displ-stress
#+BEGIN_SRC gnuplot :results graphics :file /tmp/orig-out.png
  set xlabel 'var1'
  set ylabel 'var2'
  plot data u ($1 + 1):2 with lp notitle
#+END_SRC

** Alternative 1: ~:file~ after the function
 The result of this gives me the original output file
 #+CALL: gplt-tjp-febio-results() :file /tmp/test.png

 #+RESULTS:
 [[file:/tmp/orig-out.png]]

** Alternative 2: ~:file~ as a prefix to the function
 The result of this gives me the original output file
 #+CALL: gplt-tjp-febio-results[:file /tmp/test.png]()

 #+RESULTS:
 [[file:/tmp/orig-out.png]]

* Modified code
If I do this, I get the desired output file (add variable ~outfile~
and ~:results none~)

#+NAME: gplt-tjp-febio-results-new
#+CAPTION: Gnuplot to plot
#+HEADER: :var data=bash-tjp-displ-stress
#+HEADER: :var outfile="/tmp/test.png"
#+BEGIN_SRC gnuplot :results graphics
  set output outfile
  set xlabel 'var1'
  set ylabel 'var2'
  plot data u ($1 + 1):2 with lp notitle
#+END_SRC

#+CALL: gplt-tjp-febio-results-new[:results 
none](outfile="/tmp/new_out.png")


I type this manually:
[[/tmp/new_out.png]]

* What I expected
To call
#+BEGIN_EXAMPLE
  ,#+CALL: gplt-tjp-febio-results() :file /tmp/new_out.png
#+END_EXAMPLE

and get
#+BEGIN_EXAMPLE
  ,#+RESULTS:
  [[file:/tmp/orig-out.png]]
#+END_EXAMPLE

How do I achieve this?

* Thanks
Thank you! :D

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] How to use the list search?

2017-08-31 Thread edgar

Hello,

I have tried to use https://lists.gnu.org/archive/html/emacs-orgmode/ 
without much success. If I type, for instance 
~org-babel-expand-src-block~ and ask for /reverse chronological order/ 
the first results are from 2009, then from 2008 and later from 2014.


https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-babel-expand-src-block&submit=Search%21&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Alate

Then, if I ask for /chronological order/ I get 2010, 2009, etc.

https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=org-babel-expand-src-block&submit=Search%21&idxname=emacs-orgmode&max=20&result=normal&sort=date%3Aearly

Thus, I am currently using a web search engine like this:
site:https://lists.gnu.org/archive/html/emacs-orgmode 
org-babel-expand-src-block, and I do get results from recent years.


What am I doing wrong? Thanks.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] org-babel-expand-src-block v.s. org-babel-execute-src-block with Python

2017-08-31 Thread edgar

Hello,

I have noticed that doing C-c C-v v (org-babel-expand-src-block) and C-c 
C-c (org-babel-execute-src-block) yield different results in Python. I 
have attached a file with a MWE and a couple of questions to avoid 
clutter in the mailing list. Thank you in advance :) .


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  I open emacs with ~emacs -Q~

#+BEGIN_SRC emacs-lisp :results none
  (org-babel-do-load-languages
 'org-babel-load-languages
 '((python . t)
   (emacs-lisp . t)
   (org . t)))
#+END_SRC

* This block works all the time
#+BEGIN_SRC python :python python3 :session
  import numpy as np
  for i in [1, 2, 3]:
  a = i

  print(a)
  a
#+END_SRC

#+RESULTS:
: 3


* My Python 3 block:
#+BEGIN_SRC python :python python3 :session
  import numpy as np
  for i in [1, 2, 3]:
  # Comment

  a = i

  print(a)
  a
#+END_SRC

#+RESULTS:

* What happens with C-c C-c:
If I do C-c C-c in the block, I get this in the *Python* buffer:
#+BEGIN_EXAMPLE
  >>> import numpy as np
  >>> for i in [1, 2, 3]:
  ... # Comment
  ... 
File "", line 3

  ^
  IndentationError: expected an indented block
  a = i
  >>> 
File "", line 1
  a = i
  ^
  IndentationError: unexpected indent
  >>> print(a)
  >>> 
  Traceback (most recent call last):
File "", line 1, in 
  NameError: name 'a' is not defined
  >>> open('/tmp/babel-112622VJ/python-112621jw', 'w').write(str(_))
  >>> 
  20
  >>> 
  >>> 'org_babel_python_eoe'
  >>> 'org_babel_python_eoe'
  >>> 
#+END_EXAMPLE

* What happens with C-c C-v v C-c C-c
If I do C-c C-v v C-c C-c in the block, I get this in the *Python* buffer
#+BEGIN_EXAMPLE
  >>> 3
  >>> 
#+END_EXAMPLE

* What happens with C-c ' C-c C-c
If I do C-c ' C-c C-c in the block, I get this in the *Python* buffer
#+BEGIN_EXAMPLE
  >>> 3
  >>> 
#+END_EXAMPLE

* Question:
  1. Is this the expected behaviour?
  2. Is there a way to get ~#+RESULTS:~ with C-c C-c directly for this kind of 
blocks?


Re: [O] How to use the list search?

2017-09-03 Thread edgar

Date: Fri, 01 Sep 2017 20:13:37 -0500

You're not doing anything wrong


Thanks.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Time-Event-Diagrams

2017-09-04 Thread edgar

Message: 7

Date: Tue, 29 Aug 2017 10:22:01 +0100
Subject: Re: [O] Time-Event-Diagrams
Message-ID: <874lsq4tl2@yandex.com>


#+name: whentable
| When | How many |
|--+--|
| [2016-11-17 Thu] |3 |
| [2016-11-23 Wed] |4 |
| [2016-12-10 Sat] |1 |
#+BEGIN_SRC gnuplot :file whenfile.svg :var data=whentable :session 
none :term svg

size 600,200
set timefmt "%Y-%m-%d-%H:%M:%S"
set xdata time
set yrange [0:]
plot data using 1:2 w impulse lw 6
#+END_SRC

#+RESULTS:
[[file:whenfile.svg]]





This no longer appears to work. The file whenfile.svg is created but is 
empty.




It works for me if I remove the =:session none=. It seems that there are 
some issues with the session flag:


On 2017-09-03 12:23, Nicolas Goaziou wrote:

* Question:
  1. Is this the expected behaviour?
  2. Is there a way to get ~#+RESULTS:~ with C-c C-c directly for this 
kind of blocks?


I don't think so. It looks like a bug with sessions.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] [Feature request] LaTeX blocks preview

2017-09-13 Thread edgar

On 2017-08-19 08:57, Nicolas Goaziou wrote:

to be previewed in the same way as

 \begin{align}
   I_{0}
   & > \max{(\lambda_{f}^{2})}
   \\
   & > 2^{2}
   \\
   I_{0} & > 4
 \end{align}


It is not possible in the general case. The export block is not
guaranteed to contain a complete environment; it isn't necessarily
displayable either.



I am guessing that I missed this in the documentation or that it is 
conveniently unexpected behaviour, but I can do C-' to org-edit-special 
with \begin{align} ... \end{align} alone (as shown above; without the 
#+BEGIN_ ... #+END_).



- Related ::
   - org-edit-latex-mode
 There is org-edit-latex-mode, but it requires  some extra work:
 1. org-edit-special (C-')
 2. org-edit-latex-preview-at-point (C-c C-p C-p)
 3. org-edit-src-exit (C-')

 Besides, the preview does not stay in the original Org-mode 
buffer,

but it's lost with step 3.


I beg to keep it as it is; it's not a bug, but a feature in my opinion. 
I just want to leave this for future reference to others. Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] library of babel ingest interferes with noweb

2017-09-14 Thread edgar

Hello,

It seems that when I have two blocks of code with noweb, and then I do a 
babel ingest, I don't get my original result (see attached file).


Is there a reason for this? Is this a bug?

Thanks.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  ;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.

* This works
#+NAME: test1
#+BEGIN_SRC bash
  a=2
#+END_SRC

#+NAME: test2
#+BEGIN_SRC bash :noweb yes
  <>
#+END_SRC

#+BEGIN_SRC bash :noweb yes
  <>
#+END_SRC

shows in the org-edit-special window
#+BEGIN_EXAMPLE
a=2
#+END_EXAMPLE

* This does not work
After loading this block, 
#+BEGIN_SRC emacs-lisp :exports none :results none
  (org-babel-lob-ingest "t.org")
#+END_SRC

#+BEGIN_SRC bash :noweb yes
  <>
#+END_SRC

shows in the org-edit-special window
#+BEGIN_EXAMPLE
<>
#+END_EXAMPLE

* What I expect
After ingesting the file, I should still get =a=2= in the org-edit-special


Re: [O] library of babel ingest interferes with noweb

2017-09-16 Thread edgar

On 2017-09-14 21:26, Nicolas Goaziou wrote:

I have

  #+BEGIN_EXAMPLE
<>
  #+END_EXAMPLE

However, it seems wrong to have

  #+BEGIN_EXAMPLE
a=2
  #+END_EXAMPLE

because you no longer know what part you are editing.
Ooops, I should have said that I did C-c C-v v 
(org-babel-expand-src-block) in the last block. What I need is to get 
the final code (without references). Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] What is the best way to show inline math formulas in org mode?

2017-09-20 Thread edgar

Hi Amos,

I am an inexpert user of Emacs, and that is why I think that I can help 
you. See the instructions below. Spoiler alert: the last line reads: "If 
you get your file .. I don't know how to help you."


The idea is:
1. Run emacs like this: emacs -Q
2. Check that you have a recent version of Emacs
   1) (assuming that you are running in linux) Check your Emacs version:
  a. [Alt] + [x] (in Emacs lingo, this translates to M-x, and lets 
you run commands)

  b. when you get a prompt, type  (without < >)
  c. type [Enter] (in Emacs lingo, this translates to RET most 
times)
   2) If you get a message with a version older than 24.4, your Emacs 
may be too old, but still work (may be).

3. Check that you have a recent version of Org
   Do the same as step 2, but replace  with 
. If your version is older than 8.7, I would suggest 
updating.

4. Check that you are actually running the right command
   1) Create a new buffer
  a. C-x b: [Control] + [x], then [b]
  b. test.org: type 
  c. RET
   2) Change onto org-mode by doing M-x org-mode RET
   3) Copy (kill) this as it is and paste it (yank it) on the buffer 
that you just created:   \(a = 2\)

   4) Put the cursor (point) on the <=> and do C-c C-x C-l
   5) If you don't see your equation, continue to step 5
5. If step 4 didn't work, make sure that you could produce the file in 
your computer

   1) Export the test.org to LaTeX by doing C-c C-e l l
   2) If it asks you for a name file, just type  (without < > 
!)

   3) Open the file (find the file): C-x C-f  (without < >)
   4) Do what you would normally do to produce your PDF
   5) If you get your file, it means that your Org configuration is not 
really working. Try testing your dvipng, dvisvgm or convert 
(imagemagick) commands. Imagemagick is not really good in terms of image 
quality, in my opinion, but you can play with the scale value (as 
suggested by Eric? Nicolas?). Other than that, I don't know how to help 
you.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] width/height/alignement of images in tables

2017-09-22 Thread edgar

Date: Fri, 22 Sep 2017 09:56:35 +0200
From: C?dric ODY 
To: emacs-orgmode@gnu.org
Subject: [O] width/height/alignement of images in tables

Would there be a way to add width/height/alignment parameters for 
images

that are included in a table, say

| [[./a.png]] | [[./b.png]] |

by for instance adding the parameters inside the brackets
[[./a.png,width,height,halign,valign]]?

thanks,


Hope this helps: https://github.com/linktohack/ox-latex-subfigure

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Taskjuggler effort and days

2017-10-19 Thread edgar

Hello,

I got an example from the web to run Taskjuggler (attached; 
https://emacs.stackexchange.com/a/31513).


However, when I try to set efforts to units other than hours (~:Effort: 
5d~ or ~:Effort: 1w~; see [[tjp.org::Another task]]), org-export 
multiplies 24 hours times the number of days. This results in 120.0h (3 
weeks in the HTML report) for 5d.


I would like to know if, instead of having 24 hours as the factor, there 
is a way to have the actual value copied (~:Effort: 5d~ from the tjp.org 
to ~effort 5d~ in the tjp.tjp).


I modified the resulting .tjp, and I can set ~effort 5d~ to get 5 
effective days (if no other task is allocated to the resource). Also, if 
I set ~:Length: 5d~ instead of ~:Effort: 5d~, the time is well allocated 
(results in ~length 5d~; may be that is a clue..?).


If this question has been answered before, I would appreciate if someone 
points me in the right direction. Thanks!


* My configuration
Org mode version 9.1.2 (9.1.2-15-g1d5142-elpa
GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
I copied and loaded the ox-taskjuggler.el from http://orgmode.org/elpa/ 
today.


#+BEGIN_SRC emacs-lisp
(require 'package)
(package-initialize)
(require 'org)
(add-to-list 'org-export-backends 'taskjuggler)
(require 'ox-taskjuggler)
#+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  project nil "test project" "1.0" 2017-03-25 +280d {
}
shift s40 "Part time shift" {
  workinghours wed, thu, fri off
}
resource people "People" {
  resource sdude "Some Dude" {
limits { dailymax 8.0h }
workinghours mon - fri 9:00 - 12:00, 13:00 - 18:00
  }
}
task test "test project" {
  start 2017-03-25
  task milestones "Milestones" {
task start "Start" {
  milestone
}
task end "End" {
  milestone
}
  }
  task tasks "tasks" {
task first_task "Some task" {
  depends !!milestones.start
  purge allocate
  allocate sdude
  complete 50
  effort 4.0h
}
task second_task "Another task" {
  depends !first_task
  purge allocate
  allocate sdude
  complete 50
  effort 120.0h
}
  }
}
textreport report "Plan" {
  formats html
  header '== test project =='

  center -8<-
[#Plan Plan] | [#Resource_Allocation Resource Allocation]

=== Plan ===
<[report id="plan"]>

=== Resource Allocation ===
<[report id="resourceGraph"]>
  ->8-
}

# A traditional Gantt chart with a project overview.
taskreport plan "" {
  headline "Project Plan"
  columns bsi, name, start, end, effort, chart
  loadunit shortauto
  hideresource 1
}

# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, weekly
  loadunit shortauto
  hidetask ~(isleaf() & isleaf_())
  sorttasks plan.start.up
}
#+COLUMNS: %25ITEM %TODO %3PRIORITY %ALLOCATE(Owner) %DEPENDS(depends) 
%EFFORT(Effort) %TAGS
* test project  :taskjuggler_project:
  :PROPERTIES:
  :start:2017-03-25
  :END:

** Milestones

the milestones for the project

*** Start
:PROPERTIES:
:task_id:  start
:END:

the start of the project.

*** End
:PROPERTIES:
:task_id:  end
:depends:  blah
:END:

this is the end of the project

** tasks

*** TODO Some task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-27 Mon>
:PROPERTIES:
:task_id:  first_task
:Effort:   4:00
:depends:  start
:complete: 50
:ALLOCATE: sdude
:END:

this is a test of the system.

*** TODO Another task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-28 Tue>
:PROPERTIES:
:task_id:  second_task
:Effort:   5d
:depends:  first_task
:complete: 50
:ALLOCATE: sdude
:END:

* Resources:taskjuggler_resource:
  :PROPERTIES:
  :workinghours: sat, sun off
  :END:

** People
:PROPERTIES:
:COLUMNS:  %30Item(Person) %workinghours(Work hours) %15resource_id(ID) %email 
%Phone
:END:
These are the resources available to the project.

*** Some Dude
   :PROPERTIES:
   :resource_id: sdude
   :limits:   { dailymax 8.0h }
   :workinghours: mon - fri 9:00 - 12:00, 13:00 - 18:00
   :END:


Re: [O] Ediff org files starts folded

2017-10-26 Thread edgar
Yeah, it would be nice to have something that folds the tree back to its 
original state after the ediff! (excitement)


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Prevent auto-filling of export snippets

2017-12-08 Thread edgar

Hello,

AFAIK, you are an Org guru (or at least have much more experience than I 
do), and I know that you are asking this for the benefit of everyone. I 
just want to say:


and with auto-fill-mode enabled (70 cols), if I hit Enter at the end of 
the line, I becomes:


I recommend using visual-fill-column-mode
  ;; Wrap text
  ;; http://danlovesprogramming.com/making-text-look-good-in-org-mode/
  ;; https://caolan.org/dotfiles/emacs.html
  (use-package visual-fill-column
:ensure t)
or

  (with-eval-after-load "org"
  (require 'visual-fill-column))

and add indent mode (I didn't keep the reference to the source of this; 
this may go inside the :config part of use-package org):


(add-hook 'org-mode-hook (lambda ()
 (org-indent-mode)
 (auto-fill-mode -1)
 (visual-fill-column-mode)
 (setq visual-line-fringe-indicators 
'(left-curly-arrow right-curly-arrow))

 (visual-line-mode 1)
 ))

Can the rules in Org set to prevent auto-filling (like in Headings) be 
set for Export Snippets too?

In that way, you really don't need auto-filling.

Note: I tried to set the right snippets to get visual-fill-column-mode 
working, but I don't know if more than that is needed.


Cheers!

---
Vive la liberté!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Can export the files with bibliography only to LaTeX

2017-12-14 Thread edgar

Date: Thu, 14 Dec 2017 12:28:46 +
Subject: Re: [O] Can export the files with bibliography only to LaTeX
I am sympathetic to these views but unfortunately it's not always
possible.  My university, for instance, requires me to prepare exam
scripts in DOC (hence my related email a few minutes ago... my yearly
task of preparing scripts is upon me).  I hate it but I have no choice.



I'm on the same boat: when your advisor "kindly" asks you to write 
everything in DOC{,X}. But it's a boat that is sinking, and let's hope 
sooner than later.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] advice please: best way to export to DOC(X) with maths

2017-12-14 Thread edgar

Date: Thu, 14 Dec 2017 12:18:24 +
From: Eric S Fraga 
To: emacs-orgmode@gnu.org
Subject: [O] advice please: best way to export to DOC(X) with maths
Message-ID: <87ind9pkof@gmail.com>
Content-Type: text/plain; charset="us-ascii"

Hello,

almost all the writing I do that is intended to be exported will be
exported to LaTeX.  However, every now and again I need to export to
DOC/DOCX.

My query is: what is the best way (i.e. the state of the art) currently
in org to export to DOC/DOCX for text that has equations?  I have both
inline maths, e.g. \(i \in [0,n]\) and displayed equations.  Is there a
route that will convert these to something Word et al. can process
directly, other than images?  Maybe via pandoc?

Thanks,
eric

--
Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-168-g7455f4


I only know how to do a rough approximation by means of pandoc:

#+BEGIN_SRC bash
  pandoc -f org+smart my-original.org -t docx+smart -o my-output.docx
#+END_SRC

for slightly older versions of pandoc, this may work (there is an 
equivalent for the references, I think):

#+BEGIN_SRC bash
  pandoc -f org+smart --bibliography=../../References.bib 
my-original.org -o my-output.doc

#+END_SRC

I used to have a better solution, but at some point it stopped working. 
I didn't ask here, because 1/2 of my questions go under the radar, and I 
don't like to bug people with my issues:


To get a working file, first export to odt with Org-mode
(~C-c C-e o o~), and then run this (you can do ~C-c C-c~
on it; make sure that LibreOffice is not running)
#+BEGIN_SRC shell :results none
 libreoffice --headless --convert-to doc ./my-.odt
#+END_SRC

For the latter, I used to have
#+OPTIONS: tex:dvipng

A better solution would be most appreciated.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] taskjuggler subtract scheduled and deadline

2017-12-26 Thread edgar

Hello,

I am trying this:

#+BEGIN_SRC org
  ,* TODO Pay the rent 
:taskjuggler_project:

  SCHEDULED: <2017-12-29 Fri 09:00> DEADLINE: <2017-12-29 Fri 11:00>
#+END_SRC

which gives me this:
#+BEGIN_EXAMPLE
  repeat.tjp:13: Error: The end date (2017-12-29-00:00-+) must be 
after the start date (2017-12-29-00:00-+).

#+END_EXAMPLE

I tried modifying ox-taskjuggler.el:
#+BEGIN_SRC diff
  ,*** org/ox-taskjuggler.el2017-12-26 16:39:52.633050180 -0700
  --- my/ox-taskjuggler.el  2017-12-26 19:42:17.921208465 -0700
  ,***
  ,*** 478,484 
  --- 478,490 
doesn't have any start date defined."
  (let ((scheduled (org-element-property :scheduled item)))
(or
  +  ;; How do I compile a regex to avoid locale day names?:
  +  ;; "%Y-%02m-%02d [[:alpha:][:space:]]* %[RT]"
 (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d 
%R"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d %a 
%R"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d 
%T"))
  +  (and scheduled (org-timestamp-format scheduled "%Y-%02m-%02d %a 
%T"))

 (and (memq 'start org-taskjuggler-valid-task-attributes)
(org-element-property :START item)

  ,***
  ,*** 487,493 
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any end date defined."
  (let ((deadline (org-element-property :deadline item)))
  ! (and deadline (org-timestamp-format deadline "%Y-%02m-%02d"



  --- 493,506 
ITEM is a headline.  Return value is a string or nil if ITEM
doesn't have any end date defined."
  (let ((deadline (org-element-property :deadline item)))
  ! ;; How do I compile a regex to avoid locale day names?:
  ! ;; "%Y-%02m-%02d [[:alpha:][:space:]]* %[RT]"
  ! (or
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d 
%R"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d %a 
%R"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d 
%T"))
  !  (and deadline (org-timestamp-format deadline "%Y-%02m-%02d %a 
%T")





#+END_SRC

but I got the same error. Is there a way to set starting and ending 
times with a resolution of hours or minutes to be exported with 
taskjuggler? Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] BeOrg

2018-01-04 Thread edgar
I am going to keep the thread just in case I ever need it. It's great! I 
have refrained myself from expressing my humble opinion for fear of a 
flame war, but...


"What's the point of a software which doesn't exist?" you say.

"What is the point of chaining people?" I would say.


Cheers!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] filter for svg latex-export

2018-01-07 Thread edgar

Hello,

I once tried to create a filter (is that the name?) to modify the 
function which exports SVG files. Verdict: I suck! Thus, I keep 
modifying the ox-latex.el every time that I upgrade (see attached). 
Would someone please tell me what is the right way to achieve that 
(without modifying the code, please? Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  *** org-20180103/ox-latex.el2018-01-07 16:53:43.477464348 -0700
--- plugins/ox-latex.el 2018-01-07 16:39:52.117462098 -0700
***
*** 2425,2434 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
!   (setq image-code (replace-regexp-in-string "^includegraphics"
!  "\\includesvg"
!  image-code
!  nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code
--- 2425,2437 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code
!   (format "\\simplesvg%s{%s}"
!   (cond ((not (org-string-nw-p options)) "")
! ((string-prefix-p "," options)
!  (format "{%s}" (substring options 1)))
! (t (format "{%s}" options)))
!   path))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code


Re: [O] filter for svg latex-export

2018-01-08 Thread edgar

On 2018-01-09 03:34, John Kitchin wrote:

Thank you, Dr. Kitchin! I will try this


If all you are doing is replacing includesvg with simplesvg,

#+BEGIN_SRC emacs-lisp
(let ((org-export-filter-link-functions  '((lambda (txt _ _)
 (replace-regexp-in-string "includesvg" 
"simplesvg" txt)
  (org-latex-export-as-latex))
#+END_SRC

If you are doing more than that (it looks like you are adding options?)


The only real difference in calling it is that I use {} instead of [], 
so I would not expect any problems


then one alternative option is just put a copy of your modified 
function

in your init file after you load org


Yep, I have been trying to avoid this. My init is already huge (not 
really: 2587 lines).


Thank you again!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Orgmode repeater intervals with end date

2018-01-10 Thread edgar

Message: 8
Date: Tue, 09 Jan 2018 22:16:56 -0700
From: torys.ander...@gmail.com (Tory S. Anderson)
To: orgmode list 
Subject: [O] Orgmode repeater intervals with end date
Message-ID: <87incamgxj@byu.edu>
Content-Type: text/plain; format=flowed

Hi all,

When repeater intervals are set on on org dates (eg =<2018-01-10
Wed 16:00 +2w>=) 
the output is exported nicely to ical and appears

nicely in agenda. Is there anyway to put an end-date on org dates
so that the +2w will not just continue forever?

I could use org-class, but then it wouldn't be exported to ical
nicely. I was hopefully with <2018-01-10 Wed 16:00
+2w>--<2018-04-10 Wed 16:00 +2w> but this just put the range as
counting every day in the interim. Is there an existing way to
have an end-date on a repeating cycle?

- Tory


Have you tried with DEADLINE:? I seem to remember to have read something 
like that somewhere. Don't trust me. If it helps, I am glad, but I am 
not sure.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Feature request: #+INCLUDE: with anchors

2018-01-10 Thread edgar

Hello,

I have seen this syntax in markdown (one of the many versions):

!listing
path/to/file.ext
start=ini_keyword end=end_keyword

Here, ~file.ext~ is a source file, and both ~ini_keyword~ and 
~end_keyword~ are text strings in the text delimiting what should be 
included (responsibility of the writer to make sure they are unique). I 
think that having something like this in Org would be nice. I am aware 
of the ~:lines~ option, but having something like this would not require 
an update of the numeric reference every time the referenced file 
changes.


Thanks for the great work!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Feature request: #+INCLUDE: with anchors

2018-01-12 Thread edgar

Message: 6
Date: Thu, 11 Jan 2018 11:39:29 +0100
From: Rasmus 
To: emacs-orgmode@gnu.org
Subject: Re: [O] Feature request: #+INCLUDE: with anchors
Message-ID: <878td4r866@gmx.us>
Content-Type: text/plain; charset=utf-8

What would happen if one of the keywords aren?t unique?


Get the first instance? what happens when a referenced heading, block or 
table is not unique (or doesn't exist)?




Something similar can already be done in Org.  See this part of the
manual:

Inclusions may specify a file-link to extract an object matched by
org-link-search (see Search options).

To extract only the contents of the matched object, set
:only-contents property to non-nil. This will omit any planning lines
or property drawers. The ranges for :lines keyword are relative to the
requested element. Some examples:

#+INCLUDE: "./paper.org::#theory" :only-contents t
   Include the body of the heading with the custom id ?theory?
#+INCLUDE: "./paper.org::mytable"  Include named element.
#+INCLUDE: "./paper.org::*conclusion" :lines 1-20
   Include the first 20 lines of the headline named ?conclusion?.



Although I was aware of this, I think that what you write is very 
useful, thank you.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] change in calling remote code blocks?

2018-01-18 Thread edgar

Message: 1
Date: Mon, 15 Jan 2018 10:07:33 -0800
From: John Kitchin 

with a syntax like:

#+call: si.org:figure-1() :wrap html


And C-c C-c on that line would call a code block named figure-1 in the 
file

si.org and insert the results.

in org 9.1.6, this does nothing. Does anyone know if this got changed, 
and

if there is a new way to do that?

John


You may try loading the file into the library of babel 
(org-babel-lob-ingest). Then, you can call the function without a 
reference to the file


#+CAPTION: s1.org
#+BEGIN_SRC org
  ,#+NAME: figure-1
  ,#+BEGIN_SRC python
return 2 + 2
  ,#+END_SRC
#+END_SRC

#+CAPTION: t.org
#+BEGIN_SRC org
  ,#+CALL: figure-1() :wrap html

  ,#+RESULTS:
  ,#+BEGIN_html
  4
  ,#+END_html
#+END_SRC


Message: 7
Date: Mon, 15 Jan 2018 23:49:54 +0100
From: Nicolas Goaziou 
To: John Kitchin 

This sounds like a bug.

Or missed feature?



It does ring a bell. However, I couldn't find any reference to this
syntax or behaviour in the manual. Am I missing something?


I only found the evident:
#+BEGIN_QUOTE
By calling a named code block(2) from an Org mode buffer or
a table.  Org can call the named ‘src’ code blocks from the
*current Org mode buffer* or from the *“Library of Babel”*
#+END_QUOTE
(bold added by me).



Message: 8
Date: Mon, 15 Jan 2018 16:08:26 -0800
From: John Kitchin 



babel documentation somewhere. I confirmed it does work in 8.2.10, e.g.
just with emacs -Q.


It would be nice if it did :) .

Thanks for working so well on Org. I have good news: Someone to whom I 
introduced Emacs is now using it! (not my advisor... yet).


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Change mode in org-edit-special

2018-02-02 Thread edgar

Hello,

Is there a safe way to change mode in an org-edit-special buffer?

I remember that someone mentioned something like this some months ago, 
but I can't find it: If I change the mode within an org-edit-special 
buffer, the region on the original buffer gets blocked (can't edit), and 
neither C-c C-k nor C-c ' work to close the org-edit-special buffer. I 
only know that closing both buffers and visiting the file again will get 
rid of the problem.


Thanks.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] Change mode in org-edit-special

2018-02-03 Thread edgar

On 2018-02-02 18:07, Berry, Charles wrote:

On Feb 1, 2018, at 9:07 PM, ed...@openmail.cc wrote:

Is there a safe way to change mode in an org-edit-special buffer?


The safest thing would be to customize `org-src-lang-modes' so the
buffer is created with the mode you want to edit in.

Or if you want to edit in that mode only occasionally write a small
function that let-binds `org-src-lang-modes` to the value you need and
use that function as needed to create the buffer in that mode.

As far as changing major mode while already editing, the responses
here might help:

https://emacs.stackexchange.com/questions/21940/avoid-minor-modes-from-turning-off-when-changing-restarting-major-mode

HTH,

Chuck


Thanks. I will try :)

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] A way to export to ODT

2018-05-15 Thread edgar
I want to share this little recipe in the hope that it is useful to 
someone. It is a partial solution to exporting with MathML to ODT from 
Org. I am not a fan of ODT, but my boss need DOCX like dope.


To get a working file
1. To get siunitx (partially) working, download 
[[https://github.com/Authorea/LaTeXML/blob/master/lib/LaTeXML/Package/siunitx.sty.ltxml][siunitx.sty.ltxml 
from Authorea's github.com]]
(there is an issue on the upstream 
[[https://github.com/brucemiller/LaTeXML][LaTeXML]] for this already; 
the author may be more motivated is someone else asks for it and/or 
helps) and save it somewhere (remember this location, you'll need it 
later). Here, ~~/.emacs.d/plugins~ is used.


   Do ~C-c C-c~ or ~C-c C-v C-e~ 
(src_emacs-lisp{(org-babel-execute-maybe)}) on the following block to 
add ~\mathrm{·}~ to the symbols (this removes italics from units). 
Change the path to the file accordingly.

   #+BEGIN_SRC bash
 sed -i "s-\(DefMacro.*\)'\([[:alpha:]]*\)'-\1'mathrm{\2}'-g" 
~/.emacs.d/plugins/siunitx.sty.ltxml

   #+END_SRC

   Add any required symbol to that same file (note that there is a ~\mm~ 
which should be ~\mmHg~; commit e134a5b @ Jul 24, 2017). Note that if 
you add something like ~DefMacro('\mm','some');~, strange things start 
to happen.


2. Install ~latexml~ (with ~latexmlmath~; 
https://dlmf.nist.gov/LaTeXML/get.html). Then, execute this command in 
Emacs (change ~latexmlmath~ to the actual path)

   #+BEGIN_SRC emacs-lisp
 (setq org-latex-to-mathml-convert-command
   "latexmlmath --presentationmathml=%o --preload=siunitx 
--path=~/.emacs.d/plugins/ --includestyles \"%i\"")

   #+END_SRC

3. Set the ~#+OPTIONS: LaTeX:t~ somewhere in the document

4. Export to odt with Org-mode (~C-c C-e o o~), and run this (you can do 
~C-c C-c~ on it; make sure that LibreOffice is not running)

   #+BEGIN_SRC shell
 libreoffice --headless --convert-to doc 
./.odt

   #+END_SRC

   You can use a template with the line (change file name accordingly). 
Modify the file at will.

   #+BEGIN_SRC org
 ,#+ODT_STYLES_FILE: "../Templates/odt-review-template.ott"
   #+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-17 Thread edgar

On Fri, 11 May 2018 14:09:33 +0200

(Why an acedemic review request Word files? It should be forbidden.)
Joseph


I agree! (in some countries, universities are partially 
funded--influenced--by Micro$oft, that may explain).


On Fri, 11 May 2018 14:37:10 +0200

Nicolas Goaziou:
> #+OPTIONS: LaTeX:t

This option is obsolete since Org 8.0.



That option still shows up in org-info (Working with LaTeX math 
snippets):
GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21) of 
2017-09-22, modified by Debian

Org mode version 9.1.13 (9.1.13-elpa 20180507)
May be it's corrected in a newer Emacs...

Also, I hadn't seen this thread, sorry. Thus, I created this: 
https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00346.html


Hope it helps. You can potentially use it to get any other symbols. You 
can also try with pandoc (using 2.0.5 here; there is a binary on 
https://github.com/jgm/pandoc/releases/latest):


Export to ~LaTeX~ file first with ~C-c C-e l l~
#+BEGIN_SRC bash
  pandoc --csl=council-of-science-editors.csl \
  --bibliography=/path/to/myreferences.bib \
  -f latex+smart inputfile.tex \
  -t docx+smart -o outputname.docx
#+END_SRC

Good luck!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] taskjuggler subtract scheduled and deadline

2018-05-17 Thread edgar

Bastien  writes:

AFAIK there isn't. Your patch was good start, but your expressions
inside the (or ...) were such that the one that collected the time was
never executed.

I see three options:

1. Hack the exported taskjuggler file. A hack but gets the job done
2. Try to use the START attribute on the node
3. Improve the source of ox-taskjuggler.el as you've started.

Hope that helps
Christian


Thank you, Christian and Bastien. I will try to work on this and get 
back to the list :) .


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] General advice beyond Org

2018-05-17 Thread edgar

Hello,

_I_ need help. I am in graduate school, and I keep having issues with my 
advisor for my strong inclination to use free software. I am obviously 
not in position to refuse, but she dislikes to have discussions about 
it. She pays a stipend to me every month, and my tuition is waved.


Is anyone here aware of a place where they do computational human 
biomechanics, mechanics, materials or finite elements where I could 
interact with free software? (having github, LaTeX, Python, etc.; avoid 
Micro$oft products, Matlab, Mathematica, etc.). Is there no place where 
one can simply use free software on a daily basis?


It seems from her comments that I am, otherwise, a good researcher. She 
is a nice person, but I fear that this may become an issue in the future 
for me (whether with her or other people).


As a student or junior faculty, how do you go about this? Do you just 
nod and wave your freedom good bye?


Thank you! (I will post this in other fora as well; don't let that to 
discourage you from answering, please).


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] General advice beyond Org

2018-05-18 Thread edgar

On 2018-05-18 07:12, S. Champailler wrote:

Be aware that free software is politcally loaded. It's just not a
matter of having the right or best tools, it' sometimes a question of
ideal, that is something that is *very* hard to negociate about...

Moreover, if the people you work with use, say Word, it's pretty tough
to bring in, say Latex. Because you'll disrupt the organisation of the
team.

In the case of emacs, though, things are easier : it's made to work
with text files and that is quite compatible with any other
proprietary software. You won't affect anybody's job with that.

Here at my job, I don't control any of the software I use (I have to
use Oracle, Windows, Skype), but I can choose the software that *I*
use for myself. So it's a balance.

Changing other's mind, or methods is super hard, what you experience
is just the normal. It'd be nice to know why your advisor rejects free
software equivalents (lack of features ? fear of legal battles ?
organisational ...)

Stefan


Merci, Stefan. I have tried to understand her point, and I can dissect 
it into:


1. She does not see the advantage of having to learn how to use anything 
else. It works well for her, why change and waste time on doing it?


2. She likes and is used to the "features" of the software (today, I 
discovered that one of these is the so-called "track changes"; I swear I 
have tried to introduce her to Git, not that she cares).


3. I think that she is used to the interface.

4. She says (and I have no reason to question) that the whole department 
uses the proprietary software that she uses. It is an imposition to 
others (including her) to ask them to use something different.


It is only when we have to collaborate directly that the issue arises. I 
guess that it's a similar situation as you are having (programming? she 
does not care, I can do whatever I want; publication abstract? she wants 
a DOCX or DOC). What I find unfathomable is that I can produce the 
format that she needs (even with style) with free software (thanks 
community!), but what I perceive as her reluctance to my software (or 
just plain miscommunication) prevents her from informing me or me 
understanding what exactly it is that she considers important. In other 
words, she does not seem to want to deal with it in any way.


I'm sorry, I didn't want to make this very long. I hope that I explained 
myself.


The count goes like this (so that everyone knows that I am listening, 
the count is by far the least important):
- Yield partially (1) :: You will have to work with proprietary software 
in some way, but not always.
- There is no escape (1) :: You will have to work with proprietary 
software


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-18 Thread edgar

On 2018-05-18 08:35, Joseph Vidal-Rosset wrote:

Hello Edgar, Nicolas, Eric, and everybody of the emacs-orgmode list,

I give news of my export tentatives from my .org file to odt , in a 
word:

it fails.
I suspect that the problem is my setup, but I am unable to be more 
precise

(if it was not the case, I could probably fix it).

Anyway, pandoc alone was useful and with

pandoc -f latex -t odt -o output.odt input.tex




or

pandoc my-document.tex -o my-document.docx




(I got help here:
https://askubuntu.com/questions/82634/how-to-convert-tex-into-odt
and here: 
https://jabranham.com/blog/2016/11/using-pandoc-export-to-word/ )


I have succeeded to get odt and docx files . But in these files:

   1. tables from tabular with multicolumn are not correctly exported,
   2. the bibliography is not exported
   3. figures of natural deduction proofs produced with proof.sty 
cannot be
   read, because only the latex code is given (I suppose that I need 
png
   images, but because my org export to odt fails, the export of all 
natural

   deductions proof schema also fails.).

 *Comment:* It is a terrible waste of time for a result that even if 
with a

lot of efforts the odt or docx export will finally succeed, the final
result will be far to be as nice as the pdf produced by the latex file.

Anyway, your help is still welcome.

Best wishes,

Jo.



Dear Jo,

First of all, I don't want you to have the wrong impression: I am not an 
Emacs nor Org guru. If I give you an advice, always, always take it with 
caution.


Secondly, I am glad that you are having progress! :D .

Thirdly, I think that I can help you with point (2). Did you try with 
pandoc like I said before?:


On 2018-05-16 20:19, hidden@mail wrote:

Export to ~LaTeX~ file first with ~C-c C-e l l~



  pandoc --csl=council-of-science-editors.csl \
  --bibliography=/path/to/myreferences.bib \
  -f latex+smart inputfile.tex \
  -t docx+smart -o outputname.docx


You will need
1. a CSL file to set a style to your references 
(council-of-science-editors.csl in this example). You can get some from 
here: https://github.com/citation-style-language/styles

2. a bib style (I use Biber; I don't know if that matters, just try).

This has worked for me in the past to produce a DOCX with references.

What I actually recommend is to get that DOCX and copy the references to 
what Org mode exports as ODT 
(https://lists.gnu.org/archive/html/emacs-orgmode/2018-05/msg00346.html), 
then save the ODT as DOCX in LibreOffice. The ODT produced by Org is 
almost ready, and it carries the advantage of
1. tweaking an OTT (template) to your needs to set a specific format 
(see the link above; you can try the same with --reference-doc in 
pandoc, by the way).
2. being able to (partially use siunitx or other LaTeX commands with 
LaTeXMLMath; although pandoc is working on getting siunitx as well--make 
sure to get the latest version). If you see siunitx.sty.ltxml from 
Authorea's github.com (see link above), you'll see that it may be 
possible to tweak it to your needs for proof.sty.
3. produces tables (you may need to change the format; did I mention the 
OTT?)


One disadvantage of this method is that you may need to replace the key 
to the references to the format which you need (i.e. [authoryear] to 
[1]), but you can use the Replace All function from LibreOffice (if 
there are not many references). I would advise to keep a copy of the 
list after you do the first Replace All, because it's going to be lost 
the next time that you export.


I am sure that there is a good reason for which exporting with 
references has not been implemented in the ODT export function in Org. 
As I said, I am not a guru, and I am not going to complain to the 
developers if I can't code it myself, but you may want to post a feature 
request (may be I should too).


I have never used proof.sty, but I know that there is a way to ask Org 
to load a set of packages when exporting. May be that helps (look for 
the documentation of org-latex-default-packages-alist and 
org-latex-packages-alist; C-h v org-latex-default-packages-alist)


Bonne chance! :) .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 14
Date: Fri, 18 May 2018 12:01:22 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID: <87fu2p8eq5@gmail.com>
Content-Type: text/plain

Dear Edgar,

Thanks for your help on the export of bibliography for docx or odt. I 
am

going to persist in trying to succeed it.


One is glad to be of help :) ;) .



About proof.sty, really there is not  the least problem from org-mode 
to
latex, everything  is smoothly  exported and the  final pdf  document 
is
really nice (with the really pretty 
smfart.class

[[http://smf4.emath.fr/Publications/Formats/]] that I advice.)


I will try that. Thanks.



No,  my problem  is only  with the  export of  these proof  to odt,


Oh, I know!


and
Authorea fails  also (that is  the main reason  why I gave  up 
Authorea,
which seems  to me  being a  nice project, but  not complete  enough 
and

therefore unfortunately  useless for me).


I'm sorry if I mislead you: the only thing that I recommended was the 
LaTeXML style from them. I don't know what Authorea is, actually.



The  only reasonable solutions
seems to me the png export from a succeeding org export to an odt file.


This is by far the quickest solution, and if you don't care about having 
others modify your equations in the ODT, go for it! I would even send a 
compressed file with the Org and other required files (.bib, .png, 
etc.).


I make no promises, but I will try to make a template for you that can 
export tables and equations (on my machine)




Best wishes,

--
Joseph


I wish you the best of luck on this :) .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-19 Thread edgar

Message: 16
Date: Fri, 18 May 2018 14:48:56 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hello again,

I just got this message error:

OpenDocument export failed: Wrong type argument: listp, 67




What is the meaning of this message and how can I do?

Many thanks for your help,

Jo.


I don't really know, Jo, but whenever I get something like that it means 
that

1. there is something wrong with my .emacs, or
2. there is something wrong with my document (strange character, missing 
bracket, mistyped #+OPTIONS line, etc.).


I would (and usually)
0. Open the *Messages* buffer to see if there is some useful information 
there.

1. fire up a new emacs ::  ~emacs -Q~,
2. load package ::  M-: (require 'package),
3. initialize package ::  M-: (package-initialize),
4. load Org ::  M-: (require 'org)   (you may need a path, if you did 
not install from elpa or similar).
5. take the document by chunks, export it piece by piece, and try to 
find which part holds the bug.


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-19 Thread edgar

On 2018-05-20 01:24, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


I don't really know what this means.


if you export org [you posted to org mailng list] to a foreign format,
you want your collaborator to be able to edit, save, send back without
raising a sweat.


Not really, although it would be nice--and possibly titanic to do.

now you have to integrate the changes.  you want to do this without 
annoyance.


suppose you export comments in the foreign format that contain the
equivalent of persistent markers.  you might or might not be willing
to put org id or custom id on every heading, but there might be
workarounds that are not so intrusive.  maybe your source can contain
comments with markers.  dunno.


Every great project had to start somewhere (this sounds like that). 
However, if I am going to devote time to such a gigantic task, I would 
rather spend it trying to convert others to free software rather than 
doing favours to a closed format. I am not saying that it wouldn't be 
nice to have it.



if your exported document is a subtree within a huge org file that you
edit all the time, registration allows your software to identify that
subtree, so you're not trying to change anything outside that subtree.
that alone is a win.


This sounds like a project for people in LibreOffice or Pandoc. I think 
I will contact them to see if they are interested.




but maybe we can do more.  the markers can register sections or even
paragraphs if you're doing intensive collaboration.  the tricky part
might be getting standard tools to understand that the mapping of
markers takes precedence over everything else.


Yes, big project.



details of this handwavey and possibly impossible brainstorm are left
as an exercise for the reader.


LL! you remind me of books with notes such as "after deriving the 
equation one arrives to the following expression" :P !


Thank you.

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



[O] Exporting ODT to Org [was Re: General advice beyond Org]

2018-05-20 Thread edgar

Message: 4
Date: Sun, 20 May 2018 10:08:46 +0200
From: 
To: help-gnu-em...@gnu.org
Subject: Re: General advice beyond Org
Message-ID: <20180520080846.ga15...@tuxteam.de>
Content-Type: text/plain; charset=utf-8; x-action=pgp-signed

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sat, May 19, 2018 at 06:24:49PM -0700, Samuel Wales wrote:
perhaps we can start thinking about improving registration between 
formats?


This resonates with some vague ideas that keep haunting some
dark corners of my mind:

it isn't generally possible to convert "Word" [1] into Org. But what
if that "Word" is just a slight modification of something which has
been transformed from an Org document we know?

Of course, augmenting that with "pockets" where to stash 
meta-information
which might get lost on round-trip would be even more interesting. 
Perhaps
those pockets are external, tied to some (possibly change-resistant) 
hash

made of enough context.

Did I say dark corners?

Cheers


Makes me feel lucky of being able to tie my laces! :D .

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] export to odt with LaTeX math formulae and tables

2018-05-20 Thread edgar

Message: 2
Date: Sat, 19 May 2018 19:24:12 +0200
From: Joseph Vidal-Rosset 
To: emacs-orgmode list ,   John Kitchin
,John Kitchin 
Subject: Re: [O] export to odt with LaTeX math formulae and tables
Message-ID:

Content-Type: text/plain; charset="utf-8"

Hello John, hello the list,

The results of my efforts to export an org file with equations, proofs 
and
so on to odt: imagemagick works, but the png images are ugly. 
References of

equations and bibliography do not work,


I have the same problem. So far, I can either get inter-text references 
or external packages (depending on whether I use the export from Org or 
Pandoc), but not both. I wonder if using an OTT would suffice to change 
the size of all equations in the ODT (cannot test now; away from my 
computer). If that is the case, there is an option to change the 
configuration of imagemagick and dvipng when exporting from Org to ODT. 
There, you can set the scale or resolution, I think. It makes the 
pictures to look bigger, but if the OTT forces them to be smaller again, 
I'm sure that they would look much better.



because the png images do not
reproduce the org-ref references.


I get the tags for the inter-text and bibliographic references coming 
from the LaTeX document (originally produced from Org --> LaTeX) when 
using Pandoc. I want to know: are you using Pandoc for this too?


Otherwise, I get nice inter-text references and can tweak the format if 
I take the Org export + LaTeXMLMath + OTT (template for ODT) --> ODT, 
but then I get no bibliograhpy. Is this the case for you too? If not, 
can you tell me how you solved this? (that is why I wanted to know if 
you are using Pandoc). Thanks!



I am afraid that by using another way of
exporting math. (Mathjax, Mathml...) I will not get the natural 
deductions

proofs that I get via proof.sty.


Yes, I think that has been my experience with other packages. You may 
want to get in touch with the people from LaTeXML to see if they can 
support proof.sty. In any case, there seems to be no immediate solution.



(The export to odt or docx seems to be a
real nightmare, and that is not very surprising, because LaTeX is the 
only

good solution...)


I agree on the nightmare! I made a bug (enhancement) report on 
LibreOffice to see if they can help with this. May be it would help if 
you add your "I want this too" :) . Also, consider that, when exporting 
to ODT, it's most likely because you are working with someone who does 
not care too much about the nice side of LaTeX. I would also advise you 
to consider loosing part of your format in your document. Instead of 
using \myformattingcommand{arg 1}{arg 2} which would produce a nice 
\frac{arg 1}{arg 2} in LaTeX, just replace your text for 1/2. They don't 
care!




Best wishes,

Jo.

-- next part --
An HTML attachment was scrubbed...
URL:




This link leads nowhere.

Having said all of this, I would like to ask the Org team to consider 
the next two improvements for the ODT export:
1. Support the \printbibliography[heading=none] LaTeX command (I am away 
from my computer right now, and cannot tell if it works without 
[heading=none]).
2. Support Org --> MathML with LaTeX packages (as compared to exporting 
with ImageMagick, MathToWeb or LaTeXML).



Salut!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] General advice beyond Org

2018-05-23 Thread edgar
For posterity: I have answered to the messages on this thread elsewhere. 
Thanks!


-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] filter for svg latex-export

2018-09-06 Thread edgar

Hi,

I want to report that I can use the new version  of the SVG (2.00b) 
LaTeX directly. The developer (Falk; Bcc) said that there will be a new 
release soon. I attach an example of the strange things that I can 
achieve. I hope that it's useful :) .


Cheers!

On 2018-01-09 03:34, John Kitchin wrote:

If all you are doing is replacing includesvg with simplesvg, then you
might try this:

#+BEGIN_SRC emacs-lisp
(let ((org-export-filter-link-functions  '((lambda (txt _ _)
 (replace-regexp-in-string "includesvg" 
"simplesvg" txt)
  (org-latex-export-as-latex))
#+END_SRC

If you are doing more than that (it looks like you are adding options?)
then one alternative option is just put a copy of your modified 
function

in your init file after you load org, and then it will shadow the
ox-latex function and you might not have to change anything when you
update as long as no incompatible changes are in the update. I know,
that is hacky, but it works in cases like this.



ed...@openmail.cc writes:


Hello,

I once tried to create a filter (is that the name?) to modify the
function which exports SVG files. Verdict: I suck! Thus, I keep
modifying the ox-latex.el every time that I upgrade (see attached).
Would someone please tell me what is the right way to achieve that
(without modifying the code, please? Thanks!

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out 
of the NSA's hands!

$24.95 ONETIME Lifetime accounts with Privacy Features!
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  *** 
org-20180103/ox-latex.el	2018-01-07 16:53:43.477464348 -0700

--- plugins/ox-latex.el 2018-01-07 16:39:52.117462098 -0700
***
*** 2425,2434 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
!   (setq image-code (replace-regexp-in-string "^includegraphics"
!  "\\includesvg"
!  image-code
!  nil t))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code
--- 2425,2437 
  (t (format "[%s]" options)))
path))
(when (equal filetype "svg")
! (setq image-code
!   (format "\\simplesvg%s{%s}"
!   (cond ((not (org-string-nw-p options)) "")
! ((string-prefix-p "," options)
!  (format "{%s}" (substring options 1)))
! (t (format "{%s}" options)))
!   path))
(setq image-code (replace-regexp-in-string "\\.svg}"
   "}"
   image-code



--
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



-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  

svg-sample.tar.gz
Description: Binary data


ox-latex-subfig

2021-10-04 Thread edgar

Hello nice people!

I just want to let you know about ox-latex-subfig, which you can find 
here: https://notabug.org/broncodev/ox-latex-subfig.git . It provides a 
filter to convert Org tables into "sub-figures" when exporting to (PDF) 
\LaTeX.


As you may know, the subcapiton package is deprecated, and I just like 
having figures side by side. I hope that it's useful to you as it is for 
me :) .


Thanks for Org! (you changed my life for the better).

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



how to org-babel-detangle with nested noweb?

2021-10-16 Thread edgar

Hi,

I am tangling Python files with =:comments link=. I don't know if a  
way already exits, but I would like to detangle (=org-babel-detangle=)  
/noweb/ blocks. For instance:


#+name: binary_metrics.py
#+begin_src python
  import numpy as np

  np.random.seed(42)
  true_vals = np.random.randint(0, 2, size=5)
  pred_vals = np.ones(5)
#+end_src

#+name: binary_metrics2.py
#+begin_src python :tangle ../Code/Sandbox/tmp.py :dir  
../Code/Sandbox/ :comments noweb :noweb yes :padline yes

  <>
#+end_src

Then, if I modify tmp.py and do an =org-babel-detangle=, the changes  
would go back to =binary_metrics.py=. As it is not working for me at  
the moment, I would like to know if

1. I am doing something wrong (it should be working),
2. there is a package which can handle this, or
3. this can be a feature request
The reason for which I would like to have this is to take advantage of  
Org to have reproducible and maintainable documents when programming  
in Python.


The reason behind this is that I am unaware of any package which  
allows =org-edit-special= to integrate with other blocks in the  
document in such a way that modules are imported, e.g:


#+name: code1.py
#+begin_src python
  import numpy as np
#+end_src

#+caption: Try to =org-edit-special= and get the documentation for  
=np= (with eldoc for instance).

#+begin_src python :noweb yes
  <>
  np
#+end_src

#+begin_src emacs-lisp
  (format "%s\n%s"
   (emacs-version)
   (org-version))
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27,  
cairo version 1.17.4)

:  of 2021-03-26
: 9.4.6


Thank you!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to org-babel-detangle with nested noweb?

2021-10-18 Thread edgar

On 2021-10-18 16:31, Tom Gillespie wrote:

Hi Edgar,
Degangling of nested noweb blocks tangled using
:comments noweb is broken at the moment. There are
some deep bugs that need to be worked out, and last
time I looked at the code I think my conclusion that it
was better to do a complete rewrite starting from a new
specification of the behavior along with some gnarly test
cases to ensure that everything works as expected.
Best!
Tom


Thanks for the reply :) . If you need guinea pigs, let me know.

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

Hi. I hope that this is not a known issue and that you can help me.

* Short description

If I export this as html

#+begin_src org
   test_my_subs
#+end_src

the corresponding line is exported as

#+begin_src html
   
   testmysubs
   
#+end_src

* Expected output

I was expecting the output to be
#+begin_src html
   
   test_my_subs
   
#+end_src

In the [[help:org-export-with-sub-superscripts][documentation]], it 
reads:

#+begin_quote
Still, ambiguity is possible.  So when in doubt, use {} to enclose
the sub/superscript.  If you set this variable to the symbol ‘{}’,
the braces are *required* in order to trigger interpretations as
sub/superscript.  This can be helpful in documents that need "_"
frequently in plain text.
#+end_src

What am I doing wrong? Thanks!

* Emacs and Org configuration

I am using this with ~emacs -q~:

#+begin_src emacs-lisp
(setq
   ;; Use {} for super and subscripts
   org-export-with-sub-superscripts "{}")
#+end_src

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, 
cairo version 1.17.4)

:  of 2021-03-26

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.4.6

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

On 2022-02-20 21:49, Kyle Meyer wrote:

{} should be a symbol.  Try

  (setq org-export-with-sub-superscripts '{})


Thank you!!!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: How to enforce sub-scripts with {} only for HTML export?

2022-02-20 Thread edgar

On 2022-02-20 23:29, Greg Minshall wrote:

Edgar,

one of my .org files has this

#  ^:{}: disable super/subscripting: 
https://stackoverflow.com/a/698791/1527747

#+options: ^:{}


ymmv.


Thank you, Greg. Sometimes I need to export sub-headings, selected text 
or included files, and the variable gets overridden. Thanks a lot :) .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Default attributes for images in beamer export

2022-05-19 Thread edgar

Hello,

I am trying to set the default height (or width) of all pictures for  
my Beamer  slides (ox-beamer) for a single file. How can I do it?


I am currently trying this:


#+begin_src org

#+BIND: org-latex-image-default-width 0.5\textwidth
#+property: :latex-image-default-width 0.6\regheight

* Test

** Slide:B_block:
:PROPERTIES:
:BEAMER_env: block
:END:

#+name: testing
#+caption: this figure
[[file:../some.png]]

#+begin_src emacs-lisp
  (org-version)
#+end_src

#+RESULTS:
: 9.5.2

#+begin_src emacs-lisp
  (emacs-version)
#+end_src

#+RESULTS:
: GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33,  
cairo version 1.17.6)

:  of 2022-04-20

#+end_src

and I get this
#+begin_src latex
% Created 2022-05-19 Thu 19:12
% Intended LaTeX compiler: pdflatex
\documentclass[presentation]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usetheme{default}
\date{\today}
\title{}
\hypersetup{
 pdfauthor={},
 pdftitle={},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 28.1 (Org mode 9.5.2)},
 pdflang={English}}
\begin{document}

\begin{frame}{Outline}
\tableofcontents
\end{frame}


\begin{frame}[label={sec:orgaf83f29},fragile]{Test}
 \begin{block}{Slide}
\begin{figure}[htbp]
\centering
\includegraphics{../some.png}
\caption{\label{fig:orga0f8614}this figure}
\end{figure}

\begin{verbatim}
(org-version)
\end{verbatim}

\begin{verbatim}
(emacs-version)
\end{verbatim}
\end{block}
\end{frame}
\end{document}
#+end_src


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-20 Thread edgar

On 2022-05-19 18:29, Eric S Fraga wrote:

On Thursday, 19 May 2022 at 17:17, wrote:

#+BIND: org-latex-image-default-width 0.5\textwidth


Try

#+BIND: org-latex-image-default-width "0.5\\textwidth"

and make sure org-export-allow-bind-keywords is set to t.


Oh, ok! That works. Thank you!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-20 Thread edgar

On 2022-05-20 19:50, ed...@openmail.cc wrote:

On 2022-05-19 18:29, Eric S Fraga wrote:

On Thursday, 19 May 2022 at 17:17, wrote:

#+BIND: org-latex-image-default-width 0.5\textwidth


Try

#+BIND: org-latex-image-default-width "0.5\\textwidth"

and make sure org-export-allow-bind-keywords is set to t.


Oh, ok! That works. Thank you!


Actually, if I have this (The =org-latex-image-default-option= is  
applied everywhere, but =org-latex-image-default-width= is not):


#+begin_src org
* Example

#+attr_latex: :height 0.5\regheight
file:example.png

file:example.png

* Configuration:ARCHIVE:noexport:
#+BIND: org-latex-image-default-width "0.98\\textwidth"
#+BIND: org-latex-image-default-height "\\regheight"
#+BIND: org-latex-image-default-option "keepaspectratio"
#+end_src

#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,height=0.5\regheight]{example.png}
\end{center}

\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex


But I was expecting

#+caption: Excerpt of results when exporting with Beamer LaTeX
#+begin_latex
\begin{frame}[label={sec:org22d94b4}]{Example}
\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=0.5\regheight]{example.png}
\end{center}

\begin{center}
\includegraphics[keepaspectratio,width=0.98\textwidth,height=\regheight]{example.png}
\end{center}
\end{frame}
#+end_latex

Is this the expected behaviour? Thanks again :) .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Default attributes for images in beamer export

2022-05-24 Thread edgar

On 2022-05-23 10:59, Timothy wrote:

Hi Eric,


But given that you also want to keep the aspect ratio, I am curious as
to why you would need/want to specify both?


Just on this, the `keepaspectratio' option of `graphicx' could be 
relevant here.


All the best,
Timothy


Thanks. Yes, I think that Eric is asking about why I have the three 
options set already: width, height and keepaspectratio.


In my experience, sometimes, my slide is too narrow (as compared to 
wide) and other times, it is too short (as compared to high). Since I 
don't want to be dealing with which one is going to work the best, I 
just set the three options to forget about them (as a default), and 
usually the smallest size will kick in (which is the safest for my 
slides). So, for example, even if I explicitly say that I want a 
specific width, it may be  that the height works better and LaTeX 
(Beamer) is lenient with me. I am not saying that it makes sense, it's 
just what I use :P .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



All the best

2020-03-26 Thread edgar

Dear Emacs and Org community,

I just want to send a small note to wish you the best during these times 
of need. Let us remember that it is community which allows us to keep 
going as a species. Please, take care of yourselves and those who 
surround you, and let us do our best to overcome the circumstances with 
a smile :D .


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: restore window configuration after org-edit-src-exit

2020-05-17 Thread edgar
Hello. I would like to request this to be pushed onto the =maint= branch 
(7684b59c7) or make it the default, please.


https://lists.gnu.org/archive/html/emacs-orgmode/2019-12/txtr_q1WmvVPH.txt

which is related to (at least) commits 7d5e931f7 and d833920de from the 
=master= branch. I have also tested by using lisp/org-src.el from the 
current =master= (9bc0cc7fb) on the =maint= branch (7684b59c7), and it 
works for me. Thanks!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



#+include from same file when exporting

2020-09-15 Thread edgar

Hello, dear list!

My comment for today is that I have something like this:

this-file.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python
  import numpy as np
#+end_src

** Fancy subheader 2

Res 1
#+include: "this-file.org::blk1"

Res 2
#+include: "this-file.org::blk1" src python

Res 3
#+include: "./this-file.org::blk1" src python
.. end

When I export /Fancy subheader 2/ as text, I get

this-file.txt
..
  ━━━
   FANCY SUBHEADER 2
  ━━━


Table of Contents
─




Res 1
┌
│ import numpy as np
└

Res 2
┌
│ * Fancy header 1
│
│ #+NAME: blk1
│ #+begin_src python
│   import numpy as np
│ #+end_src
│
│ ** Fancy subheader 2
│
│ Res 1
│ #+include: "this-file.org::blk1"
│
│ Res 2
│ #+include: "this-file.org::blk1" src python
│
│ Res 3
│ #+include: "./this-file.org::blk1" src python
└

Res 3
┌
│ * Fancy header 1
│
│ #+NAME: blk1
│ #+begin_src python
│   import numpy as np
│ #+end_src
│
│ ** Fancy subheader 2
│
│ Res 1
│ #+include: "this-file.org::blk1"
│
│ Res 2
│ #+include: "this-file.org::blk1" src python
│
│ Res 3
│ #+include: "./this-file.org::blk1" src python
└
.. end

I think that all of them should just export the python block, right?

Also, I think that it would be very useful to have something like this:

another-file.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python :exports none
  print(2)
#+end_src

#+RESULTS:
: 2

** Fancy subheader 2

Res 1
#+include: "this-file.org::blk1" src python :exports both
.. end

Which would allow to have the =#+include= override the =:exports= 
directive from the original block and get the results from the block. 
Right now, I can do


yaf.org
..
* Fancy header 1

#+NAME: blk1
#+begin_src python
  print(2)
#+end_src

** Fancy subheader 2

Res 1
#+begin_src python :noweb yes :exports both
  <>
#+end_src

#+RESULTS:
: 2
.. end

to get the same result, but I thought that this could be a nice feature 
to add.



GNU Emacs 27.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.21, 
cairo version 1.17.3) of 2020-09-08


Org mode version 9.3.7 (release_9.3.7-25-g4f22fd @ 
/home/edgar/.emacs.d/org-mode/lisp/)


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Ignore, skip, omit headline when exporting to LaTeX

2022-07-07 Thread edgar

Firstly, do tell me if I am breaking the nettiquete.

I found someone asking online how to ignore a headline when exporting  
to LaTeX. This e-mail is to avoid creating an account on that forum  
and to provide a solution.


(require 'ox-extra)

  (defun org-export-ignore-headlines-latex (data backend info)
"Hack of `org-export-ignore-headlines' for LaTeX: add a  
conditional for the latex backend and replace 'ignore' with 'ignoreltx'"

(when (org-export-derived-backend-p backend 'latex)
  (org-element-map data 'headline
(lambda (object)
  (when (member "ignoreltx" (org-element-property :tags object))
(let ((level-top (org-element-property :level object))
  level-diff)
  (mapc (lambda (el)
  ;; recursively promote all nested headlines
  (org-element-map el 'headline
(lambda (el)
  (when (equal 'headline (org-element-type el))
(unless level-diff
  (setq level-diff (-  
(org-element-property :level el)

  level-top)))
(org-element-put-property
 el
 :level (- (org-element-property :level el)
 
level-diff)

  ;; insert back into parse tree
  (org-element-insert-before el object))
(org-element-contents object)))
(org-element-extract-element object)))
info nil)
  data))

  (push '(ignore-latex-headlines
  org-export-ignore-headlines-latex
  org-export-filter-parse-tree-functions)
ox-extras)
  (ox-extras-activate '(latex-header-blocks ignore-headlines  
ignore-latex-headlines))



-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: Ignore, skip, omit headline when exporting to LaTeX

2022-07-08 Thread edgar

On 2022-07-08 05:04, Ihor Radchenko wrote:

ed...@openmail.cc writes:


This is on topic and can be useful for others  So, there should 
be no issue with

posting this here 


Thanks!


Note that this modified version of the function is derived from
org-export-ignore-headlines from ox-extra.el [1]


Thank you for the link.


However, a part of the original function code is omitted.
AFAIU, this version also discards the headline contents, in addition to
the headline itself (unlike what org-export-ignore-headlines does).


Sorry, I just had the version from 2014! :P  As mentioned in the comment 
of the new function, I just added a conditional and replaced "ignore" 
with "ignoreltx". As a suggestion, it could be possible to replace 
"ignore" with a variable and use another variable such that the headline 
is omitted when other export types (latex, html, etc.) are used.


In any case: Thanks for almost 20 years!



[1] https://git.sr.ht/~bzg/org-contrib

Best,
Ihor


To you too!

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



how to beamer export overlay figure?

2022-08-10 Thread edgar

Hello!

I would like to know if there is an "Org" way of doing this with the 
beamer export:


#+begin_src latex
* Section
** Sub-section
*** Slide
 figure block
#+latex: \includegraphics<2->[height=0.5\regheight]{example-image-a}
#+end_src

That is: replacing the =#+latex:= line with a =[[file:figure.png]]= 
which allows for overlays with Beamer. I already tried some stuff, but I 
think that it would only be noise to add it here. Thanks!


-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 09:51, Fraga, Eric wrote:

#+attr_latex: :options <2->
[[file:figure.png]]


Thanks. That creates

\begin{center}
\includegraphics[<2->,width=.9\linewidth]{example-image-a.png}
\end{center}

(the <2-> is within the square brackets).

GNU Emacs 28.1, Org 9.4.6. I did M-: (require 'ox-beamer)

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: how to beamer export overlay figure?

2022-08-11 Thread edgar

On 2022-08-11 14:06, Fraga, Eric wrote:

On Thursday, 11 Aug 2022 at 13:05, ed...@openmail.cc wrote:

(the <2-> is within the square brackets).


Ooops.  Sorry about that.  Didn't look closely enough at the LaTeX
created.  My bad.

In that case, I'm out of suggestions other than to put the <2-> on the
list entry itself (which I believe is possible) or as an option for a
block that only contains the figure?


Thank you for your time and the suggestions :) .

-
This free account was provided by VFEmail.net - report spam to ab...@vfemail.net

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



  1   2   >