From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18094 Path: news.gmane.org!.POSTED!not-for-mail From: lf-araujo Newsgroups: gmane.text.pandoc Subject: Re: Here is a building system for complex pandoc documents, testing needed Date: Sun, 27 Aug 2017 19:20:05 -0700 (PDT) Message-ID: References: <83a45d4b-4b18-4cbf-868a-45324849a3a7@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_5458_1309613856.1503886805646" X-Trace: blaine.gmane.org 1503886811 20209 195.159.176.226 (28 Aug 2017 02:20:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 28 Aug 2017 02:20:11 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMJMNWRMNBBVX3RXGQKGQEUJMYHEA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Aug 28 04:20:07 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-io0-f186.google.com ([209.85.223.186]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dm9ei-0004jI-Dc for gtp-pandoc-discuss@m.gmane.org; Mon, 28 Aug 2017 04:20:00 +0200 Original-Received: by mail-io0-f186.google.com with SMTP id m40sf2651172ioi.1 for ; Sun, 27 Aug 2017 19:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=KuZq3FRSsXI4fyyFhgjnMynjFTnV9GRDrCimaSzXJ6c=; b=cd9o69j7r1YjjX2ZpowBTdYFPVJq8ny0y348tn/kGPGc/oAfU/z7MytpJGC/IwAv2r XGzWyKWa6/TtW8+05eIzC9k/e/Hb36ZjOB5aYntQBEMKMXkK4ZbJ08QWYeQLBKGYCQis GwtRB1Lj3qubcBClOyPFOP8SGio13DKoEjzxLoYLRKRGiprtoIqBzhx1sm+jeToU46av PUzJDq7e9CAsn8h5uUUbCZ+sGlP92tFj2Z5l6Bv031yi7SxYa4XcykYeR4KqCaMVKWMc OyRbDatMJno0vKdpRs8JEE9yaB6zkB4M4hhGpFjFrdK5TdVtAP4CQu9XDVfVjJUwz0/d 16pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=KuZq3FRSsXI4fyyFhgjnMynjFTnV9GRDrCimaSzXJ6c=; b=hJ9qowGCf7x/b6GifqfVvEKMo1uAUmI7J8dJnO11Z7p4RMfWXyVSjzT8iB0Uv2ZBGC h/86FtKMw/JkH1dAWwoy32oEpw1kJDMTjxYdFqoF2kB+U/i5rXCNFlthISTU0zDos6rJ A3Hy2mzLSqFs6hXwNjOjguI9Yd1pu9JiyBtbFE3oJvAVwuHjBcr2mshJfpTgflsGVh0M clugVrcg8njlLDpwVsDXZTSOP+QMSRAFbc05FVrTUP96GaRql9KOlcPblL8fYfQQHHSb L6gx+8bOzXQZK+HgRTql1mPZazBdBr18oEu0w349UWWqk8Fmv3KCe2MzNZt+NiHEKRuP WkGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=KuZq3FRSsXI4fyyFhgjnMynjFTnV9GRDrCimaSzXJ6c=; b=XYD9c82otHu3K0eEHTyunepbCXDSbZ7Zva7C4JYiScEyO+MpMIxkulqA9w18ojYTYp f/82chLUHbzN5EDjP66gCEgsfcFYAYTBUps5bYyGhGkr7r4XHQ9VNhesedRXOvdf0RfL LA7cgzORqBcn3vV9XGcp0W1l/xstyFOHVjNwniV5zmi8Tb25YJo4xsD8z/ddNG9mmAk7 k6arWLwaVi1JWNkZMkerGurdq9O80enfKlC/oGj9haL+VoN2EPYcmZC9CiA6gkQZl50a snJy2ncPYffgLzeKy7Xfxa48nSoPD+qZRdabGNryX3sRFYqFHeL4du/yE3xo9uc2QOgF bZAw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHYfb5iCTptP/XVqZOjYxNavDCK5hAstJoyq0TBxXwY2G5XfFlDKWFzP rDRSJVzH0rEEHg== X-Received: by 10.36.64.135 with SMTP id n129mr217818ita.6.1503886807123; Sun, 27 Aug 2017 19:20:07 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.38.74 with SMTP id m71ls6147225iom.8.gmail; Sun, 27 Aug 2017 19:20:06 -0700 (PDT) X-Received: by 10.36.50.88 with SMTP id j85mr207208ita.12.1503886806240; Sun, 27 Aug 2017 19:20:06 -0700 (PDT) In-Reply-To: <83a45d4b-4b18-4cbf-868a-45324849a3a7-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: luis.nando-Re5JQEeQqe8AvxtiuMwx3w@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:18094 Archived-At: ------=_Part_5458_1309613856.1503886805646 Content-Type: multipart/alternative; boundary="----=_Part_5459_1757638692.1503886805647" ------=_Part_5459_1757638692.1503886805647 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, Sorry for bumping this discussion. I am updating a builder I published in= =20 May, now with support for GNUMake in windows. I don=E2=80=99t run Windows i= n any=20 machine or know anyone who runs it currently. Could anyone who have a=20 Windows machine test the below code? There is one line that might cause=20 errors, but shouldn=E2=80=99t crash the builder. It=E2=80=99s the if [[ "$O= STYPE" =3D=3D=20 "darwin" ]]; then open $@; else xdg-open $@;fi line. To test, only save the= =20 code as a Makefile in the same directory as gnumake.exe, create any simple= =20 test .md file in a subdirectory /source, and run it with make or make pdf.= =20 Examples of how to use the builder can be found here=20 . .DEFAULT_GOAL :=3D pdf =20 MD =3D $(wildcard source/*.md) =20 PDF =3D output/$(notdir $(CURDIR)).pdf =20 TEX =3D output/$(notdir $(CURDIR)).tex =20 DOCX =3D output/$(notdir $(CURDIR)).docx =20 HTML5 =3D output/$(notdir $(CURDIR)).html =20 EPUB =3D output/$(notdir $(CURDIR)).epub =20 BEAMER =3D output/$(notdir $(CURDIR))-presentation.pdf =20 FILFILES =3D $(wildcard style/*.py) =20 FILTERS :=3D $(foreach FILFILES, $(FILFILES), --filter $(FILFILES)) = =20 TEXFLAGS =3D -F pandoc-crossref -F pandoc-citeproc --latex-engine=3Dxelatex= =20 ifneq ("$(wildcard style/template.tex)","") =20 TEXTEMPLATE :=3D "--template=3Dstyle/template.tex" =20 endif =20 ifneq ("$(wildcard style/reference.docx)","") =20 DOCXTEMPLATE :=3D "--reference-docx=3Dstyle/reference.docx" = =20 endif =20 ifneq ("$(wildcard style/style.css)","") =20 CSS :=3D "--include-in-header=3Dstyle/style.css" =20 endif =20 help: =20 @echo ' = ' =20 @echo 'Makefile for automated typography using pandoc. = ' =20 @echo 'Version 1.1 ' =20 @echo ' = ' =20 @echo 'Usage: = ' =20 @echo ' make prepare first time use, setting the directories '= =20 @echo ' make html generate a web version ' = =20 @echo ' make pdf generate a PDF file ' = =20 @echo ' make docx generate a Docx file ' = =20 @echo ' make tex generate a Latex file ' = =20 @echo ' make beamer generate a beamer presentation = ' =20 @echo ' make all generate all files ' = =20 @echo ' make update update the makefile to last version ' = =20 @echo ' make will fallback to PDF ' = =20 @echo ' = ' =20 @echo 'It implies some directories in the filesystem: source, output an= d style' =20 @echo 'It also implies that the bibliography will be defined via the ya= ml ' =20 @echo ' = ' =20 @echo 'Depends on pandoc-citeproc and pandoc-crossref = ' =20 @echo 'Get local templates with: pandoc -D latex/html/etc = ' =20 @echo ' = ' =20 all : tex docx html5 epub pdf =20 pdf:$(PDF) =20 $(PDF): $(MD) =20 pandoc -o $@ source/*.md $(TEXTEMPLATE) $(TEXFLAGS) $(FILTERS) 2>output= /pdf.log =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 tex: $(TEX) =20 $(TEX): $(MD) =20 pandoc -o $@ source/*.md $(TEXFLAGS) 2>output/tex.log =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 docx: $(DOCX) =20 $(DOCX): $(MD) =20 pandoc -o $@ source/*.md $(TEXFLAGS) $(DOCXTEMPLATE) --toc 2>output/doc= x.log =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 html5: $(HTML5) =20 $(HTML5): $(MD) =20 pandoc -o $@ source/*.md $(CSS) $(TEXFLAGS) --toc -t html5 2>output/htm= l5.log =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 epub: $(EPUB) =20 $(EPUB): $(MD) =20 pandoc -o $@ source/*.md $(TEXFLAGS) --toc 2>output/epub.log = =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 beamer: $(BEAMER) =20 $(BEAMER): $(MD) =20 pandoc -o $@ source/*.md $(TEXFLAGS) --toc -t beamer 2>output/beamer.lo= g =20 if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else xdg-open $@;fi = =20 prepare: =20 command -v pandoc >/dev/null 2>&1 || { echo "I require pandoc but it's = not installed. Aborting." >&2; exit 1; } =20 command -v pandoc-crossref >/dev/null 2>&1 || { echo "I require pandoc-= crossref but it's not installed. Aborting." >&2; exit 1; } =20 command -v pandoc-citeproc >/dev/null 2>&1 || { echo "I require pandoc-= citeproc but it's not installed. Aborting." >&2; exit 1; } =20 mkdir "output" =20 mkdir "source" =20 mkdir "style" =20 update: =20 wget http://tiny.cc/mighty_make -O Makefile =20 clean: =20 rm -f "output/" *.md *.html *.pdf *.tex *.docx *.epub =20 .PHONY: help prepare update beamer clean Thank you. =E2=80=8B --=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/f6801b2d-39b8-43f2-8a99-afd1b4d353f8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_5459_1757638692.1503886805647 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi,

