* Setting custom variables in command line for Markdown -> DOCX conversion @ 2019-01-24 12:58 Dmitriy Vinokurov [not found] ` <1066fd0c-ca5f-4650-bc64-17ca4aaec04c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Dmitriy Vinokurov @ 2019-01-24 12:58 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1362 bytes --] Hi! I need to use custom variables for my DOCX file content created from Markdown file. Tried to insert DOC_NAME variable in "--reference-doc" template file both using LibreOffice and MS Office in document header. Then I redefine this variable according to pandoc man page and convert Markdown to DOCX using this command line: $ pandoc -s -V DOC_NAME=DOCUMENT1 --columns 10 --reference-doc=template.docx -s -f markdown -t docx main.md -o main.docx But when I open main.docx I see variable values that was set in office document editor in template.docx header, not what was set in command line. E.g. I set variable DOC_NAME=doc1 in office and see it in resulting file, not the "DOCUMENT1" value that was set in command line. Could anybody help me with setting custom variables? -- 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/1066fd0c-ca5f-4650-bc64-17ca4aaec04c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 1910 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <1066fd0c-ca5f-4650-bc64-17ca4aaec04c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Setting custom variables in command line for Markdown -> DOCX conversion [not found] ` <1066fd0c-ca5f-4650-bc64-17ca4aaec04c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2019-01-25 0:11 ` John MacFarlane [not found] ` <yh480kef9138at.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: John MacFarlane @ 2019-01-25 0:11 UTC (permalink / raw) To: Dmitriy Vinokurov, pandoc-discuss Variables in pandoc just affect template resolution, and docx doesn't use templates. Reference.docx is a different concept. See however #5215, which might offer a path forward in the future. Dmitriy Vinokurov <gim6626-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: > Hi! > > I need to use custom variables for my DOCX file content created from > Markdown file. > > Tried to insert DOC_NAME variable in "--reference-doc" template file both > using LibreOffice and MS Office in document header. Then I redefine this > variable according to pandoc man page and convert Markdown to DOCX using > this command line: > > $ pandoc -s -V DOC_NAME=DOCUMENT1 --columns 10 > --reference-doc=template.docx -s -f markdown -t docx main.md -o main.docx > > But when I open main.docx I see variable values that was set in office > document editor in template.docx header, not what was set in command line. > E.g. I set variable DOC_NAME=doc1 in office and see it in resulting file, > not the "DOCUMENT1" value that was set in command line. > > Could anybody help me with setting custom variables? > > -- > 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/1066fd0c-ca5f-4650-bc64-17ca4aaec04c%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <yh480kef9138at.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>]
* Re: Setting custom variables in command line for Markdown -> DOCX conversion [not found] ` <yh480kef9138at.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> @ 2019-01-25 5:11 ` Dmitriy Vinokurov [not found] ` <faac06f7-39ce-414b-a6c5-71d133da0ae2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Dmitriy Vinokurov @ 2019-01-25 5:11 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 2890 bytes --] Thanks for answer. I've read comments from issue that you've referenced. > Implement basic support for converting pandoc properties into core and custom docx properties I don't fully understand this thing. "Pandoc properties" - is it pandoc variables, which are specified using -V command line option? "docx properties" - is it same as LibreOffice "fields"? friday, 25 january 2019 г., 5:11:54 UTC+5 user John MacFarlane writes: > > > Variables in pandoc just affect template resolution, > and docx doesn't use templates. > > Reference.docx is a different concept. > > See however #5215, which might offer a path forward in > the future. > > > > Dmitriy Vinokurov <gim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> writes: > > > Hi! > > > > I need to use custom variables for my DOCX file content created from > > Markdown file. > > > > Tried to insert DOC_NAME variable in "--reference-doc" template file > both > > using LibreOffice and MS Office in document header. Then I redefine this > > variable according to pandoc man page and convert Markdown to DOCX using > > this command line: > > > > $ pandoc -s -V DOC_NAME=DOCUMENT1 --columns 10 > > --reference-doc=template.docx -s -f markdown -t docx main.md -o > main.docx > > > > But when I open main.docx I see variable values that was set in office > > document editor in template.docx header, not what was set in command > line. > > E.g. I set variable DOC_NAME=doc1 in office and see it in resulting > file, > > not the "DOCUMENT1" value that was set in command line. > > > > Could anybody help me with setting custom variables? > > > > -- > > 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-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. > > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/1066fd0c-ca5f-4650-bc64-17ca4aaec04c%40googlegroups.com. > > > For more options, visit https://groups.google.com/d/optout. > -- 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/faac06f7-39ce-414b-a6c5-71d133da0ae2%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 4905 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <faac06f7-39ce-414b-a6c5-71d133da0ae2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Setting custom variables in command line for Markdown -> DOCX conversion [not found] ` <faac06f7-39ce-414b-a6c5-71d133da0ae2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2019-01-26 22:44 ` Agustín Martín 0 siblings, 0 replies; 4+ messages in thread From: Agustín Martín @ 2019-01-26 22:44 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 3468 bytes --] Hi Dmitriy. It's probably referring to pandoc metadata (-M command line option, or YAML block in your markdown). Support for this might come soon (see https://github.com/jgm/pandoc/pull/5252 ) You'll be able to access these properties with the DocProperty field in Word. You can use this for instance to prepare a common template (--reference-doc) with text in header/footer that will use the value of one or more such metadata. On Friday, January 25, 2019 at 6:11:45 AM UTC+1, Dmitriy Vinokurov wrote: > > Thanks for answer. I've read comments from issue that you've referenced. > > > Implement basic support for converting pandoc properties into core and > custom docx properties > > I don't fully understand this thing. "Pandoc properties" - is it pandoc > variables, which are specified using -V command line option? "docx > properties" - is it same as LibreOffice "fields"? > > friday, 25 january 2019 г., 5:11:54 UTC+5 user John MacFarlane writes: >> >> >> Variables in pandoc just affect template resolution, >> and docx doesn't use templates. >> >> Reference.docx is a different concept. >> >> See however #5215, which might offer a path forward in >> the future. >> >> >> >> Dmitriy Vinokurov <gim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: >> >> > Hi! >> > >> > I need to use custom variables for my DOCX file content created from >> > Markdown file. >> > >> > Tried to insert DOC_NAME variable in "--reference-doc" template file >> both >> > using LibreOffice and MS Office in document header. Then I redefine >> this >> > variable according to pandoc man page and convert Markdown to DOCX >> using >> > this command line: >> > >> > $ pandoc -s -V DOC_NAME=DOCUMENT1 --columns 10 >> > --reference-doc=template.docx -s -f markdown -t docx main.md -o >> main.docx >> > >> > But when I open main.docx I see variable values that was set in office >> > document editor in template.docx header, not what was set in command >> line. >> > E.g. I set variable DOC_NAME=doc1 in office and see it in resulting >> file, >> > not the "DOCUMENT1" value that was set in command line. >> > >> > Could anybody help me with setting custom variables? >> > >> > -- >> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/pandoc-discuss/1066fd0c-ca5f-4650-bc64-17ca4aaec04c%40googlegroups.com. >> >> > For more options, visit https://groups.google.com/d/optout. >> > -- 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/e7932676-af8a-45b0-be92-4ee054e474bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #1.2: Type: text/html, Size: 5065 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-26 22:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-01-24 12:58 Setting custom variables in command line for Markdown -> DOCX conversion Dmitriy Vinokurov [not found] ` <1066fd0c-ca5f-4650-bc64-17ca4aaec04c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2019-01-25 0:11 ` John MacFarlane [not found] ` <yh480kef9138at.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 2019-01-25 5:11 ` Dmitriy Vinokurov [not found] ` <faac06f7-39ce-414b-a6c5-71d133da0ae2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2019-01-26 22:44 ` Agustín Martín
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).