From c6d41d9367afc974fe60ca27cb890568609b5f12 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 27 Aug 2008 00:43:43 -0400 Subject: texpdf: paper use dimensions url and urlbreaks removal of a maths package gives back typeface changes like bold better representation of tilde changelog update --- lib/sisu/v0/defaults.rb | 22 +++++++++++----------- lib/sisu/v0/texpdf.rb | 1 + lib/sisu/v0/texpdf_format.rb | 36 +++++++++++++++++++----------------- 3 files changed, 31 insertions(+), 28 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v0/defaults.rb b/lib/sisu/v0/defaults.rb index 491be5ff..801b6434 100644 --- a/lib/sisu/v0/defaults.rb +++ b/lib/sisu/v0/defaults.rb @@ -2095,10 +2095,10 @@ WOK end def landscape def w - 262 + 250 end def h - 168 + 160 end def img_px 348 @@ -2113,7 +2113,7 @@ WOK 166 end def h - 216 + 212 end def img_px 468 @@ -2122,7 +2122,7 @@ WOK end def landscape def w - 242 + 234 end def h 166 @@ -2149,7 +2149,7 @@ WOK end def landscape def w - 314 + 306 end def h 166 @@ -2167,7 +2167,7 @@ WOK 140 end def h - 210 + 204 end def img_px 356 @@ -2176,10 +2176,10 @@ WOK end def landscape def w - 216 + 208 end def h - 136 + 130 end def img_px 280 @@ -2194,7 +2194,7 @@ WOK 112 end def h - 170 + 162 end def img_px 280 @@ -2203,10 +2203,10 @@ WOK end def landscape def w - 176 + 164 end def h - 110 + 100 end def img_px 230 diff --git a/lib/sisu/v0/texpdf.rb b/lib/sisu/v0/texpdf.rb index c5ee2092..19e0a119 100644 --- a/lib/sisu/v0/texpdf.rb +++ b/lib/sisu/v0/texpdf.rb @@ -542,6 +542,7 @@ module SiSU_TeX \\tolerance=500 \\makeatother \\makeatother +\\sloppy \\begin{document} WOK sisu_rc_footnote=if @md.sc_info; @tex.doc_sc_info_footnote_full diff --git a/lib/sisu/v0/texpdf_format.rb b/lib/sisu/v0/texpdf_format.rb index 55a9473f..58dca26e 100644 --- a/lib/sisu/v0/texpdf_format.rb +++ b/lib/sisu/v0/texpdf_format.rb @@ -701,7 +701,7 @@ WOK def tex_head_paper_landscape(d) </,' ') string.gsub!(/<\/a>/,' ') string.gsub!(/((?:^|\s)#{Mx[:lnk_c]})((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/, - '\1\begin{scriptsize}\\href{\2}{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url + '\1\begin{scriptsize}\url{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url string.gsub!(/[^\}>_]((?:https?|file|ftp):\/\/\S+?)(<\/\S>)/, - ' \begin{scriptsize}\href{\1}{\1} \end{scriptsize}\2') #special case + ' \begin{scriptsize}\url{\1} \end{scriptsize}\2') #special case string.gsub!(/\B(?:\\_|\\)((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/, - '\begin{scriptsize}\\href{\1}{\1}\end{scriptsize}\2') #specially escaped url no decoration + '\begin{scriptsize}\\url{\1}\end{scriptsize}\2') #specially escaped url no decoration unless @@flag_code string.gsub!(/(^|#{Mx[:gl_c]}|\s)((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/, - "\\1#{@url_brace.tex_open}\\begin{scriptsize}\\href{\\2}{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start + "\\1#{@url_brace.tex_open}\\begin{scriptsize}\\url{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start else #code-block: angle brackets special characters, note _ already escaped string.gsub!(/\\_/,'{\UseTextSymbol{OML}{>}}') @@ -1103,7 +1105,7 @@ WOK #string.gsub!(/<=gt>/,'\>') string.gsub!(/<=underscore>/,'\_') string.gsub!(/(\href\{http:\/\/\S+?)(?:(?:<=tilde>)(\S+))+\}/,'\1\~\2}') #tildes in urls \href treated differently from text - string.gsub!(/<=tilde>/,'{\~~}') + string.gsub!(/<=tilde>/,'{$\sim$}') string.gsub!(/<=pipe>/,'{\textbar}') string.gsub!(/<=caret>/,'{\^{~}}') #string.gsub!(/<=caret>/,'\^{}') @@ -1212,14 +1214,14 @@ WOK string.gsub!(//,' ') string.gsub!(/<\/a>/,' ') string.gsub!(/((?:^|\s)#{Mx[:lnk_c]})((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/, - '\1\begin{scriptsize}\\href{\2}{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url + '\1\begin{scriptsize}\url{\2}\end{scriptsize}\3') #special case \{ e.g. \}http://url string.gsub!(/[^\}>_]((?:https?|file|ftp):\/\/\S+?)(<\/\S>)/, - ' \begin{scriptsize}\href{\1}{\1} \end{scriptsize}\2') #special case + ' \begin{scriptsize}\url{\1} \end{scriptsize}\2') #special case string.gsub!(/\B(?:\\_|\\)((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?:\s|$))/, - '\begin{scriptsize}\\href{\1}{\1}\end{scriptsize}\2') #specially escaped url no decoration + '\begin{scriptsize}\\url{\1}\end{scriptsize}\2') #specially escaped url no decoration unless @@flag_code string.gsub!(/(^|#{Mx[:gl_c]}|\s)((?:https?|file|ftp):\/\/\S+?\.[^'"><\s]+?)([;.,]?(?=\s|$))/, - "\\1#{@url_brace.tex_open}\\begin{scriptsize}\\href{\\2}{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start + "\\1#{@url_brace.tex_open}\\begin{scriptsize}\\url{\\2}\\end{scriptsize}#{@url_brace.tex_close}\\3") #url matching with decoration positive lookahead, sequence issue with { linked }http://url cannot use \b at start else #code-block: angle brackets special characters, note _ already escaped string.gsub!(/\\_/,'{\UseTextSymbol{OML}{>}}') @@ -1274,7 +1276,7 @@ WOK #string.gsub!(/<=gt>/,'\>') string.gsub!(/<=underscore>/,'\_') string.gsub!(/(\href\{http:\/\/\S+?)(?:(?:<=tilde>)(\S+))+\}/,'\1\~\2}') #tildes in urls \href treated differently from text - string.gsub!(/<=tilde>/,'{\~~}') + string.gsub!(/<=tilde>/,'{$\sim$}') string.gsub!(/<=pipe>/,'{\textbar}') string.gsub!(/<=caret>/,'{\^{~}}') #string.gsub!(/<=caret>/,'\^{}') -- cgit v1.2.3