* APA-format paper from Markdown @ 2018-12-19 17:19 Jack Bates [not found] ` <1674b2d0-1f02-fdc6-20ff-0959aa942ae9-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jack Bates @ 2018-12-19 17:19 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw When I wrote a paper in APA format with Pandoc and Markdown I ran into some obstacles, so when I figured it out, I made a blog post about it: http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: > pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md > xelatex wellness-assignment > biber wellness-assignment > xelatex wellness-assignment Start the paper with: > --- > title: Wellness Assignment > author: Jack Bates > documentclass: apa6 > classoption: > - man > - biblatex > bibliography: wellness-assignment.bib > ... > > Markdown follows ... If that post isn't accurate or I missed something, please correct me! Thank you for these excellent tools! ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1674b2d0-1f02-fdc6-20ff-0959aa942ae9-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org>]
* Re: APA-format paper from Markdown [not found] ` <1674b2d0-1f02-fdc6-20ff-0959aa942ae9-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> @ 2018-12-19 18:18 ` John MacFarlane [not found] ` <yh480kbm5hpehj.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: John MacFarlane @ 2018-12-19 18:18 UTC (permalink / raw) To: Jack Bates, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Did you try using pandoc-citeproc to format the citations instead of biber? For that, add this to your metadata: csl: apa.csl Download this csl file and put it in your working directory: https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl Then try: pandoc -o wellness-assignment.pdf --filter pandoc-citeproc wellness-assignment.md and it should go straight to PDF, no need to use xelatex or biber manually. The nice thing about this approach is that it works for every output format pandoc supports, so you could generate docx or html output too... Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: > When I wrote a paper in APA format with Pandoc and Markdown I ran into > some obstacles, so when I figured it out, I made a blog post about it: > http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html > > Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: > >> pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md >> xelatex wellness-assignment >> biber wellness-assignment >> xelatex wellness-assignment > > Start the paper with: > >> --- >> title: Wellness Assignment >> author: Jack Bates >> documentclass: apa6 >> classoption: >> - man >> - biblatex >> bibliography: wellness-assignment.bib >> ... >> >> Markdown follows ... > > If that post isn't accurate or I missed something, please correct me! > > Thank you for these excellent tools! > > -- > 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. > For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <yh480kbm5hpehj.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>]
* Re: APA-format paper from Markdown [not found] ` <yh480kbm5hpehj.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> @ 2018-12-19 20:53 ` Jack Bates [not found] ` <fb92679c-f165-eace-4bee-6923c50357d5-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jack Bates @ 2018-12-19 20:53 UTC (permalink / raw) To: John MacFarlane, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Thanks for this reply! Yes, pandoc-citeproc is the first thing I tried, but the bibliography it generated wasn't formatted quite right. I mentioned in the post the advantage that pandoc-citeproc automates the commands, you can convert to PDF in a single shot, and it works with different output formats, doesn't depend on LaTeX. I also linked to workarounds that people have found, to properly format the bibliography with pandoc-citeproc. The great thing about Pandoc is that you can use --biblatex and --filter pandoc-citeproc interchangeably, without updating your document. So you can use the one that better supports your output format or style guide. It would be great if --biblatex automated the commands, like pandoc-citeproc, so you could likewise convert to PDF in a single shot. I commented on the issue: https://github.com/jgm/pandoc/issues/4105#issuecomment-444687501 On 2018-12-19 11:18 a.m., John MacFarlane wrote: > > Did you try using pandoc-citeproc to format the > citations instead of biber? > > For that, add this to your metadata: > > csl: apa.csl > > Download this csl file and put it in your working > directory: > > https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl > > Then try: > > pandoc -o wellness-assignment.pdf --filter pandoc-citeproc wellness-assignment.md > > and it should go straight to PDF, no need to use > xelatex or biber manually. > > The nice thing about this approach is that it > works for every output format pandoc supports, > so you could generate docx or html output too... > > Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: > >> When I wrote a paper in APA format with Pandoc and Markdown I ran into >> some obstacles, so when I figured it out, I made a blog post about it: >> http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html >> >> Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: >> >>> pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md >>> xelatex wellness-assignment >>> biber wellness-assignment >>> xelatex wellness-assignment >> >> Start the paper with: >> >>> --- >>> title: Wellness Assignment >>> author: Jack Bates >>> documentclass: apa6 >>> classoption: >>> - man >>> - biblatex >>> bibliography: wellness-assignment.bib >>> ... >>> >>> Markdown follows ... >> >> If that post isn't accurate or I missed something, please correct me! >> >> Thank you for these excellent tools! >> >> -- >> 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. >> For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <fb92679c-f165-eace-4bee-6923c50357d5-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org>]
* Re: APA-format paper from Markdown [not found] ` <fb92679c-f165-eace-4bee-6923c50357d5-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> @ 2018-12-19 22:44 ` John MacFarlane [not found] ` <yh480k1s6dp25s.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: John MacFarlane @ 2018-12-19 22:44 UTC (permalink / raw) To: Jack Bates, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw This is pretty vague, though, about what didn't look right: > Sadly the references don't look quite right. > pandoc-citeproc doesn't output LaTeX, LaTeX doesn't > implement the Citation Style Language, whatever the > reason: The apa6 class isn't aware that the references > are in fact references and doesn't apply the > appropriate formatting pandoc-citeproc generates output in the Pandoc AST, which is in fact converted to LaTeX in the process of producing the PDF. Anyway, if you explain what the problem was, maybe there's a solution? Jack Bates <l33e9z-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: > Thanks for this reply! Yes, pandoc-citeproc is the first thing I tried, > but the bibliography it generated wasn't formatted quite right. I > mentioned in the post the advantage that pandoc-citeproc automates the > commands, you can convert to PDF in a single shot, and it works with > different output formats, doesn't depend on LaTeX. I also linked to > workarounds that people have found, to properly format the bibliography > with pandoc-citeproc. > > The great thing about Pandoc is that you can use --biblatex and --filter > pandoc-citeproc interchangeably, without updating your document. So you > can use the one that better supports your output format or style guide. > > It would be great if --biblatex automated the commands, like > pandoc-citeproc, so you could likewise convert to PDF in a single shot. > I commented on the issue: > https://github.com/jgm/pandoc/issues/4105#issuecomment-444687501 > > On 2018-12-19 11:18 a.m., John MacFarlane wrote: >> >> Did you try using pandoc-citeproc to format the >> citations instead of biber? >> >> For that, add this to your metadata: >> >> csl: apa.csl >> >> Download this csl file and put it in your working >> directory: >> >> https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl >> >> Then try: >> >> pandoc -o wellness-assignment.pdf --filter pandoc-citeproc wellness-assignment.md >> >> and it should go straight to PDF, no need to use >> xelatex or biber manually. >> >> The nice thing about this approach is that it >> works for every output format pandoc supports, >> so you could generate docx or html output too... >> >> Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >> >>> When I wrote a paper in APA format with Pandoc and Markdown I ran into >>> some obstacles, so when I figured it out, I made a blog post about it: >>> http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html >>> >>> Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: >>> >>>> pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md >>>> xelatex wellness-assignment >>>> biber wellness-assignment >>>> xelatex wellness-assignment >>> >>> Start the paper with: >>> >>>> --- >>>> title: Wellness Assignment >>>> author: Jack Bates >>>> documentclass: apa6 >>>> classoption: >>>> - man >>>> - biblatex >>>> bibliography: wellness-assignment.bib >>>> ... >>>> >>>> Markdown follows ... >>> >>> If that post isn't accurate or I missed something, please correct me! >>> >>> Thank you for these excellent tools! >>> >>> -- >>> 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. >>> For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <yh480k1s6dp25s.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>]
* Re: APA-format paper from Markdown [not found] ` <yh480k1s6dp25s.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> @ 2018-12-22 15:27 ` Jack Bates [not found] ` <b6f94e34-0988-2e12-76e0-d45a5eba13b0-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Jack Bates @ 2018-12-22 15:27 UTC (permalink / raw) To: John MacFarlane, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw Thank you for clarifying, and for your help! The specific problem I ran into was with hanging indents. Here's output with --biblatex: http://nottheoilrig.com/biblatex.pdf and here it is with pandoc-citeproc: http://nottheoilrig.com/pandoc-citeproc.pdf Here's my example input: http://nottheoilrig.com/wellness-assignment.md Here are the commands I used with --biblatex: > pandoc --output biblatex.tex --standalone --biblatex http://nottheoilrig.com/wellness-assignment.md > xelatex biblatex > biber biblatex > xelatex biblatex and with pandoc-citeproc: > pandoc --output pandoc-citeproc.pdf --filter pandoc-citeproc --pdf-engine xelatex --csl apa.csl http://nottheoilrig.com/wellness-assignment.md Also the --biblatex bibliography automatically starts on a new page, as required by the APA manual, but that might just be happy coincidence: https://tex.stackexchange.com/a/74298 On 2018-12-19 3:44 p.m., John MacFarlane wrote: > > This is pretty vague, though, about what didn't look > right: > >> Sadly the references don't look quite right. >> pandoc-citeproc doesn't output LaTeX, LaTeX doesn't >> implement the Citation Style Language, whatever the >> reason: The apa6 class isn't aware that the references >> are in fact references and doesn't apply the >> appropriate formatting > > pandoc-citeproc generates output in the Pandoc AST, > which is in fact converted to LaTeX in the process of > producing the PDF. Anyway, if you explain what the > problem was, maybe there's a solution? > > > Jack Bates <l33e9z-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: > >> Thanks for this reply! Yes, pandoc-citeproc is the first thing I tried, >> but the bibliography it generated wasn't formatted quite right. I >> mentioned in the post the advantage that pandoc-citeproc automates the >> commands, you can convert to PDF in a single shot, and it works with >> different output formats, doesn't depend on LaTeX. I also linked to >> workarounds that people have found, to properly format the bibliography >> with pandoc-citeproc. >> >> The great thing about Pandoc is that you can use --biblatex and --filter >> pandoc-citeproc interchangeably, without updating your document. So you >> can use the one that better supports your output format or style guide. >> >> It would be great if --biblatex automated the commands, like >> pandoc-citeproc, so you could likewise convert to PDF in a single shot. >> I commented on the issue: >> https://github.com/jgm/pandoc/issues/4105#issuecomment-444687501 >> >> On 2018-12-19 11:18 a.m., John MacFarlane wrote: >>> >>> Did you try using pandoc-citeproc to format the >>> citations instead of biber? >>> >>> For that, add this to your metadata: >>> >>> csl: apa.csl >>> >>> Download this csl file and put it in your working >>> directory: >>> >>> https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl >>> >>> Then try: >>> >>> pandoc -o wellness-assignment.pdf --filter pandoc-citeproc wellness-assignment.md >>> >>> and it should go straight to PDF, no need to use >>> xelatex or biber manually. >>> >>> The nice thing about this approach is that it >>> works for every output format pandoc supports, >>> so you could generate docx or html output too... >>> >>> Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >>> >>>> When I wrote a paper in APA format with Pandoc and Markdown I ran into >>>> some obstacles, so when I figured it out, I made a blog post about it: >>>> http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html >>>> >>>> Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: >>>> >>>>> pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md >>>>> xelatex wellness-assignment >>>>> biber wellness-assignment >>>>> xelatex wellness-assignment >>>> >>>> Start the paper with: >>>> >>>>> --- >>>>> title: Wellness Assignment >>>>> author: Jack Bates >>>>> documentclass: apa6 >>>>> classoption: >>>>> - man >>>>> - biblatex >>>>> bibliography: wellness-assignment.bib >>>>> ... >>>>> >>>>> Markdown follows ... >>>> >>>> If that post isn't accurate or I missed something, please correct me! >>>> >>>> Thank you for these excellent tools! >>>> >>>> -- >>>> 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. >>>> For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <b6f94e34-0988-2e12-76e0-d45a5eba13b0-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org>]
* Re: APA-format paper from Markdown [not found] ` <b6f94e34-0988-2e12-76e0-d45a5eba13b0-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> @ 2018-12-29 22:00 ` Jack Bates 2018-12-31 22:54 ` John MacFarlane 1 sibling, 0 replies; 7+ messages in thread From: Jack Bates @ 2018-12-29 22:00 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw, John MacFarlane I updated the blog post based on your feedback regarding the Pandoc AST, and I added what exactly was the issue with the pandoc-citeproc output: http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html Thanks again and if I've made any new or outstanding mistakes, please correct me! On 2018-12-22 8:27 a.m., Jack Bates wrote: > Thank you for clarifying, and for your help! The specific problem I ran > into was with hanging indents. > > Here's output with --biblatex: > http://nottheoilrig.com/biblatex.pdf > > and here it is with pandoc-citeproc: > http://nottheoilrig.com/pandoc-citeproc.pdf > > Here's my example input: > http://nottheoilrig.com/wellness-assignment.md > > Here are the commands I used with --biblatex: > >> pandoc --output biblatex.tex --standalone --biblatex >> http://nottheoilrig.com/wellness-assignment.md >> xelatex biblatex >> biber biblatex >> xelatex biblatex > > and with pandoc-citeproc: > >> pandoc --output pandoc-citeproc.pdf --filter pandoc-citeproc >> --pdf-engine xelatex --csl apa.csl >> http://nottheoilrig.com/wellness-assignment.md > > Also the --biblatex bibliography automatically starts on a new page, as > required by the APA manual, but that might just be happy coincidence: > https://tex.stackexchange.com/a/74298 > > On 2018-12-19 3:44 p.m., John MacFarlane wrote: >> >> This is pretty vague, though, about what didn't look >> right: >> >>> Sadly the references don't look quite right. >>> pandoc-citeproc doesn't output LaTeX, LaTeX doesn't >>> implement the Citation Style Language, whatever the >>> reason: The apa6 class isn't aware that the references >>> are in fact references and doesn't apply the >>> appropriate formatting >> >> pandoc-citeproc generates output in the Pandoc AST, >> which is in fact converted to LaTeX in the process of >> producing the PDF. Anyway, if you explain what the >> problem was, maybe there's a solution? >> >> >> Jack Bates <l33e9z-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >> >>> Thanks for this reply! Yes, pandoc-citeproc is the first thing I tried, >>> but the bibliography it generated wasn't formatted quite right. I >>> mentioned in the post the advantage that pandoc-citeproc automates the >>> commands, you can convert to PDF in a single shot, and it works with >>> different output formats, doesn't depend on LaTeX. I also linked to >>> workarounds that people have found, to properly format the bibliography >>> with pandoc-citeproc. >>> >>> The great thing about Pandoc is that you can use --biblatex and --filter >>> pandoc-citeproc interchangeably, without updating your document. So you >>> can use the one that better supports your output format or style guide. >>> >>> It would be great if --biblatex automated the commands, like >>> pandoc-citeproc, so you could likewise convert to PDF in a single shot. >>> I commented on the issue: >>> https://github.com/jgm/pandoc/issues/4105#issuecomment-444687501 >>> >>> On 2018-12-19 11:18 a.m., John MacFarlane wrote: >>>> >>>> Did you try using pandoc-citeproc to format the >>>> citations instead of biber? >>>> >>>> For that, add this to your metadata: >>>> >>>> csl: apa.csl >>>> >>>> Download this csl file and put it in your working >>>> directory: >>>> >>>> https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl >>>> >>>> >>>> Then try: >>>> >>>> pandoc -o wellness-assignment.pdf --filter pandoc-citeproc >>>> wellness-assignment.md >>>> >>>> and it should go straight to PDF, no need to use >>>> xelatex or biber manually. >>>> >>>> The nice thing about this approach is that it >>>> works for every output format pandoc supports, >>>> so you could generate docx or html output too... >>>> >>>> Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >>>> >>>>> When I wrote a paper in APA format with Pandoc and Markdown I ran into >>>>> some obstacles, so when I figured it out, I made a blog post about it: >>>>> http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html >>>>> >>>>> >>>>> Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF >>>>> with: >>>>> >>>>>> pandoc --output wellness-assignment.tex --standalone --biblatex >>>>>> wellness-assignment.md >>>>>> xelatex wellness-assignment >>>>>> biber wellness-assignment >>>>>> xelatex wellness-assignment >>>>> >>>>> Start the paper with: >>>>> >>>>>> --- >>>>>> title: Wellness Assignment >>>>>> author: Jack Bates >>>>>> documentclass: apa6 >>>>>> classoption: >>>>>> - man >>>>>> - biblatex >>>>>> bibliography: wellness-assignment.bib >>>>>> ... >>>>>> >>>>>> Markdown follows ... >>>>> >>>>> If that post isn't accurate or I missed something, please correct me! >>>>> >>>>> Thank you for these excellent tools! >>>>> >>>>> -- >>>>> 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. >>>>> >>>>> For more options, visit 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/bdba047f-6cf6-5b54-6588-0deb6c31ddcc%40nottheoilrig.com. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: APA-format paper from Markdown [not found] ` <b6f94e34-0988-2e12-76e0-d45a5eba13b0-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 2018-12-29 22:00 ` Jack Bates @ 2018-12-31 22:54 ` John MacFarlane 1 sibling, 0 replies; 7+ messages in thread From: John MacFarlane @ 2018-12-31 22:54 UTC (permalink / raw) To: Jack Bates, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw It's possible to get the hanging indents and new page, with a bit of work. Basically you need to insert some raw LaTeX before the bibliography. See https://groups.google.com/d/msg/pandoc-discuss/SUZ08-Kc6Og/ce0icuemwkkJ This concerns hanging indent, but you can also add \newpage before the References section. This is a bit ugly. Also, this approach only works for LaTeX output (but it's no worse than biblatex in this respect). A cleaner approach would be to use a lua filter that automatically adds the needed raw code (depending on the output format) before or around your bibliography; then you don't need to clutter up the source document. Jack Bates <l33e9z-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: > Thank you for clarifying, and for your help! The specific problem I ran > into was with hanging indents. > > Here's output with --biblatex: > http://nottheoilrig.com/biblatex.pdf > > and here it is with pandoc-citeproc: > http://nottheoilrig.com/pandoc-citeproc.pdf > > Here's my example input: > http://nottheoilrig.com/wellness-assignment.md > > Here are the commands I used with --biblatex: > >> pandoc --output biblatex.tex --standalone --biblatex http://nottheoilrig.com/wellness-assignment.md >> xelatex biblatex >> biber biblatex >> xelatex biblatex > > and with pandoc-citeproc: > >> pandoc --output pandoc-citeproc.pdf --filter pandoc-citeproc --pdf-engine xelatex --csl apa.csl http://nottheoilrig.com/wellness-assignment.md > > Also the --biblatex bibliography automatically starts on a new page, as > required by the APA manual, but that might just be happy coincidence: > https://tex.stackexchange.com/a/74298 > > On 2018-12-19 3:44 p.m., John MacFarlane wrote: >> >> This is pretty vague, though, about what didn't look >> right: >> >>> Sadly the references don't look quite right. >>> pandoc-citeproc doesn't output LaTeX, LaTeX doesn't >>> implement the Citation Style Language, whatever the >>> reason: The apa6 class isn't aware that the references >>> are in fact references and doesn't apply the >>> appropriate formatting >> >> pandoc-citeproc generates output in the Pandoc AST, >> which is in fact converted to LaTeX in the process of >> producing the PDF. Anyway, if you explain what the >> problem was, maybe there's a solution? >> >> >> Jack Bates <l33e9z-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >> >>> Thanks for this reply! Yes, pandoc-citeproc is the first thing I tried, >>> but the bibliography it generated wasn't formatted quite right. I >>> mentioned in the post the advantage that pandoc-citeproc automates the >>> commands, you can convert to PDF in a single shot, and it works with >>> different output formats, doesn't depend on LaTeX. I also linked to >>> workarounds that people have found, to properly format the bibliography >>> with pandoc-citeproc. >>> >>> The great thing about Pandoc is that you can use --biblatex and --filter >>> pandoc-citeproc interchangeably, without updating your document. So you >>> can use the one that better supports your output format or style guide. >>> >>> It would be great if --biblatex automated the commands, like >>> pandoc-citeproc, so you could likewise convert to PDF in a single shot. >>> I commented on the issue: >>> https://github.com/jgm/pandoc/issues/4105#issuecomment-444687501 >>> >>> On 2018-12-19 11:18 a.m., John MacFarlane wrote: >>>> >>>> Did you try using pandoc-citeproc to format the >>>> citations instead of biber? >>>> >>>> For that, add this to your metadata: >>>> >>>> csl: apa.csl >>>> >>>> Download this csl file and put it in your working >>>> directory: >>>> >>>> https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl >>>> >>>> Then try: >>>> >>>> pandoc -o wellness-assignment.pdf --filter pandoc-citeproc wellness-assignment.md >>>> >>>> and it should go straight to PDF, no need to use >>>> xelatex or biber manually. >>>> >>>> The nice thing about this approach is that it >>>> works for every output format pandoc supports, >>>> so you could generate docx or html output too... >>>> >>>> Jack Bates <m68giy-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> writes: >>>> >>>>> When I wrote a paper in APA format with Pandoc and Markdown I ran into >>>>> some obstacles, so when I figured it out, I made a blog post about it: >>>>> http://jdbates.blogspot.com/2018/12/heres-how-to-write-paper-in-apa-format.html >>>>> >>>>> Summary: Use the `apa6` document class and BibLaTeX. Convert to PDF with: >>>>> >>>>>> pandoc --output wellness-assignment.tex --standalone --biblatex wellness-assignment.md >>>>>> xelatex wellness-assignment >>>>>> biber wellness-assignment >>>>>> xelatex wellness-assignment >>>>> >>>>> Start the paper with: >>>>> >>>>>> --- >>>>>> title: Wellness Assignment >>>>>> author: Jack Bates >>>>>> documentclass: apa6 >>>>>> classoption: >>>>>> - man >>>>>> - biblatex >>>>>> bibliography: wellness-assignment.bib >>>>>> ... >>>>>> >>>>>> Markdown follows ... >>>>> >>>>> If that post isn't accurate or I missed something, please correct me! >>>>> >>>>> Thank you for these excellent tools! >>>>> >>>>> -- >>>>> 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/1674b2d0-1f02-fdc6-20ff-0959aa942ae9%40nottheoilrig.com. >>>>> For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-12-31 22:54 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-12-19 17:19 APA-format paper from Markdown Jack Bates [not found] ` <1674b2d0-1f02-fdc6-20ff-0959aa942ae9-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 2018-12-19 18:18 ` John MacFarlane [not found] ` <yh480kbm5hpehj.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 2018-12-19 20:53 ` Jack Bates [not found] ` <fb92679c-f165-eace-4bee-6923c50357d5-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 2018-12-19 22:44 ` John MacFarlane [not found] ` <yh480k1s6dp25s.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> 2018-12-22 15:27 ` Jack Bates [not found] ` <b6f94e34-0988-2e12-76e0-d45a5eba13b0-dGoucM6QAyFhr70sJ4iBzQ@public.gmane.org> 2018-12-29 22:00 ` Jack Bates 2018-12-31 22:54 ` 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).