zoukankan      html  css  js  c++  java
  • Latex 算法过长 分页显示方法

    参考:

    Algorithm tag and page break

    Latex 算法过长 分页显示方法

    1.引用algorithm包;

    2.在egin{document}前加上以下Latex代码:

    makeatletter
    
    ewenvironment{breakablealgorithm}
      {% egin{breakablealgorithm}
       egin{center}
         
    efstepcounter{algorithm}% New algorithm
         hrule height.8pt depth0pt kern2pt% @fs@pre for @fs@ruled
         
    enewcommand{caption}[2][
    elax]{% Make a new caption
           {
    aggedright	extbf{ALG@name~	healgorithm} ##2par}%
           ifx
    elax##1
    elax % #1 is 
    elax
             addcontentsline{loa}{algorithm}{protect
    umberline{	healgorithm}##2}%
           else % #1 is not 
    elax
             addcontentsline{loa}{algorithm}{protect
    umberline{	healgorithm}##1}%
           fi
           kern2pthrulekern2pt
         }
      }{% end{breakablealgorithm}
         kern2pthrule
    elax% @fs@post for @fs@ruled
       end{center}
      }
    makeatother
    

    3.使用egin{breakablealgorithm}end{breakablealgorithm}替换egin{algorithm}end{algorithm}.

    2017.12

  • 相关阅读:
    团队作业第四次
    团队作业第三次
    团队作业第二次(2)
    团队作业第二次(1)
    团队作业1
    Pillow库
    pyautogui库
    Python文件读取与异常
    元注解
    Java注解
  • 原文地址:https://www.cnblogs.com/qq952693358/p/8046923.html
Copyright © 2011-2022 走看看