public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Academic Latex PDF Export
@ 2017-01-03  2:40 William Horne
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: William Horne @ 2017-01-03  2:40 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 954 bytes --]

Any quick tips for how to render a document through pandoc so that it looks 
like this <http://johnmacfarlane.net/epistmod-2003.pdf>? Markdown --> latex 
--> template? If so, can anyone steer me towards documentation that covers 
how best to begin custom template making? If not, any words of advice?

Much appreciated as I finish up my essays for application to graduate 
school.


-- 
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/335901c8-779a-42d3-9881-36ffa6ba23fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1436 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2017-01-03  2:44   ` Matthew Pickering
  2017-01-03  2:45   ` William Horne
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: Matthew Pickering @ 2017-01-03  2:44 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

The default template is obtained with the -D command then you modify
it however you like and pass it using the --template option.

For example..

# Get the template
pandoc -D tex > template.tex
# Edit the template
vim template.tex
# Use the template
pandoc my-awesome-file.tex -o output.pdf --template=template.tex

Does that help?

Matt

On Tue, Jan 3, 2017 at 2:40 AM, William Horne <will.m.horne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Any quick tips for how to render a document through pandoc so that it looks
> like this? Markdown --> latex --> template? If so, can anyone steer me
> towards documentation that covers how best to begin custom template making?
> If not, any words of advice?
>
> Much appreciated as I finish up my essays for application to graduate
> school.
>
>
> --
> 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/335901c8-779a-42d3-9881-36ffa6ba23fc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-01-03  2:44   ` Matthew Pickering
@ 2017-01-03  2:45   ` William Horne
  2017-01-03  2:51   ` William Horne
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: William Horne @ 2017-01-03  2:45 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1166 bytes --]

e.g. double spacing, unique font, indentation at the beginning of 
paragraphs (though I won't want that for the first)

On Monday, January 2, 2017 at 7:40:39 PM UTC-7, William Horne wrote:
>
> Any quick tips for how to render a document through pandoc so that it 
> looks like this <http://johnmacfarlane.net/epistmod-2003.pdf>? Markdown 
> --> latex --> template? If so, can anyone steer me towards documentation 
> that covers how best to begin custom template making? If not, any words of 
> advice?
>
> Much appreciated as I finish up my essays for application to graduate 
> school.
>
>
>

-- 
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/d12ab687-f36e-46fa-b902-1957d8cbf2a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2208 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2017-01-03  2:44   ` Matthew Pickering
  2017-01-03  2:45   ` William Horne
@ 2017-01-03  2:51   ` William Horne
  2017-01-03  3:08   ` William Horne
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 15+ messages in thread
From: William Horne @ 2017-01-03  2:51 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1414 bytes --]

Thank you. I guess I ought to look towards Latex forums to determine how to 
tweak the individual features I listed. Do you, or does anyone, know how to 
point pandoc towards ~/.pandoc for templates? Because while I cloned JGM's 
github repo and placed it there, I receive this message:

pandoc: Could not find data file 
/usr/share/pandoc/data/templates/default.tex

On Monday, January 2, 2017 at 7:40:39 PM UTC-7, William Horne wrote:
>
> Any quick tips for how to render a document through pandoc so that it 
> looks like this <http://johnmacfarlane.net/epistmod-2003.pdf>? Markdown 
> --> latex --> template? If so, can anyone steer me towards documentation 
> that covers how best to begin custom template making? If not, any words of 
> advice?
>
> Much appreciated as I finish up my essays for application to graduate 
> school.
>
>
>

-- 
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/ede30347-8839-41a0-85be-925d8b1453db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2478 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-01-03  2:51   ` William Horne
@ 2017-01-03  3:08   ` William Horne
  2017-01-03  3:39   ` Luis Fernado Silva Castro de Araújo
  2017-01-03  4:35   ` Scot Mcphee
  5 siblings, 0 replies; 15+ messages in thread
From: William Horne @ 2017-01-03  3:08 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1139 bytes --]

Disregard: walking through this <https://gist.github.com/michaelt/1017790> proves 
helpful.

On Monday, January 2, 2017 at 7:40:39 PM UTC-7, William Horne wrote:
>
> Any quick tips for how to render a document through pandoc so that it 
> looks like this <http://johnmacfarlane.net/epistmod-2003.pdf>? Markdown 
> --> latex --> template? If so, can anyone steer me towards documentation 
> that covers how best to begin custom template making? If not, any words of 
> advice?
>
> Much appreciated as I finish up my essays for application to graduate 
> school.
>
>
>

-- 
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/dfb94ad6-5892-446f-82ec-d2150de25bc8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2191 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
                     ` (3 preceding siblings ...)
  2017-01-03  3:08   ` William Horne
@ 2017-01-03  3:39   ` Luis Fernado Silva Castro de Araújo
  2017-01-03  4:35   ` Scot Mcphee
  5 siblings, 0 replies; 15+ messages in thread
From: Luis Fernado Silva Castro de Araújo @ 2017-01-03  3:39 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 957 bytes --]

I don't think you need a custom template for that output.... It can easily 
be obtained with changes to header-includes. Please refer to my blog posts 
on the use of pandoc in science here: https://lf-araujo.github.io/

You would probably be interested in the yaml header I released for 
scientific reports here (end of the post):

https://lf-araujo.github.io/posts/going



Best,

lf

-- 
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/89d10743-a0f0-42fd-ba9a-615cb3990f28%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1404 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
                     ` (4 preceding siblings ...)
  2017-01-03  3:39   ` Luis Fernado Silva Castro de Araújo
@ 2017-01-03  4:35   ` Scot Mcphee
       [not found]     ` <C27DB66B-02E7-46A5-BC09-D3626D9C284A-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  5 siblings, 1 reply; 15+ messages in thread
From: Scot Mcphee @ 2017-01-03  4:35 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4388 bytes --]

Hi William

I am using Pandoc to write my PhD thesis. I have customised versions of the default templates, and a build system based on shell scripts. The chapter files are in GitHub (a private repository). There are two parts to the build system, a script that just compiles each individual chapter to a PDF, and another one that gets all the chapters and builds one big LaTeχ file, then uses xelatex to build that into a PDF, including all the University-mandated front matter on the thesis file.

The first process is underwritten with a shell script I wrote for myself, pandocPDF, which runs pandoc as per this command line:

/usr/local/bin/pandoc -f markdown -t latex -V geometry:margin=4cm -V fontsize=12pt -V papersize=a4paper -V documentclass=memoir -V classoption=oneside -V classoption=article -V mainfont='Times New Roman' -V frenchspacing -V onehalfspacing -V biblio-title='Works Cited' --smart --standalone --latex-engine=xelatex --bibliography=${dropbox}/ANCH/PHD/THESIS/99-Bibliography/library_clean.bib --csl=${dropbox}/Libraries/pandoc/classics-standard-for-uq-rhd-theses.csl --output=${outfile}.PDF ${1}

I simply symlinked my ~/.pandoc directory to the directory ${dropbox}/Libraries/pandoc and this directory contains altered versions of the latex template which is used above (as well as the CSL file for the Bibliography format, as seen above).

When it does the full latex compile, it does it a bit differently. I’ve organised all my markdown files such that each chapter is in a directory with two numbers, e.g. 00-frontmatter, 01-chapter1, 02-chapter2 and so on. Each file in each directory then is also prefixed with a  two-digit number that indicates it’s order in the chapter. I first collate all these into one giant pandoc/markdown file ("pandoc -f markdown -t markdown <filelist>"), then I convert that one file into a TeX file which I compile to a PDF with xelatex.

One thing I have found is that the CSL format is better at producing certain types of citations/bibliography than the formats available in “pure” biblatex format. I would love pandoc to be able to produce a latex file that contains the already formatted citations and bibliography (according to the CSL style specified).

Scot

--
Scot Mcphee
Computer Programmer, Classics PhD.
p +61 412 957414
e scot.mcphee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
w http://autonomous.org/
t @scotartt

> On 03 Jan 2017, at 12:40 , William Horne <will.m.horne-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> Any quick tips for how to render a document through pandoc so that it looks like this <http://johnmacfarlane.net/epistmod-2003.pdf>? Markdown --> latex --> template? If so, can anyone steer me towards documentation that covers how best to begin custom template making? If not, any words of advice?
> 
> Much appreciated as I finish up my essays for application to graduate school.
> 
> 
> 
> -- 
> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/335901c8-779a-42d3-9881-36ffa6ba23fc%40googlegroups.com <https://groups.google.com/d/msgid/pandoc-discuss/335901c8-779a-42d3-9881-36ffa6ba23fc%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout <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/C27DB66B-02E7-46A5-BC09-D3626D9C284A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 6977 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]     ` <C27DB66B-02E7-46A5-BC09-D3626D9C284A-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-03 10:12       ` John MacFarlane
       [not found]         ` <20170103101218.GB40868-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2017-01-03 10:12 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Scot Mcphee [Jan 03 17 14:35 ]:
