aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/cgi_sql_common.rb11
-rw-r--r--lib/sisu/v2/constants.rb1
-rw-r--r--lib/sisu/v2/dal_doc_objects.rb117
-rw-r--r--lib/sisu/v2/dal_doc_str.rb3
-rw-r--r--lib/sisu/v2/dal_endnotes.rb4
-rw-r--r--lib/sisu/v2/dal_syntax.rb23
-rw-r--r--lib/sisu/v2/defaults.rb15
-rw-r--r--lib/sisu/v2/texpdf.rb20
-rw-r--r--lib/sisu/v2/texpdf_format.rb33
9 files changed, 147 insertions, 80 deletions
diff --git a/lib/sisu/v2/cgi_sql_common.rb b/lib/sisu/v2/cgi_sql_common.rb
index 56f6cb37..1b043f00 100644
--- a/lib/sisu/v2/cgi_sql_common.rb
+++ b/lib/sisu/v2/cgi_sql_common.rb
@@ -569,9 +569,18 @@ module SiSU_CGI_sql
</a>
<br />
<i>w3 since October 3 1993</i>
- <a href="mailto://ralph@amissah.com" >
+ <a href="mailto:ralph@amissah.com" >
ralph@amissah.com
</a>
+ <br />
+ mailing list subscription
+ <a href="http://lists.sisudoc.org/listinfo/sisu" >
+ http://lists.sisudoc.org/listinfo/sisu
+ </a>
+ <br />
+ <a href="mailto:sisu@lists.sisudoc.org" >
+ sisu@lists.sisudoc.org
+ </a>
</font></p>
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
diff --git a/lib/sisu/v2/constants.rb b/lib/sisu/v2/constants.rb
index 7fe795da..9367e9cd 100644
--- a/lib/sisu/v2/constants.rb
+++ b/lib/sisu/v2/constants.rb
@@ -103,6 +103,7 @@ Mx[:rel_o]='⌈'; Mx[:rel_c]='⌋'
Mx[:tag_o]='⌊'; Mx[:tag_c]='⌉'
Mx[:sm_set_o]='《'; Mx[:sm_set_c]='》'
Mx[:sm_subset_o]='《 '; Mx[:sm_subset_c]='》'
+Mx[:vline]='┆' # ¦ |
#Mx[:sm_set_o]='∈ '; Mx[:sm_set_c]='∋ '
#Mx[:sm_subset_o]='∈ '; Mx[:sm_subset_c]='∋ '
Rx[:mx_fa_clean]= /#{Mx[:fa_o]}.+?#{Mx[:fa_c]}|#{Mx[:pa_o]}.+?#{Mx[:pa_c]}|#{Mx[:mk_o]}.+?#{Mx[:mk_c]}/
diff --git a/lib/sisu/v2/dal_doc_objects.rb b/lib/sisu/v2/dal_doc_objects.rb
index 0102ff94..bc0020b2 100644
--- a/lib/sisu/v2/dal_doc_objects.rb
+++ b/lib/sisu/v2/dal_doc_objects.rb
@@ -221,84 +221,85 @@ module SiSU_document_structure
end
end
class Object_group
- attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:ocn_,:digest,:tmp
+ attr_accessor :obj,:is,:of,:tags,:idx,:ocn,:odv,:osp,:parent,:note_,:number_,:ocn_,:digest,:tmp
def initialize
@of='group'
- @is=@obj=@idx=@ocn=@odv=@osp=@parent=@note_=@ocn_=@digest=@tmp=nil
+ @is=@obj=@idx=@ocn=@odv=@osp=@parent=@note_=@number_=@ocn_=@digest=@tmp=nil
@tags=[]
end
def code(h,o=nil)
- of= @of #String, classification - group #alt 'code'
- is= 'code' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group #alt 'code'
+ is= 'code' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ number_= h[:number_] || ((defined? o.number_) ? o.number_ : false) #Bool, numbered or not?
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
- @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ @of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@number_,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,number_,note_,ocn_,digest,tmp
self
end
def group(h,o=nil)
- of= @of #String, classification - group
- is= 'group' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'group' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
self
end
def alt(h,o=nil) #see group
- of= @of #String, classification - group
- is= 'alt' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'alt' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ note_= h[:note_] || ((defined? o.note_) ? o.note_ : false) #Bool, endnotes/footnotes? (processing optimization)
+ ocn_= if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
self
end
def verse(h,o=nil) #part of poem decide how you deal with this
- of= @of #String, classification - group
- is= 'verse' #String, classification - specific type
- tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
- obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
- idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
- ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
- odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
- osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
- parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
- ocn_=if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
- else h[:ocn_]
+ of= @of #String, classification - group
+ is= 'verse' #String, classification - specific type
+ tags= h[:tags] || ((defined? o.tags) ? o.tags : []) #Array, associated object tags, names if any
+ obj= h[:obj] || ((defined? o.obj) ? o.obj : nil) #String, text content
+ idx= h[:idx] || ((defined? o.idx) ? o.idx : nil) #String, book index provided?
+ ocn= h[:ocn] || ((defined? o.ocn) ? o.ocn : nil) #Integer, sequential on substantive-content objects
+ odv= h[:odv] || ((defined? o.odv) ? o.odv : nil)
+ osp= h[:osp] || ((defined? o.osp) ? o.osp : nil)
+ parent= h[:parent] || ((defined? o.parent) ? o.parent : nil) #[Node parent]
+ ocn_= if h[:ocn_].nil?; ((defined? o.ocn_) ? o.ocn_ : true) #Bool? no ocn, non-substantive content, do not include in toc #consider
+ else h[:ocn_]
end
- digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
- tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
+ digest= h[:digest] || ((defined? o.digest) ? o.digest : nil) #hash digests, either sha256 or md5
+ tmp= h[:tmp] || ((defined? o.tmp) ? o.tmp : nil) #available for processing, empty after use
@of,@is,@tags,@obj,@idx,@ocn,@odv,@osp,@parent,@note_,@ocn_,@digest,@tmp=of,is,tags,obj,idx,ocn,odv,osp,parent,note_,ocn_,digest,tmp
@h=nil
self
diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb
index 2d4ee192..6eb2ee69 100644
--- a/lib/sisu/v2/dal_doc_str.rb
+++ b/lib/sisu/v2/dal_doc_str.rb
@@ -198,6 +198,7 @@ module SiSU_document_structure_extract
if t_o =~/^code\{/
@@flag['code']=true
@@counter=1
+ @codeblock_numbered=(t_o =~/^code\{#/) ? true : false
h={:obj=>'code block start'} #introduce a counter
t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h)
elsif t_o =~/^poem\{/
@@ -314,7 +315,7 @@ module SiSU_document_structure_extract
if t_o =~/^\}code/
@@flag['code']=false
obj,tags=extract_tags(@tuned_code.join("\n"))
- h={:obj=>obj,:tags=>tags}
+ h={:obj=>obj,:tags=>tags,:number_=>@codeblock_numbered}
t_o=SiSU_document_structure::Object_group.new.code(h)
@tuned_code=[]
tuned_file << t_o
diff --git a/lib/sisu/v2/dal_endnotes.rb b/lib/sisu/v2/dal_endnotes.rb
index 0ea1d148..95176516 100644
--- a/lib/sisu/v2/dal_endnotes.rb
+++ b/lib/sisu/v2/dal_endnotes.rb
@@ -74,7 +74,9 @@ module SiSU_endnotes
if @md.mod.inspect =~/--no-dagger|--no-annotate/
dob.obj.gsub!(/#{Mx[:en_b_o]}[+]\s.+?#{Mx[:en_b_c]}/,'')
end
- if defined? dob.obj and defined? dob.is and dob.is !~/^code/
+ if defined? dob.obj \
+ and defined? dob.is \
+ and dob.is !~/^code/
case dob.obj # auto-numbered endnotes <!e!> <!e_!> -->
when /#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}[*+]\s+.+?#{Mx[:en_b_c]}/
dob.obj.gsub!(/\s*(#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/,' \1') # required 2003w31
diff --git a/lib/sisu/v2/dal_syntax.rb b/lib/sisu/v2/dal_syntax.rb
index 2f78fbe6..fbc62158 100644
--- a/lib/sisu/v2/dal_syntax.rb
+++ b/lib/sisu/v2/dal_syntax.rb
@@ -427,14 +427,31 @@ module SiSU_Syntax
"#{Mx[:lnk_o]}\\1#{Mx[:lnk_c]}\\2") #linked image
elsif dob.is=='table'
dob=fontface(dob)
- elsif dob.is =='code' # /^<:code>/ #should be enough # underscore used as escape for angle brackets
+ elsif dob.is =='code'
+#p dob.obj
dob.obj.gsub!(/#{Mx[:meta_o]}(\S+?)#{Mx[:meta_c]}\s*/,'@\1: ')
dob.obj.gsub!(/([<>])/,'_\1')
dob.obj.gsub!(/_<:(\S+?)_>/,'<:\1>') #convert <:\S+> back, clumsy
dob.obj.gsub!(/_<(br(?: \/)?)_>/,'<\1>') #convert <br> <br /> back, clumsy
dob.obj.gsub!(/(^|#{Mx[:gl_c]}|\s)&lt;(br(?: \/)?)&gt;([\s,.]|$)/,'\1<\2>\3') #convert <br> <br /> back, clumsy
- dob.obj.gsub!(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}/,
- "\n#{Mx[:nbsp]}#{Mx[:nbsp]}") #temporary fix, prefer: #line.gsub!(/<:codeline>/,"\n")
+ if dob.number_
+ codeline=[]
+ ln=1
+ dob.obj.split(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}|<br(?: \/)?>|\n/).each_with_index do |cl,i|
+ unless i == 0
+ cl.gsub!(Mx[:br_nl],'')
+ w=3-ln.to_s.length
+ cl = "#{ln}#{Mx[:nbsp]*w}#{Mx[:vline]}#{Mx[:nbsp]}#{Mx[:nbsp]}#{cl}#{Mx[:br_nl]}"
+ ln +=1
+ end
+ codeline << cl
+ end
+ codeline= codeline.join("")
+ dob.obj=codeline
+ else
+ dob.obj.gsub!(/#{Mx[:gr_o]}codeline#{Mx[:gr_c]}/,
+ "\n#{Mx[:nbsp]}#{Mx[:nbsp]}") #temporary fix, prefer: #line.gsub!(/<:codeline>/,"\n")
+ end
dob
else # @\S+?:
end
diff --git a/lib/sisu/v2/defaults.rb b/lib/sisu/v2/defaults.rb
index 188b1869..362b67e5 100644
--- a/lib/sisu/v2/defaults.rb
+++ b/lib/sisu/v2/defaults.rb
@@ -1595,7 +1595,7 @@ WOK
</a>
<br />
<i>w3 since October 3 1993</i>
- <a href="mailto://ralph@amissah.com" #{js_mail}>
+ <a href="mailto:ralph@amissah.com" #{js_mail}>
ralph@amissah.com
</a>
</font></p>
@@ -1989,7 +1989,7 @@ SiSU is a comprehensive future-proofing electronic document management system.
Potential users of SiSU include individual authors who want to publish their books or articles electronically to reach a broad audience, web publishers who want to provide multiple channels of access to their electronic documents, or any organizations which centrally manage a medium or large set of electronic documents, especially governmental organizations which may prefer to keep their documents in easily accessible yet non-proprietary formats.
</p>
<p>
-SiSU is an Open Source project initiated and led by Ralph Amissah (<a href="mailto://ralph.amissah@gmail.com">ralph.amissah@gmail.com</a>) and can be contacted at <a href="mailto://sisu@lists.sisudoc.org">sisu@lists.sisudoc.org</a>. SiSU is licensed under the GNU General Public License.
+SiSU is an Open Source project initiated and led by Ralph Amissah (<a href="mailto:ralph.amissah@gmail.com">ralph.amissah@gmail.com</a>) and can be contacted via mailing list <a href="http://lists.sisudoc.org/listinfo/sisu">http://lists.sisudoc.org/listinfo/sisu</a> at <a href="mailto:sisu@lists.sisudoc.org">sisu@lists.sisudoc.org</a>. SiSU is licensed under the GNU General Public License.
</p>
<p class="bold">
For less markup than the most elementary HTML you can have more.
@@ -2151,21 +2151,26 @@ SiSU was developed in relation to legal documents, and is strong across a wide v
<p class="tiny">
SiSU has been developed and has been in use for several years. Requirements to cover a wide range of documents within its use domain have been explored.</p>
<p class="small">
-<a href="mailto://ralph@amissah.com">
+<a href="mailto:ralph@amissah.com">
ralph@amissah.com
</a>
</p>
<p class="small">
-<a href="mailto://ralph.amissah@gmail.com">
+<a href="mailto:ralph.amissah@gmail.com">
ralph.amissah@gmail.com
</a>
</p>
<p class="small">
-<a href="mailto://sisu@lists.sisudoc.org">
+<a href="mailto:sisu@lists.sisudoc.org">
sisu@lists.sisudoc.org.
</a>
</p>
<p class="small">
+<a href="http://lists.sisudoc.org/listinfo/sisu">
+http://lists.sisudoc.org/listinfo/sisu
+</a>
+</p>
+<p class="small">
#{@date.year_static}
</p>
<p class="tiny">
diff --git a/lib/sisu/v2/texpdf.rb b/lib/sisu/v2/texpdf.rb
index 32b0d2ff..3a868cd8 100644
--- a/lib/sisu/v2/texpdf.rb
+++ b/lib/sisu/v2/texpdf.rb
@@ -341,10 +341,6 @@ module SiSU_TeX
if dob.tmp =~/#{Mx[:lnk_o]}.+?#{Mx[:lnk_c]}#{Mx[:rel_o]}\S+?#{Mx[:rel_c]}/
dob.tmp=SiSU_TeX_Pdf::Format_text_object.new(@md,dob.tmp).url_str_internal(dob.tmp)
end
- if dob.is=='para' \
- and dob.bullet_
- dob.tmp='$\txtbullet$~~' + dob.tmp
- end
elsif dob.is =='break'
if dob.obj==Mx[:br_page]; dob.tmp='\newpage'
elsif dob.obj==Mx[:br_page_new]; dob.tmp='\clearpage'
@@ -406,7 +402,7 @@ module SiSU_TeX
@lineone=case dob.is
when /alt|group|verse/
dob.tmp.gsub!(/#{Mx[:nbsp]}/m,'{~}')
- dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$~~')
+ dob.tmp.gsub!(/#{Mx[:gl_bullet]}/m,'$\txtbullet$\hspace{\enspace}') #Bullet environment not used for grouped text, ∴ no hanging indent here
dob.tmp.gsub!(/#{Mx[:br_nl]}+/m,"\n\n") #match not ideal, but currently not inserting extra newlines anyway
ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob)
dob.tmp=if dob.is=='group' \
@@ -436,11 +432,13 @@ module SiSU_TeX
when /code/
sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp,dob.is)
dob.tmp=sp_char.special_characters_safe
- dob.tmp.gsub!(/#{Mx[:nbsp]}/,'{~}')
- #dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/,'{~}')
+ dob.tmp.gsub!(/#{Mx[:nbsp]}/,'{~}') #dob.tmp.gsub!(/#{Mx[:nbsp]}\s*/,'{~}')
+ dob.tmp.gsub!(/#{Mx[:vline]}/m,'\vline')
dob.tmp.gsub!(/ \\( |#{Mx[:br_nl]})/,' {\textbackslash}\1')
- dob.tmp.gsub!(/(?:#{Mx[:br_nl]}\s*)+/,' \\\\\\ ') #watch
- dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n") #watch
+ dob.tmp.gsub!(/#{Mx[:br_nl]}\s*\Z/m,'')
+ dob.tmp.gsub!(/#{Mx[:br_nl]}{2}/,'\newline \\\\\\ ')
+ dob.tmp.gsub!(/#{Mx[:br_nl]}/,' \\\\\\ ')
+ dob.tmp.gsub!(/\n\n\n/m," \\newline\n\n")
ocn=SiSU_TeX_Pdf::Format_text_object.new(@md).ocn_display(dob)
dob.tmp = ocn \
+ @tex_ml.paraskip_small \
@@ -506,7 +504,9 @@ module SiSU_TeX
else dob.tmp='' # dob.tmp={:l =>'',:p =>''}
end
when 'para'
- if dob.indent \
+ if dob.bullet_
+ dob.tmp=tst.bullet
+ elsif dob.indent \
and dob.indent =~/[1-9]/
dob.tmp=tst.indent
else
diff --git a/lib/sisu/v2/texpdf_format.rb b/lib/sisu/v2/texpdf_format.rb
index 36366c9b..9ebef9dc 100644
--- a/lib/sisu/v2/texpdf_format.rb
+++ b/lib/sisu/v2/texpdf_format.rb
@@ -295,7 +295,27 @@ module SiSU_TeX_Pdf
when /8/; '70mm'
when /9/; '80mm'
end
- "\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp} \\end{ParagraphIndent}}" #"\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp}\\end{ParagraphIndent}}"
+ "\\begin{ParagraphIndent}{#{indent}}#{@dob.tmp} \\end{ParagraphIndent}}"
+ end
+ def bullet
+ blt=if @dob.indent
+ indent=case @dob.indent
+ when /1/; '0em'
+ when /2/; '1.0em'
+ when /3/; '2.0em'
+ when /4/; '3.0em'
+ when /5/; '4.0em'
+ when /6/; '5.0em'
+ when /7/; '6.0em'
+ when /8/; '7.0em'
+ when /9/; '8.0em'
+ else '-1.0em'
+ end
+ "\\begin{Bullet}{#{indent}}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ else
+ "\\begin{Bullet}{-5mm}$\\txtbullet$\\hspace{\\enspace}#{@dob.tmp}\\end{Bullet}"
+ end
+ blt
end
def symbol_graphic
dir=SiSU_Env::Info_env.new(@md.fns)
@@ -918,6 +938,17 @@ WOK
\\item[]
}
{\\end{list}}
+\\newenvironment{Bullet}[1]%
+{
+\\begin{list}{}{%
+\\setlength\\topsep{0pt}%
+\\addtolength{\\leftmargin}{#1}
+\\itemindent=-1em
+\\setlength\\parsep{0pt plus 1pt}%
+}
+\\item[]
+}
+{\\end{list}}
\\usepackage{fancyhdr}
\\lhead{}
\\renewcommand{\\part}{\\\@startsection