emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Can export the files with bibliography only to LaTeX
@ 2017-12-13 19:50 Melleus
  2017-12-14  9:06 ` Julian M. Burgos
  0 siblings, 1 reply; 15+ messages in thread
From: Melleus @ 2017-12-13 19:50 UTC (permalink / raw)
  To: emacs-orgmode


I used to think that I can export from org to bunch of different
formats. But all of a sudden when I need this feature I see that I can
export only to LaTeX. But when I try exporting to other format I get

Wrong type argument: stringp, nil   error message.

When there's no bibtex references or exporting to LaTeX everything just
works.

How can I troubleshoot the situation and possibly find the clue? I
couldn't find any documentation on the exporting references issues on
Worg unfortunately.

My environment: Gentoo with stable keyword, Emacs 25.3.1, Org 9.1.4.

Thanks ahead of time.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-13 19:50 Melleus
@ 2017-12-14  9:06 ` Julian M. Burgos
  2017-12-14  9:29   ` Alan Schmitt
  2017-12-14 12:11   ` Adonay Felipe Nogueira
  0 siblings, 2 replies; 15+ messages in thread
From: Julian M. Burgos @ 2017-12-14  9:06 UTC (permalink / raw)
  To: Melleus; +Cc: emacs-orgmode

I do not think there is an out-of-the-box way to export a bibliography
directly from org-mode to formats other than LaTex.  What I usually do
is export to Tex and then use Pandoc (https://pandoc.org/) to convert that document to other
formats, usually Word so I can share my work with my colleagues.  Pandoc
can read the bibtex file and add the right citations, doing something
like this:

pandoc --bibliography /path/to/my_bib_file.bib my_document.docx my_document.tex

There is also the ox-pandoc package, that allows you to export directly
from org using pandoc.  I have not tried yet (it is in my to-do list).

https://github.com/kawabata/ox-pandoc

Julian

Melleus writes:

> I used to think that I can export from org to bunch of different
> formats. But all of a sudden when I need this feature I see that I can
> export only to LaTeX. But when I try exporting to other format I get
>
> Wrong type argument: stringp, nil   error message.
>
> When there's no bibtex references or exporting to LaTeX everything just
> works.
>
> How can I troubleshoot the situation and possibly find the clue? I
> couldn't find any documentation on the exporting references issues on
> Worg unfortunately.
>
> My environment: Gentoo with stable keyword, Emacs 25.3.1, Org 9.1.4.
>
> Thanks ahead of time.


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsjávarsviðs / Demersal Division
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.burgos@hafogvatn.is

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14  9:06 ` Julian M. Burgos
@ 2017-12-14  9:29   ` Alan Schmitt
  2017-12-15 11:27     ` Melleus
  2017-12-14 12:11   ` Adonay Felipe Nogueira
  1 sibling, 1 reply; 15+ messages in thread
From: Alan Schmitt @ 2017-12-14  9:29 UTC (permalink / raw)
  To: Julian M. Burgos; +Cc: Melleus, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

Hello,

org-ref (https://github.com/jkitchin/org-ref) has some bibliography
support for html (and looking back at it for plain text, although I
never tried it).

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2017-11: 405.14, 2016-11: 403.53

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14  9:06 ` Julian M. Burgos
  2017-12-14  9:29   ` Alan Schmitt
@ 2017-12-14 12:11   ` Adonay Felipe Nogueira
  2017-12-14 12:28     ` Eric S Fraga
  1 sibling, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2017-12-14 12:11 UTC (permalink / raw)
  To: emacs-orgmode

Indeed, Pandoc is a way out ;)

I just would advise against converting from LaTeX to Word DOC.

I'd say stick to LaTeX and PDF.

This is important because: just like PDF, DOC (and also DOCX and
ODF-family) is sometimes binary file, but beyond that: DOC is not
standardized, and one can't edit a DOC in plain text editor, this makes
it difficult to read version differences for a given file (although it
can be used in revision/version controlled spaces, it still makes it
difficult for a human reviewer to read the differences).

Relying on these formats such as DOC and DOCX only serve to
make people more dependent on the non-free software behind these.

Finally, if writting collaboratively with someone else, either send them
the Org or LaTeX file anyways, or if they are reviewing the changes: either
make use of a revision/version control system, send them only the diffs
that come from the revision/version control system you're using, or send
them the HTML output of `diffoscope' comparing a PDF of a previous
version with the PDF of the new version.

For more information on the current caveats of using `diffoscope' with
PDF files, see my reply in [1].

[1] <https://listas.trisquel.info/pipermail/trisquel-users/2017-December/083507.html>.

2017-12-14T09:06:19+0000 Julian M. Burgos wrote:
> I do not think there is an out-of-the-box way to export a bibliography
> directly from org-mode to formats other than LaTex.  What I usually do
> is export to Tex and then use Pandoc (https://pandoc.org/) to convert
> that document to other
> formats, usually Word so I can share my work with my colleagues.  Pandoc
> can read the bibtex file and add the right citations, doing something
> like this:
>
> pandoc --bibliography /path/to/my_bib_file.bib my_document.docx my_document.tex
>
> There is also the ox-pandoc package, that allows you to export directly
> from org using pandoc.  I have not tried yet (it is in my to-do list).
>
> https://github.com/kawabata/ox-pandoc
>
> Julian

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14 12:11   ` Adonay Felipe Nogueira
@ 2017-12-14 12:28     ` Eric S Fraga
  2017-12-14 16:09       ` Adonay Felipe Nogueira
  2017-12-15 11:46       ` Melleus
  0 siblings, 2 replies; 15+ messages in thread
From: Eric S Fraga @ 2017-12-14 12:28 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 664 bytes --]

On Thursday, 14 Dec 2017 at 10:11, Adonay Felipe Nogueira wrote:
> Indeed, Pandoc is a way out ;)
>
> I just would advise against converting from LaTeX to Word DOC.