>   One thing I have found is that the CSL format is better at producing
>   certain types of citations/bibliography than the formats available in
>   “pure” biblatex format. I would love pandoc to be able to produce a
>   latex file that contains the already formatted citations and
>   bibliography (according to the CSL style specified).

It can!

pandoc --csl mystyle.csl --bibliography mybib.bib \
  -s -S input.txt -o output.tex



-- 
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/20170103101218.GB40868%40Johns-MBP.attlocal.net.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]         ` <20170103101218.GB40868-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
@ 2017-01-03 11:37           ` Scot Mcphee
       [not found]             ` <CC8CBFA1-9D65-47F9-B28E-5DF1630FF984-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Scot Mcphee @ 2017-01-03 11:37 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]


> On 03 Jan 2017, at 20:12 , John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> 
> +++ Scot Mcphee [Jan 03 17 14:35 ]:
>>  One thing I have found is that the CSL format is better at producing
>>  certain types of citations/bibliography than the formats available in
>>  “pure” biblatex format. I would love pandoc to be able to produce a
>>  latex file that contains the already formatted citations and
>>  bibliography (according to the CSL style specified).
> 
> It can!
> 
> pandoc --csl mystyle.csl --bibliography mybib.bib \
> -s -S input.txt -o output.tex

Ah ha! Thanks John, I will put that into action immediately!

It’s the simple omission of the --biblatex switch that does this, yes?

Scot

-- 
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/CC8CBFA1-9D65-47F9-B28E-5DF1630FF984%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 2645 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]             ` <CC8CBFA1-9D65-47F9-B28E-5DF1630FF984-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-03 16:26               ` John MacFarlane
       [not found]                 ` <20170103162616.GA41250-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2017-01-03 16:26 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Scot Mcphee [Jan 03 17 21:37 ]:
