Setting up ConTeXt document

From ConTeXt wiki

<< HTML_and_ConTeXt | Click_and_navigate_to_chapters_and_sections >

                          
mainfil="annrep.tex"   # open a file to output ConTeXt document                                                                                         
`rm #{mainfil}`              
fil=File.new(mainfil,"a")

# Add some opening directives and include style files
                        
fil.write "\\input context_styles \n"  # this file contains the styling options for my Context document                       
fil.write "\\starttext \n"
fil.write "\\leftaligned{\\BigFontOne Contents} \n"
fil.write "\\vfill \n"
fil.write "{ \\switchtobodyfont[10pt] "
fil.write "\\startcolumns[n=2,balance=no,rule=off,option=background,frame=off,background=color,backgroundcolor=blue:1] \n"    
fil.write "\\placecontent \n"
fil.write "\\stopcolumns \n"
fil.write "}"