Browse Source

+ Convert shorthand syntax notation to full notation

michael 22 years ago
parent
commit
45910eed90
1 changed files with 21 additions and 0 deletions
  1. 21 0
      docs/syntax/changeit.pp

+ 21 - 0
docs/syntax/changeit.pp

@@ -0,0 +1,21 @@
+program changeit;
+
+uses sysutils;
+
+var 
+  S : String;
+
+begin
+  While not eof do
+    begin
+    ReadLn(S);
+    S:=StringReplace(S,'\[','\begin{stack}\\',[rfReplaceAll]);
+    S:=StringReplace(S,'\]','\end{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\(','\begin{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\)','\end{stack}',[rfReplaceAll]);
+    S:=StringReplace(S,'\<','\begin{rep}',[rfReplaceAll]);
+    S:=StringReplace(S,'\>','\end{rep}',[rfReplaceAll]);
+    Writeln(S);
+    end;
+end.
+