>   On 03 Jan 2017, at 20:12 , John MacFarlane <[1]jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>   +++ Scot Mcphee [Jan 03 17 14:35 ]:
>
>      One thing I have found is that the CSL format is better at
>     producing
>      certain types of citations/bibliography than the formats available
>     in
>      “pure” biblatex format. I would love pandoc to be able to produce a
>      latex file that contains the already formatted citations and
>      bibliography (according to the CSL style specified).
>
>   It can!
>   pandoc --csl mystyle.csl --bibliography mybib.bib \
>   -s -S input.txt -o output.tex
>
>   Ah ha! Thanks John, I will put that into action immediately!
>   It’s the simple omission of the --biblatex switch that does this, yes?

Right, --biblatex and --natbib cause pandoc to emit native
biblatex or natbib citation commands.  Without these,
pandoc-citeproc is used to process citations using the
CSL stylesheet.

-- 
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/20170103162616.GA41250%40Johns-MBP.attlocal.net.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]                 ` <20170103162616.GA41250-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
@ 2017-01-05  7:58                   ` Scot Mcphee
       [not found]                     ` <77DC2ED3-8F10-46DA-9429-7E5877EA645E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Scot Mcphee @ 2017-01-05  7:58 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]



> On 04 Jan 2017, at 02:26 , John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> 
> +++ Scot Mcphee [Jan 03 17 21:37 ]:
>>  On 03 Jan 2017, at 20:12 , John MacFarlane <[1]jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>> 
>>  +++ Scot Mcphee [Jan 03 17 14:35 ]:
>> 
>>     One thing I have found is that the CSL format is better at
>>    producing
>>     certain types of citations/bibliography than the formats available
>>    in
>>     “pure” biblatex format. I would love pandoc to be able to produce a
>>     latex file that contains the already formatted citations and
>>     bibliography (according to the CSL style specified).
>> 
>>  It can!
>>  pandoc --csl mystyle.csl --bibliography mybib.bib \
>>  -s -S input.txt -o output.tex
>> 
>>  Ah ha! Thanks John, I will put that into action immediately!
>>  It’s the simple omission of the --biblatex switch that does this, yes?
> 
> Right, --biblatex and --natbib cause pandoc to emit native
> biblatex or natbib citation commands.  Without these,
> pandoc-citeproc is used to process citations using the
> CSL stylesheet.

Is there any way to automatically enclose the generated bibliography in an environment name?


--
Scot Mcphee
Computer Programmer, Classics PhD.
p +61 412 957414
e scot.mcphee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
w http://autonomous.org/
t @scotartt


-- 
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/77DC2ED3-8F10-46DA-9429-7E5877EA645E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 4328 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]                     ` <77DC2ED3-8F10-46DA-9429-7E5877EA645E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-05 16:27                       ` Sergio Correia
  2017-01-05 21:22                       ` John MacFarlane
  1 sibling, 0 replies; 15+ messages in thread