[...]

> Relying on these formats such as DOC and DOCX only serve to
> make people more dependent on the non-free software behind these.

I am sympathetic to these views but unfortunately it's not always
possible.  My university, for instance, requires me to prepare exam
scripts in DOC (hence my related email a few minutes ago... my yearly
task of preparing scripts is upon me).  I hate it but I have no choice.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.3-168-g7455f4

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14 12:28     ` Eric S Fraga
@ 2017-12-14 16:09       ` Adonay Felipe Nogueira
  2017-12-15 12:15         ` Eric S Fraga
  2017-12-15 11:46       ` Melleus
  1 sibling, 1 reply; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2017-12-14 16:09 UTC (permalink / raw)
  To: emacs-orgmode

Interesting...

Is this really a requirement? Did you actually asked which formats they
support? Perhaps with careful negotiation, you might come up with good
outcomes. For example: support for sending your work as PDF, TXT or
HTML.

In the case of HTML, you can use any of these to convert your LaTeX file
to HTML:

a) htlatex "File.tex"; although I don't know if this one will do
multiple runs automatically.

b) make4ht "File.tex"; if I'm not mistaken, this last method automates
the various runs of mk4ht; or lastly

c) pass "htlatex" as the LaTeX command (`-latex=' option) in `latexmk',
see the texdoc for `latexmk' and for `htlatex' to know what to put in
the `-latex=' option.

2017-12-14T12:28:46+0000 Eric S Fraga wrote:
> [...]
>
>
> I am sympathetic to these views but unfortunately it's not always
> possible.  My university, for instance, requires me to prepare exam
> scripts in DOC (hence my related email a few minutes ago... my yearly
> task of preparing scripts is upon me).  I hate it but I have no choice.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
@ 2017-12-15  3:18 edgar
  2017-12-15 12:21 ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: edgar @ 2017-12-15  3:18 UTC (permalink / raw)
  To: emacs-orgmode

> Date: Thu, 14 Dec 2017 12:28:46 +0000
> Subject: Re: [O] Can export the files with bibliography only to LaTeX
> I am sympathetic to these views but unfortunately it's not always
> possible.  My university, for instance, requires me to prepare exam
> scripts in DOC (hence my related email a few minutes ago... my yearly
> task of preparing scripts is upon me).  I hate it but I have no choice.
> 

I'm on the same boat: when your advisor "kindly" asks you to write 
everything in DOC{,X}. But it's a boat that is sinking, and let's hope 
sooner than later.

-------------------------------------------------

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!  

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14  9:29   ` Alan Schmitt
@ 2017-12-15 11:27     ` Melleus
  0 siblings, 0 replies; 15+ messages in thread
From: Melleus @ 2017-12-15 11:27 UTC (permalink / raw)
  To: emacs-orgmode

Thank you, Alan,

I also thought that org-ref is an easy way out. But it didn't work for
me out of the box (for html and txt export) unfortunately. And it is a
pretty good piece of software anyway, I must admit. Which I would miss
if I didn't run into this issue with exporting.

Regards,
Anatoly.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14 12:28     ` Eric S Fraga
  2017-12-14 16:09       ` Adonay Felipe Nogueira
@ 2017-12-15 11:46       ` Melleus
  2017-12-15 21:43         ` Tim Cross
  2017-12-28 21:18         ` Melleus
  1 sibling, 2 replies; 15+ messages in thread
From: Melleus @ 2017-12-15 11:46 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <esflists@gmail.com> writes:

> On Thursday, 14 Dec 2017 at 10:11, Adonay Felipe Nogueira wrote:
>> Indeed, Pandoc is a way out ;)
>>
>> I just would advise against converting from LaTeX to Word DOC.
>
> [...]
>
>> Relying on these formats such as DOC and DOCX only serve to
>> make people more dependent on the non-free software behind these.
>
> I am sympathetic to these views but unfortunately it's not always
> possible.  My university, for instance, requires me to prepare exam
> scripts in DOC (hence my related email a few minutes ago... my yearly
> task of preparing scripts is upon me).  I hate it but I have no choice.

