Class: Tioga::Executive
- Inherits:
-
Object
- Object
- Tioga::Executive
- Defined in:
- lib/Tioga/Executive.rb
Overview
These are the methods and attributes for controlling the FigureMaker executive routines.
Instance Method Summary collapse
-
#autocleanup ⇒ Object
:call-seq: autocleanup autocleanup = a_boolean.
-
#create_save_dir ⇒ Object
:call-seq: create_save_dir create_save_dir = a_boolean.
-
#def_enter_context_function(&cmd) ⇒ Object
:call-seq: def_enter_context_function { |string| … }.
-
#def_enter_page_function(&cmd) ⇒ Object
:call-seq: def_enter_page_function { |string| … }.
-
#def_enter_show_plot_function(&cmd) ⇒ Object
:call-seq: def_enter_show_plot_function { |string| … }.
-
#def_enter_subfigure_function(&cmd) ⇒ Object
:call-seq: def_enter_subfigure_function { |string| … }.
-
#def_enter_subplot_function(&cmd) ⇒ Object
:call-seq: def_enter_subplot_function { |string| … }.
-
#def_eval_function(&cmd) ⇒ Object
:call-seq: def_eval_function { |string| … }.
-
#def_exit_context_function(&cmd) ⇒ Object
:call-seq: def_exit_context_function { |string| … }.
-
#def_exit_page_function(&cmd) ⇒ Object
:call-seq: def_exit_page_function { |string| … }.
-
#def_exit_show_plot_function(&cmd) ⇒ Object
:call-seq: def_exit_show_plot_function { |string| … }.
-
#def_exit_subfigure_function(&cmd) ⇒ Object
:call-seq: def_exit_subfigure_function { |string| … }.
-
#def_exit_subplot_function(&cmd) ⇒ Object
:call-seq: def_exit_subplot_function { |string| … }.
-
#def_figure(name, &cmd) ⇒ Object
:call-seq: def_figure(name) do …
-
#default_enter_page_function ⇒ Object
:call-seq: default_enter_page_function.
-
#default_frame_bottom ⇒ Object
:call-seq: default_frame_bottom default_frame_bottom = a_float.
-
#default_frame_left ⇒ Object
:call-seq: default_frame_left default_frame_left = a_float.
-
#default_frame_right ⇒ Object
:call-seq: default_frame_right default_frame_right = a_float.
-
#default_frame_top ⇒ Object
:call-seq: default_frame_top default_frame_top = a_float.
-
#default_page_height ⇒ Object
:call-seq: default_page_height default_page_height = a_float.
-
#default_page_width ⇒ Object
:call-seq: default_page_width default_page_width = a_float.
-
#eval_function(string) ⇒ Object
Calls the function block defined by a previous call to def_eval_function passing the string as argument.
- #figure_index(name) ⇒ Object
-
#figure_name(num) ⇒ Object
:call-seq: figure_name(num) -> a_string .
-
#figure_names ⇒ Object
:call-seq: figure_names .
-
#figure_pdf(num) ⇒ Object
:call-seq: figure_pdf(num) -> a_string or nil figure_pdf(name) -> a_string or nil .
-
#figure_pdfs ⇒ Object
:call-seq: figure_pdfs .
-
#get_save_filename(name) ⇒ Object
:call-seq: get_save_filename(name) -> a_string.
-
#make_all(fignums = nil, report = false) ⇒ Object
:call-seq: make_all(fignums=nil,report=false).
-
#make_figure(name) ⇒ Object
:call-seq: make_figure(name) make_figure(number).
-
#make_pdf(n, &cmd) ⇒ Object
:call-seq: make_pdf(name) do |t| …
-
#make_portfolio(name, fignums = nil, report = false) ⇒ Object
:call-seq: make_portfolio(name,fignums=nil,report=false).
-
#make_portfolio_pdf(name, fignums = nil, report = false) ⇒ Object
:call-seq: make_portfolio_pdf(name,fignums=nil,report=false).
-
#multithreads_okay_for_tioga ⇒ Object
:call-seq: multithreads_okay_for_tioga multithreads_okay_for_tioga = a_boolean.
-
#num_figures ⇒ Object
:call-seq: num_figures .
-
#pdflatex ⇒ Object
:call-seq: pdflatex pdflatex = a_string.
-
#quiet_mode ⇒ Object
:call-seq: quiet_mode quiet_mode = true or false.
-
#require_all(fignums = nil, report = false) ⇒ Object
:call-seq: require_all(fignums=nil,report=false).
-
#require_pdf(name) ⇒ Object
:call-seq: require_pdf(name) require_pdf(number).
-
#reset_enter_context_function ⇒ Object
:call-seq: reset_enter_context_function.
-
#reset_enter_page_function ⇒ Object
:call-seq: reset_enter_page_function.
-
#reset_enter_show_plot_function ⇒ Object
:call-seq: reset_enter_show_plot_function.
-
#reset_enter_subfigure_function ⇒ Object
:call-seq: reset_enter_subfigure_function.
-
#reset_enter_subplot_function ⇒ Object
:call-seq: reset_enter_subplot_function.
-
#reset_eval_function ⇒ Object
:call-seq: reset_eval_function.
-
#reset_exit_context_function ⇒ Object
:call-seq: reset_exit_context_function.
-
#reset_exit_page_function ⇒ Object
:call-seq: reset_exit_page_function.
-
#reset_exit_show_plot_function ⇒ Object
:call-seq: reset_exit_show_plot_function.
-
#reset_exit_subfigure_function ⇒ Object
:call-seq: reset_exit_subfigure_function.
-
#reset_exit_subplot_function ⇒ Object
:call-seq: reset_exit_subplot_function.
-
#reset_figures ⇒ Object
:call-seq: reset_figures .
-
#reset_state ⇒ Object
:call-seq: reset_state.
-
#run_dir ⇒ Object
:call-seq: run_dir .
-
#save_dir ⇒ Object
:call-seq: save_dir save_dir = a_string.
Instance Method Details
#autocleanup ⇒ Object
:call-seq:
autocleanup
autocleanup = a_boolean
Whether or not to do automatic cleanup of the temporary files when create a PDF for a figure (default is true).
438 439 |
# File 'lib/Tioga/Executive.rb', line 438 def autocleanup end |
#create_save_dir ⇒ Object
:call-seq:
create_save_dir
create_save_dir = a_boolean
Whether or not to create save_dir
if it doesn’t exist.
430 431 |
# File 'lib/Tioga/Executive.rb', line 430 def create_save_dir end |
#def_enter_context_function(&cmd) ⇒ Object
:call-seq:
def_enter_context_function { |string| ... }
The block of code is saved to be executed later whenever context is called.
See also reset_enter_context_function.
379 380 |
# File 'lib/Tioga/Executive.rb', line 379 def def_enter_context_function(&cmd) end |
#def_enter_page_function(&cmd) ⇒ Object
:call-seq:
def_enter_page_function { |string| ... }
The block of code is saved to be executed later whenever make_pdf is called to create a page for a figure.
See also reset_enter_page_function, default_enter_page_function.
151 152 |
# File 'lib/Tioga/Executive.rb', line 151 def def_enter_page_function(&cmd) end |
#def_enter_show_plot_function(&cmd) ⇒ Object
:call-seq:
def_enter_show_plot_function { |string| ... }
The block of code is saved to be executed later whenever show_plot is called.
See also reset_enter_show_plot_function.
252 253 |
# File 'lib/Tioga/Executive.rb', line 252 def def_enter_show_plot_function(&cmd) end |
#def_enter_subfigure_function(&cmd) ⇒ Object
:call-seq:
def_enter_subfigure_function { |string| ... }
The block of code is saved to be executed later whenever subfigure is called.
See also reset_enter_subfigure_function.
293 294 |
# File 'lib/Tioga/Executive.rb', line 293 def def_enter_subfigure_function(&cmd) end |
#def_enter_subplot_function(&cmd) ⇒ Object
:call-seq:
def_enter_subplot_function { |string| ... }
The block of code is saved to be executed later whenever subplot is called.
See also reset_enter_subplot_function.
334 335 |
# File 'lib/Tioga/Executive.rb', line 334 def def_enter_subplot_function(&cmd) end |
#def_eval_function(&cmd) ⇒ Object
:call-seq:
def_eval_function { |string| ... }
The block of code is saved to be executed later when eval_function is called. See also reset_eval_function.
134 135 |
# File 'lib/Tioga/Executive.rb', line 134 def def_eval_function(&cmd) end |
#def_exit_context_function(&cmd) ⇒ Object
:call-seq:
def_exit_context_function { |string| ... }
The block of code is saved to be executed whenever context returns.
See also reset_exit_context_function.
398 399 |
# File 'lib/Tioga/Executive.rb', line 398 def def_exit_context_function(&cmd) end |
#def_exit_page_function(&cmd) ⇒ Object
:call-seq:
def_exit_page_function { |string| ... }
The block of code is saved to be executed later after make_pdf has returned from creating a page for a figure.
See also reset_exit_page_function.
233 234 |
# File 'lib/Tioga/Executive.rb', line 233 def def_exit_page_function(&cmd) end |
#def_exit_show_plot_function(&cmd) ⇒ Object
:call-seq:
def_exit_show_plot_function { |string| ... }
The block of code is saved to be executed whenever show_plot returns.
See also reset_exit_show_plot_function.
271 272 |
# File 'lib/Tioga/Executive.rb', line 271 def def_exit_show_plot_function(&cmd) end |
#def_exit_subfigure_function(&cmd) ⇒ Object
:call-seq:
def_exit_subfigure_function { |string| ... }
The block of code is saved to be executed whenever subfigure returns.
See also reset_exit_subfigure_function.
312 313 |
# File 'lib/Tioga/Executive.rb', line 312 def def_exit_subfigure_function(&cmd) end |
#def_exit_subplot_function(&cmd) ⇒ Object
:call-seq:
def_exit_subplot_function { |string| ... }
The block of code is saved to be executed whenever subplot returns.
See also reset_exit_subplot_function.
353 354 |
# File 'lib/Tioga/Executive.rb', line 353 def def_exit_subplot_function(&cmd) end |
#def_figure(name, &cmd) ⇒ Object
:call-seq:
def_figure(name) do ... end
The block of code is saved to be executed later when the name string is given to make_figure. The name is entered in the table of figure_names. If the name was already listed, then the new code replaces the previous definition.
16 17 |
# File 'lib/Tioga/Executive.rb', line 16 def def_figure(name, &cmd) end |
#default_enter_page_function ⇒ Object
:call-seq:
default_enter_page_function
Calls page_setup with the current default_page_width and default_page_height. Then calls set_frame_sides with default_frame_left, default_frame_right, default_frame_top, and default_frame_bottom.
168 169 |
# File 'lib/Tioga/Executive.rb', line 168 def default_enter_page_function end |
#default_frame_bottom ⇒ Object
:call-seq:
default_frame_bottom
default_frame_bottom = a_float
The frame bottom for use by default_enter_page_function.
222 223 |
# File 'lib/Tioga/Executive.rb', line 222 def default_frame_bottom end |
#default_frame_left ⇒ Object
:call-seq:
default_frame_left
default_frame_left = a_float
The frame left for use by default_enter_page_function.
195 196 |
# File 'lib/Tioga/Executive.rb', line 195 def default_frame_left end |
#default_frame_right ⇒ Object
:call-seq:
default_frame_right
default_frame_right = a_float
The frame right for use by default_enter_page_function.
204 205 |
# File 'lib/Tioga/Executive.rb', line 204 def default_frame_right end |
#default_frame_top ⇒ Object
:call-seq:
default_frame_top
default_frame_top = a_float
The frame top for use by default_enter_page_function.
213 214 |
# File 'lib/Tioga/Executive.rb', line 213 def default_frame_top end |
#default_page_height ⇒ Object
:call-seq:
default_page_height
default_page_height = a_float
The page height for use by default_enter_page_function.
186 187 |
# File 'lib/Tioga/Executive.rb', line 186 def default_page_height end |
#default_page_width ⇒ Object
:call-seq:
default_page_width
default_page_width = a_float
The page width for use by default_enter_page_function.
177 178 |
# File 'lib/Tioga/Executive.rb', line 177 def default_page_width end |
#eval_function(string) ⇒ Object
Calls the function block defined by a previous call to def_eval_function passing the string as argument. If no function is currently defined, it calls Ruby’s eval
with string.
140 141 |
# File 'lib/Tioga/Executive.rb', line 140 def eval_function(string) end |
#figure_index(name) ⇒ Object
102 103 |
# File 'lib/Tioga/Executive.rb', line 102 def figure_index(name) end |
#figure_name(num) ⇒ Object
:call-seq:
figure_name(num) -> a_string
Returns the name from the figure_names array.
492 493 |
# File 'lib/Tioga/Executive.rb', line 492 def figure_name(num) end |
#figure_names ⇒ Object
:call-seq:
figure_names
An array of names for the currently defined figures.
485 486 |
# File 'lib/Tioga/Executive.rb', line 485 def figure_names end |
#figure_pdf(num) ⇒ Object
:call-seq:
figure_pdf(num) -> a_string or nil
figure_pdf(name) -> a_string or nil
Returns the corresponding entry from the figure_pdfs array.
510 511 |
# File 'lib/Tioga/Executive.rb', line 510 def figure_pdf(num) end |
#figure_pdfs ⇒ Object
:call-seq:
figure_pdfs
An array of full pdf filenames for the currently defined figures. All entries in the array initialized to nil
. When a pdf is created for a figure, the full filename for the pdf is placed in this array in position corresponding to the figure’s location in figure_names.
502 503 |
# File 'lib/Tioga/Executive.rb', line 502 def figure_pdfs end |
#get_save_filename(name) ⇒ Object
:call-seq:
get_save_filename(name) -> a_string
Returns a string with the filename that will be used for saving the figure with the given name.
471 472 |
# File 'lib/Tioga/Executive.rb', line 471 def get_save_filename(name) end |
#make_all(fignums = nil, report = false) ⇒ Object
:call-seq:
make_all(fignums=nil,report=false)
Calls make_pdf for each of the figures listed in fignums.
Does all the defined figures if fignums is nil
. See also require_all. Writes pdf information to terminal as it goes if report is true.
46 47 |
# File 'lib/Tioga/Executive.rb', line 46 def make_all(fignums=nil,report=false) end |
#make_figure(name) ⇒ Object
:call-seq:
make_figure(name)
make_figure(number)
Executes the corresponding code that was previously saved by def_figure. Output is written to the currently specified save_dir directory. Alias for make_pdf.
57 58 |
# File 'lib/Tioga/Executive.rb', line 57 def make_figure(name) end |
#make_pdf(n, &cmd) ⇒ Object
:call-seq:
make_pdf(name) do |t| ... end
make_pdf(name)
make_pdf(number)
First, if there is a command block given, def_figure is called to save it. Then make_pdf executes the command corresponding to the given name or number. Output is written to the currently specified save_dir directory. See also require_pdf.
70 71 |
# File 'lib/Tioga/Executive.rb', line 70 def make_pdf(n,&cmd) end |
#make_portfolio(name, fignums = nil, report = false) ⇒ Object
:call-seq:
make_portfolio(name,fignums=nil,report=false)
Creates a multipage pdf file containing the figures listed in fignums.
Does all the defined figures if fignums is nil
. Writes pdf information to terminal as it goes if report is true.
First, make_portfolio calls require_all(fignums) so that all the pdfs will be available.
The portfolio will have the given name with a “.pdf” extension and will be placed in the save_dir.
84 85 |
# File 'lib/Tioga/Executive.rb', line 84 def make_portfolio(name,fignums=nil,report=false) end |
#make_portfolio_pdf(name, fignums = nil, report = false) ⇒ Object
:call-seq:
make_portfolio_pdf(name,fignums=nil,report=false)
Alias for make_portfolio.
92 93 |
# File 'lib/Tioga/Executive.rb', line 92 def make_portfolio_pdf(name,fignums=nil,report=false) end |
#multithreads_okay_for_tioga ⇒ Object
:call-seq:
multithreads_okay_for_tioga
multithreads_okay_for_tioga = a_boolean
Whether or not to use multithreading wherever possible (default is true). Currently, this only is used when making a batch of pdfs – if multithreads_okay_for_tioga is true, then we launch all the pdflatex shells in parallel.
447 448 |
# File 'lib/Tioga/Executive.rb', line 447 def multithreads_okay_for_tioga end |
#num_figures ⇒ Object
:call-seq:
num_figures
The current number of defined figures for this FigureMaker.
478 479 |
# File 'lib/Tioga/Executive.rb', line 478 def num_figures end |
#pdflatex ⇒ Object
:call-seq:
pdflatex
pdflatex = a_string
The name for the pdflatex to use. Defaults to ‘pdflatex’.
455 456 |
# File 'lib/Tioga/Executive.rb', line 455 def pdflatex end |
#quiet_mode ⇒ Object
:call-seq:
quiet_mode
quiet_mode = true or false
Defaults to false
. If true
, turns off all but essential messages.
464 465 |
# File 'lib/Tioga/Executive.rb', line 464 def quiet_mode end |
#require_all(fignums = nil, report = false) ⇒ Object
:call-seq:
require_all(fignums=nil,report=false)
Calls require_pdf for each of the figures listed in fignums.
Does all the defined figures if fignums is nil
. Writes pdf information to terminal as it goes if report is true.
36 37 |
# File 'lib/Tioga/Executive.rb', line 36 def require_all(fignums=nil,report=false) end |
#require_pdf(name) ⇒ Object
:call-seq:
require_pdf(name)
require_pdf(number)
Calls make_pdf if the pdf for the figure has not yet been created. Returns the full file name of the pdf.
26 27 |
# File 'lib/Tioga/Executive.rb', line 26 def require_pdf(name) end |
#reset_enter_context_function ⇒ Object
:call-seq:
reset_enter_context_function
Removes the current definition for the enter_context_function. See also def_enter_context_function.
387 388 |
# File 'lib/Tioga/Executive.rb', line 387 def reset_enter_context_function end |
#reset_enter_page_function ⇒ Object
:call-seq:
reset_enter_page_function
Removes the current definition for the enter_page_function. See also def_enter_page_function, default_enter_page_function.
159 160 |
# File 'lib/Tioga/Executive.rb', line 159 def reset_enter_page_function end |
#reset_enter_show_plot_function ⇒ Object
:call-seq:
reset_enter_show_plot_function
Removes the current definition for the enter_show_plot_function. See also def_enter_show_plot_function.
260 261 |
# File 'lib/Tioga/Executive.rb', line 260 def reset_enter_show_plot_function end |
#reset_enter_subfigure_function ⇒ Object
:call-seq:
reset_enter_subfigure_function
Removes the current definition for the enter_subfigure_function. See also def_enter_subfigure_function.
301 302 |
# File 'lib/Tioga/Executive.rb', line 301 def reset_enter_subfigure_function end |
#reset_enter_subplot_function ⇒ Object
:call-seq:
reset_enter_subplot_function
Removes the current definition for the enter_subplot_function. See also def_enter_subplot_function.
342 343 |
# File 'lib/Tioga/Executive.rb', line 342 def reset_enter_subplot_function end |
#reset_eval_function ⇒ Object
:call-seq:
reset_eval_function
Removes the current definition for the eval_function. See also def_eval_function.
126 127 |
# File 'lib/Tioga/Executive.rb', line 126 def reset_eval_function end |
#reset_exit_context_function ⇒ Object
:call-seq:
reset_exit_context_function
Removes the current definition for the exit_context_function. See also def_exit_context_function.
406 407 |
# File 'lib/Tioga/Executive.rb', line 406 def reset_exit_context_function end |
#reset_exit_page_function ⇒ Object
:call-seq:
reset_exit_page_function
Removes the current definition for the exit_page_function. See also def_exit_page_function.
241 242 |
# File 'lib/Tioga/Executive.rb', line 241 def reset_exit_page_function end |
#reset_exit_show_plot_function ⇒ Object
:call-seq:
reset_exit_show_plot_function
Removes the current definition for the exit_show_plot_function. See also def_exit_show_plot_function.
279 280 |
# File 'lib/Tioga/Executive.rb', line 279 def reset_exit_show_plot_function end |
#reset_exit_subfigure_function ⇒ Object
:call-seq:
reset_exit_subfigure_function
Removes the current definition for the exit_subfigure_function. See also def_exit_subfigure_function.
320 321 |
# File 'lib/Tioga/Executive.rb', line 320 def reset_exit_subfigure_function end |
#reset_exit_subplot_function ⇒ Object
:call-seq:
reset_exit_subplot_function
Removes the current definition for the exit_subplot_function. See also def_exit_subplot_function.
361 362 |
# File 'lib/Tioga/Executive.rb', line 361 def reset_exit_subplot_function end |
#reset_figures ⇒ Object
:call-seq:
reset_figures
Alias for reset_state.
116 117 |
# File 'lib/Tioga/Executive.rb', line 116 def reset_figures end |
#reset_state ⇒ Object
:call-seq:
reset_state
Reinitializes the FigureMaker. This is automatically called when you load or reload a tioga document file.
109 110 |
# File 'lib/Tioga/Executive.rb', line 109 def reset_state end |
#run_dir ⇒ Object
:call-seq:
run_dir
The path name for the FigureMaker working directory.
414 415 |
# File 'lib/Tioga/Executive.rb', line 414 def run_dir end |
#save_dir ⇒ Object
:call-seq:
save_dir
save_dir = a_string
The path name for the directory where output files will be created.
422 423 |
# File 'lib/Tioga/Executive.rb', line 422 def save_dir end |