Re: [O] org-mode vs pandoc export

2019-09-26 Thread Joseph Vidal-Rosset
Hello,

Many thanks Emmanuel for your help.

Indeed, I'm  using org-ref and scimax, all the  nice tools that
John offers very  generously to the community; org-ref  is so convenient
that  now I  cannot  imagine to  work  without it.  Maybe  John has  the
solution for future exports. (I did not succeed to export in odt because
of links, bibliography links.)

Finally the best result was done directly via pandoc, via a command line
like this one:

pandoc -s --filter pandoc-crossref --bibliography=reforg.bib --csl=ieee.csl -o 
mydocument.odt mydocument.org

But pandoc-crossref never  worked and I had also to  make png images for
tables.

The best  solution that I  found was to install  libreoffice-texmaths. I
just had  to enter "sudo  aptitude install libreoffice-texmaths"  via my
GNU/Linux Debian sid, but for other OS, the package is here

https://extensions.libreoffice.org/extensions/texmaths-1

and it works.

Of course the output is less pretty than the pdf via the tex life

I hope that it will help other people.

Best wishes,

Jo.

PS: The publisher is in philosophy... 



[O] moving an entry from one date tree to another

2019-09-26 Thread Alan Schmitt

Hello,

Is there an easy way to move an entry from one date tree to 
another? I

guess I need two things:
- figure out where in the date tree the entry is,
- create the parents if needed, and move it there.

This might be a more general question: given an entry in some 
file, can
I move it recreating the path form the root of the file to another 
file?


Thanks,

Alan


signature.asc
Description: PGP signature


Re: [O] org-mode vs pandoc export

2019-09-26 Thread Emmanuel Charpentier
I suppose that you need org-mode to use Babel features (code and/or
code execution results intermixed with your paper's text).

I have had trouble with .dot exporting using the builtin .dot exporter,
but can't, for the life of me, remembering if my troubles were cross-
reference or citations-related (an academic paper usually needs
both...). I noted that the references done via John Kitchin's excellent
org-ref didn't export to .dot.

As far as I can tell, ox-pandoc does its own numbering (generating an
intermediate temporary file that I never managed to catch) and does not
use  pandoc-crossref.

ISTR that a "clever" use of org-ref allows to number equations... in
LaTeX output. I also STR that it doesn't work in .docx output. John
Kitchin (the org-ref author) thinks that the key is to generate a
correct \LaTeX file and to export that to .docx via pandoc.

At this point, writing a \LaTeX file with pandoc export in mind is
probably your best bet. There exist (limited) alternatives to the 
Babel features of org-mode:
 - knitr (supports R and Python code in "session"mode, i. e. continuity
between code chunks),
 - SageTeX (post-processing in a single Sagemath run ; can include code
for a variety of math software, including R),
 - Pythontex (postprocessor, supports Python, Sage, Octave and a couple
other, but not R ; a clever use of knitr and Pythontex is possible).

Possible alternative: Markdown + Codebraid (supports a hanful of
langiages, including R and (development branch) Sage). This should
accept pandoc-crossref numbering. But it's Markdown, with limited
formatting abilities...

So, we have an array of partial solutions, none universal. Pick your
poison...

Out of curiosity: in which domain still exist journal publishers not
accepting \LaTeX ? I suspect medicine...

HTH,

--
Emmanuel Charpentier





Re: [O] Tables: Exclude headings in Row Number?

2019-09-26 Thread Neil Jerram
Well, the code for this is in `org-table-overlay-coordinate-overlays' in
org-table.el.  There isn't an existing flag for your request, but of course
you can play with that code as you like.

For example, if the `(setq ih (1+ ih))' is changed to `(setq id 0 ih (1+
ih))', the row numbers will start again from 1 after each hline.

Best wishes,
Neil


On Mon, 23 Sep 2019 at 04:24, Nathan Neff  wrote:

