From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/21938 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Setting custom variables in command line for Markdown -> DOCX conversion Date: Thu, 24 Jan 2019 16:11:38 -0800 Message-ID: References: <1066fd0c-ca5f-4650-bc64-17ca4aaec04c@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="123075"; mail-complaints-to="usenet@blaine.gmane.org" To: Dmitriy Vinokurov , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBSFIVHRAKGQEK5UHHJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 25 01:11:56 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-yb1-f187.google.com ([209.85.219.187]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gmp69-000VrK-Vt for gtp-pandoc-discuss@m.gmane.org; Fri, 25 Jan 2019 01:11:54 +0100 Original-Received: by mail-yb1-f187.google.com with SMTP id l83sf3741468ybl.3 for ; Thu, 24 Jan 2019 16:11:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1548375112; cv=pass; d=google.com; s=arc-20160816; b=ONcbAJqA4Z0YnhRuKRjgfWHxWRqZZc6vZLfV3ndCvdTyvNMo9x9wqvkSAiyfqZTbUa jHyitVQNKeU4kxIWlYQx/yulogOlFqLEfjVBuHmUhc71hGWalBEy94cl7qlkkK3Mru/O mCh8SCC1TWxO48BSgfvK7pSyQE4JWLHCyfp5FmffnoVY/WAkdk4uCyZolffcWHu/hVAr MkzNOudug8aTHFKNq+w5lhhS38o5pTTaf+Xn6Vg1UsgH1wyIwNuvh5NYAkhhoVO28UD+ F6eSrD6HixJbyXxykK91xnuafpgn66wfVHz8o/VZi7fo4oFQiKf3eP9a25Vgkm764Xbl ChEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=B6OYicKwmXzQqTANizjPazt1wnF8qSOI56EpIm33bkM=; b=RGFAJHsDtNwl414C2ZzgvRvx+l+uKwtzc85bdEk7AwOHHhEceMsAwFpE38XLa4T2Xr IPkzR59uORIOnr6c9dvKwo2rKLMJ5Sc19VYIWp5rh7hj27mmRVegKNm8Z3W48Ms+Ct9v A9Vw4TJGTUUPvs0ca+pvOzZeqvubvX9Ni1uxxU3GukYKu/SpxTAEkDl7j9jLvEJoyLTu Jq0UGVDtpMzUSugwL5kN4AOm1Lz+h7ibq3mhNXPqeeGdSwNes+Y6Nz/QiGUjgggy368J EFaOpZzwqMF44v+2giL5kvd4hOC5IE1ozc4SI1nI/aiUSIl2dVkpu21fez4fWUFzi2AD e6YA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=bRpPjtg7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::433 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=B6OYicKwmXzQqTANizjPazt1wnF8qSOI56EpIm33bkM=; b=r91D4/ImFSIK/HRUqBQqa0c9Ix68wQ8dQYGZejOYzpB3BmPvdD2iRA77jfAaZ8z6Lq 3wvSu/GnqJoPVY/LSsJEvY4q+AlPHFjIaK4lC4taO6jvnY0RXItJf5oHDxduUjSpnb7d Ibu9d1s8jL/bZCeFfJujTaG7BzDsNA3qrgAJmWsSGj41DTvS3FIR0FBzBxS7dmdKW5tq 91mRLl/+tzOl6qoxw+3V1ybLh5/oZKADn/dCCCMShu5QchzPhuRpoaqjUdXXL/8Y7BIx FyV8Fgn+xu+sDlziFBRjpfi0pwhbxnFpmqzXCDDoGW3/Xhq9KdUw48AFwr4OoZU+tuxu gfBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=B6OYicKwmXzQqTANizjPazt1wnF8qSOI56EpIm33bkM=; b=EIhklNDxrpcZ2rxFShaAh7dy2FBwYCsFou8e8tqMbXfEAahjgLsGnS8JOFxewT3Skz JmzxnnLHJ4Nr7P2vLSohQixvEHKTHbDafYwKn9w5xu2LaceNzKaFYzm6V1k0l6xlhyu5 Yrro4KQ7qhb7rFdexWNlgn1ngTDXeYq6OXYJuU/DpGWv9fEMwf+wg5s4VZlzW5ltM9u+ lKkEofw4gSIK5m4cKQ1/gQjZotvznxztbKTXYa2oOHrqJwbzYlPk0Le/0YRHrDTUnJZP jS2NwIMGSGgPiWTpUlGrWVfO+x7oIEHLl2yyc/Hjo2jRjIwW/Rhho+6YOHue2PcftNf3 j/iQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJcUukdc1KTmjm1yaiEe17gjfkRdwjbC/N3RhJfesTkDdtWEK3avMiSg XtMj0CLCfEq0focB3dMQ4iE= X-Google-Smtp-Source: ALg8bN4JEdIycgRfQqWOc2VDLPGmRKTcQzkVaCm0AYVOLHAhtJaNsI0RPMPUeMQRAcSVJOzrT3vvAg== X-Received: by 2002:a81:9841:: with SMTP id p62mr131273ywg.0.1548375112775; Thu, 24 Jan 2019 16:11:52 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:38ca:: with SMTP id f193ls2197461yba.13.gmail; Thu, 24 Jan 2019 16:11:51 -0800 (PST) X-Received: by 2002:a25:4fc3:: with SMTP id d186mr4597329ybb.54.1548375111889; Thu, 24 Jan 2019 16:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548375111; cv=none; d=google.com; s=arc-20160816; b=0ryIBLlWoTix+jj8iTNOIhtUaJGNEzY2abkl9PpW1YkqUe+/cOEAl6lixdfPsJ+V8a 30COLmfNHk5PYNGKF3cqDol8zhLoZgdblNLu/Q7xpjalVcBfjN72Xthqd1la7FPP9BBb 0y5y6rf+grr1y94Yw0Hrz2RFR2Ck8aSdT3JHCx2uTr1B8O/vJv7EjijaiG7gTVheSwEe BfNecy6401XVFOQg4aHS/WkL1nQSZjgroYXNv15/ZUN0e9Bhjmstv72tA9xtMu+E1Mlv p1mXimNucWFHzsr7Yws/APpQfoH4vh9weXG6/VH+YawfustY9b5kOijap1EOpiFOVNx2 vYbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=CYteeSYsxmROI5ayt+xN7rU8dLUh/DIj4uqWKHfCBok=; b=zyYaYOeFH5RytVZ1lkBrhqoxOymnsE7smUoViJ8sWo1pzZftkjD2deq0cdBSJyOKmH 6TVf4xhyT25eRYI9O0I8fTo7axxRxiB/ZNA7iUc07nWbxRbl0UP9jLmsF0DuOZ9fiDPm rWEKHkbPFZ+tb3t+0KEBqOBZeTPGUbt+aduUI+tv8OQhJHyZuGromwb1sCtG8Feifylh Esp5bpoNXF1lqobeJizFpIpROv42U1u1HSlLr6NcVbyecr9KxwglDbKxDk6IqqCy47Bl hvJcFhJrNGA/rqz33hNYDYtDLy7V6KK+revLXo0BwQd4WaVdNbSk76GCl6snKSEgE2Ra aUDQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=bRpPjtg7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::433 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com. [2607:f8b0:4864:20::433]) by gmr-mx.google.com with ESMTPS id z185si970893ywa.3.2019.01.24.16.11.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 16:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::433 as permitted sender) client-ip=2607:f8b0:4864:20::433; Original-Received: by mail-pf1-x433.google.com with SMTP id q1so3831033pfi.5 for ; Thu, 24 Jan 2019 16:11:51 -0800 (PST) X-Received: by 2002:a62:fb07:: with SMTP id x7mr8601811pfm.71.1548375110944; Thu, 24 Jan 2019 16:11:50 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id c9sm46280197pfc.92.2019.01.24.16.11.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 16:11:50 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 1009EA1F8; Thu, 24 Jan 2019 19:11:39 -0500 (EST) In-Reply-To: <1066fd0c-ca5f-4650-bc64-17ca4aaec04c-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=bRpPjtg7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::433 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:21938 Archived-At: 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 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.