From: Patrick Fradin Date: Sun, 18 Sep 2011 14:42:37 +0000 (+0200) Subject: Première version de texgraph.php basée sur metapost.php X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=commitdiff_plain;h=6859468a589418fa30b4f8b6c1d3d36a06d2a088;p=geshi.git Première version de texgraph.php basée sur metapost.php --- diff --git a/texgraph.php b/texgraph.php new file mode 100644 index 0000000..a39a8c2 --- /dev/null +++ b/texgraph.php @@ -0,0 +1,298 @@ + 'TeXgraph', + 'COMMENT_SINGLE' => array(1 => '//'), + 'COMMENT_MULTI' => array( + '{'=>'}' + ), + 'COMMENT_REGEXP' => array( + ), + 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, + 'QUOTEMARKS' => array('"'), + 'ESCAPE_CHAR' => '', + 'KEYWORDS' => array( + 1 => array( # type + + ), + 2 => array( # file construction + 'TeXgraph','Cmd','Var','Mac','Graph','Include' + ), + 3 => array( # programmation structure + 'if','else','elif', 'else', 'fi', 'for','do','od','by','By', + 'step','until','in','to','repeat','from', 'odfi', 'andif' + ), + 4 => array( # operateurs binaires + 'And', 'Or', 'CutA', 'CutB', 'Inside', 'Inter', 'InterL' + ), + 5 => array( # macros + 'Ryb','Lcolor','Rcolor','Gcolor','Bcolor','RgbL','MixColor','CplColor','ColorJump','Hsb','HueColor','SatColor','BrightColor', + 'Rgb2Hsb','Rgb2Gray','Light','Dark','Palette','Rgb2Hexa','MapBy','coord','epsCoord','svgCoord','texCoord','SetStr','engineerF', + 'StrNum','StrListAdd','StrListInit','StrListCopy','StrListDelKey','StrListDelVal','StrListGetKey','StrListKill', + 'StrListInsert','StrListReplace','StrListReplaceKey','StrListShow','Ceil','div','mod','not','pgcd','ppcm','Abs','free', + 'IsIn','nil','round','bary','CpCopy','CpDel','CpNops','CpReplace','CpReverse','del','getdot','IsAlign','isobar','KillDup', + 'length','permute','Pos','rectangle','replace','reverse','SortWith','Anp','binom','ecart','fact','max','min','median','moy', + 'prod','sum','var','RealArg','RealCoord','RealCoordV','ScrCoord','ScrCoordV','SvgCoord','TeXCoord','affin','defAff','ftransform', + 'hom','inv','mtransform','proj','projO','rot','shift','simil','sym','symG','symO','ChangeWinTo','invmatrix','matrix','mulmatrix', + 'bissec','cap','capB','carre','cup','cupB','cutBezier','Cvx2d','Intersec','med','parallel','parallelo','perp','polyreg','pqGoneReg', + 'rect','setminus','setminusB','compileFormule','conv2FlatPs','drawFlatPs','drawTeXlabel','loadFlatPs','extractFlatPs','NewTeXlabel', + 'bbox','centerView','RestoreWin','SaveWin','size','view','zoom','angleD','arcBezier','Arc','arc','axes','axeX','axeY','background', + 'Cercle','Clip','Dbissec','Dcarre','DrawDot','Ddroite','Dmed','domaine1','domaine2','domaine3','Dparallel','Dparallelo','Dperp', + 'Dpolyreg','DpqGoneReg','drawSet','Drectangle','ellipseArc','ellipticArc','flecher','addfrac','Incfrac','GradDroite','label', + 'LabelArc','LabelAxe','LabelDot','LabelSeg','markangle','markseg','periodic','Rarc','Rcercle','Rellipse','RellipticArc','Seg', + 'set','setB','suite','tangente','tangenteP','wedge','aire3d','angle3d','angle','bary3d','det3d','det','interDD','interDP', + 'interLP','interPP','IsAlign3d','isobar3d','IsPlan','KillDup3D','length3d','Map3D','Merge3d','n','Nops3d','normalize', + 'permute3d','planEqn','Pos3d','purge3d','px','py','pz','pxy','pxz','pyz','replace3d','reverse3d','viewDir','visible', + 'Xde','Yde','Zde','antirot3d','defAff3d','dproj3d','dproj3dO','dsym3d','dsym3dO','ftransform3d','hom3d','inv3d','proj3d', + 'proj3dO','shift3d','sym3d','sym3dO','rot3d','invmatrix3d','matrix3d','mtransform3d','mulmatrix3d','drawWin3d','rectangle3d', + 'RestoreTphi','RestoreWin3d','SaveTphi','SaveWin3d','transformbox3d','view3D','ScreenX','ScreenY','ScreenCenter','ScreenPos', + 'Clip3D','clipCurve','clipPoly','pdfprog','CompileEps','CompilePdf','Bsave','Esave','AretesNum','Chanfrein','Cone','curve2Cone', + 'curve2Cylinder','curveTube','Cvx3dAux','bordsAjour','Cvx3d','Cylindre','FacesNum','getdroite','getplan','getplanEqn','grille3d', + 'HollowFacet','Intersection','line2Cone','line2Cylinder','lineTube','putAbove','Ordonner','Parallelep','pqGoneReg3D','Prisme', + 'Pyramide','rotCurve','rotLine','Section2','Section','Sphere','Tetra','trianguler','Arc3D','newxlegend','newylegend','newzlegend', + 'Axes3D','AxeX3D','AxeY3D','AxeZ3D','BoxAxes3D','Courbe3D','Cercle3D','Dcone','Dcylindre','DpqGoneReg3D','DrawAretes', + 'DrawDroite','DrawDdroite','DrawGouraudTr','DrawPlan','Dsphere','LabelDot3D','Ligne3D','markseg3d','Point3D','Dparallelep','Dprisme', + 'Dpyramide','DrawFaces','DrawFacet','DrawFlatFacet','DrawPoly','DrawPolyNC','DrawSmoothFacet','Dsurface','Dtetraedre','bdFacet', + 'bdLine','bdPlan','bdPlanEqn','bdDroite','bdCurve','bdTorus','bdPrism','bdPyramid','bdCylinder','bdCone','bdSphere','bdSurf', + 'bdWall','bdAxes','bdAngleD','bdDot','bande','conv2Facet','split2facet1','class_Path','split2facet2','makeLabel3d','drawTeXlabel3d', + 'bdLabel','labelarc','bdArc','bdCercle','ExportGouraudTr','ExportSmoothFacet','WriteObj','WriteOff','SceneToObj','SceneToGeom','SceneToJvx', + 'Apercu','javaview','geomview','Bouton','CompVer','MakeVer','help','MouseZoom','NewLabel','NewLabelDot','NewLabelDot3D','Snapshot', + 'VarGlob','chaine' + ), + 6 => array( # commandes relatives aux chaines + 'StrComp','StrPos','StrLength','StrReplace','StrCopy','StrDel','ScientificF','GetStr','Str', + 'UpperCase','LowerCase','String','Concat','IsString','StrEval' + ), + 7 => array( # fonctions math + 'sqr','opp','sin','cos','tan','arcsin','arccos','arctan','sh','ch','th','argsh','argch','argth','sqrt','bar', + 'abs','Arg','Ent','Re','Im','Rand','cot','arccot','cth','argcth', + ), + 8 => array( # commandes prédéfinies + 'Seq','Map','For','Liste','Si','Copy','Loop','While','Assign','Nops','Nargs','M','Args','StrArgs','Diff', + 'Int','Solve','Round','Set','Mix','Del','Clip2D','Echange','Inc','Insert','Sort','PermuteWith', + 'Reverse','Merge','Free','SortFacet','ClipFacet','Get3D','Display3D','ModelView','PosCam','DistCam', + 'Build3D','GetSurface','Clip3DLine','Proj3D','Prodvec','Prodscal','Norm','Normal','Mtransform3D', + 'Fvisible','ConvertToObj','ConvertToObjN','Inserer3D','Sommets','Aretes', + 'Bord','MakePoly','PaintFacet','PaintVertex','EpsCoord','SaveAttr','RestoreAttr','GetAttr','SetAttr','ChangeAttr', + 'DefaultAttr','Border','Special','Mtransform','Dup','Der','GetSpline','Creer','NewGraph', + 'Fenetre','Marges','Eval','Get','Saut','Close','Input','LoadImage','InputMac','Load', + 'RenMac','RenCommand','TeX2FlatPs','Message','DelGraph','DefVar','DelVar','IsVar','NewVar', + 'DefMac','NewMac','DelMac','IsMac','Exec','OriginalCoord','ReCalc' + ), + 9 => array( # commandes relatives à la couleur + 'Rgb','HexaColor','GrayScale' + ), + 10 => array( # commandes relatives aux transformations + 'GetMatrix','ComposeMatrix','IdMatrix','GetMatrix3D','IdMatrix3D','ComposeMatrix3D','SetMatrix3D','SetMatrix' + ), + 11 => array( # commandes relatives à l'interface graphique + 'VisibleGraph','Delay','Timer','TimerMac','ReDraw','NotXor','Move','Stroke','NewItem','DelItem','NewButton', + 'NewText','DelText','DelButton','Attributs','MaxPixels','Pixel2Scr','Scr2Pixel','Pixel','NewBitmap','DelBitmap', + 'UpdateLocalDatabase','ListFiles','ListWords','AddMenu2D','AddMenu3D','Show','Hide', + ), + 12 => array( # commandes relatives aux labels + 'Label' + ), + 13 => array( + ), + 14 => array(# draw instructions + 'Ligne','Courbe','Cartesienne','Polaire','Droite','Ellipse','Axes','Grille', + 'Point','EllipticArc','EquaDif','Implicit','Bezier','Spline','Path','MyExport','draw', + ), + 15 => array(# Attributs graphiques + 'DashPattern','LabelStyle','DotStyle','LineStyle','Width','Color','Arrows','FillStyle','FillColor','NbPoints', + 'AutoReCalc','LabelSize','LabelAngle','xylabelsep','xyticks','xylabelpos','PenMode','ForMinToMax','TeXLabel', + 'FillOpacity','StrokeOpacity','IsVisible','Eofill','LineJoin','LineCap','MiterLimit','DotAngle', + 'DotScale','DotSize' + ), + 16 => array(# commandes relatives aux fichiers + 'WriteFile','OpenFile','CloseFile','FileExists','ReadData','ReadFlatPs','ReadObj','Export','ExportObject', + 'ExportPathData' + ), + 17 => array(# constantes internes + 'i','e','pi','noline','solid','dashed','dotted','userdash','thinlines','thicklines','Thicklines','dotcircle','dot', + 'bigdot','square''','plus','cross','times','asterisk','oplus','otimes','diamond','diamond''','triangle','triangle''', + 'pentagon','pentagon''','butt','round','square','miter','bevel','centered','left','right','center','baseline','framed', + 'stacked','special','top','bottom','jump','comp','line','linearc','bezier','curve','arc','move','ellipticArc','circle', + 'ellipse','closepath','none','full','bdiag','hvcross','diagcross','fdiag','horizontal','vertical','tiny','scriptsize', + 'footnotesize','small','normalsize','large','Large','LARGE','huge','Huge','Nil','version','Windows','GUI','Data','Xmin', + 'Ymin','Xmax','Ymax','Xscale','Yscale','margeG','margeD','margeH','margeB','ExportMode','teg','tex','pst','pgf','svg','eps', + 'pdf','tkz','epsc','pdfc','psf','user','src4latex','obj','geom','jvx','bmp','texsrc', + 'ortho','central','sep3D','sep','black', + 'white','red','green','blue','yellow','cyan','magenta','gray','aliceblue','antiquewhite','aqua','aquamarine','azure', + 'beige','bisque','blanchedalmond','blueviolet','brown','burlywood','cadetblue','chartreuse','chocolate','coral','cornflowerblue', + 'cornsilk','crimson','darkblue','darkcyan','darkgoldenrod','darkgray','darkgreen','darkkhaki','darkmagenta','darkolivegreen','darkorange', + 'darkorchid','darkred','darksalmon','darkseagreen','darkslateblue','darkslategray','darkturquoise','darkviolet','deeppink','deepskyblue', + 'dimgray','dodgerblue','firebrick','floralwhite','forestgreen','fuchsia','gainsboro','ghostwhite','gold','goldenrod','greenyellow', + 'honeydew','hotpink','indianred','indigo','ivory','khaki','lavender','lavenderblush','lawngreen','lemonchiffon','lightblue','lightcoral', + 'lightcyan','lightgoldenrodyellow','lightgreen','lightgray','lightpink','lightsalmon','lightseagreen','lightskyblue','lightslategray', + 'lightsteelblue','lightyellow','lime','limegreen','linen','maroon','mediumaquamarine','mediumblue','mediumorchid','mediumpurple', + 'mediumseagreen','mediumslateblue','mediumspringgreen','mediumturquoise','mediumvioletred','midnightblue','mintcream','mistyrose', + 'moccasin','navajowhite','navy','oldlace','olive','olivedrab','orange','orangered','orchid','palegoldenrod','palegreen','paleturquoise', + 'palevioletred','papayawhip','peachpuff','peru','pink','plum','powderblue','purple','rosybrown','royalblue','saddlebrown','salmon', + 'sandybrown','seagreen','seashell','sienna','silver','skyblue','slateblue','slategray','snow','springgreen','steelblue','tan', + 'teal','thistle','tomato','turquoise','violet','wheat','whitesmoke','yellowgreen' + ), + 18 => array(# constantes chaines internes + 'LF','DirSep','Diese','InitialPath','TmpPath','UserMacPath','DocPath','PdfReader','ImageViewer','JavaviewPath','WebLoad' + ), + 19 => array(# other predefined variables + ), + 20 => array(# variables prédéfinies + 'theta','phi','tMin','tMax','ComptGraph','ComptLabel3d', + 'MouseCode','ZoomList','AngleStep','stock','stock1','stock2','stock3','stock4','stock5','mm','deg', + 'rad','Xfact','Yfact','maxGrad','Origin','vecI','vecJ','vecK','Xinf','Xsup','Yinf','Ysup','Zinf','Zsup','backcolor','win2dList', + 'win3dList','TphiList','labelpos','labelsep','inside','outside','usecomma','nbdeci','numericFormat','labels','height', + 'position','rotation','select','width','scale','hollow','color','dollar','ScriptExt','HideStyle','HideWidth','HideColor','above', + 'hiddenLines','TeXifyLabels','defaultMatrix','contrast','smooth','backculling','opacity','twoside','clip','clipwin','matrix', + 'arrows','arrowscale','linestyle','tube','radius','radiusscale','nbfacet','hidden','close','t','nbdot','u','v','grid','disc', + 'cube','dotstyle','dotscale','dir','cleanLabel','dotcolor','labelsize','labelstyle','labeldir','label3d','showdot','TeXify', + 'radscale','normal','border','bordercolor','xaxe','yaxe','zaxe','drawbox','flip','mirror','xlabelsep','xlabelstyle','xlegendsep', + 'xstep','xlimits','xgradlimits','ylabelsep','ylabelstyle','ylegendsep','ystep','ylimits','ygradlimits','zlabelsep','zlabelstyle', + 'zlegendsep','zstep','zlimits','zgradlimits','gridwidth','gridcolor','tickdir','tickpos','axeOrigin','legendpos','originlabel', + 'tailleB','DeltaB','RefPoint','NbBoutons' + ) + ), + 'SYMBOLS' => array( + ':=','=','+','-','*','/','<','>','>=','<=','<>','\\', '@', ',', ';', '#' + ), + 'CASE_SENSITIVE' => array( + GESHI_COMMENTS => false, + 1 => true, + 2 => true, + 3 => true, + 4 => true, + 5 => true, + 6 => true, + 7 => true, + 8 => true, + 9 => true, + 10 => true, + 11 => true, + 12 => true, + 13 => true, + 14 => true, + 15 => true, + 16 => true, + 17 => true, + 18 => true, + 19 => true, + 20 => true + ), + 'STYLES' => array( + 'KEYWORDS' => array( + 1 => 'color: #472;', # type + 2 => 'color: #35A;font-weight: bold;', # file construction + 3 => 'color: #A53;', # structure + 4 => 'color: #35A;', # operateurs binaires + 5 => 'color: #35A;', # macros + 6 => 'color: #35A;', # commandes relatives aux chaines + 7 => 'color: #35A;', # fonctions math + 8 => 'color: #35A;', # commandes prédéfinies + 9 => 'color: #35A;', # commandes relatives à la couleur + 10 => 'color: #35A;', # commandes relatives aux transformations + 11 => 'color: #35A;', # commandes relatives à l'interface graphique + 12 => 'color: #35A;', # commandes relatives aux labels + 13 => 'color: #3B5;', # + 14 => 'color: #35A;', # draw instructions + 15 => 'color: #472;', # Attributs graphiques + 16 => 'color: #000;', # commandes relatives aux fichiers + 17 => 'color: #000;', # constantes internes + 18 => 'color: #000;', # constantes chaines internes + 19 => 'color: #000;', # + 20 => 'color: #000;' # variables prédéfinies + ), + 'COMMENTS' => array( + 1 => 'color: #777;', + 'MULTI' => 'color: #880;' + ), + 'ESCAPE_CHAR' => array( + 0 => '' + ), + 'BRACKETS' => array( + 0 => 'color: #820;' + ), + 'STRINGS' => array( + 0 => 'color: #880;' + ), + 'NUMBERS' => array( + 0 => 'color: #000;' + ), + 'METHODS' => array( + 1 => '', + 2 => '' + ), + 'SYMBOLS' => array( + 0 => 'color: #000;' + ), + 'REGEXPS' => array( + ), + 'SCRIPT' => array( + 0 => '' + ) + ), + 'URLS' => array( + 1 => '', + 2 => '', + 3 => '', + 4 => '', + 5 => '', + 6 => '', + 7 => '', + 8 => '', + 9 => '', + 10 => '', + 11 => '', + 12 => '', + 13 => '', + 14 => '', + 15 => '', + 16 => '', + 17 => '', + 18 => '', + 19 => '', + 20 => '' + ), + 'OOLANG' => false, + 'OBJECT_SPLITTERS' => array( + ), + 'REGEXPS' => array( + ), + 'STRICT_MODE_APPLIES' => GESHI_NEVER, + 'SCRIPT_DELIMITERS' => array( + ), + 'HIGHLIGHT_STRICT_BLOCK' => array( + ) +); + +?>