File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,16 @@ local function setup_cmd (self)
283
283
file:write("MAD_TERM = \"set term ${term} ${output} size ${wsizex},\z
284
284
${wsizey} enhanced font '${font},${fontsize}'\"\n" % self)
285
285
elseif is_string(output) then
286
- file:write("MAD_TERM = \"set term pdfcairo enhanced font \z
287
- '${font},${fontsize}'; set out '${output}'\"\n" % self)
286
+ local ext = output:sub(-3, -1)
287
+ if ext == "png" then
288
+ file:write("MAD_TERM = \" set term png enhanced font '${font},\z
289
+ ${fontsize}' size ${wsizex},${wsizey}; set out '${output}'\"\n" % self)
290
+ elseif ext == "pdf" then
291
+ file:write("MAD_TERM = \"set term pdfcairo enhanced font \z
292
+ '${font},${fontsize}'; set out '${output}'\"\n" % self)
293
+ else
294
+ error("unsupported output file extension '".. ext .. "'")
295
+ end
288
296
end
289
297
290
298
file:write("@MAD_SET_TERM\n")
You can’t perform that action at this time.
0 commit comments