public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Processing certain elements only in a document
@ 2017-05-25  3:37 Vicente Vera
       [not found] ` <be21c643-c693-47b4-a0b1-22ecf71afa45-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Vicente Vera @ 2017-05-25  3:37 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1223 bytes --]

Hello!

As a test I'm using pandoc together with pandoc-citeproc to process
citations in an Org mode document. Basically, the contents are pure
Org syntax plus pandoc's syntax for citations (Org support for
citations is missing at the moment).

In summary: it works. For reference, this is the command line
invocation used:

pandoc -r org -w org --filter=pandoc-citeproc -M bibliography=refs.bib -M 
citation-style=apa.csl -o out_test.org a_test.org

However, I would like pandoc to leave the document contents as-is
except for the citations. It does make sense IMO since both input and
output formats are the same.

Is this possible? And if so, how?

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/be21c643-c693-47b4-a0b1-22ecf71afa45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1694 bytes --]

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

* Re: Processing certain elements only in a document
       [not found] ` <be21c643-c693-47b4-a0b1-22ecf71afa45-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-05-25  9:27   ` John MacFarlane
  2017-05-25  9:44   ` Joost Kremers
  1 sibling, 0 replies; 5+ messages in thread
From: John MacFarlane @ 2017-05-25  9:27 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Not with pandoc.  This might be helpful:
https://github.com/wyleyr/org-citeproc

+++ Vicente Vera [May 24 17 20:37 ]:
>   Hello!
>   As a test I'm using pandoc together with pandoc-citeproc to process
>   citations in an Org mode document. Basically, the contents are pure
>   Org syntax plus pandoc's syntax for citations (Org support for
>   citations is missing at the moment).
>   In summary: it works. For reference, this is the command line
>   invocation used:
>   pandoc -r org -w org --filter=pandoc-citeproc -M bibliography=refs.bib
>   -M citation-style=apa.csl -o out_test.org a_test.org
>   However, I would like pandoc to leave the document contents as-is
>   except for the citations. It does make sense IMO since both input and
>   output formats are the same.
>   Is this possible? And if so, how?
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/be21c643-c693-47b4-
>   a0b1-22ecf71afa45%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/be21c643-c693-47b4-a0b1-22ecf71afa45-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


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

* Re: Processing certain elements only in a document
       [not found] ` <be21c643-c693-47b4-a0b1-22ecf71afa45-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-05-25  9:27   ` John MacFarlane
@ 2017-05-25  9:44   ` Joost Kremers
       [not found]     ` <87lgplclt5.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Joost Kremers @ 2017-05-25  9:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


On Thu, May 25 2017, Vicente Vera wrote:
> However, I would like pandoc to leave the document contents 
> as-is
> except for the citations. It does make sense IMO since both 
> input and
> output formats are the same.
>
> Is this possible? And if so, how?

Pandoc converts the input document into its own internal 
representation, and converts from that representation back to the 
output format. So even if your input and output format are the 
same, it's possible that the output document is not identical to 
the input document and if that happens, there is usually nothing 
that can be done.

That being said, if you want to write in Org, have you looked at 
[org-ref]? I haven't tried it myself but it seems it gives you all 
you need in dealing with references in Org files.

HTH

Joost




[org-ref]: https://github.com/jkitchin/org-ref



-- 
Joost Kremers
Life has its moments


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

* Re: Processing certain elements only in a document
       [not found]     ` <87lgplclt5.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
@ 2017-05-25 14:42       ` Albert Krewinkel
  2017-05-25 16:12       ` Vicente Vera
  1 sibling, 0 replies; 5+ messages in thread
From: Albert Krewinkel @ 2017-05-25 14:42 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Joost Kremers <joostkremers-97jfqw80gc6171pxa8y+qA@public.gmane.org> writes:

> That being said, if you want to write in Org, have you looked at [org-ref]? I
> haven't tried it myself but it seems it gives you all you need in dealing with
> references in Org files.

Org-ref is great for what it does. Be aware though, it is geared towards
users from STEM fields. Citation prefixes and suffixes are rarely needed
in those areas and hence not supported (last time I checked). If that's
acceptable, then I strongly suggest using it.


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

* Re: Processing certain elements only in a document
       [not found]     ` <87lgplclt5.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
  2017-05-25 14:42       ` Albert Krewinkel
@ 2017-05-25 16:12       ` Vicente Vera
  1 sibling, 0 replies; 5+ messages in thread
From: Vicente Vera @ 2017-05-25 16:12 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1830 bytes --]

El jueves, 25 de mayo de 2017, 9:45:03 (UTC), Joost escribió: 
>
> Pandoc converts the input document into its own internal 
> representation, and converts from that representation back to the 
> output format. So even if your input and output format are the 
> same, it's possible that the output document is not identical to 
> the input document and if that happens, there is usually nothing 
> that can be done. 
>

 Yes, I literally see it now writing to native or json formats. All
questions cleared. At first I thought running the input through a
filter might work but filters can only act on the elements understood
by pandoc.

org-ref has all these convenient functions around inserting LaTeX
citations into an Org document but then is LaTeX job to sort it all
out. pandoc-citeproc is an interface to CSL and that's why I'm
sticking to it (in fact right now I'm doing my writing in Pandoc
Markdown).

An Org/Elisp program which talks to an external CSL processor, or
better, an Elisp CSL processor would be nice. But that's emacs-orgmode
mailing list material.

org-citeproc looks very interesting. Just cloned the repository to try
it out.

Thank you all for the replies. And thank you very much for your work!

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/78134756-d8d4-435b-ba69-e56a179a8dec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2440 bytes --]

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

end of thread, other threads:[~2017-05-25 16:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-25  3:37 Processing certain elements only in a document Vicente Vera
     [not found] ` <be21c643-c693-47b4-a0b1-22ecf71afa45-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-05-25  9:27   ` John MacFarlane
2017-05-25  9:44   ` Joost Kremers
     [not found]     ` <87lgplclt5.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2017-05-25 14:42       ` Albert Krewinkel
2017-05-25 16:12       ` Vicente Vera

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 NNTP newsgroup(s).