Yes, to take the choise away from customer is very powerful business
strategy. And a very destructive one either, as many bright minds are
wasted on creating products that could not compete if not only those
artificial "standards" supported not by logical reasoning, but by
interests of the most powerful players.

So I need to adopt DOC/DOCX in my workflow somehow. It is required by my
university and by my publishers also.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-14 16:09       ` Adonay Felipe Nogueira
@ 2017-12-15 12:15         ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2017-12-15 12:15 UTC (permalink / raw)
  To: Adonay Felipe Nogueira; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

On Thursday, 14 Dec 2017 at 14:09, Adonay Felipe Nogueira wrote:
> Interesting...
>
> Is this really a requirement? Did you actually asked which formats they
> support? Perhaps with careful negotiation, you might come up with good
> outcomes. For example: support for sending your work as PDF, TXT or
> HTML.

yeah, believe me, I have tried.  It's been an on-going battle for years
now.  I finally gave up arguing.  Tilting at windmills can finally get
tiring.

For some parts of the bureaucracy, only Microsoft products exist.  As a
computer scientist by birth (;-)), the lack of progress dismays me but
there you are.

Thanks in any case!

eric

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-15  3:18 Can export the files with bibliography only to LaTeX edgar
@ 2017-12-15 12:21 ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2017-12-15 12:21 UTC (permalink / raw)
  To: edgar; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

On Friday, 15 Dec 2017 at 03:18, edgar@openmail.cc wrote:
> I'm on the same boat: when your advisor "kindly" asks you to write
> everything in DOC{,X}. But it's a boat that is sinking, and let's hope
> sooner than later.

Funnily enough, at least I can require my PhD students to write in LaTeX
(usually via LyX initially but sometimes even emacs+org).  Initially,
some are quite unhappy and even more so when I say absolutely no to any
PowerPoint (they have to use beamer instead).

Later, however, they actually come and thank me for having made them use
LaTeX when they see what some of their colleagues have to go through in
preparing their final PhD thesis in Word... (with references, equations,
especially equations, etc.)

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-15 11:46       ` Melleus
@ 2017-12-15 21:43         ` Tim Cross
  2017-12-16 20:54           ` Adonay Felipe Nogueira
  2017-12-17 13:07           ` Eric S Fraga
  2017-12-28 21:18         ` Melleus
  1 sibling, 2 replies; 15+ messages in thread
From: Tim Cross @ 2017-12-15 21:43 UTC (permalink / raw)
  To: Melleus; +Cc: emacs-orgmode


The saddest part of this message is the last line about your publishers
also requiring word doc! A long time since I had to deal with
publishers, but at least they use to require Latex (albeit often with
weird *.sty files!).

After 17 years working in an 'admin' area of a University, I got to the
end of my tether and resigned 3 weeks ago. A big part of this was due to
the extent the administrative arm is now dictating direction and a
feeling the tail is now wagging the dog. Too much of what is being
required is based on making the administration 'efficient' rather than
focusing on making teaching, learning and research effective.

Good news is 7 days after finishing, I got a new position within a
research centre where my role is 100% technical, I'm free to use
whatever 'tool' I want provided I produce the final outcome i.e. good
looking presentations and documents (all org and Latex!) and solid
technical solutions.

Like others who have replied, Pandoc was my 'goto' solution for dealing
with administration. It is an incredibly powerful tool and worth some
time investment IMO.

Tim

Melleus <melleus@openmailbox.org> writes:

