-
Notifications
You must be signed in to change notification settings - Fork 1
/
settings.rb
executable file
·41 lines (32 loc) · 1.49 KB
/
settings.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
### Variables which are good to tweak ###
require 'fileutils'
## Check for latex
# Main Path
output_temp_dir = "./tmp/sinatratex"
FileUtils.mkdir_p(output_temp_dir) unless File.exists?(output_temp_dir)
# Temporary pdf file
TEMP_PDF = "%s/pdf" % output_temp_dir
FileUtils.mkdir_p(TEMP_PDF) unless File.exists?(TEMP_PDF)
# Temporary dvi file
TEMP_DVI = "%s/dvi" % output_temp_dir
FileUtils.mkdir_p(TEMP_DVI) unless File.exists?(TEMP_DVI)
# Temporary png file
TEMP_PNG = "%s/png" % output_temp_dir
FileUtils.mkdir_p(TEMP_PNG) unless File.exists?(TEMP_PNG)
# Temporary png file
TEMP_IMAGES = "%s/images" % output_temp_dir
FileUtils.mkdir_p(TEMP_IMAGES) unless File.exists?(TEMP_IMAGES)
# Temporary tex file
TEMP_TEX = "%s/tex" % output_temp_dir
FileUtils.mkdir_p(TEMP_TEX) unless File.exists?(TEMP_TEX)
# Loggin access and errors
LOGFILE = "%s/log" % output_temp_dir
TEX_BLACKLIST = ["\\def", "\\let", "\\futurelet",
"\\newcommand", "\\renewcommand", "\\else", "\\fi", "\\write",
"\\input", "\\include", "\\chardef", "\\catcode", "\\makeatletter",
"\\noexpand", "\\toksdef", "\\every", "\\errhelp", "\\errorstopmode",
"\\scrollmode", "\\nonstopmode", "\\batchmode", "\\read", "\\csname",
"\\newhelp", "\\relax", "\\afterground", "\\afterassignment",
"\\expandafter", "\\noexpand", "\\special", "\\command", "\\loop",
"\\repeat", "\\toks", "\\output", "\\line", "\\mathcode", "\\name",
"\\item", "\\section", "\\mbox", "\\DeclareRobustCommand", "\\[", "\\]"];