TransWikia.com

How to split algorithm2e?

TeX - LaTeX Asked on July 20, 2021

Is there any way to split algorithm2e in two pages? I want it to be under the paragraph on page 1 and the rest of it on page 2.

documentclass{article}
usepackage{xcolor}
usepackage[linesnumbered,ruled,vlined]{algorithm2e}

title{Another algorithm template}
author{Roy}

%%% Coloring the comment as blue
newcommandmycommfont[1]{footnotesizettfamilytextcolor{blue}{#1}}
SetCommentSty{mycommfont}

SetKwInput{KwInput}{Input}                % Set the Input
SetKwInput{KwOutput}{Output}              % set the Output

begin{document}
maketitle

Algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, drakon-charts, programming languages or control tables (processed by interpreters). Natural language expressions of algorithms tend to be verbose and ambiguous, and are rarely used for complex or technical algorithms. Pseudocode, flowcharts, drakon-charts and control tables are structured ways to express algorithms that avoid many of the ambiguities common in the statements based on natural language. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a computer, but are also often used as a way to define or document algorithms.

There is a wide variety of representations possible and one can express a given Turing machine program as a sequence of machine tables (see finite-state machine, state transition table and control table for more), as flowcharts and drakon-charts (see state diagram for more), or as a form of rudimentary machine code or assembly code called "sets of quadruples" (see Turing machine for more). [Wikipedia]

begin{algorithm}[H]
    KwInput{$----------$,---------------- $------$, $--------$, and $-------------$}
    KwOutput{----------- $------------$}
    $-------------$;
    $-----------$; $---------$;
    While{$----------$}
    {
        
            If{$----------$ for some $-----------$}
        {
            
            $--------------$;
            
            For{$-----------$}    
            { 
                $-----------$; 
                $---------------$;
            }
            
            $---------------$; 
            $------------------$;  
        }   
        ElseIf{$-----------$ for some $----------$}
        {
            If{$-------$}{
                
                $----------------;$;
                For{$--------$}    
                { 
                    $----------------$; 
                    $----------------$;;
                }
            }
            Else{$--------------------------------$;
                {
                    For{$---------$}    
                    { 
                        $----------------------$; $-----------------------$;
                }}
            }
            $-------------------$; 
            $------------------$;
        }      
        ElseIf{-------------------------------}
        {
            If{-----------}{
                
                $----------------------------------$;
                $----------------------------------$;
                For{$----------$}    
                { 
                    $----------------------------------$; $----------------------------------$;;
                    $----------------------------------$; 
                    $----------------------------------$;
                }
            }
            Else{$----------------------------------$;
                $----------------------------------$;
                For{$--------$}    
                { 
                    $--------------------$; 
                    $----------------------------------$; 
                    $----------------------------------$; 
                    $----------------------------------$; 
            }}
            
            $-------------------------$; 
            $---------------------------$;
            $----------------------------------$; 
            $------------------------$; 
            $------------------------$;   
        }  
        $-------$; comment{--------------------------.}
    }
    caption{----------------}
end{algorithm}
end{document}

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP