How to add hline after the last row of every pages












0














documentclass{article}
usepackage{lipsum}
usepackage{cals}
usepackage[latin]{babel}
showboxbreadth=100
showboxdepth=100

makeatletter
letoldDispatch=cals@row@dispatch
newboxrowBefore
newboxrowAfter
newboxdecorationCopy
newdimensplitHeight

defcals@row@dispatch{%
cals@ifbreakiftrue % detect that a break is required
splitHeight=pagegoal advancesplitHeight -pagetotal
ifdim splitHeight>50pt % break inrow only if at least 100pt left
advancesplitHeight -5pt % avoid pagebreak due to overflows
%
% Split the current row on two: before and after the break
%
setboxrowBefore=hbox{}
setboxrowAfter=hbox{}
defnext{%
setbox0=lastbox
ifvoid0
defnext{globalsetboxrowBefore=boxrowBefore
globalsetboxrowAfter=boxrowAfter }%
else
setbox2=vsplit0 tosplitHeight
setboxrowBefore=hbox{box2 unhboxrowBefore}%
setboxrowAfter=hbox{box0 unhboxrowAfter}%
fi
next}
setbox0=hbox{unhboxcals@current@row next}
%
% Decoration backup, typeset the first row,
% restore context, typeset the second at the end of macro
%
setboxdecorationCopy=copycals@current@cs
setboxcals@current@row=boxrowBefore
htcals@current@cs=htcals@current@row
oldDispatch
cals@issue@break
cals@thead@tokens
setboxcals@current@row=boxrowAfter
cals@reheight@cellscals@current@row
setboxcals@current@cs=boxdecorationCopy
htcals@current@cs=htcals@current@row
letcals@current@context=b
fi
fi
oldDispatch}

begin{document}
begin{calstable}
colwidths{{150pt}{150pt}{150pt}}

defcals@framecs@width{.4pt}
defcals@framers@width{.4pt}

thead{brow bfseries cell{header1}cell{header2}cell{header3}
mdseries erow}
brow cell{lipsum[ 1]}cell{lipsum[ 2]}cell{lipsum[ 3]} erow
brow cell{lipsum[ 4]}cell{lipsum[ 5]}cell{lipsum[ 6]} erow
brow cell{lipsum[ 7]}cell{lipsum[ 8]}cell{lipsum[ 9]} erow
brow cell{lipsum[10]}cell{lipsum[11]}cell{lipsum[12]} erow
brow cell{lipsum[13]}cell{lipsum[14]}cell{lipsum[15]} erow
brow cell{lipsum[16]}cell{lipsum[17]}cell{lipsum[18]} erow
end{calstable}
end{document}









