Class: SiSU_TeX::Source::LaTeXcreate
- Inherits:
-
Object
- Object
- SiSU_TeX::Source::LaTeXcreate
- Includes:
- SiSU_Parts_TeXpdf
- Defined in:
- lib/sisu/texpdf.rb
Constant Summary collapse
- @@tex_head =
{ 'a4'=> { p: nil, l: nil }, 'a5'=> { p: nil, l: nil }, 'b5'=> { p: nil, l: nil }, 'letter'=>{ p: nil, l: nil }, 'legal'=> { p: nil, l: nil }, 'book'=> { p: nil, l: nil } }
- @@prefix_b =
nil
Instance Method Summary collapse
-
#initialize(particulars) ⇒ LaTeXcreate
constructor
A new instance of LaTeXcreate.
- #songsheet ⇒ Object
Methods included from SiSU_Parts_TeXpdf
#set_fonts, #tex_close, #tex_open, #the_font, #the_line_break, #txt_close, #txt_open, #url_decoration
Methods included from SiSU_Parts_Generic
#footer_signature, #home, #home_txt, #i_choice, #i_home_button, #i_ico, #i_new, #rl_root, #root_http, #sisu, #sisu_txt, #sisudoc, #site, #the_icon, #the_text, #the_url, #txt_home, #txt_hp, #txt_hp_alias, #txt_signature, #urify, #url_close, #url_open
Constructor Details
#initialize(particulars) ⇒ LaTeXcreate
Returns a new instance of LaTeXcreate.
403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/sisu/texpdf.rb', line 403 def initialize(particulars) @particulars=particulars @md=@particulars.md @env=SiSU_Env::InfoEnv.new(@md.fns) #@[email protected] @data=@particulars.ao_array # ao file drawn here @st={ tex: {} } @tex_ml=SiSU_TeX_Pdf::UseTeX.new(@md) @dp=@@dp ||=SiSU_Env::InfoEnv.new.digest.pattern l=SiSU_Env::StandardiseLanguage.new(@md.opt.lng).language @language=l[:n] @translate=SiSU_Translate::Source.new(@md,@language) @codeblock_box='listings' #alternative 'boites' @make ||=SiSU_Env::ProcessingSettings.new(@md) end |
Instance Method Details
#songsheet ⇒ Object
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/sisu/texpdf.rb', line 417 def songsheet begin data=@data @@tex_footnote_array=[] @@rights=nil txt_gen=if @md.opt.act[:pdf_l][:set]==:on \ and @md.opt.act[:pdf_p][:set]==:on 'pdfTex portrait & landscape' elsif @md.opt.act[:pdf_l][:set]==:on 'pdfTex landscape' elsif @md.opt.act[:pdf_p][:set]==:on 'pdfTex portrait' else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).error('error: neither landscape nor portrait') end if (@md.opt.act[:verbose][:set]==:on \ || @md.opt.act[:verbose_plus][:set]==:on \ || @md.opt.act[:maintenance][:set]==:on) SiSU_Screen::Ansi.new( @md.opt.act[:color_state][:set], txt_gen ).txt_grey end if defined? @md.rights.all \ and not @md.rights.all.empty? sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.rights.copyright.copyright_and_license.dup) copymark='Copyright {\begin{small}{\copyright\end{small}} ' #copymark='Copyright {\begin{small}^{\copyright\end{small}} ' copyright=sp_char.special_characters_safe.gsub(/\s*Copyright \(C\)/, copymark) @@rights||="\n #{Tex[:backslash]*2}[3]\\ \\linebreak #{copyright}" end if defined? @md.notes.prefix_b \ and not @md.notes.prefix_b.empty? sp_char=SiSU_TeX_Pdf::SpecialCharacters.new(@md,@md.notes.prefix_b) prefix_b=sp_char.special_characters_safe @@prefix_b="\n #{Tex[:backslash]*2}[3]\\ \\linebreak \\ #{prefix_b}\n" unless @@prefix_b end data=pre(data) data=footnote(data) if @md.flag_tables #WORK ON 2009 data=tables(data) #uncomment to start experimenting with tables end data=number_paras(data) data=markup(data) output(data) rescue SiSU_Errors::Rescued.new($!,$@,@md.opt.selections.str,@md.fns).location do __LINE__.to_s + ':' + __FILE__ end ensure end end |