Sorry for bumping this discu= ssion. I am updating a builder I published in May, now with support for GNU= Make in windows. I don=E2=80=99t run Windows in any machine or know anyone = who runs it currently. Could anyone who have a Windows machine test the bel= ow code? There is one line that might cause errors, but shouldn=E2=80=99t = crash the builder. It=E2=80=99s the i= f [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; else x= dg-open $@;fi line. To test, only save the code as a Makefile in the= same directory as gnumake.exe, create any simple test .md file in a subdir= ectory /source, and run it wi= th make or make pdf.

Examples of how to use the b= uilder can be found here.


.DEFAULT_GOAL :=3D pdf             =20






MD =3D $(wildcard source/*.md)             =20


PDF =3D output/$(notdir $(CURDIR)).pdf             =20


TEX =3D output/$(notdir $(CURDIR)).tex             =20


DOCX =3D output/$(notdir $(CURDIR)).docx             =20


HTML5 =3D output/$(notdir $(CURDIR)).html             =20


EPUB =3D output/$(notdir $(CURDIR)).epub             =20


BEAMER =3D output/$(notdir $(CURDIR))-presentation.pdf             =20






FILFILES =3D $(wildcard style/*.py)             =20


FILTERS :=3D $(foreach FILFILES, $(FILFILES), --filter $(FILFILES))        =
     =20


TEXFLAGS =3D -F pandoc-crossref -F pandoc-citeproc --latex-engine=3Dxelatex=
             =20






ifneq ("$(wildcard style/template.tex)","")            =
 =20


    TEXTEMPLATE :=3D "--template=3Dstyle/template.tex"           =
  =20


endif             =20


ifneq ("$(wildcard style/reference.docx)","")          =
   =20


    DOCXTEMPLATE :=3D "--reference-docx=3Dstyle/reference.docx"  =
           =20


endif             =20


ifneq ("$(wildcard style/style.css)","")             =
=20


    CSS :=3D "--include-in-header=3Dstyle/style.css"             =
=20


endif             =20






help:             =20


    @echo '                                                            =
           '             =20


    @echo 'Makefile for automated typography using pandoc.             =
            '             =20


    @echo 'Version 1.1                        '             =20


    @echo '                                                            =
           '             =20


    @echo 'Usage:                                                      =
           '             =20


    @echo '   make prepare    first time use, setting the directories  =
   '             =20


    @echo '   make html       generate a web version             ' =
            =20


    @echo '   make pdf        generate a PDF file                ' =
            =20


    @echo '   make docx       generate a Docx file               ' =
            =20


    @echo '   make tex        generate a Latex file               '=
             =20


    @echo '   make beamer     generate a beamer presentation           =
    '             =20


    @echo '   make all        generate all files                 ' =
            =20


    @echo '   make update     update the makefile to last version      =
 '             =20


    @echo '   make            will fallback to PDF               ' =
            =20


    @echo '                                                            =
           '             =20


    @echo 'It implies some directories in the filesystem: source, outpu=
t and style'             =20


    @echo 'It also implies that the bibliography will be defined via th=
e yaml      '             =20


    @echo '                                                            =
           '             =20


    @echo 'Depends on pandoc-citeproc and pandoc-crossref              =
            '             =20


    @echo 'Get local templates with: pandoc -D latex/html/etc          =
             '             =20


    @echo '                                                            =
           '             =20














all : tex docx html5 epub pdf             =20










pdf:$(PDF)             =20


$(PDF): $(MD)             =20


    pandoc -o $@ source/*.md $(TEXTEMPLATE) $(TEXFLAGS) $(FILTERS) 2>out=
put/pdf.log             =20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






tex: $(TEX)             =20


$(TEX): $(MD)             =20


    pandoc -o $@ source/*.md $(TEXFLAGS) 2>output/tex.log             =
=20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






docx: $(DOCX)             =20


$(DOCX): $(MD)             =20


    pandoc -o $@ source/*.md $(TEXFLAGS) $(DOCXTEMPLATE) --toc 2>output/=
docx.log             =20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






html5: $(HTML5)             =20


$(HTML5): $(MD)             =20


    pandoc -o $@ source/*.md $(CSS) $(TEXFLAGS) --toc -t html5 2>output/=
html5.log             =20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






epub: $(EPUB)             =20


$(EPUB): $(MD)             =20


    pandoc -o $@ source/*.md $(TEXFLAGS) --toc 2>output/epub.log        =
     =20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






beamer: $(BEAMER)             =20


$(BEAMER): $(MD)             =20


    pandoc -o $@ source/*.md $(TEXFLAGS) --toc -t beamer 2>output/beamer=
.log             =20


    if [[ "$OSTYPE" =3D=3D "darwin" ]]; then open $@; e=
lse xdg-open $@;fi             =20






prepare:             =20


    command -v pandoc >/dev/null 2>&1 || { echo "I require p=
andoc but it's not installed.  Aborting." >&2; exit 1; }   =
          =20


    command -v pandoc-crossref >/dev/null 2>&1 || { echo "I =
require pandoc-crossref but it's not installed.  Aborting." >&a=
mp;2; exit 1; }             =20


    command -v pandoc-citeproc >/dev/null 2>&1 || { echo "I =
require pandoc-citeproc but it's not installed.  Aborting." >&a=
mp;2; exit 1; }             =20


    mkdir "output"             =20


    mkdir "source"             =20


    mkdir "style"             =20






update:             =20


    wget http://tiny.cc/mighty_make -O Makefile             =20






clean:             =20


    rm -f "output/" *.md *.html *.pdf *.tex *.docx *.epub        =
     =20






.PHONY: help prepare update beamer clean

Thank you.

=E2=80=8B

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/f6801b2d-39b8-43f2-8a99-afd1b4d353f8%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_5459_1757638692.1503886805647-- ------=_Part_5458_1309613856.1503886805646--