share|improve this question





























    0














    documentclass{article}
    usepackage{lipsum}
    usepackage{cals}
    usepackage[latin]{babel}
    showboxbreadth=100
    showboxdepth=100

    makeatletter
    letoldDispatch=cals@row@dispatch
    newboxrowBefore
    newboxrowAfter
    newboxdecorationCopy
    newdimensplitHeight

    defcals@row@dispatch{%
    cals@ifbreakiftrue % detect that a break is required
    splitHeight=pagegoal advancesplitHeight -pagetotal
    ifdim splitHeight>50pt % break inrow only if at least 100pt left
    advancesplitHeight -5pt % avoid pagebreak due to overflows
    %
    % Split the current row on two: before and after the break
    %
    setboxrowBefore=hbox{}
    setboxrowAfter=hbox{}
    defnext{%
    setbox0=lastbox
    ifvoid0
    defnext{globalsetboxrowBefore=boxrowBefore
    globalsetboxrowAfter=boxrowAfter }%
    else
    setbox2=vsplit0 tosplitHeight
    setboxrowBefore=hbox{box2 unhboxrowBefore}%
    setboxrowAfter=hbox{box0 unhboxrowAfter}%
    fi
    next}
    setbox0=hbox{unhboxcals@current@row next}
    %
    % Decoration backup, typeset the first row,
    % restore context, typeset the second at the end of macro
    %
    setboxdecorationCopy=copycals@current@cs
    setboxcals@current@row=boxrowBefore
    htcals@current@cs=htcals@current@row
    oldDispatch
    cals@issue@break
    cals@thead@tokens
    setboxcals@current@row=boxrowAfter
    cals@reheight@cellscals@current@row
    setboxcals@current@cs=boxdecorationCopy
    htcals@current@cs=htcals@current@row
    letcals@current@context=b
    fi
    fi
    oldDispatch}

    begin{document}
    begin{calstable}
    colwidths{{150pt}{150pt}{150pt}}

    defcals@framecs@width{.4pt}
    defcals@framers@width{.4pt}

    thead{brow bfseries cell{header1}cell{header2}cell{header3}
    mdseries erow}
    brow cell{lipsum[ 1]}cell{lipsum[ 2]}cell{lipsum[ 3]} erow
    brow cell{lipsum[ 4]}cell{lipsum[ 5]}cell{lipsum[ 6]} erow
    brow cell{lipsum[ 7]}cell{lipsum[ 8]}cell{lipsum[ 9]} erow
    brow cell{lipsum[10]}cell{lipsum[11]}cell{lipsum[12]} erow
    brow cell{lipsum[13]}cell{lipsum[14]}cell{lipsum[15]} erow
    brow cell{lipsum[16]}cell{lipsum[17]}cell{lipsum[18]} erow
    end{calstable}
    end{document}









    share|improve this question



























      0












      0








      0







      documentclass{article}
      usepackage{lipsum}
      usepackage{cals}
      usepackage[latin]{babel}
      showboxbreadth=100
      showboxdepth=100

      makeatletter
      letoldDispatch=cals@row@dispatch
      newboxrowBefore
      newboxrowAfter
      newboxdecorationCopy
      newdimensplitHeight

      defcals@row@dispatch{%
      cals@ifbreakiftrue % detect that a break is required
      splitHeight=pagegoal advancesplitHeight -pagetotal
      ifdim splitHeight>50pt % break inrow only if at least 100pt left
      advancesplitHeight -5pt % avoid pagebreak due to overflows
      %
      % Split the current row on two: before and after the break
      %
      setboxrowBefore=hbox{}
      setboxrowAfter=hbox{}
      defnext{%
      setbox0=lastbox
      ifvoid0
      defnext{globalsetboxrowBefore=boxrowBefore
      globalsetboxrowAfter=boxrowAfter }%
      else
      setbox2=vsplit0 tosplitHeight
      setboxrowBefore=hbox{box2 unhboxrowBefore}%
      setboxrowAfter=hbox{box0 unhboxrowAfter}%
      fi
      next}
      setbox0=hbox{unhboxcals@current@row next}
      %
      % Decoration backup, typeset the first row,
      % restore context, typeset the second at the end of macro
      %
      setboxdecorationCopy=copycals@current@cs
      setboxcals@current@row=boxrowBefore
      htcals@current@cs=htcals@current@row
      oldDispatch
      cals@issue@break
      cals@thead@tokens
      setboxcals@current@row=boxrowAfter
      cals@reheight@cellscals@current@row
      setboxcals@current@cs=boxdecorationCopy
      htcals@current@cs=htcals@current@row
      letcals@current@context=b
      fi
      fi
      oldDispatch}

      begin{document}
      begin{calstable}
      colwidths{{150pt}{150pt}{150pt}}

      defcals@framecs@width{.4pt}
      defcals@framers@width{.4pt}

      thead{brow bfseries cell{header1}cell{header2}cell{header3}
      mdseries erow}
      brow cell{lipsum[ 1]}cell{lipsum[ 2]}cell{lipsum[ 3]} erow
      brow cell{lipsum[ 4]}cell{lipsum[ 5]}cell{lipsum[ 6]} erow
      brow cell{lipsum[ 7]}cell{lipsum[ 8]}cell{lipsum[ 9]} erow
      brow cell{lipsum[10]}cell{lipsum[11]}cell{lipsum[12]} erow
      brow cell{lipsum[13]}cell{lipsum[14]}cell{lipsum[15]} erow
      brow cell{lipsum[16]}cell{lipsum[17]}cell{lipsum[18]} erow
      end{calstable}
      end{document}









      share|improve this question















      documentclass{article}
      usepackage{lipsum}
      usepackage{cals}
      usepackage[latin]{babel}
      showboxbreadth=100
      showboxdepth=100

      makeatletter
      letoldDispatch=cals@row@dispatch
      newboxrowBefore
      newboxrowAfter
      newboxdecorationCopy
      newdimensplitHeight

      defcals@row@dispatch{%
      cals@ifbreakiftrue % detect that a break is required
      splitHeight=pagegoal advancesplitHeight -pagetotal
      ifdim splitHeight>50pt % break inrow only if at least 100pt left
      advancesplitHeight -5pt % avoid pagebreak due to overflows
      %
      % Split the current row on two: before and after the break
      %
      setboxrowBefore=hbox{}
      setboxrowAfter=hbox{}
      defnext{%
      setbox0=lastbox
      ifvoid0
      defnext{globalsetboxrowBefore=boxrowBefore
      globalsetboxrowAfter=boxrowAfter }%
      else
      setbox2=vsplit0 tosplitHeight
      setboxrowBefore=hbox{box2 unhboxrowBefore}%
      setboxrowAfter=hbox{box0 unhboxrowAfter}%
      fi
      next}
      setbox0=hbox{unhboxcals@current@row next}
      %
      % Decoration backup, typeset the first row,
      % restore context, typeset the second at the end of macro
      %
      setboxdecorationCopy=copycals@current@cs
      setboxcals@current@row=boxrowBefore
      htcals@current@cs=htcals@current@row
      oldDispatch
      cals@issue@break
      cals@thead@tokens
      setboxcals@current@row=boxrowAfter
      cals@reheight@cellscals@current@row
      setboxcals@current@cs=boxdecorationCopy
      htcals@current@cs=htcals@current@row
      letcals@current@context=b
      fi
      fi
      oldDispatch}

      begin{document}
      begin{calstable}
      colwidths{{150pt}{150pt}{150pt}}

      defcals@framecs@width{.4pt}
      defcals@framers@width{.4pt}

      thead{brow bfseries cell{header1}cell{header2}cell{header3}
      mdseries erow}
      brow cell{lipsum[ 1]}cell{lipsum[ 2]}cell{lipsum[ 3]} erow
      brow cell{lipsum[ 4]}cell{lipsum[ 5]}cell{lipsum[ 6]} erow
      brow cell{lipsum[ 7]}cell{lipsum[ 8]}cell{lipsum[ 9]} erow
      brow cell{lipsum[10]}cell{lipsum[11]}cell{lipsum[12]} erow
      brow cell{lipsum[13]}cell{lipsum[14]}cell{lipsum[15]} erow
      brow cell{lipsum[16]}cell{lipsum[17]}cell{lipsum[18]} erow
      end{calstable}
      end{document}






      tables split cals






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 7 mins ago

























      asked 21 mins ago









      Zeno Shuai

      534




      534



























          active

          oldest

          votes











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


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f466799%2fhow-to-add-hline-after-the-last-row-of-every-pages%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2f466799%2fhow-to-add-hline-after-the-last-row-of-every-pages%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

          Contact image not getting when fetch all contact list from iPhone by CNContact

          count number of partitions of a set with n elements into k subsets

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks