Class: SiSU_Param::Parameters::Instructions

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/dp.rb

Defined Under Namespace

Classes: Store

Constant Summary collapse

@@publisher =
'SiSU scribe'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fns_array, opt) ⇒ Instructions

Returns a new instance of Instructions.



902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/sisu/dp.rb', line 902

def initialize(fns_array,opt)
  @env=@path,@file=@fn=@fns=@fno=@fnb=@fnn=@fnt=@fnl=@flv=@fnz=@fnstex=@ocn=@sfx_src=@pdf=@file_type=@dir_out=@dir_tex=@dir_lout=@txt_path=@make=@flag_biblio=@flag_auto_biblio=@flag_endnotes=@flag_auto_endnotes=@flag_glossary=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@project_details=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@email=@author_title=@author_nationality=@translator=@illustrator=@prepared_by=@digitized_by=@subject=@description=@publisher=@current_publisher=@contributor=@date=@date_created=@date_issued=@date_available=@date_valid=@date_modified=@date_translated=@date_added_to_site=@date_scheme=@date_created_scheme=@date_issued_scheme=@date_available_scheme=@date_valid_scheme=@date_modified_scheme=@type=@format=@identifier=@source=@language=@language_original=@relation=@coverage=@rights=@keywords=@comments=@abstract=@cls_loc=@cls_dewey=@cls_pg=@cls_isbn=@papersize=@toc=@lv0=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@pageline=@num_top=@bold_match_list=@italics_match_list=@substitution_match_list=@emphasis_set_to=@toc_lev_limit=@flag_tables=@vocabulary=@doc_css=@yaml=@lnk=@links=@prefix_a=@prefix_b=@suffix=@information=@contact=@icon=@ad_url=@ad_png=@ad_alt=@ad_began=@promo=@ad_home=@stmp=@stmpd=@sc_filename=@sc_number=@sc_date=@sc_time=@sc_info=@yamladdr=@locale=@wc_lines=@wc_words=@wc_bytes=@file_encoding=@filesize=@firstseg=@programs=@author_copymark=@i18n=@lang=@lang_code_insert=@en=@notes=@dgst=@generated=@heading_seg_first=@base_program=@topic_register=@original=@writing_focus=@audio=@home_button_image=@home_button_links=@cover_image=@man_section=nil
  @data,      @path,  @fns,   @fno,   @opt=
    fns_array,opt.pth,opt.fns,opt.fno,opt #@data used as data
  @flag_tables,@set_header_title,@set_heading_top,@set_heading_seg,@heading_seg_first_flag,@flag_promo,@book_idx=
    false,     false,            false,           false,           false,                  false,      false
  @seg_autoname_safe=true
  @daisy,@sem_tag=false,false
  @authorship,@markup_instruction,@image='','','','' #check which other values should be set to empty rather than nil
  @markup=@markup_instruction #use @markup_instruction
  @doc,@fn,@make_italic,@tag_hash,@ec={},{},{},{},{},{}
  @flv,@lang,@seg_names,@tags,@tag_array,@tag_a,@ec[:image],@ec[:audio],@ec[:multimedia]=Array.new(9){[]}
  @authors,@topic_register_array,@papersize_array=[],[],[]
  @lvs=[nil,0,0,0,0,0,0]
  @emphasis_set_to='bold'
  @lang_code_insert=SiSU_Env::FilenameLanguageCodeInsert.new(@opt).language_code_insert
  @footer_links= { left: { say: '', url: '' }, center: { say: '', url: '' } }
  @rgx_image=/(?:^|[^_\\])\{(?:\s*|\~\^\s+)(\S+?\.(?:png|jpg|gif)\b)/m
  @rgx_audio=/\{\s*(\S+?\.(?:mp3|ogg))/
  @rgx_mm=/\{\s*(\S+?\.(?:ogg|mpeg))/ #expand and distinguish ogg
  Dir.chdir(@opt.f_pth[:pth])
  begin
  rescue
    SiSU_Errors::Rescued.new($!,$@,@opt.selections.str,@fns).location do
      __LINE__.to_s + ':' + __FILE__
    end
  ensure
  end
  @header_make_links_append=:no
  common_makes=(defined? @opt.make_instructions_pod) \
  && @opt.make_instructions_pod !=nil \
  && @opt.make_instructions_pod[:makeset]==true \
  ? @opt.make_instructions_pod
  : @opt.make_instructions
  if common_makes[:makeset]
    @pagenew=common_makes[:pagenew]
    @pagebreak=common_makes[:pagebreak]
    @pageline=common_makes[:pageline]
    @toc=common_makes[:toc]
    @lv0=common_makes[:lv0]
    @lv1=common_makes[:lv1]
    @lv2=common_makes[:lv2]
    @lv3=common_makes[:lv3]
    @lv4=common_makes[:lv4]
    @lv5=common_makes[:lv5]
    @lv6=common_makes[:lv6]
    @num_top=common_makes[:num_top]
    @i18n=common_makes[:i18n]
    @man_section=common_makes[:man_section]
    @emphasis_set_to=common_makes[:emphasis_set_to]
    @bold_match_list=common_makes[:bold_match_list]
    @italics_match_list=common_makes[:italics_match_list]
    @substitution_match_list=common_makes[:substitution_match_list]
    @footer_links=common_makes[:footer_links]
    @home_button_links=common_makes[:home_button_links]
    @home_button_image=common_makes[:home_button_image]
    @cover_image=common_makes[:cover_image]
    @lnk=@links=common_makes[:links]
    @header_make_links_append=common_makes[:links_append]
  end
end

Instance Attribute Details

#abstractObject

Returns the value of attribute abstract.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def abstract
  @abstract
end

#ad_altObject

Returns the value of attribute ad_alt.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ad_alt
  @ad_alt
end

#ad_beganObject

Returns the value of attribute ad_began.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ad_began
  @ad_began
end

#ad_homeObject

Returns the value of attribute ad_home.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ad_home
  @ad_home
end

#ad_pngObject

Returns the value of attribute ad_png.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ad_png
  @ad_png
end

#ad_urlObject

Returns the value of attribute ad_url.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ad_url
  @ad_url
end

#audioObject

Returns the value of attribute audio.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def audio
  @audio
end

#authorObject

Returns the value of attribute author.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def author
  @author
end

#author_copymarkObject

Returns the value of attribute author_copymark.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def author_copymark
  @author_copymark
end

#author_homeObject

Returns the value of attribute author_home.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def author_home
  @author_home
end

#author_nationalityObject

Returns the value of attribute author_nationality.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def author_nationality
  @author_nationality
end

#author_titleObject

Returns the value of attribute author_title.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def author_title
  @author_title
end

#authorsObject

Returns the value of attribute authors.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def authors
  @authors
end

#authorshipObject

Returns the value of attribute authorship.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def authorship
  @authorship
end

#base_programObject

Returns the value of attribute base_program.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def base_program
  @base_program
end

#bold_match_listObject

Returns the value of attribute bold_match_list.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def bold_match_list
  @bold_match_list
end

#book_idxObject

Returns the value of attribute book_idx.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def book_idx
  @book_idx
end

#classifyObject

Returns the value of attribute classify.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def classify
  @classify
end

#cls_deweyObject

Returns the value of attribute cls_dewey.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def cls_dewey
  @cls_dewey
end

#cls_isbnObject

Returns the value of attribute cls_isbn.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def cls_isbn
  @cls_isbn
end

#cls_locObject

Returns the value of attribute cls_loc.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def cls_loc
  @cls_loc
end

#cls_pgObject

Returns the value of attribute cls_pg.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def cls_pg
  @cls_pg
end

#commentsObject

Returns the value of attribute comments.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def comments
  @comments
end

#concord_makeObject

Returns the value of attribute concord_make.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def concord_make
  @concord_make
end

#contactObject

Returns the value of attribute contact.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def contact
  @contact
end

#contributorObject

Returns the value of attribute contributor.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def contributor
  @contributor
end

#cover_imageObject

Returns the value of attribute cover_image.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def cover_image
  @cover_image
end

#coverageObject

Returns the value of attribute coverage.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def coverage
  @coverage
end

#creatorObject

Returns the value of attribute creator.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def creator
  @creator
end

#current_publisherObject

Returns the value of attribute current_publisher.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def current_publisher
  @current_publisher
end

#daisyObject

Returns the value of attribute daisy.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def daisy
  @daisy
end

#dateObject

Returns the value of attribute date.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date
  @date
end

#date_added_to_siteObject

Returns the value of attribute date_added_to_site.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_added_to_site
  @date_added_to_site
end

#date_availableObject

Returns the value of attribute date_available.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_available
  @date_available
end

#date_available_schemeObject

Returns the value of attribute date_available_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_available_scheme
  @date_available_scheme
end

#date_createdObject

Returns the value of attribute date_created.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_created
  @date_created
end

#date_created_schemeObject

Returns the value of attribute date_created_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_created_scheme
  @date_created_scheme
end

#date_issuedObject

Returns the value of attribute date_issued.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_issued
  @date_issued
end

#date_issued_schemeObject

Returns the value of attribute date_issued_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_issued_scheme
  @date_issued_scheme
end

#date_modifiedObject

Returns the value of attribute date_modified.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_modified
  @date_modified
end

#date_modified_schemeObject

Returns the value of attribute date_modified_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_modified_scheme
  @date_modified_scheme
end

#date_schemeObject

Returns the value of attribute date_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_scheme
  @date_scheme
end

#date_translatedObject

Returns the value of attribute date_translated.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_translated
  @date_translated
end

#date_validObject

Returns the value of attribute date_valid.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_valid
  @date_valid
end

#date_valid_schemeObject

Returns the value of attribute date_valid_scheme.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def date_valid_scheme
  @date_valid_scheme
end

#descriptionObject

Returns the value of attribute description.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def description
  @description
end

#dgstObject

Returns the value of attribute dgst.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def dgst
  @dgst
end

#digitized_byObject

Returns the value of attribute digitized_by.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def digitized_by
  @digitized_by
end

#dir_loutObject

Returns the value of attribute dir_lout.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def dir_lout
  @dir_lout
end

#dir_outObject

Returns the value of attribute dir_out.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def dir_out
  @dir_out
end

#dir_texObject

Returns the value of attribute dir_tex.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def dir_tex
  @dir_tex
end

#doc_cssObject

Returns the value of attribute doc_css.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def doc_css
  @doc_css
end

#ecObject

Returns the value of attribute ec.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ec
  @ec
end

#emailObject

Returns the value of attribute email.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def email
  @email
end

#emphasis_set_toObject

Returns the value of attribute emphasis_set_to.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def emphasis_set_to
  @emphasis_set_to
end

#enObject

Returns the value of attribute en.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def en
  @en
end

#envObject

Returns the value of attribute env.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def env
  @env
end

#fileObject

Returns the value of attribute file.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def file
  @file
end

#file_encodingObject

Returns the value of attribute file_encoding.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def file_encoding
  @file_encoding
end

#file_typeObject

Returns the value of attribute file_type.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def file_type
  @file_type
end

#filesizeObject

Returns the value of attribute filesize.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def filesize
  @filesize
end

#firstsegObject

Returns the value of attribute firstseg.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def firstseg
  @firstseg
end

#flag_auto_biblioObject

Returns the value of attribute flag_auto_biblio.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_auto_biblio
  @flag_auto_biblio
end

#flag_auto_endnotesObject

Returns the value of attribute flag_auto_endnotes.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_auto_endnotes
  @flag_auto_endnotes
end

#flag_biblioObject

Returns the value of attribute flag_biblio.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_biblio
  @flag_biblio
end

#flag_endnotesObject

Returns the value of attribute flag_endnotes.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_endnotes
  @flag_endnotes
end

#flag_glossaryObject

Returns the value of attribute flag_glossary.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_glossary
  @flag_glossary
end

#flag_promoObject

Returns the value of attribute flag_promo.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_promo
  @flag_promo
end

#flag_separate_endnotesObject

Returns the value of attribute flag_separate_endnotes.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_separate_endnotes
  @flag_separate_endnotes
end

#flag_separate_endnotes_makeObject

Returns the value of attribute flag_separate_endnotes_make.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_separate_endnotes_make
  @flag_separate_endnotes_make
end

#flag_tablesObject

Returns the value of attribute flag_tables.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flag_tables
  @flag_tables
end

#flvObject

Returns the value of attribute flv.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def flv
  @flv
end

#fnObject

Returns the value of attribute fn.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fn
  @fn
end

#fnbObject

Returns the value of attribute fnb.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnb
  @fnb
end

#fnlObject

Returns the value of attribute fnl.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnl
  @fnl
end

#fnnObject

Returns the value of attribute fnn.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnn
  @fnn
end

#fnoObject

Returns the value of attribute fno.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fno
  @fno
end

#fnsObject

Returns the value of attribute fns.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fns
  @fns
end

#fnstexObject

Returns the value of attribute fnstex.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnstex
  @fnstex
end

#fntObject

Returns the value of attribute fnt.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnt
  @fnt
end

#fnzObject

Returns the value of attribute fnz.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def fnz
  @fnz
end

Returns the value of attribute footer_links.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def footer_links
  @footer_links
end

#formatObject

Returns the value of attribute format.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def format
  @format
end

#full_titleObject

Returns the value of attribute full_title.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def full_title
  @full_title
end

#generatedObject

Returns the value of attribute generated.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def generated
  @generated
end

#heading_seg_firstObject

Returns the value of attribute heading_seg_first.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def heading_seg_first
  @heading_seg_first
end

#heading_seg_first_flagObject

Returns the value of attribute heading_seg_first_flag.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def heading_seg_first_flag
  @heading_seg_first_flag
end

#homeObject

Returns the value of attribute home.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def home
  @home
end

#home_button_imageObject

Returns the value of attribute home_button_image.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def home_button_image
  @home_button_image
end

Returns the value of attribute home_button_links.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def home_button_links
  @home_button_links
end

#hostnameObject

Returns the value of attribute hostname.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def hostname
  @hostname
end

#html_titleObject

Returns the value of attribute html_title.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def html_title
  @html_title
end

#i18nObject

Returns the value of attribute i18n.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def i18n
  @i18n
end

#iconObject

Returns the value of attribute icon.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def icon
  @icon
end

#identifierObject

Returns the value of attribute identifier.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def identifier
  @identifier
end

#illustratorObject

Returns the value of attribute illustrator.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def illustrator
  @illustrator
end

#imageObject

Returns the value of attribute image.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def image
  @image
end

#informationObject

Returns the value of attribute information.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def information
  @information
end

#italics_match_listObject

Returns the value of attribute italics_match_list.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def italics_match_list
  @italics_match_list
end

#keywordsObject

Returns the value of attribute keywords.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def keywords
  @keywords
end

#langObject

Returns the value of attribute lang.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lang
  @lang
end

#lang_code_insertObject

Returns the value of attribute lang_code_insert.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lang_code_insert
  @lang_code_insert
end

#languageObject

Returns the value of attribute language.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def language
  @language
end

#language_originalObject

Returns the value of attribute language_original.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def language_original
  @language_original
end

Returns the value of attribute links.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def links
  @links
end

#lnkObject

Returns the value of attribute lnk.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lnk
  @lnk
end

#localeObject

Returns the value of attribute locale.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def locale
  @locale
end

#lv0Object

Returns the value of attribute lv0.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv0
  @lv0
end

#lv1Object

Returns the value of attribute lv1.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv1
  @lv1
end

#lv2Object

Returns the value of attribute lv2.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv2
  @lv2
end

#lv3Object

Returns the value of attribute lv3.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv3
  @lv3
end

#lv4Object

Returns the value of attribute lv4.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv4
  @lv4
end

#lv5Object

Returns the value of attribute lv5.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv5
  @lv5
end

#lv6Object

Returns the value of attribute lv6.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lv6
  @lv6
end

#lvsObject

Returns the value of attribute lvs.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def lvs
  @lvs
end

#makeObject

Returns the value of attribute make.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def make
  @make
end

#man_sectionObject

Returns the value of attribute man_section.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def man_section
  @man_section
end

#markupObject

Returns the value of attribute markup.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def markup
  @markup
end

#markup_instructionObject

Returns the value of attribute markup_instruction.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def markup_instruction
  @markup_instruction
end

#notesObject

Returns the value of attribute notes.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def notes
  @notes
end

#num_topObject

Returns the value of attribute num_top.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def num_top
  @num_top
end

#ocnObject

Returns the value of attribute ocn.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ocn
  @ocn
end

#optObject

Returns the value of attribute opt.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def opt
  @opt
end

#originalObject

Returns the value of attribute original.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def original
  @original
end

#pagebreakObject

Returns the value of attribute pagebreak.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def pagebreak
  @pagebreak
end

#pagelineObject

Returns the value of attribute pageline.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def pageline
  @pageline
end

#pagenewObject

Returns the value of attribute pagenew.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def pagenew
  @pagenew
end

#papersizeObject

Returns the value of attribute papersize.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def papersize
  @papersize
end

#papersize_arrayObject

Returns the value of attribute papersize_array.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def papersize_array
  @papersize_array
end

#pathObject

Returns the value of attribute path.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def path
  @path
end

#pdfObject

Returns the value of attribute pdf.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def pdf
  @pdf
end

#prefix_aObject

Returns the value of attribute prefix_a.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def prefix_a
  @prefix_a
end

#prefix_bObject

Returns the value of attribute prefix_b.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def prefix_b
  @prefix_b
end

#prepared_byObject

Returns the value of attribute prepared_by.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def prepared_by
  @prepared_by
end

#programsObject

Returns the value of attribute programs.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def programs
  @programs
end

#project_detailsObject

Returns the value of attribute project_details.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def project_details
  @project_details
end

#promoObject

Returns the value of attribute promo.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def promo
  @promo
end

#publisherObject

Returns the value of attribute publisher.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def publisher
  @publisher
end

#pwdObject

Returns the value of attribute pwd.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def pwd
  @pwd
end

#relationObject

Returns the value of attribute relation.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def relation
  @relation
end

#rightsObject

Returns the value of attribute rights.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def rights
  @rights
end

#ruby_versionObject

Returns the value of attribute ruby_version.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def ruby_version
  @ruby_version
end

#sc_dateObject

Returns the value of attribute sc_date.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sc_date
  @sc_date
end

#sc_filenameObject

Returns the value of attribute sc_filename.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sc_filename
  @sc_filename
end

#sc_infoObject

Returns the value of attribute sc_info.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sc_info
  @sc_info
end

#sc_numberObject

Returns the value of attribute sc_number.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sc_number
  @sc_number
end

#sc_timeObject

Returns the value of attribute sc_time.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sc_time
  @sc_time
end

#seg_autoname_safeObject

Returns the value of attribute seg_autoname_safe.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def seg_autoname_safe
  @seg_autoname_safe
end

#seg_namesObject

Returns the value of attribute seg_names.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def seg_names
  @seg_names
end

#sem_tagObject

Returns the value of attribute sem_tag.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sem_tag
  @sem_tag
end

#set_header_titleObject

Returns the value of attribute set_header_title.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def set_header_title
  @set_header_title
end

#set_heading_segObject

Returns the value of attribute set_heading_seg.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def set_heading_seg
  @set_heading_seg
end

#set_heading_topObject

Returns the value of attribute set_heading_top.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def set_heading_top
  @set_heading_top
end

#sfx_srcObject

Returns the value of attribute sfx_src.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sfx_src
  @sfx_src
end

#sisuObject

Returns the value of attribute sisu.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def sisu
  @sisu
end

#sourceObject

Returns the value of attribute source.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def source
  @source
end

#stmpObject

Returns the value of attribute stmp.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def stmp
  @stmp
end

#stmpdObject

Returns the value of attribute stmpd.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def stmpd
  @stmpd
end

#subjectObject

Returns the value of attribute subject.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def subject
  @subject
end

#substitution_match_listObject

Returns the value of attribute substitution_match_list.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def substitution_match_list
  @substitution_match_list
end

#subtitleObject

Returns the value of attribute subtitle.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def subtitle
  @subtitle
end

#subtitle_texObject

Returns the value of attribute subtitle_tex.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def subtitle_tex
  @subtitle_tex
end

#suffixObject

Returns the value of attribute suffix.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def suffix
  @suffix
end

#tag_arrayObject

Returns the value of attribute tag_array.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def tag_array
  @tag_array
end

#tagsObject

Returns the value of attribute tags.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def title
  @title
end

#tocObject

Returns the value of attribute toc.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def toc
  @toc
end

#toc_lev_limitObject

Returns the value of attribute toc_lev_limit.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def toc_lev_limit
  @toc_lev_limit
end

#topic_registerObject

Returns the value of attribute topic_register.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def topic_register
  @topic_register
end

#topic_register_arrayObject

Returns the value of attribute topic_register_array.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def topic_register_array
  @topic_register_array
end

#translatorObject

Returns the value of attribute translator.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def translator
  @translator
end

#txt_pathObject

Returns the value of attribute txt_path.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def txt_path
  @txt_path
end

#typeObject

Returns the value of attribute type.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def type
  @type
end

#userObject

Returns the value of attribute user.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def user
  @user
end

#vocabularyObject

Returns the value of attribute vocabulary.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def vocabulary
  @vocabulary
end

#wc_bytesObject

Returns the value of attribute wc_bytes.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def wc_bytes
  @wc_bytes
end

#wc_linesObject

Returns the value of attribute wc_lines.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def wc_lines
  @wc_lines
end

#wc_wordsObject

Returns the value of attribute wc_words.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def wc_words
  @wc_words
end

#writing_focusObject

Returns the value of attribute writing_focus.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def writing_focus
  @writing_focus
end

#yamlObject

Returns the value of attribute yaml.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def yaml
  @yaml
end

#yamladdrObject

Returns the value of attribute yamladdr.



901
902
903
# File 'lib/sisu/dp.rb', line 901

def yamladdr
  @yamladdr
end

Instance Method Details

#extractObject

protected



964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
# File 'lib/sisu/dp.rb', line 964

def extract
  begin
    @user,@home,@hostname,@pwd=ENV['USER'],ENV['HOME'],ENV['HOSTNAME'],ENV['PWD']
    @programs,@wc,@language,@language_original={},{},{},{}
    @en={ sum: 0, mark: 0, note: 0, mismatch: 0 }
    @prog=SiSU_Env::InfoSettings.new
    @sys=SiSU_Env::SystemCall.new
    @env=SiSU_Env::InfoEnv.new(@fns) #watch
    if (@opt.act[:verbose_plus][:set]==:on \
    || @opt.act[:maintenance][:set]==:on)
      puts 'system locale: ' + @sys.locale
    end
    if @prog.wc \
    and @sys.wc
      wc=%x{wc #{fns}}
      wca=wc.scan(/\d+/)
      @wc_lines,@wc_words,@wc_bytes=wca[0].to_i,wca[1].to_i,wca[2].to_i
    else
      fns_a=@data.dup
      tmp=fns_a.join
      fns_a=tmp.scan(/\S+/)
      @wc_words=fns_a.length
      fns_a=tmp=nil
    end
    @concord_make=(@wc_words > @env.concord_max) ? false : true
    @locale=@sys.locale
    @file_encoding=@sys.file_encoding(fns,@opt.act)
    # programs set here for things that affect output appearance only
    @programs[:pdf]=SiSU_Env::SystemCall.new.program_found?('pdflatex')
    if @opt.act[:psql][:set] == [:ok]
      m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm|ssi)$/ #watch added match for sss
      @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3]
      @flv=@env.document_language_versions_found[:f]
    else
      m=/((.+?)(?:\~\w\w(?:_\w\w)?)?)\.((?:-|ssm\.)?sst|ssm)$/ #watch added match for sss
      @fnn,@fnb,@fnt=@fns[m,1],@fns[m,2],@fns[m,3]
      @flv=@env.document_language_versions_found[:f]
      @fnz=(@fns =~/\.(?:ssm\.sst|ssm)$/) ? (@fnn + '.ssm.txz') : (@fnn + '.sst.txz')
    end
    @papersize=@env.papersize #'A4' #default size #get first from SiSU_Env:: # @env is probably no longer most appropriate name! as default info is more general
    @sfx_src=@fns[m,2]
    if @fns =~ /(?:-|ssm\.)?sst$/ \
    and not @opt.act[:psql][:set] == [:ok]
      @env_out_root=@env.path.output
      @dir_out="#{@env.path.output}/#{@fnb}"
      @dir_tex=@env.processing_path.tex
      @dir_lout=@env.processing_path.lout
      @@publisher='SiSU http://www.jus.uio.no/sisu'
    end
    @txt_path=@txt_path ||= @env.path.output
    @stmp=%{#{@fns}}[/^(.+?)\..*/m,1]
    @fnstex=@fns.gsub(/_/,'\_\-').gsub(/\./,'.\-')
    @flag_endnotes,@flag_auto_endnotes,@flag_separate_endnotes=false,false,false
    @flag_separate_endnotes_make=true
    @flag_glossary=false
    @flag_biblio,@flag_auto_biblio=false,false
    ver=SiSU_Env::InfoVersion.instance
    @project_details=ver.get_version
    @ruby_version=ver.rbversion
    @generated=Time.now
    fns_array=@data.dup
    skip unless fns_array                                                    # consider
    @code_flag=false
    flag_code_curly=:not_code_curly
    flag_code_tics=:not_code_tics
    fns_array.each do |para|                                               #% scan document
      if para !~/^%+\s/ \
      and para =~/<![abcdeghijklmnopqrstuvwxyz]/i # <!f not included
        raise "Old markup style in file #{@fns}, current version #{@project_details.project} #{@project_details.version} #{@project_details.date_stamp} #{@project_details.date}:\n\t\t#{para}\n\n"
      end
      if para =~/^code\{/
        flag_code_curly=:code_curly
      elsif para =~/^\}code/
        flag_code_curly=:not_code_curly
      elsif para =~/^``` code/
        flag_code_tics=:code_tics
      elsif flag_code_tics ==:code_tics \
      and para =~/^```/
        flag_code_tics=:not_code_tics
      end
      @code_flag=if flag_code_curly==:code_curly \
      or flag_code_tics==:code_tics
        true
      else false
      end
      regx_header=/^@\S+?:[+-]?\s/
      if para =~regx_header \
      and not @code_flag #or para=~/^(?:1|:?A)~/
        case para
        when /^@title:(.+)/m                                               #% * header metadata - title
          @title=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).title
        when /^@creator:(.+)/m                                             #% * header metadata - creator
          @creator=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).creator
          @authorship=@author=@creator.author
          @authors=@creator.author_detail
        when /^@date:(.+)/m                                                #% * header metadata - date
          @date=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).date
        when /^@publisher:\s+(.+)/m                                        #% * header metadata - publisher
          @publisher=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).current_publisher
          @current_publisher=@publisher
        when /^@rights:(.+)/m                                              #% * header metadata - rights
          @rights=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).rights
        when /^@classify:(.+)/m                                            #% * header metadata - classify
          @classify=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).classify
        when /^@identifier:(.+)/m                                          #% * header metadata - identifier
          @identifier=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).identifier
        when /^@original:(.+)/m                                            #% * header metadata - original (document)
          @original=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).original
          @source=@original.source
        when /^@notes?:\s(.+)\Z/m                                          #% * header metadata - notes
          @notes=SiSU_Param::Parameters::Md.new($1.strip,@opt,@env).notes
        when /^@links:\s+(.+?)\Z/m                                         #% * header metadata - links
          links=SiSU_Param::Parameters::MdMake.new($1.strip,@opt,@env).make_links.links
          @lnk=@links=if @header_make_links_append == :yes
            (links) \
              ? (links + @links)
              : @links
          else
            (links) \
              ? (links)
              : @links
          end
        when /^@make:(.+)/m                                                #% * header processing - make
          @make=SiSU_Param::Parameters::MdMake.new($1.strip,@opt,@env).make
          makes=SiSU_Param_Make::MakeHead.new(@make).make_instruct
          @pagenew=(makes[:pagenew]) \
            ? (makes[:pagenew]) \
            : @pagenew
          @pagebreak=(makes[:pagebreak]) \
            ? (makes[:pagebreak]) \
            : @pagebreak
          @pageline=(makes[:pageline]) \
            ? (makes[:pageline]) \
            : @pageline
          @toc=(makes[:toc]) ? (makes[:toc]) : @toc
          @lv0=(makes[:lv0]) ? (makes[:lv0]) : @lv0
          @lv1=(makes[:lv1]) ? (makes[:lv1]) : @lv1
          @lv2=(makes[:lv2]) ? (makes[:lv2]) : @lv2
          @lv3=(makes[:lv3]) ? (makes[:lv3]) : @lv3
          @lv4=(makes[:lv4]) ? (makes[:lv4]) : @lv4
          @lv5=(makes[:lv5]) ? (makes[:lv5]) : @lv5
          @lv6=(makes[:lv6]) ? (makes[:lv6]) : @lv6
          @num_top=
            (makes[:num_top]) \
            ? (makes[:num_top]) \
            : @num_top
          @substitution_match_list=
            (makes[:substitution_match_list]) \
            ? (makes[:substitution_match_list]) \
            : @substitution_match_list
          @bold_match_list=
            (makes[:bold_match_list]) \
            ? (makes[:bold_match_list]) \
            : @bold_match_list
          @italics_match_list=
            (makes[:italics_match_list]) \
            ? (makes[:italics_match_list]) \
            : @italics_match_list
          @emphasis_set_to=
            (makes[:emphasis_set_to]) \
            ? (makes[:emphasis_set_to]) \
            : @emphasis_set_to
          @i18n=
            (makes[:i18n]) \
            ? (makes[:i18n]) \
            : @i18n
          @man_section=
            (makes[:man_section]) \
            ? (makes[:man_section]) \
            : @man_section
          @footer_links=
            (makes[:footer_links]) \
            ? (makes[:footer_links]) \
            : @footer_links
          @home_button_links=
            (makes[:home_button_links]) \
            ? (makes[:home_button_links]) \
            : @home_button_links
          @home_button_image=
            (makes[:home_button_image]) \
            ? (makes[:home_button_image]) \
            : @home_button_image
          @cover_image=
            (makes[:cover_image]) \
            ? (makes[:cover_image]) \
            : @cover_image
        end
        @lv0 ||=/^0~/
        @lv1 ||=/^1~/
        @lv2 ||=/^2~/
        @lv3 ||=/^3~/
        @lv4 ||=/^4~/
        @lv5 ||=/^5~/
        @lv6 ||=/^6~/
      else                                                                 #% *
        l_0=l_1=l_2=l_3=l_4=l_5=''
        if defined? @make.headings[0]
          l_0=if defined? @make.headings[0][0] \
          and @make.headings[0][0] =~/\S+/
            "|^#{@make.headings[0][0]}"
          end
          l_1=if defined? @make.headings[0][1] \
          and @make.headings[0][1] =~/\S+/
            "|^#{@make.headings[0][1]}"
          end
          l_2=if defined? @make.headings[0][2] \
          and @make.headings[0][2] =~/\S+/
            "|^#{@make.headings[0][2]}"
          end
          l_3=if defined? @make.headings[0][3] \
          and @make.headings[0][3] =~/\S+/
            "|^#{@make.headings[0][3]}"
          end
          l_4=if defined? @make.headings[0][4] \
          and @make.headings[0][4] =~/\S+/
            "|^#{@make.headings[0][4]}"
          end
          l_5=if defined? @make.headings[0][5] \
          and @make.headings[0][5] =~/\S+/
            "|^#{@make.headings[0][5]}"
          end
        end
        case para
        #when /^:?A~/
        when /^:?B~#{l_0}/
          @lvs[1]=1
        when /^:?C~#{l_1}/
          @lvs[2]=1
        when /^:?D~#{l_2}/
          @lvs[3]=1
        when /^1~#{l_3}/
          @lvs[4]=1
        when /^2~#{l_4}/
          @lvs[5]=1
        when /^3~#{l_5}/
          @lvs[6]=1
        end
        if para =~ /^:?A~/                                                  #% processing
          if not defined? @title.full.nil?
            tf=para[/^:A~\S*(.+)$/m,1]
            tf="@title: #{tf}"
            @title=SiSU_Param::Parameters::Md.new(tf.strip,@opt,@env).title
          end
          creator=(@creator.is_a?(SiSU_Param::Parameters::Md) \
          && defined? @creator.author \
          && @creator.author.is_a?(String)) \
          ? " #{@creator.author}"
          : ''
          title=@title.full.gsub(/\s*(?:<p>|<p \/>|<br>|<br \/>)\s*/,' ').
            gsub(/~\{.+?\}~/,'')
          SiSU_Screen::Ansi.new(
            @opt.act[:color_state][:set],
            'Document Parameters',
            %{#{title}#{creator}}
          ).txt_grey if @opt.act[:verbose][:set]==:on
        end
        unless @code_flag
          if para =~/^1~!biblio(?:graphy)?/
            @flag_auto_biblio,@flag_biblio=false,true
            #@flag_biblio=true
          elsif @flag_biblio ==true \
          and @flag_auto_biblio ==false \
          and para =~/^(?:au|author):/m
            @flag_auto_biblio =true
          end
          if para =~/^1~!glossary/
            @flag_glossary=true
          end
        end
        if not @book_idx \
        and para =~/^=\{(.+?)\}[\s`]*\Z/m
          @book_idx=true
        end
        unless @code_flag
          case para
          when /~\{\s+.+?\}~/m                                             #% processing
            en=para.scan(/~\{.+?\}~/m)
            en.each { |e| @en[:sum] +=1 }
          when /~\^(?:\s|$)/m                                              #% processing
            mk=para.scan(/~\^(?:\s|$)/)
            mk.each { |e| @en[:mark] +=1 }
          when /^\^~\s+\S/ then @en[:note] +=1                             #% processing
          end
        end
        if para =~/~\{|\^~ |~\^|\{.+?\[[1-6]\]\}\S+?\.ss[tm]/m
          @flag_auto_endnotes,@flag_endnotes=true,true
        end
        if para =~/^(?:table\{|\{table)/i
          @flag_tables=true
        end
      end
      if para =~/^:?A~/
        @set_heading_top=true
      end
      if para =~/^1~/
        m=nil
        if para =~/^1~(\S+)\s+(.+)$/
          m,t=$1,$2
        elsif para =~/^1~\s+(.+)$/
          t=$1
        end
        unless @heading_seg_first_flag                                     # extract first segment name
          @heading_seg_first=t
          @heading_seg_first_flag=true
        end
        if m                                                               # list all segment names
          @seg_names << m
          @set_heading_seg=true
          if m=~/^\d{1,3}/ \
          and m !~/^0/
            @seg_autoname_safe=false
          end
        end
      end
      para=para.gsub(/<:=(\S+?)>/,'{ c_\1.png 14x14 }image')               # embedded symbol (image)
      if para !~/^%+\s/ \
      and para =~@rgx_image
        @ec[:image] << para.scan(@rgx_image).uniq
      end
      @ec[:audio] << para.scan(@rgx_audio).uniq if para =~@rgx_audio #embedded content
      @ec[:multimedia] << para.scan(@rgx_mm).uniq if para =~@rgx_mm #embedded content
      unless @sem_tag
        @sem_tag=true if para=~/[:;]\{.+?\}[:;][a-z+]/ #refix later
      end
    end                                                                    #% here endeth the document loop
    unless @make
      if (@opt.act[:verbose_plus][:set]==:on \
      || @opt.act[:maintenance][:set]==:on)
        SiSU_Screen::Ansi.new(
          @opt.act[:color_state][:set],
          '@make:',
          'header absent'
        ).warn
      end
      @make=SiSU_Param::Parameters::MdMake.new('@make: ',@opt,@env).make
    end
    if @cover_image \
    and @cover_image.is_a?(Hash) \
    and (@cover_image[:cover] =~@rgx_image \
      or @cover_image[:cover] =~/\S+?.(?:jpg|png|gif)/)
      @ec[:image] << @cover_image[:cover]
    end
    if @home_button_image \
    and @home_button_image.is_a?(Hash) \
    and (@home_button_image =~@rgx_image \
      or @home_button_image =~/\S+?\.(?:jpg|png|gif)/)
      @ec[:image] << @home_button_image
    end
    if @ec[:image].length > 0
      @ec[:image]=@ec[:image].flatten.uniq
      @ec[:image].delete_if {|x| x =~/https?:\/\// }
      @ec[:image]=@ec[:image].sort
    end
    @ec[:audio]=@ec[:audio].uniq.flatten.sort
    @ec[:multimedia]=@ec[:multimedia].uniq.flatten.sort
    unless @rights
      if defined? @creator.author \
      and @creator.author.is_a?(String) \
      and defined? @date.published \
      and @date.published.is_a?(String)
        @rights=SiSU_Param::Parameters::MdDefault.new.rights(@creator.author,@date.published)
      elsif defined? @creator.author \
      and @creator.author.is_a?(String)
        @rights=SiSU_Param::Parameters::MdDefault.new.rights("[#{@creator.author}]",'')
      end
    end
    if defined? @classify.topic_register \
    and @classify.topic_register.is_a?(String) \
    and @classify.topic_register.length >3
       topic_register=@classify.topic_register
       u=topic_register.scan(/[^;]+/m).sort
       v=[]
       u.each do |l|
         v << l.scan(/[^:]+/m)
       end
       v.each do |s|
         s[-1]=s[-1].scan(/[^|]+/m) if s[-1] =~/[|]/m
         @topic_register_array << s
       end
       @topic_register_array
    end
    if @i18n
      @i18n=@i18n.uniq
      @i18n << 'en' unless @i18n.find_index("en")
    else
      @i18n=[ 'en' ]
    end
    translated=[]
    translate_list=[@pagenew,@pagebreak,@pageline,@num_top,@toc_lev_limit]
    translate_list.each do |t|
      translate=t.to_s if t
      translated << if translate
        translate.gsub!(/3/,'6')
        translate.gsub!(/2/,'5')
        translate.gsub!(/1/,'4')
        translate.gsub!(/:?C/,'3')
        translate.gsub!(/:?B/,'2')
        translate.gsub!(/:?A/,'1')
        # looks like an ok substituion for the above but is not, causes problems, check why
        #translate=translate.gsub(/3/,'6').
        #  gsub(/2/,'5').
        #  gsub(/1/,'4').
        #  gsub(/:?C/,'3').
        #  gsub(/:?B/,'2').
        #  gsub(/:?A/,'1')
        translate=(translate =~/^\d+$/) \
        ? translate.to_i
        : translate
      else nil
      end
    end
    @pagenew,@pagebreak,@pageline,@num_top,@toc_lev_limit=translated
    @markup=@markup.gsub(/page_new\s*=\s*([\dA-C])/,"page_new=#{@pagenew}").
      gsub(/page_break\s*=\s*([\dA-C])/,"page_break=#{@pagebreak}").
      gsub(/page_line\s*=\s*([\dA-C])/,"page_line=#{@pageline}").
      gsub(/num_top\s*=\s*([\dA-C])/,"num_top=#{@num_top}").
      gsub(/toc_lev_limit\s*=\s*([\dA-C])/,"toc_lev_limit=#{@toc_lev_limit}")
    papersize_array_rc=@papersize.downcase.scan(/(?:a4|letter|legal|book|a5|b5)/)
    papersize_array_opt=[
      ((@opt.act[:pdf_a4][:set]==:on)     ? 'a4'     : ''),
      ((@opt.act[:pdf_a5][:set]==:on)     ? 'a5'     : ''),
      ((@opt.act[:pdf_b5][:set]==:on)     ? 'b5'     : ''),
      ((@opt.act[:pdf_letter][:set]==:on) ? 'letter' : ''),
      ((@opt.act[:pdf_legal][:set]==:on)  ? 'legal'  : ''),
    ] - [""]
    @papersize_array=(papersize_array_opt.length > 0) \
    ? papersize_array_opt
    : papersize_array_rc
    fn=@opt.fno #decide what to do a filesize on .ssm tells very little about actual document size
    @filesize=(File.size(fn)).to_s
    if @sys.openssl !=false \
    and FileTest.file?(@env.source_file_with_path)
      @dgst=[]
      case @env.digest(@opt).type
      when :sha512
        dgst=@sys.sha512(@env.source_file_with_path)
        @dgst=dgst[1].length==128 ? dgst : nil
        puts 'check document (sha512) digest' if not @dgst
      when :sha256
        dgst=@sys.sha256(@env.source_file_with_path)
        @dgst=dgst[1].length==64 ? dgst : nil
        puts 'check document (sha256) digest' if not @dgst
      when :md5
        dgst=@sys.md5(@env.source_file_with_path)
        @dgst=dgst[1].length==32 ? dgst : nil
        puts 'check document (md5) digest' if not @dgst
      else
        dgst=@sys.sha256(@env.source_file_with_path)
        @dgst=dgst[1].length==64 ? dgst : nil
        puts 'check document (sha256) digest' if not @dgst
      end
    elsif not FileTest.file?(@env.source_file_with_path)
      #puts SiSU_Utils::CodeMarker.new(__LINE__,__FILE__).set(:fuchsia)
    end
    @publisher ||= "#{@@publisher} (this copy)"
    fn_set_lang=SiSU_Env::StandardiseLanguage.new(@opt.lng).language
    unless @language[:code] \
    and @language[:name]
      lang=@env.i18n.language #default language settings for directory by name, or in sysrc.yml
      @language[:code] ||= lang.code
      @language[:name] ||= lang.title
    end
    unless fn_set_lang[:d]==true #decide, naming convention overrides other settings, within document, etc.
      @language[:code]=fn_set_lang[:c]
      @language[:name]=fn_set_lang[:n]
    end
    @fnl=@env.i18n.lang_filename(fn_set_lang[:c])
    @lang=@lang.uniq
    @fn=SiSU_Env::EnvCall.new(@fns).lang(fn_set_lang[:c])
    if @en[:note] > 0 \
    and @en[:sum] > 0
      if @en[:sum] > 0
      else
        SiSU_Screen::Ansi.new(
          @opt.act[:color_state][:set],
          '*WARN* both endnote styles used',
          "~{ #{@en[:sum]} }~ and ^~ #{@en[:mark]}"
        ).warn unless @opt.act[:quiet][:set]==:on
      end
    end
    if @en[:mark] != @en[:note] \
    and @en[:note] > 0
      @en[:mismatch]=@en[:note] - @en[:mark]
      SiSU_Screen::Ansi.new(
        @opt.act[:color_state][:set],
        '*WARN* endnote number mismatch',
        "endnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
        + "(difference = #{@en[:mismatch]})"
      ).warn unless @opt.act[:quiet][:set]==:on
      footnote_conversion_errors=File.new("#{Dir.pwd}/footnote_conversion_errors.txt",'a')
      footnote_conversion_errors <<
        "#{@fns}:\n\tendnotes: #{@en[:note]} != endnote reference marks: #{@en[:mark]} " \
        + "(difference = #{@en[:mismatch]})\n"
    end
    if not @title \
    or not defined? @title.main \
    or @title.main !~/[\S]/
      if @fns =~/\.ssm$/ \
      and  @opt.inspect =~/P/
        #@title=Md.new('Text Insert',@opt,@env).title
      else
        SiSU_Screen::Ansi.new(
          @opt.act[:color_state][:set],
          'WARNING: Document Title missing',
          'please provide @title:'
        ).warn if (@opt.act[:verbose][:set]==:on \
          || @opt.act[:verbose_plus][:set]==:on \
          || @opt.act[:maintenance][:set]==:on)
      end
    end
    if @author !~/[\S]/
      if @fns =~/\.ssm$/ \
      and  @opt.inspect =~/P/
        #@creator=SiSU_Param::Md.new('Text Insert',@opt,@env).creator
      else
        SiSU_Screen::Ansi.new(
          @opt.act[:color_state][:set],
          'WARNING: Document Author missing',
          'please provide @creator: :author:'
        ).warn if (@opt.act[:verbose][:set]==:on \
          || @opt.act[:verbose_plus][:set]==:on \
          || @opt.act[:maintenance][:set]==:on)
      end
    end
    @struct={}
    doc_struct=Hash.new(0)
    if @lv1.nil?
      fns_array.each do |para|
        if para =~/^(Part|Chapter|Section|Article)\b/i
          case para
          when /^(Part|PART)\b/
            @struct[:part]=doc_struct[:part]
            doc_struct[:part]=doc_struct[:part] + 1
          when /^(Chapter|CHAPTER)\b/
            @struct[:chapter]=doc_struct[:chapter]
            doc_struct[:chapter]=doc_struct[:chapter] + 1
          when /^(Section|SECTION)\b/
            @struct[:section]=doc_struct[:section]
            doc_struct[:section]=doc_struct[:section] + 1
          when /^(Article|ARTICLE)\b/
            @struct[:article]=doc_struct[:article]
            doc_struct[:article]=doc_struct[:article] + 1
          when /^(Clause|CLAUSE)\b/
            @struct[:clause]=doc_struct[:clause]
            doc_struct[:clause]=doc_struct[:clause] + 1
          when /^\d\..*[^\.]$/
            @struct[:number]=doc_struct[:number]
            doc_struct[:number]=doc_struct[:number] + 1
          end
        end
      end
      if doc_struct[:article] > 2                                            #%~level 4
        @lv4=/^(?:Article|ARTICLE)\b/
      elsif doc_struct[:chapter] > 2 \
      and doc_struct[:article] \
      and doc_struct[:article] < 3
        @lv4=/^(?:Chapter|CHAPTER)\b/
      elsif doc_struct[:clause] > 2
        @lv4=/^(?:Clause|CLAUSE)\b/
      elsif doc_struct[:number] > 2
        @lv4="^\d\..*[^\.]$"
      end
      if doc_struct[:section] > 2                                           #%~level 3
        @lv3=/^(?:Section|SECTION)\b/
      end
      if doc_struct[:chapter] > 2 \
      and doc_struct[:article] \
      and doc_struct[:article] > 2
        @lv2=/^(?:Chapter|CHAPTER)\b/
      end
      if doc_struct[:part] > 2 \
      and @lv[2].nil?
        @lv2=/^(?:Part|PART)\b/
      end
      if doc_struct[:part] > 2 \
      and @lv[2].inspect !~/Part/ \
      and @lv[1].nil?
        @lv1=/^(Part|PART)\b/
      end
    end
    @lnk=@lnk.compact if @lnk
    @lv0 ||=/^0~/
    @lv1 ||=/^1~/
    @lv2 ||=/^2~/
    @lv3 ||=/^3~/
    @lv4 ||=/^4~/
    @lv5 ||=/^5~/
    @lv6 ||=/^6~/
    @data=nil #else whole file's contents are stored in md pstore & is not required to be... big waste actually
    @file=SiSU_Env::FileOp.new(self) #watch
    Store.new(self,@env).store                                             #% pstore
    self
  rescue
    if @opt.act[:harvest][:set]==:on
      exit
    end
  end
end