1

I was following this blog about using org-mode for writing papers, and the author said

Use C-c C-e l l to create a LaTeX file. Then, from the terminal, use Pandoc as follows to create an odt or a docx file.

pandoc --bibliography=biblidatabase.bib --filter pandoc-citeproc \
latexfile.tex -o outputfile.odt

Is it possible to run this shell command within the same org document?

I tried to add a bash source code block in the .org file:

#+BEGIN_SRC bash
    pandoc --bibliography=biblidatabase.bib --filter pandoc-citeproc \
    latexfile.tex -o outputfile.odt
#+END_SRC

But then, this code block showed up in the exported .odt file. This is expected, but of course, I don't want this shell command (or its output) in the final paper.

Would it be possible to suppress this code block during the export and prevent it from showing up in the exported file?

2

Adding :exports none should take care of that:

#+BEGIN_SRC bash :exports none
    pandoc --bibliography=biblidatabase.bib --filter pandoc-citeproc \
    latexfile.tex -o outputfile.odt
#+END_SRC

See Exporting Code Blocks in the manual.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.