Fixed latex output
This commit is contained in:
parent
a0803eb8b1
commit
8429afbfcc
18
oll.rkt
18
oll.rkt
|
@ -53,14 +53,14 @@
|
||||||
(when (attribute latex-file)
|
(when (attribute latex-file)
|
||||||
(with-output-to-file (syntax->datum #'latex-file)
|
(with-output-to-file (syntax->datum #'latex-file)
|
||||||
(thunk
|
(thunk
|
||||||
(format "\\fbox{$~a$}$~n$\\begin{mathpar}~n~a~n\end{mathpar}$$"
|
(printf (format "\\fbox{$~a$}$~n$\\begin{mathpar}~n~a~n\\end{mathpar}$$"
|
||||||
(syntax->datum #'(n types* ...))
|
(syntax->datum #'(n types* ...))
|
||||||
(string-trim
|
(string-trim
|
||||||
(for/fold ([str ""])
|
(for/fold ([str ""])
|
||||||
([rule (attribute rules.latex)])
|
([rule (attribute rules.latex)])
|
||||||
(format "~a~a\\and~n" str rule))
|
(format "~a~a\\and~n" str rule))
|
||||||
"\\and"
|
"\\and"
|
||||||
#:left? #f)))
|
#:left? #f))))
|
||||||
#:exists 'append))
|
#:exists 'append))
|
||||||
#`(begin
|
#`(begin
|
||||||
#,@(if (attribute coq-file)
|
#,@(if (attribute coq-file)
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
#:left? #f))]))))
|
#:left? #f))]))))
|
||||||
(define (generate-latex-bnf file-name vars clauses)
|
(define (generate-latex-bnf file-name vars clauses)
|
||||||
(with-output-to-file file-name
|
(with-output-to-file file-name
|
||||||
(thunk (output-latex-bnf vars clauses))
|
(thunk (printf (output-latex-bnf vars clauses)))
|
||||||
#:exists 'append)))
|
#:exists 'append)))
|
||||||
(module+ test
|
(module+ test
|
||||||
(require "stdlib/sugar.rkt")
|
(require "stdlib/sugar.rkt")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user