@@ -7,17 +7,25 @@ import (
77 "text/template"
88)
99
10+ const VERSION = "v23.0"
11+
1012func main () {
1113 var config Config
12- var inputFilename = flag .String ("input" , "-" , "input file or - for stdin" )
13- var outputFilename = flag .String ("output" , "-" , "output file or - for stdout" )
14- var equationDirectory = flag .String ("eqdir" , "equations" , "directory to output equations" )
15- var inputUrl = flag .String ("inurl" , "eqn://" , "input webtex URL prefix" )
16- var outputUrl = flag .String ("outurl" , "equations" , "image src root" )
17- var templateFilename = flag .String ("template" , "" , "TeX template file" )
18- var onlyInner = flag .Bool ("innerhtml" , false , "export only inner HTML of the result (without <html><body> tags)" )
14+ inputFilename := flag .String ("input" , "-" , "input file or - for stdin" )
15+ outputFilename := flag .String ("output" , "-" , "output file or - for stdout" )
16+ equationDirectory := flag .String ("eqdir" , "equations" , "directory to output equations" )
17+ inputUrl := flag .String ("inurl" , "eqn://" , "input webtex URL prefix" )
18+ outputUrl := flag .String ("outurl" , "equations" , "image src root" )
19+ templateFilename := flag .String ("template" , "" , "TeX template file" )
20+ onlyInner := flag .Bool ("innerhtml" , false , "export only inner HTML of the result (without <html><body> tags)" )
21+ version := flag .Bool ("version" , false , "prints current roxy version" )
1922 flag .Parse ()
2023
24+ if * version {
25+ log .Printf ("WebTeX Render version %v\n " , VERSION )
26+ os .Exit (0 )
27+ }
28+
2129 var err error
2230 if * inputFilename == "-" {
2331 config .InputFile = os .Stdin
0 commit comments