
from parser_classes import *

'''
STANDARD LATEX
this extends the command class from
the latex class
the commands here should be all
    simply standard LaTeX commands
    and commands from standard LaTeX packages
'''

class valeptex(TextMacro):
    args = ''

# html and latex
class htmllatex(Command, Inline):
    args = 'html latex'

class latexonly(Command, Inline):
    args = 'self'

class latexenv(Environment):
    args = ''

class description(LaTeXList):
    args = ''

class author(Command, Inline):
    args = 'self'

class date(Command, Inline):
    args = 'self'

class title(Command, Inline):
    args = 'self'

class maketitle(Section):
    args = ''
    level = -2

class titlepage(Environment):
    args = ''

class tableofcontents(TextMacro):
    args = ''

class part(Section):
    args = '[ toc ] title'
    level = -1

class chapter(Section):
    args = '[ toc ] title'
    level = 1

class chapter_(Section):
    args = '[ toc ] title'
    level = 1

class section(Section):
    args = '[ toc ] title'
    level = 2

class section_(Section):
    args = '[ toc ] title'
    level = 2

class subsection(Section):
    args = '[ toc ] title'
    level = 3

class subsection_(Section):
    args = '[ toc ] title'
    level = 3

class subsubsection(Section):
    args = '[ toc ] title'
    level = 4

class subsubsection_(Section):
    args = '[ toc ] title'
    level = 4

class subsubsubsection(Section):
    args = '[ toc ] title'
    level = 5

class subsubsubsection_(Section):
    args = '[ toc ] title'
    level = 5

class paragraph(Section):
    args = '[ toc ] title'
    level = 10

class paragraph_(Section):
    args = '[ toc ] title'
    level = 10

class subparagraph(Section):
    args = '[ toc ] title'
    level = 11

class subparagraph_(Section):
    args = '[ toc ] title'
    level = 11

class index(Index):
    args = 'self'

# Commands from various packages 
class PassOptionsToPackage(SystemCommand):
    args = 'options package'

class hypersetup(SystemCommand):
    args = 'self'

class inputencoding(SystemCommand):
    args = 'self'

class sectionstyle(SystemCommand):
    args = ''


class foreignlanguage(SystemCommand):
    args = 'lang text'

class rotatebox(Format):
    args = '[ options ] angle text'

class RaggedRight(Format):
    args = ''

class discretionary(SystemCommand):
    args = 'end begin text'

class nicefrac(Format):
    args = 'num denom'

class fontsize(SystemCommand):
    args = 'arga argb'

class lettrine(Format):
    args = '[ opt ] text something'

class hyphenation(SystemCommand):
    args = 'self'

class texorpdfstring(SystemCommand):
    args = 'eins zwei'

class addtocontents(SystemCommand):
    args = 'eins zwei'

class markright(SystemCommand):
    args= 'self'

class markleft(SystemCommand):
    args = 'self'

class selectlanguage(SystemCommand):
    args = 'self'

class grafik(Format):
    args = 'self'

class includegraphicscn(Graphic):
    args = '[ opt ] self html'

class htmlimg(Graphic):
    args = 'self html'

class textit(Format):
    args = 'self'

class emph(Format):
    args = 'self'

class textgreater(TextMacro):
    args = '' 
    
class textless(TextMacro):
    args = '' 
    
class LaTeX(TextMacro):
    args = ''

class TeX(TextMacro):
    args = ''

class hline(Format):
    args = ''

class href(Link):
    args = 'link caption'

class quad(NoLineend):
    args = ''

class qquad(NoLineend):
    args = ''

class label(Label):
    args = 'self'

class ref(Ref):
    args = 'self'

class ref_(Ref):
    args = 'self'

class pageref(Ref):
    args = 'self'

class quotation(FormatEnv, Division):
    args = ''

class quote(FormatEnv, Division):
    args = ''

class center(FormatEnv, Division):
    args = ''

class flushright(FormatEnv, Division):
    args = ''

class flushleft(FormatEnv, Division):
    args = ''

class multicols(FormatEnv, Division):
    args = 'colno'

class textbf(Format):
    args = 'self'

class textsf(Format):
    args = 'self'

class textsc(Format):
    args = 'self'

class textcircled(Format):
    args = 'self'

class textcolor(Format):
    args = 'color text'

class textsubscript(Format):
    args = 'self'

class textsuperscript(Format):
    args = 'self'

class url(Link):
    args = 'self'

class verse(FormatEnv):
    args = ''

# various:
class FootnoteSpecific(SystemCommand):
    args = 'self'

class aboveentryskip(SystemCommand):
    args = ''

class advance(SystemCommand):
    args = ''

class allowbreak(SystemCommand):
    args = ''

class begingroup(SystemCommand):
    args = ''
    
class bigskip(Format):
    args = ''
    
class centering(Format):
    args = ''
    
class clearpage(Format):
    args = ''
    
class cline(Format):
    args = 'self'

class documentclass(SystemCommand):
    args = '[ options ] self'
    
class endgroup(SystemCommand):
    args = ''

class enlargethispage(SystemCommand):
    args = 'self' 

# LR Boxes
class hbox(Format):
    args = 'self'

class fbox(Format):
    args = 'self'

class mbox(Format):
    args = 'self'

