Hanging indents with a Pandoc bibliographyHanging indents in bibliographyPandoc Markdown to PDF doesn't show...

Borrowing Characters

Are paired adjectives bad style?

Achieving MPPT of a solar panel with LM2596

Is the withholding of funding notice allowed?

How do I deal with being jealous of my own players?

Traversing Africa: A Cryptic Journey

Is it possible to convert a suspension fork to rigid by drilling it?

I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?

What is this waxed root vegetable?

How can atoms be electrically neutral when there is a difference in the positions of the charges?

Is there a frame of reference in which I was born before I was conceived?

In iTunes 12 on macOS, how can I reset the skip count of a song?

Why do phishing e-mails use faked e-mail addresses instead of the real one?

If a set is open, does that imply that it has no boundary points?

Wrap all numerics in JSON with quotes

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

What type of postprocessing gives the effect of people standing out

Difference between 'stomach' and 'uterus'

Why adding the article "the" when it is not needed?

If nine coins are tossed, what is the probability that the number of heads is even?

How can I be pwned if I'm not registered on the compromised site?

Practical reasons to have both a large police force and bounty hunting network?

Inverse of the covariance matrix of a multivariate normal distribution

Is divide-by-zero a security vulnerability?



Hanging indents with a Pandoc bibliography


Hanging indents in bibliographyPandoc Markdown to PDF doesn't show imagesHow to change bibliography locale in pandoc?Chaining citations in pandocFull-width figures with PandocPandoc: code blocks in MarkDown with very long lines get cut off when outputting to PDFpandoc LaTex change ` backtick highlightCombining bash script with pandocPass LaTeX options with PandocSubdivided bibliography with pandoc













1















I'm using Pandoc / Markdown / LaTeX to write lab reports.



I've opted to not deal with multiple intermediate files for my bibliography. So I have to use this to generate my documents:



pandoc --csl=apa.csl lab02.md --bibliography=bibtex.bib -o lab02.pdf


This works alright. The issue is that hanging indent does not work. It's easy to solve this through this code block:



begingroup
# References
setlength{parindent}{-0.2in}
setlength{leftskip}{0.2in}
setlength{parskip}{8pt}

<div id="refs"></div>
endgroup


Which is how I am citing references. I have to do this because I have a required section after references, otherwise I could simply do # References and have it automatically put everything in, and just do that setlength stuff once right at the end of the doc.



My question is concerning how to create a custom command to do this faster, because I like hanging indent in some other sections too. I want do do this both for ease of use and to learn how to make commands. I am having trouble doing this on my own.



Ideally it'd be something like: starthang which maps to



begingroup
# References
setlength{parindent}{-0.2in}
setlength{leftskip}{0.2in}
setlength{parskip}{8pt}


And



endhang which just is an alias for endgroup



The best I have come up with is this, which doesn't seem to work:



newenvironment{hang}
{ {begingroup
setlength{parindent}{-0.2in}
setlength{leftskip}{0.2in}
setlength{parskip}{8pt}
}
{
endgroup
}
}


Any ideas greatly appreciated.










share|improve this question