From: Sergio Correia @ 2017-01-05 16:27 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2448 bytes --]

From the manpage of pandoc-citeproc, it adds a Div with id "refs":

https://github.com/jgm/pandoc-citeproc/blob/master/man/pandoc-citeproc.1.md#filter-mode

So you could run another filter right after pandoc-citeproc, and use it to 
add the latex content you need right before and after the Div (i.e. 
\begin{..} )

On Thursday, January 5, 2017 at 2:58:17 AM UTC-5, Scot Mcphee wrote:
>
>
>
> On 04 Jan 2017, at 02:26 , John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 
> <javascript:>> wrote:
>
> +++ Scot Mcphee [Jan 03 17 21:37 ]:
>
>  On 03 Jan 2017, at 20:12 , John MacFarlane <[1]j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org 
> <javascript:>> wrote:
>
>  +++ Scot Mcphee [Jan 03 17 14:35 ]:
>
>     One thing I have found is that the CSL format is better at
>    producing
>     certain types of citations/bibliography than the formats available
>    in
>     “pure” biblatex format. I would love pandoc to be able to produce a
>     latex file that contains the already formatted citations and
>     bibliography (according to the CSL style specified).
>
>  It can!
>  pandoc --csl mystyle.csl --bibliography mybib.bib \
>  -s -S input.txt -o output.tex
>
>  Ah ha! Thanks John, I will put that into action immediately!
>  It’s the simple omission of the --biblatex switch that does this, yes?
>
>
> Right, --biblatex and --natbib cause pandoc to emit native
> biblatex or natbib citation commands.  Without these,
> pandoc-citeproc is used to process citations using the
> CSL stylesheet.
>
>
> Is there any way to automatically enclose the generated bibliography in an 
> environment name?
>
>
> --
> Scot Mcphee
> Computer Programmer, Classics PhD.
> p +61 412 957414
> e scot....-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>
> w http://autonomous.org/
> t @scotartt
>
>
>

-- 
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/f5b00512-7ef2-4480-a4ea-bdbb761805a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 4677 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Academic Latex PDF Export
       [not found]                     ` <77DC2ED3-8F10-46DA-9429-7E5877EA645E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-01-05 16:27                       ` Sergio Correia
@ 2017-01-05 21:22                       ` John MacFarlane
       [not found]                         ` <20170105212225.GA28738-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
  1 sibling, 1 reply; 15+ messages in thread
From: John MacFarlane @ 2017-01-05 21:22 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

+++ Scot Mcphee [Jan 05 17 17:58 ]:

>   Is there any way to automatically enclose the generated bibliography in
>   an environment name?

