public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: J <lixichen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: yaml_metadata_block and bibliography
Date: Sat, 05 May 2018 09:55:47 -0700	[thread overview]
Message-ID: <m24ljmjb3g.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <90202344-2943-4d7d-942c-4b6726153b46-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

J <lixichen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Would you please extract a set of your standard procedures and share as an 
> example ? :D

Sure.  Here's a Makefile I used for a seminar I just taught.
I put all my handouts in the handouts/ directory. syllabus.md
was in the root directory.  Typing 'make' would rebuild the
syllabus and all handouts that had been modified.

Important note: the indents in each rule must be TAB characters;
they have been converted in this forum to spaces.

```
HANDOUTS=$(patsubst %.md, %.pdf, $(wildcard handouts/*.md))
ALL=$(HANDOUTS) syllabus.pdf

all: $(ALL)

handouts/%.pdf: handouts/%.md
        pandoc $< -o $@ -Vdocumentclass=tufte-handout -Vclassoption=sfsidenotes -Vclassoption=notoc -H header-includes.tex --bibliography seminar.bib -F pandoc-citeproc --lua-filter wrap-bibliography.lua -Vsubparagraph

syllabus.pdf: syllabus.md
        pandoc $< -o $@ -Vdocumentclass=tufte-handout -Vclassoption=sfsidenotes -Vclassoption=notoc -H header-includes.tex --bibliography seminar.bib -F pandoc-citeproc --lua-filter remove-bibliography.lua -Vsubparagraph --csl mhra-intext.csl


clean:
        rm $(ALL)

.PHONY: all clean
```

For a simple, one-off project, I could have something as simple as:

```
article.pdf: article.md
        pandoc $< -o $@ --filter pandoc-citeproc --bibliography bib.bib
```


      parent reply	other threads:[~2018-05-05 16:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02 14:57 Stephen Mildenhall
     [not found] ` <856c6edc-e70f-4e0c-9387-29c399679b28-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-05-02 17:47   ` John MacFarlane
     [not found]     ` <yh480kfu3aymot.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-05-02 18:28       ` Stephen Mildenhall
     [not found]         ` <fbea6c6e-f31b-4047-9c96-82f30bfeef2e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-05-02 19:07           ` John MacFarlane
2018-05-02 22:50           ` msprevak
2018-05-02 19:08   ` John MacFarlane
     [not found]     ` <yh480kefityiy5.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-05-02 19:40       ` Stephen Mildenhall
2018-05-04  8:17       ` J
     [not found]         ` <90202344-2943-4d7d-942c-4b6726153b46-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-05-05 16:55           ` John MacFarlane [this message]

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=m24ljmjb3g.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=lixichen-Re5JQEeQqe8AvxtiuMwx3w@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).