Skip to content

Commit d1069ca

Browse files
gkv311inv
authored andcommitted
0032156: Documentation, gendoc.tcl - wrong processing of 'mathjax' option
Fixed handling of -s=<search_mode> option. Fixed handling of -mathjax=<path> option.
1 parent 0c4931e commit d1069ca

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

adm/gendoc.tcl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,11 @@ proc gendoc {args} {
236236
return -1
237237
}
238238
} elseif {$arg_n == "s"} {
239-
if { [ lsearch $args_names "pdf" ] == -1 } {
239+
if { [ lsearch $args_names "pdf" ] != -1 } {
240+
puts "Warning: search is not used with PDF and will be ignored."
240241
continue
241242
}
243+
242244
if {$args_values(s) != "NULL"} {
243245
set SEARCH_MODE $args_values(s)
244246
} else {
@@ -247,16 +249,16 @@ proc gendoc {args} {
247249
}
248250
} elseif {$arg_n == "mathjax"} {
249251
if { [ lsearch $args_names "pdf" ] != -1 } {
250-
set possible_mathjax_loc $args_values(mathjax)
251-
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
252-
set MATHJAX_LOCATION $args_values(mathjax)
253-
puts "$MATHJAX_LOCATION"
254-
} else {
255-
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
256-
puts " MathJax will be used from $MATHJAX_LOCATION"
257-
}
252+
puts "Warning: MathJax is not used with PDF and will be ignored."
253+
}
254+
255+
set possible_mathjax_loc $args_values(mathjax)
256+
if {[file exist [file join $possible_mathjax_loc $mathjax_js_name]]} {
257+
set MATHJAX_LOCATION $args_values(mathjax)
258+
puts "$MATHJAX_LOCATION"
258259
} else {
259-
puts "Warning: MathJax is not used with pdf and will be ignored."
260+
puts "Warning: $mathjax_js_name is not found in $possible_mathjax_loc."
261+
puts " MathJax will be used from $MATHJAX_LOCATION"
260262
}
261263
} else {
262264
puts "\nWrong argument: $arg_n"

0 commit comments

Comments
 (0)