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

2017-12-25 Thread Adrian Bradd

According to Karl's post [1], pandoc now supports conversion with some
template support. I haven't tried it myself though.

Cheers,

Adrian

[1] http://www.karl-voit.at/2017/12/17/pandoc-docx-reference/

Tim O'Callaghan  writes:

> Thanks!
> I will experiment with this work-flow, but i have one other issue, any
> advice on working with existing (word) document templates?
> I have to work within templates, so it would be great if i could manage to
> conform.
>
> On 19 December 2017 at 06:09,  wrote:
>
>> On 2017-12-15 12:28, Eric S Fraga wrote:
>>
>>> On Friday, 15 Dec 2017 at 03:20, ed...@openmail.cc wrote:
>>>
>>> [...]
>>>
>>> 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

>>>
>>> What version of pandoc are you using?  My Debian (testing) has pandoc
>>> 1.19.2.4 and it does not seem to recognise the +smart bits...
>>>
>>> But, in any case, pandoc (without the smart bits) does seem to do a
>>> reasonable job and creates proper maths entities.  This is good enough
>>> for me!  My once a year pain is relieved.  :-)
>>>
>>> Thanks,
>>> eric
>>>
>>
>> I'm sorry for the very late response (deadlines). I will check for the
>> pandoc version and let you know. One of the distros that I use is a rolling
>> linux. The other one is the same as yours. I would also like to note that I
>> got the pandoc snippet from Dr. Kitchin's website:
>> http://kitchingroup.cheme.cmu.edu/blog/2015/01/29/Export-org
>> -mode-to-docx-with-citations-via-pandoc/
>>
>> I checked, and I am very satisfied with ~C-c C-e o o~. I set #+OPTIONS:
>> dvipng. You can't edit the formulas, but I don't care about that. All my
>> equations look fine and the pictures too. I also have to copy my references
>> by hand, but that is the least of my issues, and I only do it when the
>> final version is ready. I also get my source blocks right.
>>
>> I think that the only thing which is really missing from Org as related to
>> exporting is handling pictures inside tables (a way to create subfigures).
>> There is a partial solution with ox-latex-subfigure [[
>> https://github.com/linktohack/ox-latex-subfigure]], but is limited in the
>> :width parameter. One of these days I will learn LISP and implement it
>> myself (unless another brave soul goes for it first). Even Beamer columns
>> can be used to this end, but this would only work for presentations. I
>> don't know any other way.
>>
>>
>> -
>>
>> 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!
>>


-- 
Adrian

Bioelectronic Systems Lab,
Columbia University



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

2017-12-21 Thread Tim O'Callaghan
Thanks!
I will experiment with this work-flow, but i have one other issue, any
advice on working with existing (word) document templates?
I have to work within templates, so it would be great if i could manage to
conform.

On 19 December 2017 at 06:09,  wrote:

> On 2017-12-15 12:28, Eric S Fraga wrote:
>
>> On Friday, 15 Dec 2017 at 03:20, ed...@openmail.cc wrote:
>>
>> [...]
>>
>> 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
>>>
>>
>> What version of pandoc are you using?  My Debian (testing) has pandoc
>> 1.19.2.4 and it does not seem to recognise the +smart bits...
>>
>> But, in any case, pandoc (without the smart bits) does seem to do a
>> reasonable job and creates proper maths entities.  This is good enough
>> for me!  My once a year pain is relieved.  :-)
>>
>> Thanks,
>> eric
>>
>
> I'm sorry for the very late response (deadlines). I will check for the
> pandoc version and let you know. One of the distros that I use is a rolling
> linux. The other one is the same as yours. I would also like to note that I
> got the pandoc snippet from Dr. Kitchin's website:
> http://kitchingroup.cheme.cmu.edu/blog/2015/01/29/Export-org
> -mode-to-docx-with-citations-via-pandoc/
>
> I checked, and I am very satisfied with ~C-c C-e o o~. I set #+OPTIONS:
> dvipng. You can't edit the formulas, but I don't care about that. All my
> equations look fine and the pictures too. I also have to copy my references
> by hand, but that is the least of my issues, and I only do it when the
> final version is ready. I also get my source blocks right.
>
> I think that the only thing which is really missing from Org as related to
> exporting is handling pictures inside tables (a way to create subfigures).
> There is a partial solution with ox-latex-subfigure [[
> https://github.com/linktohack/ox-latex-subfigure]], but is limited in the
> :width parameter. One of these days I will learn LISP and implement it
> myself (unless another brave soul goes for it first). Even Beamer columns
> can be used to this end, but this would only work for presentations. I
> don't know any other way.
>
>
> -
>
> 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-18 Thread Scott Randby


On 12/17/2017 10:14 PM, Grant Rettke wrote:
> On Sun, Dec 17, 2017 at 10:55 AM, Scott Randby  wrote:
>>
>> On 12/15/2017 01:43 PM, Grant Rettke wrote:
>>> Write it in Org. Export to Pandoc file pandoc-A.
>>>
>>> Export Pandoc file pandoc-A to Word file word-A. Send that to your
>>> peers for review.
>>>
>>> Export Word file word-A to Pandoc file pandoc-B.
>>>
>>> Get the Word from your peers, the file with changes from their review,
>>> word-C. Export it to pandoc-C
>>>
>>> Do a diff between pandoc-B and pandoc-C. Integrate the results into
>>> your original Org file.
>>
>> I'm confused. My understanding is that Pandoc converts between file formats, 
>> so I don't understand what you mean by a Pandoc file. What is the file 
>> format of pandoc-A?
>>
>> Is this what you mean?
>>
>> Pandoc: Org -> word-A
>> Pandoc: word-A -> pandoc-B.org
>> Pandoc: word-C -> pandoc-C.org
> 
> Pandoc has their own markup language "Pandoc Markdown". That is what I
> meant by "Pandoc". And that was totally wrong in regards to your
> question. Sorry my mistake.
> 
> You said it right, yes. It makes it easy to diff the "reverse
> engineered" Org fils to see what changed from the reviewers.

I appreciate the clarification. Your method is very useful to me since I 
frequently have to work with people who know nothing but Word and since 
LibreOffice doesn't deal well with some of the poorly formatted DOCX files I 
receive. I've been experimenting with some sample files, and your method works 
great.

I know this is a lost cause, but I dream of the future in which document 
collaboration is done using only text files.

Scott
> 



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

2017-12-17 Thread Grant Rettke
On Sun, Dec 17, 2017 at 10:55 AM, Scott Randby  wrote:
>
> On 12/15/2017 01:43 PM, Grant Rettke wrote:
> > Write it in Org. Export to Pandoc file pandoc-A.
> >
> > Export Pandoc file pandoc-A to Word file word-A. Send that to your
> > peers for review.
> >
> > Export Word file word-A to Pandoc file pandoc-B.
> >
> > Get the Word from your peers, the file with changes from their review,
> > word-C. Export it to pandoc-C
> >
> > Do a diff between pandoc-B and pandoc-C. Integrate the results into
> > your original Org file.
>
> I'm confused. My understanding is that Pandoc converts between file formats, 
> so I don't understand what you mean by a Pandoc file. What is the file format 
> of pandoc-A?
>
> Is this what you mean?
>
> Pandoc: Org -> word-A
> Pandoc: word-A -> pandoc-B.org
> Pandoc: word-C -> pandoc-C.org

Pandoc has their own markup language "Pandoc Markdown". That is what I
meant by "Pandoc". And that was totally wrong in regards to your
question. Sorry my mistake.

You said it right, yes. It makes it easy to diff the "reverse
engineered" Org fils to see what changed from the reviewers.



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

2017-12-17 Thread Scott Randby
On 12/15/2017 01:43 PM, Grant Rettke wrote:
> Write it in Org. Export to Pandoc file pandoc-A.
> 
> Export Pandoc file pandoc-A to Word file word-A. Send that to your
> peers for review.
> 
> Export Word file word-A to Pandoc file pandoc-B.
> 
> Get the Word from your peers, the file with changes from their review,
> word-C. Export it to pandoc-C
> 
> Do a diff between pandoc-B and pandoc-C. Integrate the results into
> your original Org file.

I'm confused. My understanding is that Pandoc converts between file formats, so 
I don't understand what you mean by a Pandoc file. What is the file format of 
pandoc-A?

Is this what you mean?

Pandoc: Org -> word-A
Pandoc: word-A -> pandoc-B.org
Pandoc: word-C -> pandoc-C.org

Scott Randby



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

2017-12-15 Thread Grant Rettke
Write it in Org. Export to Pandoc file pandoc-A.

Export Pandoc file pandoc-A to Word file word-A. Send that to your
peers for review.

Export Word file word-A to Pandoc file pandoc-B.

Get the Word from your peers, the file with changes from their review,
word-C. Export it to pandoc-C

Do a diff between pandoc-B and pandoc-C. Integrate the results into
your original Org file.
Sincerely,

Grant Rettke

(accidentally replied off list)
Sincerely,

Grant Rettke


On Fri, Dec 15, 2017 at 8:54 AM, Tim O'Callaghan  wrote:
> Does anyone know of a good round trip/review workflow for word documents?
> I'm interested in generating documents and processing feedback/comments,
> especially with word document tracking.
>
> On 15 December 2017 at 14:30, Eric S Fraga  wrote:
>>
>> On Friday, 15 Dec 2017 at 13:58, Fabrice Popineau wrote:
>> > The best way  is probably to generate a PDF with LaTeX
>> > and to open it with MS-Word. Yes, it can do that, and the math import
>> > is quite good (for what I have seen, at least as good as any other
>> > alternative option).
>>
>> Interesting.  I don't use MS Word (I'm on Linux on all of my systems)
>> but may ask somebody to check this out for me.  LibreOffice almost works
>> importing the PDF generated via LaTeX but not quite.  OneDrive (web
>> interface) doesn't quite work either.
>>
>> But pandoc is handling most of what I need.
>>
>> thanks,
>> eric
>>
>> --
>> Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
>
>



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

2017-12-15 Thread Adonay Felipe Nogueira
A few weeks ago I made a suggestion similar to what you want, see [1].

[1] 
.

2017-12-15T15:54:06+0100 Tim O'Callaghan wrote:
> Does anyone know of a good round trip/review workflow for word documents? 
> I'm interested in generating documents and processing feedback/comments,
> especially with word document tracking.

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.



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

2017-12-15 Thread Tim O'Callaghan
Does anyone know of a good round trip/review workflow for word documents?
I'm interested in generating documents and processing feedback/comments,
especially with word document tracking.

On 15 December 2017 at 14:30, Eric S Fraga  wrote:

> On Friday, 15 Dec 2017 at 13:58, Fabrice Popineau wrote:
> > The best way  is probably to generate a PDF with LaTeX
> > and to open it with MS-Word. Yes, it can do that, and the math import
> > is quite good (for what I have seen, at least as good as any other
> > alternative option).
>
> Interesting.  I don't use MS Word (I'm on Linux on all of my systems)
> but may ask somebody to check this out for me.  LibreOffice almost works
> importing the PDF generated via LaTeX but not quite.  OneDrive (web
> interface) doesn't quite work either.
>
> But pandoc is handling most of what I need.
>
> thanks,
> eric
>
> --
> Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b
>


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

2017-12-15 Thread Eric S Fraga
On Friday, 15 Dec 2017 at 13:58, Fabrice Popineau wrote:
> The best way  is probably to generate a PDF with LaTeX
> and to open it with MS-Word. Yes, it can do that, and the math import
> is quite good (for what I have seen, at least as good as any other
> alternative option).

Interesting.  I don't use MS Word (I'm on Linux on all of my systems)
but may ask somebody to check this out for me.  LibreOffice almost works
importing the PDF generated via LaTeX but not quite.  OneDrive (web
interface) doesn't quite work either.

But pandoc is handling most of what I need.

thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b


signature.asc
Description: PGP signature


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

2017-12-15 Thread Fabrice Popineau
The best way  is probably to generate a PDF with LaTeX
and to open it with MS-Word. Yes, it can do that, and the math import
is quite good (for what I have seen, at least as good as any other
alternative option).

Fabrice

2017-12-14 13:18 GMT+01:00 Eric S Fraga :

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



-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
Standard : +33 (0) 169851212
--


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

2017-12-15 Thread Eric S Fraga
On Friday, 15 Dec 2017 at 03:20, ed...@openmail.cc wrote:

[...]

> 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

What version of pandoc are you using?  My Debian (testing) has pandoc
1.19.2.4 and it does not seem to recognise the +smart bits...

But, in any case, pandoc (without the smart bits) does seem to do a
reasonable job and creates proper maths entities.  This is good enough
for me!  My once a year pain is relieved.  :-)

Thanks,
eric

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.4-214-ge8b71b


signature.asc
Description: PGP signature


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!