1

I am trying to generate text files from org files(originally intended for latex>PDF outputs), for submissions that require plain text.

org-file:

#+TITLE: Foo

#+latex_class: article-no-defaults
#+OPTIONS: |:nil toc:nil author:nil
#+latex_class_options: [11pt,a4paper]
#+latex_header: \usepackage{fontspec}
#+latex_header: \setmainfont{Times New Roman}
#+latex_header: \usepackage{float}
#+latex_header: \usepackage{latexsym}
#+latex_header: \usepackage{graphicx}
#+latex_header: \usepackage{url}
#+latex_header: \usepackage{cleveref}

#+EXPORT_EXCLUDE_TAGS: noexport
#+DRAWERS: NOTES
\date{}
\maketitle

*Document Begins
text text

sentence 1 cite:Ohala1997. sentence 2 cite:Ohala1983, cite:Ham1998. Previous studies on sentence 3 cite:hankamer1988, cite:Ghosh2015, cite:banerjee2018.  sentence 4 cite:recasens1997. sentence 5 cite:banerjee2018.

bibliography:file.bib
bibliographystyle:plain

I tried ‘apalike’ ‘plain’ and ‘natbib’ to check if the problem persisted with different bibliography styles. When I exported this file to text(c-c c-e t U/A) in unicode and ASCII, this was the output:

       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
           Foo
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


\date{} \maketitle

sentence 1 [Ohala1997]. sentence 2 [Ohala1983], [Ham1998]. Previous studies on sentence 3 [hankamer1988], [Ghosh2015], [banerjee2018].  sentence 4 [recasens1997]. sentence 5 [banerjee2018].

Bibliography ============= [Ohala1997] John Ohala, Aerodynamics of
phonology, <i>{Proc. 4th Seoul International Conference on Linguistics
[SICOL]}</i>, <b>()</b>, 92--97 (1997). <a href="">link</a>. <a
href="http://dx.doi.org/">doi</a>.  [Ohala1983] John Ohala, PHONETIC
EXPLANATIONS FOR SOUND PATTERNS: IMPLICATIONS FOR GRAMMARS OF
COMPETENCE., <i>{Historical linguistics: Problems and perspectives}</i>,
<b>()</b>, 237--278 (1993). <a href="">link</a>. <a
href=“http://dx.doi.org/">doi</a>.

Here, the in-line references are simple the assigned tags, the bibliography has HTML codes, and \date{} \maketitle are also being read as is(this is a problem I’ve seen in Git repos sometimes). Is there a way to generate a text file(templates, packages) with the bibliography section rendered correctly, and without at org-mode tags?

Thanks in advance.

  • 1
    There is pretty limited support for export to formats other than latex and html in org-ref. It is configurable, which might get you half way there, but if you want something much fancier than what is there, you are in for a lot of work. The latex bibliography styles are not used in creating the txt output. The formats are defined in org-ref-bibliography-entry-format. You might consider trying to use pandoc to convert one of those to plain text. – John Kitchin Aug 17 '18 at 13:23
  • Agree, I'd suggest using pandoc to convert from the latex output to docx, for instance. That's what I do, when my co-authors want an editable version. – jdtonkin Aug 17 '18 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.