aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2013-02-22 19:23:04 -0500
committerRalph Amissah <ralph@amissah.com>2013-02-22 19:23:16 -0500
commit9916bc2ddd1480a3ba35b3a74b766d9acbd34873 (patch)
tree75d53c4d9e951a26d4057c7a1167c96882d29a94
parentv4: version & changelog (diff)
v4: dal, markup: line across page divider -..- introduced
* an alternative to page breaks -\\- & =\\=, significantly affects pdf & odf * output formats modified to include (pdf, odf, epub, html, plaintext)
-rw-r--r--data/doc/sisu/CHANGELOG_v44
-rw-r--r--lib/sisu/v4/constants.rb2
-rw-r--r--lib/sisu/v4/dal_doc_str.rb3
-rw-r--r--lib/sisu/v4/dal_numbering.rb4
-rw-r--r--lib/sisu/v4/dal_syntax.rb3
-rw-r--r--lib/sisu/v4/epub_format.rb2
-rw-r--r--lib/sisu/v4/manpage.rb18
-rw-r--r--lib/sisu/v4/odf.rb10
-rw-r--r--lib/sisu/v4/odf_format.rb5
-rw-r--r--lib/sisu/v4/options.rb4
-rw-r--r--lib/sisu/v4/param.rb15
-rw-r--r--lib/sisu/v4/param_make.rb14
-rw-r--r--lib/sisu/v4/plaintext.rb3
-rw-r--r--lib/sisu/v4/shared_xml.rb1
-rw-r--r--lib/sisu/v4/texpdf.rb1
15 files changed, 64 insertions, 25 deletions
diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4
index f205ec63..19a1d88b 100644
--- a/data/doc/sisu/CHANGELOG_v4
+++ b/data/doc/sisu/CHANGELOG_v4
@@ -28,6 +28,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.9.orig.tar.xz
sisu_4.0.9.orig.tar.xz
sisu_4.0.9-1.dsc
+* v4: dal, line across page divider -..- introduced, an alternative to page
+ break -\\- & =\\=, affects pdf and odf most significantly
+ * output formats modified to include, (pdf, odf, epub, html, plaintext)
+
%% 4.0.8.orig.tar.xz (2013-02-20:07/3)
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.8
http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.8-1
diff --git a/lib/sisu/v4/constants.rb b/lib/sisu/v4/constants.rb
index 505fdc02..fe4e895f 100644
--- a/lib/sisu/v4/constants.rb
+++ b/lib/sisu/v4/constants.rb
@@ -102,6 +102,7 @@ Mx={
br_nl: '╲', #lB ▌ 』 ┘
br_paragraph: '█', #FB █ 9608 # PP ∥ 8741 #▐ #'┘' #'¶' #FB █ 9608 lB ▌ 9612 RB ▐ 9616
br_obj: 'break_obj',
+ br_page_line: '▭',
br_page: '┼',
br_page_new: '╋',
lnk_o: '⌠', lnk_c: '⌡', #'⌈' '⌋' '⌠' '⌡' #Mx[:lnk_o: '◁'; Mx[:lnk_c: '▷' #‹ ›
@@ -139,6 +140,7 @@ Mx[:pa_non_object_dummy_heading]="#{Mx[:pa_o]}-##{Mx[:pa_c]}" #
Mx[:pa_non_object_no_heading]="#{Mx[:pa_o]}~##{Mx[:pa_c]}" #unnumbered paragraph (place marker at end of paragraph)
Hx={
br_obj: { obj: Mx[:br_obj] }, # line sep
+ br_page_line: { obj: Mx[:br_page_line] }, # line across page
br_page: { obj: Mx[:br_page] }, # newpage
br_page_new: { obj: Mx[:br_page_new] }, # clearpage
}
diff --git a/lib/sisu/v4/dal_doc_str.rb b/lib/sisu/v4/dal_doc_str.rb
index ddae0af0..dfea4ad4 100644
--- a/lib/sisu/v4/dal_doc_str.rb
+++ b/lib/sisu/v4/dal_doc_str.rb
@@ -75,6 +75,7 @@ module SiSU_DAL_DocumentStructureExtract
SiSU_DAL_DocumentStructureExtract::Instantiate.new
@pb=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page])
@pbn=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new])
+ @pbl=SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line])
end
def ln_get(lv)
ln=case lv
@@ -243,6 +244,8 @@ module SiSU_DAL_DocumentStructureExtract
SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page],:markup)
when /^(?:=\\\\=|<:pn>)\s*$/ #[br:pgn]
SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new],:markup)
+ when /^-\.\.-\s*$/ #[br:pgl]
+ SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line],:markup)
else #paragraph
image=image_test(t_o)
note=endnote_test?(t_o)
diff --git a/lib/sisu/v4/dal_numbering.rb b/lib/sisu/v4/dal_numbering.rb
index f3750065..258911d2 100644
--- a/lib/sisu/v4/dal_numbering.rb
+++ b/lib/sisu/v4/dal_numbering.rb
@@ -347,13 +347,15 @@ module SiSU_DAL_Numbering
@seg=dob.name
end
@tuned_file << if dob.is==:heading \
- && (@md.pagenew || @md.pagebreak)
+ && (@md.pagenew || @md.pagebreak || @md.pageline)
m=dob.ln.to_s
dob_tmp=[]
if @md.pagenew.inspect =~/#{m}/
dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_new]) << dob
elsif @md.pagebreak.inspect =~/#{m}/
dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page]) << dob
+ elsif @md.pageline.inspect =~/#{m}/
+ dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line]) << dob
end
para_result=unless dob_tmp.length > 0; dob
else dob_tmp
diff --git a/lib/sisu/v4/dal_syntax.rb b/lib/sisu/v4/dal_syntax.rb
index 069b45ed..eeaca1a5 100644
--- a/lib/sisu/v4/dal_syntax.rb
+++ b/lib/sisu/v4/dal_syntax.rb
@@ -147,7 +147,8 @@ module SiSU_DAL_Syntax
gsub(/ \\\\(?: |$)/,"#{Mx[:br_line]}").
gsub(/(?:<:?pb>)/,"#{Mx[:br_page]}"). # depreciated
gsub(/(?:<:?pn>)/,"#{Mx[:br_page_new]}"). # depreciated
- gsub(/(?:<:?br>|<br \/>)/,"#{Mx[:br_line]}") # depreciated
+ gsub(/(?:<:?br>|<br \/>)/,"#{Mx[:br_line]}"). # depreciated
+ gsub(/(?:^-\.\.-\s*$)/,"#{Mx[:br_page_line]}")
end
dob
end
diff --git a/lib/sisu/v4/epub_format.rb b/lib/sisu/v4/epub_format.rb
index 98f4d7e4..49139667 100644
--- a/lib/sisu/v4/epub_format.rb
+++ b/lib/sisu/v4/epub_format.rb
@@ -1971,7 +1971,7 @@ output_epub_cont_seg.close
para_form_css('p','norm',@txt)
end
def break
- @txt=@txt.gsub(/#{Mx[:br_page_new]}|#{Mx[:br_page]}/,'<hr /><br />').
+ @txt=@txt.gsub(/#{Mx[:br_page_new]}|#{Mx[:br_page]}|#{Mx[:br_page_line]}/,'<hr /><br />').
gsub(/#{Mx[:br_obj]}/,'<hr style="width:30%" /><br />')
para_form_css('p','norm',@txt)
end
diff --git a/lib/sisu/v4/manpage.rb b/lib/sisu/v4/manpage.rb
index 9afc56eb..3b85183c 100644
--- a/lib/sisu/v4/manpage.rb
+++ b/lib/sisu/v4/manpage.rb
@@ -312,27 +312,27 @@ WOK
gsub(/#{Mx[:gl_o]}#169#{Mx[:gl_c]}/,'©')
else
dob.obj=dob.obj.gsub(/\\/,'\e').
- gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*/,"\n") # watch
+ gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*/,"\n") # watch
end
- dob.obj=dob.obj.gsub(/(^|&nbsp;|#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires
+ dob.obj=dob.obj.gsub(/(^|&nbsp;|#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires
gsub(/┆/,'|').
- gsub(/^(\.\S{3,})/m,' \1') # ^\. used by interpreter, disable when use not intended
+ gsub(/^(\.\S{3,})/m,' \1') # ^\. used by interpreter, disable when use not intended
dob.obj=dob.obj.gsub(/&#126;/,'~') if dob.obj #manpages use this
if dob.is ==:code
dob.obj=dob.obj.gsub(/(^|[^}])_([<>])/m,'\1\2'). # _> _<
gsub(/(^|[^}])_([<>])/m,'\1\2'). # _<_<
- gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+(\s*)/m,"\n\\1"). # watch
+ gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+(\s*)/m,"\n\\1"). # watch
gsub(/\A(.+?)\s*\Z/m,".nf\n\\1\n.fi")
end
- dob.obj=dob.obj.gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/m,"\n\n") # watch
+ dob.obj=dob.obj.gsub(/(?:#{Mx[:br_line]}|#{Mx[:br_nl]})+\s*/m,"\n\n") # watch
blit=dob.obj.scan(/\[[^\]]+\]|[^\[]+/)
blit_array=[]
- dob.obj=dob.obj.gsub(/#{Mx[:gl_o]}:name#\S+?#{Mx[:gl_c]}/mi,''). #added
- gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}/,''). # remove page breaks
+ dob.obj=dob.obj.gsub(/#{Mx[:gl_o]}:name#\S+?#{Mx[:gl_c]}/mi,''). #added
+ gsub(/#{Mx[:br_page]}\s*|#{Mx[:br_page_new]}|#{Mx[:br_page_line]}/,''). # remove page breaks, you may wish to have a line across the page break instead
gsub(/(^|#{Mx[:gl_c]}|\s)#{Mx[:url_o]}_(\S+?)#{Mx[:url_c]}/,'\1\2').
gsub(/<a href=".+?">(.+?)<\/a>/m,'\1').
- gsub(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,''). # remove name links
- gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
+ gsub(/#{Mx[:mk_o]}name#\S+?#{Mx[:mk_c]}/,''). # remove name links
+ gsub(/&nbsp;|#{Mx[:nbsp]}/,' '). # decide on
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}#{Mx[:url_o]}\S+?#{Mx[:url_c]}/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
gsub(/(?:^|[^_\\])#{Mx[:lnk_o]}\s*(\S+?\.(?:png|jpg|gif)) .+?#{Mx[:lnk_c]}image/,' [ \1 ]'). #"[ #{dir.url.images_local}\/\\1 ]")
gsub(/^(?:^|[^_\\])#{Mx[:lnk_o]}\s*\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"\s*#{Mx[:lnk_c]}\S+/,'[image: "\1"]')
diff --git a/lib/sisu/v4/odf.rb b/lib/sisu/v4/odf.rb
index ca02d16a..c3746b06 100644
--- a/lib/sisu/v4/odf.rb
+++ b/lib/sisu/v4/odf.rb
@@ -191,9 +191,11 @@ module SiSU_ODF
@@fns=@md.fns
end
unless @@docstart
- breakpage=if (@md.pagenew or @md.pagebreak) \
- and (@md.pagenew =~ m or @md.pagebreak =~m)
+ breakpage=if (@md.pagenew || @md.pagebreak) \
+ and (@md.pagenew =~m or @md.pagebreak =~m)
'<text:p text:style-name="P_normal_page_new"> </text:p>'
+ elsif @md.pageline \
+ and @md.pageline =~m #fix
else ''
end
end
@@ -526,6 +528,8 @@ module SiSU_ODF
if dob.obj==Mx[:br_page] \
or dob.obj==Mx[:br_page_new]
dob=br.br_page
+ elsif dob.obj==Mx[:br_page_line]
+ dob=br.br_page_line
elsif dob.obj==Mx[:br_obj]
dob=br.obj_sep
end
@@ -725,6 +729,8 @@ WOK
breakpage=if @md.pagenew \
or @md.pagebreak
' fo:break-before="page"'
+ elsif @md.pageline ##fix
+ ''
else ''
end
x=<<WOK
diff --git a/lib/sisu/v4/odf_format.rb b/lib/sisu/v4/odf_format.rb
index b86fcb1f..b1eb51ae 100644
--- a/lib/sisu/v4/odf_format.rb
+++ b/lib/sisu/v4/odf_format.rb
@@ -650,6 +650,11 @@ WOK
@t_o.obj='<text:p text:style-name="P_page_break"> </text:p>'
@t_o
end
+ def br_page_line
+ sep='_'
+ @t_o.obj=%{<text:p text:style-name="P_normal">#{sep*60}</text:p>}
+ @t_o
+ end
def obj_sep #center later
sep='--- '
@t_o.obj=%{<text:p text:style-name="P_normal">#{sep*20}</text:p>}
diff --git a/lib/sisu/v4/options.rb b/lib/sisu/v4/options.rb
index 61586009..6e5f7ca4 100644
--- a/lib/sisu/v4/options.rb
+++ b/lib/sisu/v4/options.rb
@@ -70,7 +70,7 @@ module SiSU_Commandline
@make_instruct_array=make_instruct_array
end
def sisu_document_make_instructions
- @pagenew=@pagebreak=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@emphasis_set_to=@bold_match_list=@italics_match_list=@substitution_match_list=@footer_links=@home_button_links=@links=nil
+ @pagenew=@pagebreak=@pageline=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@emphasis_set_to=@bold_match_list=@italics_match_list=@substitution_match_list=@footer_links=@home_button_links=@links=nil
@makeset=false
if @make_instruct_array
@make_instruct_array.each do |para| #% scan document
@@ -83,6 +83,7 @@ module SiSU_Commandline
@makeset=true
@pagenew=makes[:pagenew]
@pagebreak=makes[:pagenew]
+ @pageline=makes[:pageline]
@toc=makes[:toc]
@lv1=makes[:lv1]
@lv2=makes[:lv2]
@@ -111,6 +112,7 @@ module SiSU_Commandline
{ makeset: @makeset,
pagenew: @pagenew,
pagebreak: @pagebreak,
+ pageline: @pageline,
toc: @toc,
lv1: @lv1,
lv2: @lv2,
diff --git a/lib/sisu/v4/param.rb b/lib/sisu/v4/param.rb
index 1bfd8b3d..375e2af8 100644
--- a/lib/sisu/v4/param.rb
+++ b/lib/sisu/v4/param.rb
@@ -830,9 +830,9 @@ module SiSU_Param
@doc={ lv: [] }
@doc[:fns],@doc[:fnb],@doc[:scr_suffix]='','',''
@@publisher='SiSU scribe'
- attr_accessor :make,: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,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,: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,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,: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,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section
+ attr_accessor :make,: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,:sisu,:sisu_version,:ruby_version,:title,:subtitle,:full_title,:html_title,:subtitle_tex,:creator,:classify,:author_home,:author,:author_title,:author_nationality,:authors,:authorship,: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,:papersize_array,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:lvs,:pagenew,:pagebreak,:pageline,:num_top,:bold_match_list,:italics_match_list,:substitution_match_list,:emphasis_set_to,:toc_lev_limit,:flag_endnotes,:flag_auto_endnotes,:flag_separate_endnotes,:flag_separate_endnotes_make,:markup,:markup_instruction,:markup_version,:markup_declared,:flag_tables,:vocabulary,:doc_css,:yaml,:lnk,:links,:prefix_a,:prefix_b,:suffix,:information,:contact,:icon,:image,:ad_url,:ad_png,:ad_alt,:ad_began,:flag_promo,: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,:user,:home,:hostname,:pwd,:firstseg,:programs,:author_copymark,:i18n,:lang,:lang_code_insert,:en,:notes,:dgst,:generated,:tags,:tag_array,:concord_make,:seg_names,:seg_autoname_safe,:set_header_title,:set_heading_top,:set_heading_seg,:heading_seg_first,:heading_seg_first_flag,:base_program,:ec,:opt,:sem_tag,:book_idx,:topic_register,:topic_register_array,:original,:writing_focus,:audio,:daisy,:home_button_image,:home_button_links,:footer_links,:cover_image,:man_section
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_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@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=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@pagenew=@pagebreak=@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
+ @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_endnotes=@flag_auto_endnotes=@flag_separate_endnotes=@flag_separate_endnotes_make=@sisu=@sisu_version=@ruby_version=@title=@subtitle=@full_title=@html_title=@subtitle_tex=@creator=@classify=@author_home=@author=@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=@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
@@ -874,7 +874,8 @@ module SiSU_Param
: @opt.make_instructions
if common_makes[:makeset]
@pagenew=common_makes[:pagenew]
- @pagebreak=common_makes[:pagenew]
+ @pagebreak=common_makes[:pagebreak]
+ @pageline=common_makes[:pageline]
@toc=common_makes[:toc]
@lv1=common_makes[:lv1]
@lv2=common_makes[:lv2]
@@ -1050,6 +1051,9 @@ module SiSU_Param
@pagebreak=(makes[:pagebreak]) \
? (makes[:pagebreak]) \
: @pagebreak
+ @pageline=(makes[:pageline]) \
+ ? (makes[:pageline]) \
+ : @pageline
@toc=(makes[:toc]) ? (makes[:toc]) : @toc
@lv1=(makes[:lv1]) ? (makes[:lv1]) : @lv1
@lv2=(makes[:lv2]) ? (makes[:lv2]) : @lv2
@@ -1268,7 +1272,7 @@ module SiSU_Param
end
if @markup_version.determined >= 0.38 #convert values in headers to internal representation
translated=[]
- translate_list=[@pagenew,@pagebreak,@num_top,@toc_lev_limit]
+ translate_list=[@pagenew,@pagebreak,@pageline,@num_top,@toc_lev_limit]
translate_list.each do |t|
translate=t.to_s if t
translated << if translate
@@ -1291,9 +1295,10 @@ module SiSU_Param
else nil
end
end
- @pagenew,@pagebreak,@num_top,@toc_lev_limit=translated
+ @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}")
end
diff --git a/lib/sisu/v4/param_make.rb b/lib/sisu/v4/param_make.rb
index cfc14074..675c0955 100644
--- a/lib/sisu/v4/param_make.rb
+++ b/lib/sisu/v4/param_make.rb
@@ -167,12 +167,13 @@ module SiSU_Param_Make
pagebreaks=((@h['breaks'] =~/;/) \
? (@h['breaks'].split(/;\s*/))
: [ @h['breaks'] ])
- page_new,page_break=nil,nil
+ page_new,page_break,page_line=nil,nil,nil
pagebreaks.each do |x|
page_new=x[/(:?[\dA-C],?)+/] if x=~/new|clear/
page_break=x[/(:?[\dA-C],?)+/] if x =~/break/
+ page_line=x[/(:?[\dA-C],?)+/] if x =~/line/
end
- { page_new: page_new, page_break: page_break }
+ { page_new: page_new, page_break: page_break, page_line: page_line }
end
def language
l=if @h['language'] && (@h['language']=~/\S{2,}/)
@@ -516,12 +517,12 @@ module SiSU_Param_Make
end
end
class MakeHead
- attr_accessor :pagenew,:pagebreak,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:num_top,:i18n,:man_section,:substitution_match_list,:bold_match_list,:italics_match_list,:emphasis_set_to,:footer_links,:home_button_links,:home_button_image,:cover_image
+ attr_accessor :pagenew,:pagebreak,:pageline,:toc,:lv1,:lv2,:lv3,:lv4,:lv5,:lv6,:num_top,:i18n,:man_section,:substitution_match_list,:bold_match_list,:italics_match_list,:emphasis_set_to,:footer_links,:home_button_links,:home_button_image,:cover_image
def initialize(make)
@make=make
end
def clear
- @pagenew=@pagebreak=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@footer_links=@substitution_match_list=@bold_match_list=@italics_match_list=@emphasis_set_to=@home_button_links=@home_button_image=@cover_image=nil
+ @pagenew=@pagebreak=@pageline=@toc=@lv1=@lv2=@lv3=@lv4=@lv5=@lv6=@num_top=@i18n=@man_section=@footer_links=@substitution_match_list=@bold_match_list=@italics_match_list=@emphasis_set_to=@home_button_links=@home_button_image=@cover_image=nil
end
def make_instruct
clear
@@ -533,6 +534,10 @@ module SiSU_Param_Make
and @make.breaks[:page_break] #newpage
@pagebreak=@make.breaks[:page_break]
end
+ if defined? @make.breaks \
+ and @make.breaks[:page_line] #page line across
+ @pagebreak=@make.breaks[:page_line]
+ end
if defined? @make.headings \
and @make.headings
@toc=@make.headings[0]
@@ -615,6 +620,7 @@ module SiSU_Param_Make
end
{ pagenew: @pagenew,
pagebreak: @pagebreak,
+ pageline: @pageline,
toc: @toc,
lv1: @lv1,
lv2: @lv2,
diff --git a/lib/sisu/v4/plaintext.rb b/lib/sisu/v4/plaintext.rb
index 9bbc799c..b916f081 100644
--- a/lib/sisu/v4/plaintext.rb
+++ b/lib/sisu/v4/plaintext.rb
@@ -363,7 +363,8 @@ WOK
sp=' '
ln='-'
@plaintext[:body] <<=if dob.obj==Mx[:br_page] \
- or dob.obj==Mx[:br_page_new]
+ or dob.obj==Mx[:br_page_new] \
+ or dob.obj==Mx[:br_page_line]
"#{@br}#{ln*40}#{@br*2}"
elsif dob.obj ==Mx[:br_obj]
"#{@br}#{sp*20}* * *#{@br*2}"
diff --git a/lib/sisu/v4/shared_xml.rb b/lib/sisu/v4/shared_xml.rb
index 9db839b1..b175408d 100644
--- a/lib/sisu/v4/shared_xml.rb
+++ b/lib/sisu/v4/shared_xml.rb
@@ -376,6 +376,7 @@ module SiSU_XML_Munge
dob.obj=dob.obj.gsub(/#{Mx[:br_line]}|#{Mx[:br_nl]}/,'<br />') unless dob.is==:table
dob.obj=dob.obj.gsub(/#{Mx[:br_page]}\s*/,'').
gsub(/#{Mx[:br_page_new]}\s*/,'').
+ gsub(/#{Mx[:br_page_line]}\s*/,'').
gsub(/#{Mx[:pa_non_object_no_heading]}|#{Mx[:pa_non_object_dummy_heading]}/,'').
gsub(/<[-~]#>/,'').
gsub(/href="#{Xx[:segment]}/m,'href="').
diff --git a/lib/sisu/v4/texpdf.rb b/lib/sisu/v4/texpdf.rb
index 01ca5934..5e18f5aa 100644
--- a/lib/sisu/v4/texpdf.rb
+++ b/lib/sisu/v4/texpdf.rb
@@ -398,6 +398,7 @@ module SiSU_TeX
elsif dob.is ==:break
if dob.obj==Mx[:br_page]; dob.tmp='\newpage'
elsif dob.obj==Mx[:br_page_new]; dob.tmp='\clearpage'
+ elsif dob.obj==Mx[:br_page_line]; dob.tmp=' \\ \hline \\ '
elsif dob.obj==Mx[:br_obj]; dob.tmp='\parasep'
end
elsif dob.is==:comment \