From 60bd031de5561592c97a40345ea9791d895ee8d0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 26 Jun 2011 14:21:07 -0400 Subject: v3: ansi screen reporting include document language code --- lib/sisu/v3/texpdf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/sisu/v3/texpdf.rb') diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 918e00a2..c9e0f032 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -103,11 +103,11 @@ module SiSU_TeX def song begin @md=@particulars.md - SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',@md.fns).green_title_hi unless @opt.cmd =~/q/ + SiSU_Screen::Ansi.new(@opt.cmd,'LaTeX/PDF',"[#{@opt.f_pth[:lng_is]}] #{@opt.fns}").green_title_hi unless @opt.cmd =~/q/ if @opt.cmd =~/[MVv]/ path=@env.url.output_tell SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_l}pdf").flow - SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").flow + SiSU_Screen::Ansi.new(@opt.cmd,@opt.fns,"#{@opt.fns} #{@env.program.pdf_viewer} #{@md.file.output_path.pdf.dir}/#{@md.file.base_filename.pdf_p}pdf").flow end @md=@particulars.md $flag=@md.opt.cmd #introduced to pass 0 for no object citation numbers... to texpdf_format -- cgit v1.2.3 From 7ef0302aa8c9e810bd9d8de86a2b92a2d9bea0fe Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 26 Jun 2011 14:40:52 -0400 Subject: v2 v3: texpdf, define hardspace & provide backslash * define \hardspace to simplify placing a hardspace * provide backslash character in code block --- lib/sisu/v3/texpdf.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sisu/v3/texpdf.rb') diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index c9e0f032..0f16e991 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -349,6 +349,8 @@ 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 + elsif dob.is =='code' + dob.tmp=SiSU_TeX_Pdf::Special_characters.new(@md,dob.tmp).special_characters_code elsif dob.is =='break' if dob.obj==Mx[:br_page]; dob.tmp='\newpage' elsif dob.obj==Mx[:br_page_new]; dob.tmp='\clearpage' @@ -582,6 +584,8 @@ module SiSU_TeX \\newcommand{\\Codeblock}[1]{\\normaltext\\raggedright\\small\\ttfamily\\texbackslash#1} \\newcommand{\\monosp}[1]{\\normaltext\\ttfamily\\texbackslash#1} \\newcommand{\\parasep}{\\\\ \\begin{center}*\\hspace{2em}*\\hspace{2em}*\\end{center} \\\\} +\\newcommand{\\hardspace}{{~}} +%\\newcommand{\\hardspace}{\\hspace{.5em}} % \\sloppy \\begin{document} WOK -- cgit v1.2.3 From d95f8574ec670222f7236033e7b188c7b5a099ab Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 26 Jun 2011 14:50:18 -0400 Subject: v3: define latex \newcommands for some special characters (for sisu code) * \newcommands for some special characters to simplify dealing with them in sisu code \hardspace \caret \pipe \curlyopen \curlyclose \lt \gt \slash \backslash \underscore \exclaim --- lib/sisu/v3/texpdf.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v3/texpdf.rb') diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb index 0f16e991..522480fd 100644 --- a/lib/sisu/v3/texpdf.rb +++ b/lib/sisu/v3/texpdf.rb @@ -462,10 +462,6 @@ module SiSU_TeX dob else 'error' #should never occur end - if dob.tmp =~/<=curly/ #takes care of escaped curly braces, expand - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob) - dob.tmp=sp_char.special_characters_curly(dob.tmp) - end dob=enclose(dob) unless dob.tmp =~/^$/ dob else @@ -533,10 +529,6 @@ module SiSU_TeX dob.tmp.gsub!(/\s*(?:#{Mx[:br_line]}|#{Mx[:br_nl]})\s*/,' \newline ') #% tread with care dob.tmp.gsub!(/(\.#{Tex[:tilde]}\S*\s*|<:\S+>|#{Mx[:fa_o]}.*?#{Mx[:fa_c]}|#{Mx[:gr_o]}.*?#{Mx[:gr_c]}||)/,' ') #% tread with care end - if dob.tmp =~/<=curly/ #takes care of escaped curly braces, expand - sp_char=SiSU_TeX_Pdf::Special_characters.new(@md,dob) - dob.tmp=sp_char.special_characters_curly(dob.tmp) - end dob end if dob.tmp =~/(?:#{Mx[:url_o]}\S+?#{Mx[:url_c]}|image\b)/m \ @@ -586,6 +578,16 @@ module SiSU_TeX \\newcommand{\\parasep}{\\\\ \\begin{center}*\\hspace{2em}*\\hspace{2em}*\\end{center} \\\\} \\newcommand{\\hardspace}{{~}} %\\newcommand{\\hardspace}{\\hspace{.5em}} +\\newcommand{\\caret}{{\\^{~}}} +\\newcommand{\\pipe}{{\\textbar}} +\\newcommand{\\curlyopen}{\{} +\\newcommand{\\curlyclose}{\}} +\\newcommand{\\lt}{{\UseTextSymbol{OML}{<}}} +\\newcommand{\\gt}{{\UseTextSymbol{OML}{>}}} +\\newcommand{\\slash}{{/}} +\\newcommand{\\underscore}{\\_} +\\newcommand{\\exclaim}{\\Verbatim{!}} +% (tilde hash amp affected by http) % \\sloppy \\begin{document} WOK -- cgit v1.2.3