You could do it with a custom filter.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* filter order while processing citeproc bibliography in a latex environment
       [not found]                         ` <20170105212225.GA28738-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
@ 2017-01-08  5:03                           ` Scot Mcphee
       [not found]                             ` <AEF123E6-FEF4-4995-9775-679846496075-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Scot Mcphee @ 2017-01-08  5:03 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]


> On 06 Jan 2017, at 07:22 , John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
> 
> +++ Scot Mcphee [Jan 05 17 17:58 ]:
> 
>>  Is there any way to automatically enclose the generated bibliography in
>>  an environment name?
> 
> You could do it with a custom filter.


Hi John

I’ve been looking at this (using python) but when the filter gets the AST, the bibliography output at the end isn’t yet added to it (and the citation is still unprocessed), if I specified just my filter on the command line.  I experimented a bit and found I could control the order of the filters by specifying multiple - -filter options, with citeproc specified first, like this:

pandoc -f markdown -t latex --smart --standalone --latex-engine=xelatex --bibliography=./mybib.bib  --filter pandoc-citeproc --filter ./myfilter.py  input.md

Is this the approved way to control the filter execution order?

Thanks
Scot

--
Scot Mcphee
Computer Programmer, Classics PhD.
p +61 412 957414
e scot.mcphee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
w http://autonomous.org/
t @scotartt

-- 
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/AEF123E6-FEF4-4995-9775-679846496075%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 3434 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: filter order while processing citeproc bibliography in a latex environment
       [not found]                             ` <AEF123E6-FEF4-4995-9775-679846496075-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-01-08  9:10                               ` John MacFarlane
  0 siblings, 0 replies; 15+ messages in thread
From: John MacFarlane @ 2017-01-08  9:10 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Yes, filters execute in the order on the command line
command line.

+++ Scot Mcphee [Jan 08 17 15:03 ]:
>   On 06 Jan 2017, at 07:22 , John MacFarlane <[1]jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:
>
>   +++ Scot Mcphee [Jan 05 17 17:58 ]:
>
>      Is there any way to automatically enclose the generated
>     bibliography in
>      an environment name?
>
>   You could do it with a custom filter.
>
>   Hi John
>   I’ve been looking at this (using python) but when the filter gets the
>   AST, the bibliography output at the end isn’t yet added to it (and the
>   citation is still unprocessed), if I specified just my filter on the
>   command line.  I experimented a bit and found I could control the order
>   of the filters by specifying multiple - -filter options, with citeproc
>   specified first, like this:
>
>   pandoc -f markdown -t latex --smart --standalone --latex-engine=xelatex
>   --bibliography=./mybib.bib  --filter pandoc-citeproc --filter
>   ./myfilter.py  input.md
>
>   Is this the approved way to control the filter execution order?
>   Thanks
>   Scot
>   --
>   Scot Mcphee
>   Computer Programmer, Classics PhD.
>   p +61 412 957414
>   e [2]scot.mcphee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>   w [3]http://autonomous.org/
>   t @scotartt
>
>   --
>   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 [4]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [5]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [6]https://groups.google.com/d/msgid/pandoc-discuss/AEF123E6-FEF4-4995-
>   9775-679846496075%40gmail.com.
>   For more options, visit [7]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org
>   2. mailto:scot.mcphee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>   3. http://autonomous.org/
>   4. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   5. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   6. https://groups.google.com/d/msgid/pandoc-discuss/AEF123E6-FEF4-4995-9775-679846496075-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org?utm_medium=email&utm_source=footer
>   7. 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/20170108091028.GB41105%40Johns-MBP.home.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-01-08  9:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-03  2:40 Academic Latex PDF Export William Horne
     [not found] ` <335901c8-779a-42d3-9881-36ffa6ba23fc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-01-03  2:44   ` Matthew Pickering
2017-01-03  2:45   ` William Horne
2017-01-03  2:51   ` William Horne
2017-01-03  3:08   ` William Horne
2017-01-03  3:39   ` Luis Fernado Silva Castro de Araújo
2017-01-03  4:35   ` Scot Mcphee
     [not found]     ` <C27DB66B-02E7-46A5-BC09-D3626D9C284A-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-03 10:12       ` John MacFarlane
     [not found]         ` <20170103101218.GB40868-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
2017-01-03 11:37           ` Scot Mcphee
     [not found]             ` <CC8CBFA1-9D65-47F9-B28E-5DF1630FF984-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-03 16:26               ` John MacFarlane
     [not found]                 ` <20170103162616.GA41250-l/d5Ua9yGnwnBWzF2BZoWXABM7IC3klV@public.gmane.org>
2017-01-05  7:58                   ` Scot Mcphee
     [not found]                     ` <77DC2ED3-8F10-46DA-9429-7E5877EA645E-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-05 16:27                       ` Sergio Correia
2017-01-05 21:22                       ` John MacFarlane
     [not found]                         ` <20170105212225.GA28738-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
2017-01-08  5:03                           ` filter order while processing citeproc bibliography in a latex environment Scot Mcphee
     [not found]                             ` <AEF123E6-FEF4-4995-9775-679846496075-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-08  9:10                               ` John MacFarlane

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).