emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Sharing documents with bibtex bibliography from org to non-org u


From: Maria Shinoto
Subject: Re: [O] Sharing documents with bibtex bibliography from org to non-org users
Date: Wed, 17 Aug 2016 08:25:46 +0900
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi,

in the recent year and a half I have been writing in Pandoc Markdown, exchanging documents and research papers with others as .docx documents that I converted directly in Pandoc, or, if a biblatex bibliography was involved, via Latex document.

The route back to Pandoc was copy and paste, which was not as time consuming as one might suppose. I had to go over the changes anyway.

I am an archaeologist, so there are no problems with equations ;)

A lot of idea exchange is via email, and composing ideas in Pandoc Markdown before sending the mail was a well organised way of developing research.

Now I hope to get org-mode running the same way, either using direct export to word or Pandoc.


Best,
Maria







Am 16.08.16 um 20:41 schrieb Ken Mankoff:
Hi Martin,

The workflow I've been using for the past few months is this:

1) Export to ODT and then use LibreOffice to convert ODT to DOC with,

(use-package ox-odt
  :ensure nil
  :config (progn
            (setq org-odt-preferred-output-format "doc")
            (setq org-odt-convert-processes
                  '(("LibreOffice" 
"/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to %f%x 
%i")))))

Note that LibreOffice *cannot* be open/running while exporting, or the 
conversion fails.

2) Clean up the DOC file using the following LibreOffice macro (you can give 
its own toolbar button for easy access). This removes some LaTeX-specific 
formatting (examples: \( and \), \begin{equation}, \ref, etc.) and replaces 
some (examples: ^{-2} to -2).

Sub ReplaceTeXStrings
  Dim mTeXStringsNO(99) As String
  Dim mTeXStringsCNVfrom(99) As String
  Dim mTexStringsCNVto(99) As String
  Dim n As Long
  Dim oDocument As Object
  Dim oReplace As Object

  mTeXStringsNO() = Array("\(", "\)", "\ref", "\mathrm", _
                "\begin{equation}", "\end{equation}", "\left", "\right", _
                "\singlespacing", "\doublespacing", "\,")
                
   mTeXStringsCNV() = Array("\sigma","σ", "\rho","ρ", "\sum", "∑", _
   "\phi","ɸ", "\partial","∂", "\Theta","Θ", "^{th}","th", "^{{th}}","th", _
   "^{-1}","-1", "^{-2}","-2", "^{2}","^2", "^{3}", "^3",  "^{-3}", "^-3")

                
  oDocument = ThisComponent
  oReplace = oDocument.createReplaceDescriptor
  For n = lbound(mTeXStringsNO()) To ubound(mTeXStringsNO())
    oReplace.SearchString = mTexStringsNO(n)
    oReplace.ReplaceString = ""
    oDocument.replaceAll(oReplace)
  Next n
  For n = lbound(mTeXStringsCNV()) To ubound(mTeXStringsCNV()) Step 2
    oReplace.SearchString = mTexStringsCNV(n)
    oReplace.ReplaceString = mTexStringsCNV(n+1)
    oDocument.replaceAll(oReplace)
  Next n
  End Sub


At this point, the DOC file is in decent shape, but equations are in raw LaTeX. 
The text does say things like see Figure {fig:foo} and Equation {eq:bar}. 
Figures are all numbered SEC.N, where SEC is the section number, and N restarts 
at 1 each section. References appear correctly as (Someone, 1942), or inline as 
Someone (1942), but there is no bibliography. It is easily readable, decently 
formatted, and much better than asking a co-author to read the raw LaTeX.

3) Export to PDF and compile the final product

4) Send both PDF and DOC to co-authors. Let them know they can read and mark up 
the DOC via Track Changes, but the PDF is the canonical version and should be 
used when looking at Equations, Figures, Bibliography, or anything else that 
appears suspect in the DOC file.

5) I manually integrate changes back into the Org file.

Alternative workflows I've used in the past include Org -> LaTeX and then using 
Pandoc LaTeX -> DOCX. This version includes a bibliography, but overall I found the 
DOC more poorly formatted than the above workflow. If you prefer a cut-and-paste method, 
I'd consider Org -> HTML and then cut-and-paste that, rather than cut-and-paste PDF 
contents.

I hope this helps,

  -k.


On 2016-08-16 at 03:36, Martin Leduc <address@hidden> wrote:
Hi orgers,

People using org-mode or LaTeX to write scientific papers inevitably
face problems when time comes to share a manuscript with co-authors for
reviewing. Unless one decides to restrict the choice of his co-authors
based exclusively on their knowledge of LaTeX, collaborators generally
use Microsoft Word to write their documents.

One way to share LaTeX documents with non-LaTeX users is to simply
copy-paste the LaTeX file into a Word document. You can then share this
file with other people along with a pdf-compiled version of the
manuscript allowing them to see all references, bibliography, equations
and figures. This is the most convenient approach for the first author,
who can simply copy-paste back the text into a tex file after the rounds
of review and then compile the LaTeX manuscript again following some
minor debugging.

However, the latter approach may not be suitable in situations where the
document is intended to stay into a word format for whatever reason. It
could be for instance because you want to be kind with some co-authors
that wouldn't pay much interest into a scary document filled with
complicated codes.

So I would like to know what are the best known strategies to circumvent
the latter issue. To simplify, I accept that I will need to rewrite the
equations (and eq. numbers) in the Word document. What I really want,
however, is all the citations and the list of references being managed
automatically at the step of exporting from org to ODT or to Plain Text.

The only solution I see now is to export the org document to a plain pdf
(e.g. with no page numbers) and then to copy-paste the pdf into a Word
document. This strategy is cumbersome because a lot of work is generally
needed to format the word document (page wrapping, no line breaks
between paragraphs, words hyphenation, etc).

Is there any cleaner solutions to this issue ? Or more general ideas on
how we could facilitate the sharing of documents containing a bibtex
bibliography between org and non-org users ?

Thanks

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]