> I also re-read my initial question and your response *does* address my
> mis phrased question.  To rephrase my question, I have a table
> with these values:
>
> | heading col 0  | heading col 1 |
> | -- | - |
> | A   | B
> | C  | D
>
> I found the org-table-toggle-coordinate-overlays
> which displays an overlay showing the row number:
>
> https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8
>
> I would like to know if there's a way to influence
> org-table-toggle-coordinate-overlays
> (e.g. some flag like "don't count rows before headings")
>
> Thanks,
> --Nate
>
>
>
>
>
>
> On Sun, Sep 22, 2019 at 10:22 PM Nathan Neff 
> wrote:
>
>> Hi Neil,
>>
>> Unfortunately, no - This code will print the number of rows in my table -
>> it does
>> not add a column to my table, with numbering starting at the first row
>> under the
>> headline.
>>
>> I really like the example, where I can mess with the table using lisp
>> though - thank
>> you!
>> --Nate
>>
>> On Thu, Sep 19, 2019 at 9:13 AM Neil Jerram  wrote:
>>
>>> Does this answer your question?
>>>
>>> #+NAME: tt
>>> | num | ID |
>>> |-+|
>>> |   1 | A  |
>>> |   2 | B  |
>>> |   3 | C  |
>>> |   4 ||
>>> |   5 | E  |
>>>
>>> #+BEGIN_SRC emacs-lisp :var tt=tt
>>> (length tt)
>>> #+END_SRC
>>>
>>> #+RESULTS:
>>> : 5
>>>
>>> Best wishes,
>>> Neil
>>>
>>>
>>> On Wed, 18 Sep 2019 at 18:39, Nathan Neff  wrote:
>>>
 Hello all,

 I have a table like this:


 | ID |
 ||
 |  2 |
 |  3 |

 and I want to know how many rows there are w/o the ID heading
 and w/o the horizontal separator.  I found the
 org-table-toggle-coordinate-overlays
 which displays an overlay showing the row number:

 https://www.evernote.com/l/AOJvD5ty6RRIBYAcSWV-047CKCHT5NIAhl8

 However, the heading is included in the row number (which makes sense).

 Is there a way to ignore lines above a heading (or mark a heading in
 some way?

 I found a way to add a seq. number by using Calc [1] but I was
 wondering if
 there's a way to tell the org-table-toggle-coordinate-overlays not to
 count the
 heading.

 Thanks,
 --Nate

 [1]


 | num | ID |
 |-+|
 |   1 | A  |
 |   2 | B  |
 |   3 | C  |
 |   4 ||
 |   5 | E  |
 #+TBLFM: $1=vlen(@I..0)


 https://stackoverflow.com/questions/9267050/how-to-achieve-a-row-index-column-in-emacs-org-mode-using-a-calc-column-rule





Re: [O] Bug: COMMENT and noweb-ref

2019-09-26 Thread Marco Wahl
Sebastian Miele  writes:

> In the following days I will try to fix it and write a regression test.
>
> However, in the unlikely case that this is a feature and not a bug,
> please let me know. Please also let me know, if anyone is already on it.
>
> Sebastian Miele  writes:
>
>> org-babel-tangle on
>>
>>   * A
>>
>> #+BEGIN_SRC elisp :tangle yes :noweb yes
>> ;; A
>> <>
>> #+END_SRC
>>
>>   * COMMENT B
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC

>> [...]

>>
>> produces a file with A and B in it. Expected: Just A. Changing
>>
>> #+BEGIN_SRC elisp :noweb-ref B
>> ;; B
>> #+END_SRC
>>
>> to
>>
>> # #+BEGIN_SRC elisp :noweb-ref B
>> # ;; B
>> # #+END_SRC
>>
>> does yield the expected result.

Your expectation looks right to me.  I guess nobody thought about this
case before.


Happy hacking,
-- 
Marco




Re: [O] Bug: COMMENT and noweb-ref

2019-09-26 Thread Sebastian Miele
In the following days I will try to fix it and write a regression test.

However, in the unlikely case that this is a feature and not a bug,
please let me know. Please also let me know, if anyone is already on it.

Sebastian Miele  writes:

> org-babel-tangle on
>
>   * A
>
> #+BEGIN_SRC elisp :tangle yes :noweb yes
> ;; A
> <>
> #+END_SRC
>
>   * COMMENT B
>
> #+BEGIN_SRC elisp :noweb-ref B
> ;; B
> #+END_SRC
>
>   * COMMENT C
>
> #+BEGIN_SRC elisp :tangle yes
> ;; C
> #+END_SRC
>
> produces a file with A and B in it. Expected: Just A. Changing
>
> #+BEGIN_SRC elisp :noweb-ref B
> ;; B
> #+END_SRC
>
> to
>
> # #+BEGIN_SRC elisp :noweb-ref B
> # ;; B
> # #+END_SRC
>
> does yield the expected result.



[O] org-mode vs pandoc export

2019-09-26 Thread Joseph Vidal-Rosset
Hello,

Does someone succeeds to export scientific paper with numbering
formulas from LateX to odt or docx?

I have tried to use pandoc, but pandoc-crossref does not work...

(I hate these publishers that do not know LaTeX... )

Best wishes,

Jo.



Re: [O] Bug: Operator associativity problem [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.1/lisp/org/)]

2019-09-26 Thread Robert Pluim
> On Wed, 25 Sep 2019 20:16:26 +0200, Justus Winter 
>  said:

Justus> "Fraga, Eric"  writes:
>> On Wednesday, 25 Sep 2019 at 11:50, Justus Winter wrote:
>>> I noticed a operator associativity problem when evaluating formulas in
>>> tables.  To reproduce, enter:
>>> 
>>> | :=6/2*3 |
>>> 
>>> And evaluate the formula.  This results in:
>>> 
>>> | 1 |
>>> #+TBLFM: @1$1=6/2*3
>> 
>> Yes, this is a property (feature, ?) of Emacs Calc.

Justus> Wow!  Re-reading the org-mode documentation I see that it is 
prominently
Justus> mentioned indeed, and that it is an precedence thing, not an
Justus> associativity one.

See 'calc-multiplication-has-precedence'

Robert


signature.asc
Description: PGP signature