aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2012-10-01 15:17:03 -0400
committerRalph Amissah <ralph@amissah.com>2012-10-01 15:17:03 -0400
commitd96753b4e4b7b0f2748064bc35aeaa8418deb7fa (patch)
tree6591aa80f6044d391b09ad2d986acece5df80c8c
parentv3: pdflatex, landscape cover page was botched, came out as portrait, fix (diff)
v3: texpdf fixes
* group text, bullet * group text, hardspaces at start of line (indent) * group text, pass through special characters safe * poem, bold etc.
-rw-r--r--data/doc/sisu/CHANGELOG_v36
-rw-r--r--lib/sisu/v3/texpdf.rb8
2 files changed, 12 insertions, 2 deletions
diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3
index 9a46ae93..93ce9c8c 100644
--- a/data/doc/sisu/CHANGELOG_v3
+++ b/data/doc/sisu/CHANGELOG_v3
@@ -51,6 +51,12 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.3.3.orig.tar.xz
* v3: pdflatex, fixes
* landscape cover page was botched, came out as portrait
+* v3: pdf, fix
+ * group text, bullet
+ * group text, hardspaces at start of line (indent)
+ * group text, pass through special characters safe
+ * poem, bold etc.
+
%% 3.3.2.orig.tar.xz (2012-06-30:26/6)
http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/sisu_3.3.2
http://git.sisudoc.org/?p=code/sisu.git;a=log;h=refs/tags/debian/sisu_3.3.2-1
diff --git a/lib/sisu/v3/texpdf.rb b/lib/sisu/v3/texpdf.rb
index 4c224b22..618c891e 100644
--- a/lib/sisu/v3/texpdf.rb
+++ b/lib/sisu/v3/texpdf.rb
@@ -468,13 +468,14 @@ module SiSU_TeX
|| dob.is==:group \
|| dob.is==:alt \
|| dob.is==:verse
- dob.tmp=dob.tmp.gsub(/#{Mx[:nbsp]}/m,'{~}').
- gsub(/#{Mx[:gl_bullet]}/m,'$\txtbullet$\hspace{\enspace}'). #Bullet environment not used for grouped text, ∴ no hanging indent here
+ dob.tmp=dob.tmp.gsub(/#{Mx[:nbsp]}/m,' \hardspace ').
+ gsub(/#{Mx[:gl_bullet]}/m,'\txtbullet \hardspace '). #Bullet environment not used for grouped text, no hanging indent here
gsub(/#{Mx[:br_nl]}+/m,"\n\n") #match not ideal, but currently not inserting extra newlines anyway
ocn=SiSU_TeX_Pdf::FormatTextObject.new(@md).ocn_display(dob)
dob.tmp=if dob.is==:group \
|| dob.is==:block \
|| dob.is==:alt
+ dob.tmp=SiSU_TeX_Pdf::SpecialCharacters.new(@md,dob.tmp).special_characters_safe
ocn \
+ @tex_ml.paraskip_small \
+ "\n" \
@@ -485,6 +486,9 @@ module SiSU_TeX
+ "\n" \
+ @tex_ml.paraskip_normal
elsif dob.is==:verse
+ dob.tmp=dob.tmp.gsub(/#{Mx[:fa_bold_o]}(.+?)#{Mx[:fa_bold_c]}/m,'\begin{bfseries}\1 \end{bfseries}').
+ gsub(/#{Mx[:fa_italics_o]}(.+?)#{Mx[:fa_italics_c]}/m,'\emph{\1}').
+ gsub(/#{Mx[:fa_underscore_o]}(.+?)#{Mx[:fa_underscore_c]}/m,'\uline{\1}')
ocn \
+ @tex_ml.paraskip_tiny \
+ "\n" \