From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/14844 Path: news.gmane.org!not-for-mail From: John MACFARLANE Newsgroups: gmane.text.pandoc Subject: Re: Automating markdown to odt with fields Date: Tue, 26 Apr 2016 14:22:37 -0700 Message-ID: <20160426212236.GA35686@protagoras.berkeley.edu> References: <7608243e-3f15-48de-9230-00b78127246e@googlegroups.com> <1a7138b7-aa6a-4873-b214-9644944c75c6@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1461705784 27989 80.91.229.3 (26 Apr 2016 21:23:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 26 Apr 2016 21:23:04 +0000 (UTC) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBKNY764AKGQEKRU2QLA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Apr 26 23:22:51 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ig0-f183.google.com ([209.85.213.183]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avARW-0002qh-Uz for gtp-pandoc-discuss@m.gmane.org; Tue, 26 Apr 2016 23:22:51 +0200 Original-Received: by mail-ig0-f183.google.com with SMTP id yi10sf9109375igc.0 for ; Tue, 26 Apr 2016 14:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent: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=BmEcrX6gbVkLX1TEH/Ou53VAq6Hzj5A1VbWKvOaUJsI=; b=M4aW+ksdatpsCh3XWenOQPzY23ZDPTjcPQGNMIwYy6oF5Pyhz7hspU1yoDljWo0BSK Fq2TvrO06b3OoEDM00xn/PgKvcH6bJ5jy3nhjJyWJoWSCnErzewy3Bl93Pq2+CTnbAQI fVG1msVN9IKrSbwaDK7y651DLmB61JwPg+1YdYA64hZySf0COJ0SEaDjOgs2WuxOxgNP zK1PLT3Fg9smKRk3I7B/qUvjbuyp+8SmfFx5FgFSY155gUkyy6lle1fFkZ0Qixi/H9Cm GC6MsQC3eSwOFuyZmreNBIR/IvUueM43Jm1jwN/T0qK3xSxdLDboSB52Jhx4sBMI X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent: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=BmEcrX6gbVkLX1TEH/Ou53VAq6Hzj5A1VbWKvOaUJsI=; b=GXQfcpwzmv9Au8JS10oL1HDfPyUowsgMW9QYXD+V4CdVkyko1mq1XhvRwW+uvK45uK 8K9u8B4IsI2H31txjMaNRzFxy+EQcUkP+vqAaUgD6C5a5Ek9vZni/aI6bbEQFgFHY8PW FKXTZTY2i+f/scAx00sHH6uXLMjSl/xEanNAQ9z9VufEUPmQFP3wsmm8LIEI6qUTdL4J BaLBOu4l4pfoQP+e2pSRXEQJNETnbr2uV+ZnujgK5AVwj10mfHN3v+Ws1inCHKw5Yk9l BnvrjMTRqIO+1o6gK51sWv8jp1S3fvuC2 Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOPr4FX7DVCTronFeEsrP+xPESqx/y/KMNn+1DnRCxgU9vNLwug1RlrqQ9rfU8yBDcboEA== X-Received: by 10.140.41.177 with SMTP id z46mr176275qgz.1.1461705770051; Tue, 26 Apr 2016 14:22:50 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.140.34.98 with SMTP id k89ls3164872qgk.39.gmail; Tue, 26 Apr 2016 14:22:49 -0700 (PDT) X-Received: by 10.129.161.69 with SMTP id y66mr3258373ywg.44.1461705769514; Tue, 26 Apr 2016 14:22:49 -0700 (PDT) Original-Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com. [2607:f8b0:400e:c03::22f]) by gmr-mx.google.com with ESMTPS id yr8si571333pac.0.2016.04.26.14.22.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 14:22:49 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c03::22f as permitted sender) client-ip=2607:f8b0:400e:c03::22f; Original-Received: by mail-pa0-x22f.google.com with SMTP id zm5so12364987pac.0 for ; Tue, 26 Apr 2016 14:22:49 -0700 (PDT) X-Received: by 10.66.65.109 with SMTP id w13mr6663615pas.142.1461705769071; Tue, 26 Apr 2016 14:22:49 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id dr4sm818185pac.11.2016.04.26.14.22.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 14:22:47 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id AA2E0A329; Tue, 26 Apr 2016 17:22:36 -0400 (EDT) Content-Disposition: inline In-Reply-To: <1a7138b7-aa6a-4873-b214-9644944c75c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc User-Agent: Mutt/1.5.24 (2015-08-30) 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; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c03::22f 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-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:14844 Archived-At: There are two things to fiddle with. The --reference-odt, which can help with style (spacing, margins, etc.), and the opendocument template, which is a place to put hooks for content. You can create a custom opendocument template (use 'pandoc -D opendocument' to get the default one). In place of $body$ you might have, for example, $s1$, $s2$, and $s3$, perhaps with some content intervening. You can then use pandoc to fill these variables: pandoc --template mycustom.opendocument main.md -o my.odt \ -V s1=3D$(pandoc -f markdown -t opendocument s1.md) -V s2=3D$(pandoc -f markdown -t opendocument s2.md) -V s3=3D$(pandoc -f markdown -t opendocument s3.md) +++ JDani Jim=C3=A9nez [Apr 26 16 13:58 ]: > Yes, you're right, maybe I was not clear enough. Let's go with a > better simpler try: > > I would like to generate a odt template containing: > 1. Structure: First page, spaces, between-paragraph distances, > margins... > 2. Static objects: Static text, images... > 3. Sections gaps (I guess vars in LibreOffice) placed where section > text should go. > > This template will be the base of my documents. Well, once the template > is ready, I need to generate final doc with the dynamics text. What I > would like to do, and I don't know if it's possible, is to fill this > sections (t1, t2, t3) in my template with markdown. Why I want to use > markdown is to make possible to insert more than text in each section > (bold text, lists, links, images...). An idea could be having 3 files, > t1.md, t2.md and t3.md and use pandoc to fill the template like this: > 1. render s1.md into s1 in the template > 2. render s2.md into s2 in the template > 3. render s3.md into s3 in the template > > Ideally, I would like to insert a ToC at the begging. At this point, I > should have my odt generated. > Trying to clarify: Section number and possition is fixed. > Let's forget about git or automations... I'm experienced enough to do > that. > Thanks you all! > > -- > 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/1a7138b7-aa6a-4873- > b214-9644944c75c6%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/1a7138b7-aa6a-4873-= b214-9644944c75c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=3Demail&utm_source=3Dfooter > 4. https://groups.google.com/d/optout --=20 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 e= mail 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/20160426212236.GA35686%40protagoras.berkeley.edu. For more options, visit https://groups.google.com/d/optout.