Module: RDoc::Generator::Papyrus::Options

Defined in:
lib/rdoc/generator/papyrus/options.rb

Overview

Mixin module that is used to extend the RDoc::Options instance given to RDoc::Generator::Papyrus.setup_options to arrange for some new options specific to the PDF generator.

Constant Summary collapse

DEFAULT_LATEX_COMMAND =

The default command invoked when running LaTeX. Overriden by the --latex-command commandline option.

"xelatex"
DEFAULT_BABEL_LANG =

The default language option passed to the LaTeX babel package.

"english"
DEFAULT_INPUT_ENCODING =

The default encoding for the --inputencoding option.

"UTF-8"

Instance Method Summary collapse

Instance Method Details

#append_sourceObject

Wheather or not to include the methods’ sourcecode in the PDF file in form of an appendix. I highly recommand you to not do this as the bigger a project grows, the thicker the resulting PDF will be. Furthermore printing the PDF would resulting in printing the sourcecode which is nonsense as you’re better off directly looking into the sourcecode files with your favourite editor where you can edit them.



101
102
103
# File 'lib/rdoc/generator/papyrus/options.rb', line 101

def append_source
  @append_source ||= false
end

#append_source=(val) ⇒ Object

Stter for the #append_source value.



106
107
108
# File 'lib/rdoc/generator/papyrus/options.rb', line 106

def append_source=(val)
  @append_source = val
end

#babel_langObject

The language option to be passed to the babel package. Note that changing this value doesn’t translate hard-coded strings like “Public class methods” yet.



75
76
77
# File 'lib/rdoc/generator/papyrus/options.rb', line 75

def babel_lang
  @babel_lang ||= DEFAULT_BABEL_LANG
end

#babel_lang=(val) ⇒ Object

Setter for the #babel_lang value.



80
81
82
# File 'lib/rdoc/generator/papyrus/options.rb', line 80

def babel_lang=(val)
  @babel_lang = val
end

#inputencodingObject

The encoding assumed for all the input files. Defautls to “UTF-8”.



85
86
87
# File 'lib/rdoc/generator/papyrus/options.rb', line 85

def inputencoding
  @inputencoding ||= DEFAULT_INPUT_ENCODING
end

#inputencoding=(val) ⇒ Object

Setter for the #inputencoding value.



90
91
92
# File 'lib/rdoc/generator/papyrus/options.rb', line 90

def inputencoding=(val)
  @inputencoding = val
end

#latex_commandObject

The command to run LaTeX, defaults to the value of DEFAULT_LATEX_COMMAND, which in turn is “pdflatex”.



63
64
65
# File 'lib/rdoc/generator/papyrus/options.rb', line 63

def latex_command
  @latex_command ||= DEFAULT_LATEX_COMMAND
end

#latex_command=(val) ⇒ Object

Setter for the #latex_command value.



68
69
70
# File 'lib/rdoc/generator/papyrus/options.rb', line 68

def latex_command=(val)
  @latex_command = val
end

#show_pagesObject

Wheather or not to show page numbers in square brackets behind any cross-reference made. Useful if one is sure that the documentation won’t be printed and therefore doesn’t need the annoying page numbers.



51
52
53
# File 'lib/rdoc/generator/papyrus/options.rb', line 51

def show_pages
  @show_pages ||= true
end

#show_pages=(val) ⇒ Object

Setter for #show_pages value.



56
57
58
# File 'lib/rdoc/generator/papyrus/options.rb', line 56

def show_pages=(val)
  @show_pages = !!val
end