New contributor




Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1















    I'm using Pandoc / Markdown / LaTeX to write lab reports.



    I've opted to not deal with multiple intermediate files for my bibliography. So I have to use this to generate my documents:



    pandoc --csl=apa.csl lab02.md --bibliography=bibtex.bib -o lab02.pdf


    This works alright. The issue is that hanging indent does not work. It's easy to solve this through this code block:



    begingroup
    # References
    setlength{parindent}{-0.2in}
    setlength{leftskip}{0.2in}
    setlength{parskip}{8pt}

    <div id="refs"></div>
    endgroup


    Which is how I am citing references. I have to do this because I have a required section after references, otherwise I could simply do # References and have it automatically put everything in, and just do that setlength stuff once right at the end of the doc.



    My question is concerning how to create a custom command to do this faster, because I like hanging indent in some other sections too. I want do do this both for ease of use and to learn how to make commands. I am having trouble doing this on my own.



    Ideally it'd be something like: starthang which maps to



    begingroup
    # References
    setlength{parindent}{-0.2in}
    setlength{leftskip}{0.2in}
    setlength{parskip}{8pt}


    And



    endhang which just is an alias for endgroup



    The best I have come up with is this, which doesn't seem to work:



    newenvironment{hang}
    { {begingroup
    setlength{parindent}{-0.2in}
    setlength{leftskip}{0.2in}
    setlength{parskip}{8pt}
    }
    {
    endgroup
    }
    }


    Any ideas greatly appreciated.










    share|improve this question









    New contributor




    Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      I'm using Pandoc / Markdown / LaTeX to write lab reports.



      I've opted to not deal with multiple intermediate files for my bibliography. So I have to use this to generate my documents:



      pandoc --csl=apa.csl lab02.md --bibliography=bibtex.bib -o lab02.pdf


      This works alright. The issue is that hanging indent does not work. It's easy to solve this through this code block:



      begingroup
      # References
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}

      <div id="refs"></div>
      endgroup


      Which is how I am citing references. I have to do this because I have a required section after references, otherwise I could simply do # References and have it automatically put everything in, and just do that setlength stuff once right at the end of the doc.



      My question is concerning how to create a custom command to do this faster, because I like hanging indent in some other sections too. I want do do this both for ease of use and to learn how to make commands. I am having trouble doing this on my own.



      Ideally it'd be something like: starthang which maps to



      begingroup
      # References
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}


      And



      endhang which just is an alias for endgroup



      The best I have come up with is this, which doesn't seem to work:



      newenvironment{hang}
      { {begingroup
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}
      }
      {
      endgroup
      }
      }


      Any ideas greatly appreciated.










      share|improve this question









      New contributor




      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I'm using Pandoc / Markdown / LaTeX to write lab reports.



      I've opted to not deal with multiple intermediate files for my bibliography. So I have to use this to generate my documents:



      pandoc --csl=apa.csl lab02.md --bibliography=bibtex.bib -o lab02.pdf


      This works alright. The issue is that hanging indent does not work. It's easy to solve this through this code block:



      begingroup
      # References
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}

      <div id="refs"></div>
      endgroup


      Which is how I am citing references. I have to do this because I have a required section after references, otherwise I could simply do # References and have it automatically put everything in, and just do that setlength stuff once right at the end of the doc.



      My question is concerning how to create a custom command to do this faster, because I like hanging indent in some other sections too. I want do do this both for ease of use and to learn how to make commands. I am having trouble doing this on my own.



      Ideally it'd be something like: starthang which maps to



      begingroup
      # References
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}


      And



      endhang which just is an alias for endgroup



      The best I have come up with is this, which doesn't seem to work:



      newenvironment{hang}
      { {begingroup
      setlength{parindent}{-0.2in}
      setlength{leftskip}{0.2in}
      setlength{parskip}{8pt}
      }
      {
      endgroup
      }
      }


      Any ideas greatly appreciated.







      pdf pandoc markdown






      share|improve this question









      New contributor




      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 17 hours ago









      JouleV

      4,87611139




      4,87611139






      New contributor




      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Feb 28 at 21:07









      Atticus MassieAtticus Massie

      61




      61




      New contributor




      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Atticus Massie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          2














          One easy solution is to use the hangparas environment from the hanging package:



          Pandoc Bibliography example with hangparas



          ---
          header-includes: |
          usepackage{hanging}
          references:
          - id: 'abou-el-haj:1983bury'
          type: article-journal
          title: >-
          Bury St Edmunds Abbey Between 1070 and 1124: A History of Property,
          Privilege, and Monastic Art Production
          container-title: Art History
          page: 1-29
          volume: '6'
          issue: '1'
          DOI: 10/gftmwk
          author:
          - family: Abou-El-Haj
          given: Barbara
          issued:
          - year: 1983
          month: 3
          - id: 'abou-el-haj:1991audiences'
          type: article-journal
          title: The audiences for the medieval cult of saints
          container-title: Gesta
          page: 3-15
          volume: '30'
          issue: '1'
          DOI: 10/bhjtnp
          author:
          - family: Abou-El-Haj
          given: Barbara
          issued:
          - year: 1991
          ---

          [@abou-el-haj:1983bury; @abou-el-haj:1991audiences]

          # References

          ```{=latex}
          begin{hangparas}{1em}{1}
          ```

          <div id="refs"></div>

          ```{=latex}
          end{hangparas}
          ```





          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "85"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });






            Atticus Massie is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477219%2fhanging-indents-with-a-pandoc-bibliography%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            One easy solution is to use the hangparas environment from the hanging package:



            Pandoc Bibliography example with hangparas



            ---
            header-includes: |
            usepackage{hanging}
            references:
            - id: 'abou-el-haj:1983bury'
            type: article-journal
            title: >-
            Bury St Edmunds Abbey Between 1070 and 1124: A History of Property,
            Privilege, and Monastic Art Production
            container-title: Art History
            page: 1-29
            volume: '6'
            issue: '1'
            DOI: 10/gftmwk
            author:
            - family: Abou-El-Haj
            given: Barbara
            issued:
            - year: 1983
            month: 3
            - id: 'abou-el-haj:1991audiences'
            type: article-journal
            title: The audiences for the medieval cult of saints
            container-title: Gesta
            page: 3-15
            volume: '30'
            issue: '1'
            DOI: 10/bhjtnp
            author:
            - family: Abou-El-Haj
            given: Barbara
            issued:
            - year: 1991
            ---

            [@abou-el-haj:1983bury; @abou-el-haj:1991audiences]

            # References

            ```{=latex}
            begin{hangparas}{1em}{1}
            ```

            <div id="refs"></div>

            ```{=latex}
            end{hangparas}
            ```





            share|improve this answer




























              2














              One easy solution is to use the hangparas environment from the hanging package:



              Pandoc Bibliography example with hangparas



              ---
              header-includes: |
              usepackage{hanging}
              references:
              - id: 'abou-el-haj:1983bury'
              type: article-journal
              title: >-
              Bury St Edmunds Abbey Between 1070 and 1124: A History of Property,
              Privilege, and Monastic Art Production
              container-title: Art History
              page: 1-29
              volume: '6'
              issue: '1'
              DOI: 10/gftmwk
              author:
              - family: Abou-El-Haj
              given: Barbara
              issued:
              - year: 1983
              month: 3
              - id: 'abou-el-haj:1991audiences'
              type: article-journal
              title: The audiences for the medieval cult of saints
              container-title: Gesta
              page: 3-15
              volume: '30'
              issue: '1'
              DOI: 10/bhjtnp
              author:
              - family: Abou-El-Haj
              given: Barbara
              issued:
              - year: 1991
              ---

              [@abou-el-haj:1983bury; @abou-el-haj:1991audiences]

              # References

              ```{=latex}
              begin{hangparas}{1em}{1}
              ```

              <div id="refs"></div>

              ```{=latex}
              end{hangparas}
              ```





              share|improve this answer


























                2












                2








                2







                One easy solution is to use the hangparas environment from the hanging package:



                Pandoc Bibliography example with hangparas



                ---
                header-includes: |
                usepackage{hanging}
                references:
                - id: 'abou-el-haj:1983bury'
                type: article-journal
                title: >-
                Bury St Edmunds Abbey Between 1070 and 1124: A History of Property,
                Privilege, and Monastic Art Production
                container-title: Art History
                page: 1-29
                volume: '6'
                issue: '1'
                DOI: 10/gftmwk
                author:
                - family: Abou-El-Haj
                given: Barbara
                issued:
                - year: 1983
                month: 3
                - id: 'abou-el-haj:1991audiences'
                type: article-journal
                title: The audiences for the medieval cult of saints
                container-title: Gesta
                page: 3-15
                volume: '30'
                issue: '1'
                DOI: 10/bhjtnp
                author:
                - family: Abou-El-Haj
                given: Barbara
                issued:
                - year: 1991
                ---

                [@abou-el-haj:1983bury; @abou-el-haj:1991audiences]

                # References

                ```{=latex}
                begin{hangparas}{1em}{1}
                ```

                <div id="refs"></div>

                ```{=latex}
                end{hangparas}
                ```





                share|improve this answer













                One easy solution is to use the hangparas environment from the hanging package:



                Pandoc Bibliography example with hangparas



                ---
                header-includes: |
                usepackage{hanging}
                references:
                - id: 'abou-el-haj:1983bury'
                type: article-journal
                title: >-
                Bury St Edmunds Abbey Between 1070 and 1124: A History of Property,
                Privilege, and Monastic Art Production
                container-title: Art History
                page: 1-29
                volume: '6'
                issue: '1'
                DOI: 10/gftmwk
                author:
                - family: Abou-El-Haj
                given: Barbara
                issued:
                - year: 1983
                month: 3
                - id: 'abou-el-haj:1991audiences'
                type: article-journal
                title: The audiences for the medieval cult of saints
                container-title: Gesta
                page: 3-15
                volume: '30'
                issue: '1'
                DOI: 10/bhjtnp
                author:
                - family: Abou-El-Haj
                given: Barbara
                issued:
                - year: 1991
                ---

                [@abou-el-haj:1983bury; @abou-el-haj:1991audiences]

                # References

                ```{=latex}
                begin{hangparas}{1em}{1}
                ```

                <div id="refs"></div>

                ```{=latex}
                end{hangparas}
                ```






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered yesterday









                Andrew DunningAndrew Dunning

                617315




                617315






















                    Atticus Massie is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Atticus Massie is a new contributor. Be nice, and check out our Code of Conduct.













                    Atticus Massie is a new contributor. Be nice, and check out our Code of Conduct.












                    Atticus Massie is a new contributor. Be nice, and check out our Code of Conduct.
















                    Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477219%2fhanging-indents-with-a-pandoc-bibliography%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    El tren de la libertad Índice Antecedentes "Porque yo decido" Desarrollo de la...

                    Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...

                    Castillo d'Acher Características Menú de navegación