> Eric S Fraga <esflists@gmail.com> writes:
>
>> On Thursday, 14 Dec 2017 at 10:11, Adonay Felipe Nogueira wrote:
>>> Indeed, Pandoc is a way out ;)
>>>
>>> I just would advise against converting from LaTeX to Word DOC.
>>
>> [...]
>>
>>> Relying on these formats such as DOC and DOCX only serve to
>>> make people more dependent on the non-free software behind these.
>>
>> I am sympathetic to these views but unfortunately it's not always
>> possible.  My university, for instance, requires me to prepare exam
>> scripts in DOC (hence my related email a few minutes ago... my yearly
>> task of preparing scripts is upon me).  I hate it but I have no choice.
>
> Yes, to take the choise away from customer is very powerful business
> strategy. And a very destructive one either, as many bright minds are
> wasted on creating products that could not compete if not only those
> artificial "standards" supported not by logical reasoning, but by
> interests of the most powerful players.
>
> So I need to adopt DOC/DOCX in my workflow somehow. It is required by my
> university and by my publishers also.


-- 
Tim Cross

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-15 21:43         ` Tim Cross
@ 2017-12-16 20:54           ` Adonay Felipe Nogueira
  2017-12-17 13:07           ` Eric S Fraga
  1 sibling, 0 replies; 15+ messages in thread
From: Adonay Felipe Nogueira @ 2017-12-16 20:54 UTC (permalink / raw)
  To: emacs-orgmode

This serves as good argumentation:

For all of those reading this and which have other people making demands
such as "you must use this (non-free) software", please remind these
people that what matters is the content, not the tool in this case.

Besides, if they really want to go the "efficiency" route, they should
just accept plain text files since these are lightweight. ;)

2017-12-16T08:43:06+1100 Tim Cross wrote:
> The saddest part of this message is the last line about your publishers
> also requiring word doc! A long time since I had to deal with
> publishers, but at least they use to require Latex (albeit often with
> weird *.sty files!).
>
> After 17 years working in an 'admin' area of a University, I got to the
> end of my tether and resigned 3 weeks ago. A big part of this was due to
> the extent the administrative arm is now dictating direction and a
> feeling the tail is now wagging the dog. Too much of what is being
> required is based on making the administration 'efficient' rather than
> focusing on making teaching, learning and research effective.
>
> Good news is 7 days after finishing, I got a new position within a
> research centre where my role is 100% technical, I'm free to use
> whatever 'tool' I want provided I produce the final outcome i.e. good
> looking presentations and documents (all org and Latex!) and solid
> technical solutions.
>
> Like others who have replied, Pandoc was my 'goto' solution for dealing
> with administration. It is an incredibly powerful tool and worth some
> time investment IMO.
>
> Tim

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-15 21:43         ` Tim Cross
  2017-12-16 20:54           ` Adonay Felipe Nogueira
@ 2017-12-17 13:07           ` Eric S Fraga
  1 sibling, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2017-12-17 13:07 UTC (permalink / raw)
  To: Tim Cross; +Cc: Melleus, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

On Saturday, 16 Dec 2017 at 08:43, Tim Cross wrote:
> Good news is 7 days after finishing, I got a new position within a
> research centre where my role is 100% technical, I'm free to use
> whatever 'tool' I want provided I produce the final outcome i.e. good
> looking presentations and documents (all org and Latex!) and solid
> technical solutions.

Excellent!  And as it should be.

At least, for me, it's only once a year that I have to put up with the
tail wagging the dog...  rest of the year, all my outputs are
org->LaTeX->PDF.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Can export the files with bibliography only to LaTeX
  2017-12-15 11:46       ` Melleus
  2017-12-15 21:43         ` Tim Cross
@ 2017-12-28 21:18         ` Melleus
  1 sibling, 0 replies; 15+ messages in thread
From: Melleus @ 2017-12-28 21:18 UTC (permalink / raw)
  To: emacs-orgmode

Accidentally I've found that until there are no "Online" type of
references Org exports both to text and html. When there is at least one
"Online" reference, I got "Wrong type argument: stringp, nil" error. I
don't know whether this is a bug or some misconfiguration. But might
someone will check out if this is reproducible. One-liner with
cite:cite-to-online-kind-source is enough for my system to get the
error.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-12-28 21:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-15  3:18 Can export the files with bibliography only to LaTeX edgar
2017-12-15 12:21 ` Eric S Fraga
  -- strict thread matches above, loose matches on Subject: below --
2017-12-13 19:50 Melleus
2017-12-14  9:06 ` Julian M. Burgos
2017-12-14  9:29   ` Alan Schmitt
2017-12-15 11:27     ` Melleus
2017-12-14 12:11   ` Adonay Felipe Nogueira
2017-12-14 12:28     ` Eric S Fraga
2017-12-14 16:09       ` Adonay Felipe Nogueira
2017-12-15 12:15         ` Eric S Fraga
2017-12-15 11:46       ` Melleus
2017-12-15 21:43         ` Tim Cross
2017-12-16 20:54           ` Adonay Felipe Nogueira
2017-12-17 13:07           ` Eric S Fraga
2017-12-28 21:18         ` Melleus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).