public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: albert.krewinkel-stqabkCVF6SGlKaCpJGLJw@public.gmane.org
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: docx to pdf conversion error
Date: Mon, 13 Nov 2017 01:19:02 -0800 (PST)	[thread overview]
Message-ID: <323e407c-d9ae-429a-b951-1dc5b87a624b@googlegroups.com> (raw)
In-Reply-To: <85643608-a189-4407-8a21-37e5d75074fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


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

Lua filters are my hammer which makes everything look like a nail, so here 
is a suggestion on using those to get what you want:

function Meta(meta)
  local f = io.open(meta.metadata_file, 'r')
  local content = f:read('*a')
  f:close()
  return pandoc.read(content).meta
end


Safe the above to a file and call pandoc with --lua-filter=<that-file>.lua 
and --metadata=metadata_file:<your-yaml-file>. It will overwrite all 
metadata using the contents of the yaml file.

See also this issue: https://github.com/jgm/pandoc/issues/3115

On Sunday, November 12, 2017 at 10:34:02 PM UTC+1, scl...-DpHT0TjK6O80n/F98K4Iww@public.gmane.org 
wrote:
>
> Hmm ok - I'll look into that :)
>
> The workflow is probably more edge case from the standard use of pandoc 
> for academic writing.
>
> What we want to achieve:
>
> User -> editor of choice -> save in native format
> Apply YAML metadata with user details and extracted customer/client 
> details from CRM
> Apply customised style to ensure consistency
> Apply template to ensure consistent cover page, TOC format, 
> copyright/confidentiality notice, commercial in confidence footer
>
> Export to PDF for all the good reasons you use PDF for official documents 
> ;)
>
>
>

-- 
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/323e407c-d9ae-429a-b951-1dc5b87a624b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

  parent reply	other threads:[~2017-11-13  9:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09 23:32 sclarke-DpHT0TjK6O80n/F98K4Iww
     [not found] ` <9256e740-7530-4dc2-9acd-5d14eca6fc07-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-10  3:58   ` John Muccigrosso
     [not found]     ` <ac6b1f81-80bf-4e92-a65c-db089def2c19-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-10  4:02       ` sclarke-DpHT0TjK6O80n/F98K4Iww
     [not found]         ` <d1935dae-097e-447c-bd10-a8265ba169db-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-10  4:02           ` sclarke-DpHT0TjK6O80n/F98K4Iww
2017-11-10  4:44   ` John MacFarlane
     [not found]     ` <20171110044412.GI70590-jF64zX8BO091tJRe0FUodcM6rOWSkUom@public.gmane.org>
2017-11-10  5:10       ` sclarke-DpHT0TjK6O80n/F98K4Iww
     [not found]         ` <e741d764-809b-422b-aee1-75b4e4351569-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-10 22:02           ` Kolen Cheung
2017-11-10 22:06           ` Kolen Cheung
     [not found]             ` <4710734d-f71c-45c9-b65f-27ebf81e29e1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-12 21:34               ` sclarke-DpHT0TjK6O80n/F98K4Iww
     [not found]                 ` <85643608-a189-4407-8a21-37e5d75074fd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-13  9:19                   ` albert.krewinkel-stqabkCVF6SGlKaCpJGLJw [this message]
     [not found]                     ` <323e407c-d9ae-429a-b951-1dc5b87a624b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-13 23:37                       ` Kolen Cheung
     [not found]                         ` <2b1dba89-0544-49a0-954d-cad4c269fc78-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-13 23:53                           ` sclarke-DpHT0TjK6O80n/F98K4Iww
2017-11-14  7:50                           ` albert.krewinkel-stqabkCVF6SGlKaCpJGLJw
     [not found]                             ` <600cb80b-0753-4823-acd3-a05cae7577e8-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-14 12:12                               ` Kolen Cheung
     [not found]                                 ` <17d771db-6489-402c-afa6-d948ca8e9cac-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-15 13:38                                   ` albert.krewinkel-stqabkCVF6SGlKaCpJGLJw
     [not found]                                     ` <b8cdcc3a-105a-405f-b2a2-188cdc053abb-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-11-15 17:43                                       ` Kolen Cheung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=323e407c-d9ae-429a-b951-1dc5b87a624b@googlegroups.com \
    --to=albert.krewinkel-stqabkcvf6sglkacpjgljw@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).