class framebox(Format):
    args = '[ width ] [ pos ] self'

class makebox(Format):
    args = '[ width ] [ pos ] self'

class raisebox(Format):
    args = 'lift [ height ] [ depth ] text'

class reflectbox(Format):
    args = 'text'

class resizebox(Format):
    args = 'hlength vlength text'

# parboxes

class parbox(Format):
    args = '[ pos ] width text'

class minipage(FormatEnv):
    args = '[ pos ] width'

# text size switches: 
class tiny(Format):
    args = ''

class scriptsize(Format):
    args = ''

class footnotesize(Format):
    args = ''
    
class small(Format):
    args = ''

class normalsize(Format):
    args = ''

class large(Format):
    args = ''

class Large(Format):
    args = ''

class LARGE(Format):
    args = ''

class huge(Format):
    args = ''

class Huge(Format):
    args = ''

class tinyc(Format):
    args = 'self'

class scriptsizec(Format):
    args = 'self'

class footnotesizec(Format):
    args = 'self'

class smallc(Format):
    args = 'self'

class normalsizec(Format):
    args = 'self'

class largec(Format):
    args = 'self'

class Largec(Format):
    args = 'self'

class LARGEc(Format):
    args = 'self'

class hugec(Format):
    args = 'self'

class Hugec(Format):
    args = 'self'

class hfill(Format):
    args = ''

class dotfill(Format):
    args = ''

class flexpar(Format):
    args = 'self'

class hrule(Format):
    args = ''

class hsize(Format):
    args = ''

class hskip(Format):
    args = ''

class hspace(Format):
    args = 'self'
    
class hspace_(Format):
    args = 'self'
    
class ignorespaces(Format):
    args = ''

class include(SystemCommand):
    args = 'self' 
    
    
class includeonly(SystemCommand):
    args = 'self'
    
class kern(Format):
    args = ''

class let(SystemCommand):
    args = ''

class linebreak(Format):
    args = ''

class longlet(SystemCommand):
    args = ''

class looseness(SystemCommand):
    args = ''

class makeatletter(SystemCommand):
    args = ''

class makeatother(SystemCommand):
    args = ''
    
class margsize(Format):
    args = ''
    
class markboth(SystemCommand):
    args = 'left right'
    
class medskip(Format):
    args = ''

# tabular stuff   
class multicolumn(Command):
    args = 'number align text' 
    
class multirow(Command):
    args = 'number width text'
    
class newpage(Format):
    args = ''

class noindent(Format):
    args = ''
    
class nopagebreak(Format):
    args = ''
    
class overfullrule(Format):
    args = ''
    
class pagebreak(Format):
    args = ''
    
class put(Format):
    args = ''
    
class raggedright(Format):
    args = ''
    
class selectfont(SystemCommand):
    args = ''

class setlength(SystemCommand):
    args = 'cmd spec'
    
class shortenpage(SystemCommand):
    args = ''

class sideways(Environment):
    args = ''
    
class silentindex(Environment):
    args = ''

class sloppy(SystemCommand):
    args = ''
    
class smallskip(Format):
    args = ''

class tabcolsep(SystemCommand):
    args = ''

class textwidth(SystemCommand):
    args = '' 

class tolerance(SystemCommand):
    args = ''

class ul(Format):
    args = ''

class UL(Format):
    args = ''
    
class uwave(Format):
    args = 'self'

class vskip(Format):
    args = ''

class vspace(Format):
    args = 'space'
    
class vspace_(Format):
    args = 'space'

class watermark(SystemCommand):
    args = 'self '
    
class abstract(Environment, Division):
    args = ''

class bibliography(SystemCommand):
    args = 'self'

class bibliographystyle(SystemCommand):
    args = 'self'

class cite(Format):
    args = '[pages] self'

class citep(Format):
    args = '[pages] self'

class citet(Format):
    args = '[pages] self'

class citeyear(Format):
    args = 'self'

class citeyearpar(Format):
    args = 'self'

class citeauthor(Format):
    args = 'self'

class date(Format):
    args = 'self'

class appendix(SystemCommand):
    args = ''

class baselineskip(SystemCommand):
    args = ''

class cleardoublepage(SystemCommand):
    args = ''

class cr(SystemCommand):
    args = ''

class hyperref(Format):
    args = '[ opt ] text'

class indent(SystemCommand):
    args = ''

class long(SystemCommand):
    args = ''

class newif(SystemCommand):
    args = ''

class ooalign(Format):
    args = 'self'

class pdfbookmark(SystemCommand):
    args = '[ no ] first second'

class printindex(SystemCommand):
    args = '[ name ]'

class printindextrue(SystemCommand):
    args = ''

class protect(SystemCommand):
    args = ''

class rule(Format):
    args = '[shift] width height'

class scalebox(Format):
    args = 'hscale [vscale] text'

class setchaptertoctype(SystemCommand):
    args = ' section '

class setupworks(SystemCommand):
    args = ''

class sffamily(SystemCommand):
    args = ''

class rmfamily(SystemCommand):
    args = ''

class thispagestyle(SystemCommand):
    args = 'self'

class today(Format):
    args = ''

class vfill(Format):
    args = ''

class phantom(Format):
    args = 'self'

class strut(TextMacro):
    args = 'self'

