3-level Verse in LaTeX











up vote
4
down vote

favorite
1












In Vietnamese, there is a type of poem (song thất lục bát -- double seven - six - eight) which goes like this



                       LIPSUM

Lorem ipsum dolor sit amet, consectetur adipiscing
Elit, sed do eiusmod tempor incididunt ut
Labore et dolore magna aliqua. Ut
Enim ad minim veniam, quis nostrud exercitation ullamco
Laboris nisi ut aliquip ex ea commodo
Consequat. Duis aute irure dolor in reprehenderit
In voluptate velit esse cillum dolore
Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.

Lipsum, 2018


(After two 7-word sentences is a 6-word sentence and then a 8-word sentence, and then another two 7-word sentences, and so on)



The alignment of the poem needs to be as above.



JosephHarriott's answer has helped me a lot in 2-level verse. However, I can't edit it so that it can output a 3-level verse.



Also, is it possible to make a n-level verse for any value of n? (this is not necessary right now, but it may help me in the future).



Any helps will be highly appreciated. Thanks in advance!










share|improve this question


























    up vote
    4
    down vote

    favorite
    1












    In Vietnamese, there is a type of poem (song thất lục bát -- double seven - six - eight) which goes like this



                           LIPSUM

    Lorem ipsum dolor sit amet, consectetur adipiscing
    Elit, sed do eiusmod tempor incididunt ut
    Labore et dolore magna aliqua. Ut
    Enim ad minim veniam, quis nostrud exercitation ullamco
    Laboris nisi ut aliquip ex ea commodo
    Consequat. Duis aute irure dolor in reprehenderit
    In voluptate velit esse cillum dolore
    Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.

    Lipsum, 2018


    (After two 7-word sentences is a 6-word sentence and then a 8-word sentence, and then another two 7-word sentences, and so on)



    The alignment of the poem needs to be as above.



    JosephHarriott's answer has helped me a lot in 2-level verse. However, I can't edit it so that it can output a 3-level verse.



    Also, is it possible to make a n-level verse for any value of n? (this is not necessary right now, but it may help me in the future).



    Any helps will be highly appreciated. Thanks in advance!










    share|improve this question
























      up vote
      4
      down vote

      favorite
      1









      up vote
      4
      down vote

      favorite
      1






      1





      In Vietnamese, there is a type of poem (song thất lục bát -- double seven - six - eight) which goes like this



                             LIPSUM

      Lorem ipsum dolor sit amet, consectetur adipiscing
      Elit, sed do eiusmod tempor incididunt ut
      Labore et dolore magna aliqua. Ut
      Enim ad minim veniam, quis nostrud exercitation ullamco
      Laboris nisi ut aliquip ex ea commodo
      Consequat. Duis aute irure dolor in reprehenderit
      In voluptate velit esse cillum dolore
      Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.

      Lipsum, 2018


      (After two 7-word sentences is a 6-word sentence and then a 8-word sentence, and then another two 7-word sentences, and so on)



      The alignment of the poem needs to be as above.



      JosephHarriott's answer has helped me a lot in 2-level verse. However, I can't edit it so that it can output a 3-level verse.



      Also, is it possible to make a n-level verse for any value of n? (this is not necessary right now, but it may help me in the future).



      Any helps will be highly appreciated. Thanks in advance!










      share|improve this question













      In Vietnamese, there is a type of poem (song thất lục bát -- double seven - six - eight) which goes like this



                             LIPSUM

      Lorem ipsum dolor sit amet, consectetur adipiscing
      Elit, sed do eiusmod tempor incididunt ut
      Labore et dolore magna aliqua. Ut
      Enim ad minim veniam, quis nostrud exercitation ullamco
      Laboris nisi ut aliquip ex ea commodo
      Consequat. Duis aute irure dolor in reprehenderit
      In voluptate velit esse cillum dolore
      Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.

      Lipsum, 2018


      (After two 7-word sentences is a 6-word sentence and then a 8-word sentence, and then another two 7-word sentences, and so on)



      The alignment of the poem needs to be as above.



      JosephHarriott's answer has helped me a lot in 2-level verse. However, I can't edit it so that it can output a 3-level verse.



      Also, is it possible to make a n-level verse for any value of n? (this is not necessary right now, but it may help me in the future).



      Any helps will be highly appreciated. Thanks in advance!







      alignment verse






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 5 hours ago









      Dũng Vũ

      1,180121




      1,180121






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          This 1st version just types as text, indenting as it goes. Therefore, it is left-aligned to the margin and can break mid-verse across page boundaries.



          documentclass[12pt]{article}
          usepackage{listofitems}
          newcommanddefineverse[1]{%
          setsepchar{,}%
          greadlist*vindent{#1}%
          }
          newcommandsetverse[1]{%
          parnoindent%
          setsepchar{\}%
          readlist*versedata{#1}%
          ifnumlistlenversedata=listlenvindentrelax%
          foreachitemxinversedata{%
          ifnumxcnt=1relaxelse\fi%
          mbox{}hspace{vindent[xcnt]dimexprverseindentrelax}%
          x%
          }%
          else%
          textit{Line count does not correspond to verse definition.}
          fi%
          par%
          }
          defverseindent{1em}
          begin{document}
          defineverse{1,1,2,0,1,1,2,0}
          setverse{
          Lorem ipsum dolor sit amet, consectetur adipiscing\
          Elit, sed do eiusmod tempor incididunt ut\
          Labore et dolore magna aliqua. Ut\
          Enim ad minim veniam, quis nostrud exercitation ullamco\
          Laboris nisi ut aliquip ex ea commodo\
          Consequat. Duis aute irure dolor in reprehenderit \
          In voluptate velit esse cillum dolore\
          Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}
          bigskip Try to set a poorly composed verse:
          setverse{A\b\c\d}
          end{document}


          enter image description here



          Here is a version that creates each verse in a stack. Therefore, it can be easily centered. But the verse cannot break across pages.



          documentclass[12pt]{article}
          usepackage{listofitems,stackengine}
          newcommanddefineverse[1]{%
          setsepchar{,}%
          greadlist*vindent{#1}%
          }
          newcommandsetverse[2]{%
          par%
          ifxrelax#1relaxelsecenterline{#1}medskipfi%
          setsepchar{\}%
          readlist*versedata{#2}%
          ifnumlistlenversedata=listlenvindentrelax%
          saveboxstackedbox{}%
          foreachitemxinversedata{%
          stackengine{0pt}{usebox{stackedbox}}{%
          mbox{strut}%
          hspace{vindent[-xcnt]dimexprverseindentrelax}%
          versedata[-xcnt]}{O}{l}{T}{F}{S}%
          }%
          centerline{usebox{stackedbox}}%
          else%
          textit{Line count does not correspond to verse definition.}
          fi%
          parmedskip%
          }
          newcommandattribution[1]{%
          centerline{hspace{wdstackedbox}makebox[0pt][r]{#1}}%
          par
          }
          defverseindent{1em}
          begin{document}
          defineverse{1,1,2,0,1,1,2,0}
          setverse[Lipsum]{
          Lorem ipsum dolor sit amet, consectetur adipiscing\
          Elit, sed do eiusmod tempor incididunt ut\
          Labore et dolore magna aliqua. Ut\
          Enim ad minim veniam, quis nostrud exercitation ullamco\
          Laboris nisi ut aliquip ex ea commodo\
          Consequat. Duis aute irure dolor in reprehenderit \
          In voluptate velit esse cillum dolore\
          Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}%
          setverse{
          Lorem ipsum dolor sit amet, consectetur\
          Elit, sed do eiusmod tempor incididunt ut\
          Labore et dolore magna aliqua. Ut\
          Enim ad minim veniam, quis nostrud exercitation\
          Laboris nisi ut aliquip ex ea commodo\
          Consequat. Duis aute irure dolor in reprehenderit \
          In voluptate velit esse cillum dolore\
          Eu fugiat nulla pariatur. Excepteur sint occaecat.}%
          attribution{Lipsum, 2018}

          bigskip Try to set a poorly composed verse:

          fbox{setverse{A\b\c\d}}
          end{document}


          enter image description here






          share|improve this answer






























            up vote
            1
            down vote













            You can try with the verse package.



            documentclass{report}
            usepackage{verse}
            begin{document}
            begin{verse}
            indentpattern{0010} % line indents
            begin{patverse}
            First line \
            Second line \
            Third line \
            hspace{-vgap}Fourth line \
            end{patverse}
            begin{patverse}
            Fifth line \
            Sixth line \
            Seventh line \
            hspace{-vgap}Eifgth line \
            end{patverse}
            end{verse}

            end{document}


            See the verse package documentation (> texdoc verse) for more information.






            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',
              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
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462211%2f3-level-verse-in-latex%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote













              This 1st version just types as text, indenting as it goes. Therefore, it is left-aligned to the margin and can break mid-verse across page boundaries.



              documentclass[12pt]{article}
              usepackage{listofitems}
              newcommanddefineverse[1]{%
              setsepchar{,}%
              greadlist*vindent{#1}%
              }
              newcommandsetverse[1]{%
              parnoindent%
              setsepchar{\}%
              readlist*versedata{#1}%
              ifnumlistlenversedata=listlenvindentrelax%
              foreachitemxinversedata{%
              ifnumxcnt=1relaxelse\fi%
              mbox{}hspace{vindent[xcnt]dimexprverseindentrelax}%
              x%
              }%
              else%
              textit{Line count does not correspond to verse definition.}
              fi%
              par%
              }
              defverseindent{1em}
              begin{document}
              defineverse{1,1,2,0,1,1,2,0}
              setverse{
              Lorem ipsum dolor sit amet, consectetur adipiscing\
              Elit, sed do eiusmod tempor incididunt ut\
              Labore et dolore magna aliqua. Ut\
              Enim ad minim veniam, quis nostrud exercitation ullamco\
              Laboris nisi ut aliquip ex ea commodo\
              Consequat. Duis aute irure dolor in reprehenderit \
              In voluptate velit esse cillum dolore\
              Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}
              bigskip Try to set a poorly composed verse:
              setverse{A\b\c\d}
              end{document}


              enter image description here



              Here is a version that creates each verse in a stack. Therefore, it can be easily centered. But the verse cannot break across pages.



              documentclass[12pt]{article}
              usepackage{listofitems,stackengine}
              newcommanddefineverse[1]{%
              setsepchar{,}%
              greadlist*vindent{#1}%
              }
              newcommandsetverse[2]{%
              par%
              ifxrelax#1relaxelsecenterline{#1}medskipfi%
              setsepchar{\}%
              readlist*versedata{#2}%
              ifnumlistlenversedata=listlenvindentrelax%
              saveboxstackedbox{}%
              foreachitemxinversedata{%
              stackengine{0pt}{usebox{stackedbox}}{%
              mbox{strut}%
              hspace{vindent[-xcnt]dimexprverseindentrelax}%
              versedata[-xcnt]}{O}{l}{T}{F}{S}%
              }%
              centerline{usebox{stackedbox}}%
              else%
              textit{Line count does not correspond to verse definition.}
              fi%
              parmedskip%
              }
              newcommandattribution[1]{%
              centerline{hspace{wdstackedbox}makebox[0pt][r]{#1}}%
              par
              }
              defverseindent{1em}
              begin{document}
              defineverse{1,1,2,0,1,1,2,0}
              setverse[Lipsum]{
              Lorem ipsum dolor sit amet, consectetur adipiscing\
              Elit, sed do eiusmod tempor incididunt ut\
              Labore et dolore magna aliqua. Ut\
              Enim ad minim veniam, quis nostrud exercitation ullamco\
              Laboris nisi ut aliquip ex ea commodo\
              Consequat. Duis aute irure dolor in reprehenderit \
              In voluptate velit esse cillum dolore\
              Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}%
              setverse{
              Lorem ipsum dolor sit amet, consectetur\
              Elit, sed do eiusmod tempor incididunt ut\
              Labore et dolore magna aliqua. Ut\
              Enim ad minim veniam, quis nostrud exercitation\
              Laboris nisi ut aliquip ex ea commodo\
              Consequat. Duis aute irure dolor in reprehenderit \
              In voluptate velit esse cillum dolore\
              Eu fugiat nulla pariatur. Excepteur sint occaecat.}%
              attribution{Lipsum, 2018}

              bigskip Try to set a poorly composed verse:

              fbox{setverse{A\b\c\d}}
              end{document}


              enter image description here






              share|improve this answer



























                up vote
                2
                down vote













                This 1st version just types as text, indenting as it goes. Therefore, it is left-aligned to the margin and can break mid-verse across page boundaries.



                documentclass[12pt]{article}
                usepackage{listofitems}
                newcommanddefineverse[1]{%
                setsepchar{,}%
                greadlist*vindent{#1}%
                }
                newcommandsetverse[1]{%
                parnoindent%
                setsepchar{\}%
                readlist*versedata{#1}%
                ifnumlistlenversedata=listlenvindentrelax%
                foreachitemxinversedata{%
                ifnumxcnt=1relaxelse\fi%
                mbox{}hspace{vindent[xcnt]dimexprverseindentrelax}%
                x%
                }%
                else%
                textit{Line count does not correspond to verse definition.}
                fi%
                par%
                }
                defverseindent{1em}
                begin{document}
                defineverse{1,1,2,0,1,1,2,0}
                setverse{
                Lorem ipsum dolor sit amet, consectetur adipiscing\
                Elit, sed do eiusmod tempor incididunt ut\
                Labore et dolore magna aliqua. Ut\
                Enim ad minim veniam, quis nostrud exercitation ullamco\
                Laboris nisi ut aliquip ex ea commodo\
                Consequat. Duis aute irure dolor in reprehenderit \
                In voluptate velit esse cillum dolore\
                Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}
                bigskip Try to set a poorly composed verse:
                setverse{A\b\c\d}
                end{document}


                enter image description here



                Here is a version that creates each verse in a stack. Therefore, it can be easily centered. But the verse cannot break across pages.



                documentclass[12pt]{article}
                usepackage{listofitems,stackengine}
                newcommanddefineverse[1]{%
                setsepchar{,}%
                greadlist*vindent{#1}%
                }
                newcommandsetverse[2]{%
                par%
                ifxrelax#1relaxelsecenterline{#1}medskipfi%
                setsepchar{\}%
                readlist*versedata{#2}%
                ifnumlistlenversedata=listlenvindentrelax%
                saveboxstackedbox{}%
                foreachitemxinversedata{%
                stackengine{0pt}{usebox{stackedbox}}{%
                mbox{strut}%
                hspace{vindent[-xcnt]dimexprverseindentrelax}%
                versedata[-xcnt]}{O}{l}{T}{F}{S}%
                }%
                centerline{usebox{stackedbox}}%
                else%
                textit{Line count does not correspond to verse definition.}
                fi%
                parmedskip%
                }
                newcommandattribution[1]{%
                centerline{hspace{wdstackedbox}makebox[0pt][r]{#1}}%
                par
                }
                defverseindent{1em}
                begin{document}
                defineverse{1,1,2,0,1,1,2,0}
                setverse[Lipsum]{
                Lorem ipsum dolor sit amet, consectetur adipiscing\
                Elit, sed do eiusmod tempor incididunt ut\
                Labore et dolore magna aliqua. Ut\
                Enim ad minim veniam, quis nostrud exercitation ullamco\
                Laboris nisi ut aliquip ex ea commodo\
                Consequat. Duis aute irure dolor in reprehenderit \
                In voluptate velit esse cillum dolore\
                Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}%
                setverse{
                Lorem ipsum dolor sit amet, consectetur\
                Elit, sed do eiusmod tempor incididunt ut\
                Labore et dolore magna aliqua. Ut\
                Enim ad minim veniam, quis nostrud exercitation\
                Laboris nisi ut aliquip ex ea commodo\
                Consequat. Duis aute irure dolor in reprehenderit \
                In voluptate velit esse cillum dolore\
                Eu fugiat nulla pariatur. Excepteur sint occaecat.}%
                attribution{Lipsum, 2018}

                bigskip Try to set a poorly composed verse:

                fbox{setverse{A\b\c\d}}
                end{document}


                enter image description here






                share|improve this answer

























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  This 1st version just types as text, indenting as it goes. Therefore, it is left-aligned to the margin and can break mid-verse across page boundaries.



                  documentclass[12pt]{article}
                  usepackage{listofitems}
                  newcommanddefineverse[1]{%
                  setsepchar{,}%
                  greadlist*vindent{#1}%
                  }
                  newcommandsetverse[1]{%
                  parnoindent%
                  setsepchar{\}%
                  readlist*versedata{#1}%
                  ifnumlistlenversedata=listlenvindentrelax%
                  foreachitemxinversedata{%
                  ifnumxcnt=1relaxelse\fi%
                  mbox{}hspace{vindent[xcnt]dimexprverseindentrelax}%
                  x%
                  }%
                  else%
                  textit{Line count does not correspond to verse definition.}
                  fi%
                  par%
                  }
                  defverseindent{1em}
                  begin{document}
                  defineverse{1,1,2,0,1,1,2,0}
                  setverse{
                  Lorem ipsum dolor sit amet, consectetur adipiscing\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation ullamco\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}
                  bigskip Try to set a poorly composed verse:
                  setverse{A\b\c\d}
                  end{document}


                  enter image description here



                  Here is a version that creates each verse in a stack. Therefore, it can be easily centered. But the verse cannot break across pages.



                  documentclass[12pt]{article}
                  usepackage{listofitems,stackengine}
                  newcommanddefineverse[1]{%
                  setsepchar{,}%
                  greadlist*vindent{#1}%
                  }
                  newcommandsetverse[2]{%
                  par%
                  ifxrelax#1relaxelsecenterline{#1}medskipfi%
                  setsepchar{\}%
                  readlist*versedata{#2}%
                  ifnumlistlenversedata=listlenvindentrelax%
                  saveboxstackedbox{}%
                  foreachitemxinversedata{%
                  stackengine{0pt}{usebox{stackedbox}}{%
                  mbox{strut}%
                  hspace{vindent[-xcnt]dimexprverseindentrelax}%
                  versedata[-xcnt]}{O}{l}{T}{F}{S}%
                  }%
                  centerline{usebox{stackedbox}}%
                  else%
                  textit{Line count does not correspond to verse definition.}
                  fi%
                  parmedskip%
                  }
                  newcommandattribution[1]{%
                  centerline{hspace{wdstackedbox}makebox[0pt][r]{#1}}%
                  par
                  }
                  defverseindent{1em}
                  begin{document}
                  defineverse{1,1,2,0,1,1,2,0}
                  setverse[Lipsum]{
                  Lorem ipsum dolor sit amet, consectetur adipiscing\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation ullamco\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}%
                  setverse{
                  Lorem ipsum dolor sit amet, consectetur\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat.}%
                  attribution{Lipsum, 2018}

                  bigskip Try to set a poorly composed verse:

                  fbox{setverse{A\b\c\d}}
                  end{document}


                  enter image description here






                  share|improve this answer














                  This 1st version just types as text, indenting as it goes. Therefore, it is left-aligned to the margin and can break mid-verse across page boundaries.



                  documentclass[12pt]{article}
                  usepackage{listofitems}
                  newcommanddefineverse[1]{%
                  setsepchar{,}%
                  greadlist*vindent{#1}%
                  }
                  newcommandsetverse[1]{%
                  parnoindent%
                  setsepchar{\}%
                  readlist*versedata{#1}%
                  ifnumlistlenversedata=listlenvindentrelax%
                  foreachitemxinversedata{%
                  ifnumxcnt=1relaxelse\fi%
                  mbox{}hspace{vindent[xcnt]dimexprverseindentrelax}%
                  x%
                  }%
                  else%
                  textit{Line count does not correspond to verse definition.}
                  fi%
                  par%
                  }
                  defverseindent{1em}
                  begin{document}
                  defineverse{1,1,2,0,1,1,2,0}
                  setverse{
                  Lorem ipsum dolor sit amet, consectetur adipiscing\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation ullamco\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}
                  bigskip Try to set a poorly composed verse:
                  setverse{A\b\c\d}
                  end{document}


                  enter image description here



                  Here is a version that creates each verse in a stack. Therefore, it can be easily centered. But the verse cannot break across pages.



                  documentclass[12pt]{article}
                  usepackage{listofitems,stackengine}
                  newcommanddefineverse[1]{%
                  setsepchar{,}%
                  greadlist*vindent{#1}%
                  }
                  newcommandsetverse[2]{%
                  par%
                  ifxrelax#1relaxelsecenterline{#1}medskipfi%
                  setsepchar{\}%
                  readlist*versedata{#2}%
                  ifnumlistlenversedata=listlenvindentrelax%
                  saveboxstackedbox{}%
                  foreachitemxinversedata{%
                  stackengine{0pt}{usebox{stackedbox}}{%
                  mbox{strut}%
                  hspace{vindent[-xcnt]dimexprverseindentrelax}%
                  versedata[-xcnt]}{O}{l}{T}{F}{S}%
                  }%
                  centerline{usebox{stackedbox}}%
                  else%
                  textit{Line count does not correspond to verse definition.}
                  fi%
                  parmedskip%
                  }
                  newcommandattribution[1]{%
                  centerline{hspace{wdstackedbox}makebox[0pt][r]{#1}}%
                  par
                  }
                  defverseindent{1em}
                  begin{document}
                  defineverse{1,1,2,0,1,1,2,0}
                  setverse[Lipsum]{
                  Lorem ipsum dolor sit amet, consectetur adipiscing\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation ullamco\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat.}%
                  setverse{
                  Lorem ipsum dolor sit amet, consectetur\
                  Elit, sed do eiusmod tempor incididunt ut\
                  Labore et dolore magna aliqua. Ut\
                  Enim ad minim veniam, quis nostrud exercitation\
                  Laboris nisi ut aliquip ex ea commodo\
                  Consequat. Duis aute irure dolor in reprehenderit \
                  In voluptate velit esse cillum dolore\
                  Eu fugiat nulla pariatur. Excepteur sint occaecat.}%
                  attribution{Lipsum, 2018}

                  bigskip Try to set a poorly composed verse:

                  fbox{setverse{A\b\c\d}}
                  end{document}


                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited 4 hours ago

























                  answered 5 hours ago









                  Steven B. Segletes

                  151k9191398




                  151k9191398






















                      up vote
                      1
                      down vote













                      You can try with the verse package.



                      documentclass{report}
                      usepackage{verse}
                      begin{document}
                      begin{verse}
                      indentpattern{0010} % line indents
                      begin{patverse}
                      First line \
                      Second line \
                      Third line \
                      hspace{-vgap}Fourth line \
                      end{patverse}
                      begin{patverse}
                      Fifth line \
                      Sixth line \
                      Seventh line \
                      hspace{-vgap}Eifgth line \
                      end{patverse}
                      end{verse}

                      end{document}


                      See the verse package documentation (> texdoc verse) for more information.






                      share|improve this answer

























                        up vote
                        1
                        down vote













                        You can try with the verse package.



                        documentclass{report}
                        usepackage{verse}
                        begin{document}
                        begin{verse}
                        indentpattern{0010} % line indents
                        begin{patverse}
                        First line \
                        Second line \
                        Third line \
                        hspace{-vgap}Fourth line \
                        end{patverse}
                        begin{patverse}
                        Fifth line \
                        Sixth line \
                        Seventh line \
                        hspace{-vgap}Eifgth line \
                        end{patverse}
                        end{verse}

                        end{document}


                        See the verse package documentation (> texdoc verse) for more information.






                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          You can try with the verse package.



                          documentclass{report}
                          usepackage{verse}
                          begin{document}
                          begin{verse}
                          indentpattern{0010} % line indents
                          begin{patverse}
                          First line \
                          Second line \
                          Third line \
                          hspace{-vgap}Fourth line \
                          end{patverse}
                          begin{patverse}
                          Fifth line \
                          Sixth line \
                          Seventh line \
                          hspace{-vgap}Eifgth line \
                          end{patverse}
                          end{verse}

                          end{document}


                          See the verse package documentation (> texdoc verse) for more information.






                          share|improve this answer












                          You can try with the verse package.



                          documentclass{report}
                          usepackage{verse}
                          begin{document}
                          begin{verse}
                          indentpattern{0010} % line indents
                          begin{patverse}
                          First line \
                          Second line \
                          Third line \
                          hspace{-vgap}Fourth line \
                          end{patverse}
                          begin{patverse}
                          Fifth line \
                          Sixth line \
                          Seventh line \
                          hspace{-vgap}Eifgth line \
                          end{patverse}
                          end{verse}

                          end{document}


                          See the verse package documentation (> texdoc verse) for more information.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 1 hour ago









                          Peter Wilson

                          7,93911432




                          7,93911432






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462211%2f3-level-verse-in-latex%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

                              サソリ

                              広島県道265号伴広島線

                              Setup Asymptote in Texstudio