From 7ef0238f4ffd4eb5a669ecd4bf83735a93f80db5 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 16 Jul 2019 11:36:47 -0400 Subject: texpdf, indent values, use formula (to replace table) - values changed to work better with portrait a4 & letter --- data/doc/sisu/CHANGELOG_v7 | 3 + lib/sisu/texpdf_format.rb | 135 +-------------------------------------------- 2 files changed, 6 insertions(+), 132 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v7 b/data/doc/sisu/CHANGELOG_v7 index 0eb18e7f..47c647d9 100644 --- a/data/doc/sisu/CHANGELOG_v7 +++ b/data/doc/sisu/CHANGELOG_v7 @@ -25,6 +25,9 @@ Reverse Chronological: * sisu_7.1.12.orig.tar.xz (Open commit window: 2019-07-16; Pre-Release) http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.12 + - texpdf, indent values, use formula (to replace table) + values changed to work better with portrait a4 & letter + * sisu_7.1.11.orig.tar.xz (2017-07-14:28/5) http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.11 diff --git a/lib/sisu/texpdf_format.rb b/lib/sisu/texpdf_format.rb index 5549a245..5c9d2c9d 100644 --- a/lib/sisu/texpdf_format.rb +++ b/lib/sisu/texpdf_format.rb @@ -318,138 +318,9 @@ module SiSU_TeX_Pdf heading_sublevels(@dob) end def hang - case @dob.indent - when /0/ - case @dob.hang - when /0/ then indent,hang='0mm', '0mm' - when /1/ then indent,hang='0mm','10mm' - when /2/ then indent,hang='0mm','20mm' - when /3/ then indent,hang='0mm','30mm' - when /4/ then indent,hang='0mm','40mm' - when /5/ then indent,hang='0mm','50mm' - when /6/ then indent,hang='0mm','60mm' - when /7/ then indent,hang='0mm','70mm' - when /8/ then indent,hang='0mm','80mm' - when /9/ then indent,hang='0mm','90mm' - end - when /1/ - case @dob.hang - when /0/ then indent,hang='10mm','-10mm' - when /1/ then indent,hang='10mm', '0mm' - when /2/ then indent,hang='10mm', '10mm' - when /3/ then indent,hang='10mm', '20mm' - when /4/ then indent,hang='10mm', '30mm' - when /5/ then indent,hang='10mm', '40mm' - when /6/ then indent,hang='10mm', '50mm' - when /7/ then indent,hang='10mm', '60mm' - when /8/ then indent,hang='10mm', '70mm' - when /9/ then indent,hang='10mm', '80mm' - end - when /2/ - case @dob.hang - when /0/ then indent,hang='20mm','-20mm' - when /1/ then indent,hang='20mm','-10mm' - when /2/ then indent,hang='20mm', '0mm' - when /3/ then indent,hang='20mm', '10mm' - when /4/ then indent,hang='20mm', '20mm' - when /5/ then indent,hang='20mm', '30mm' - when /6/ then indent,hang='20mm', '40mm' - when /7/ then indent,hang='20mm', '50mm' - when /8/ then indent,hang='20mm', '60mm' - when /9/ then indent,hang='20mm', '70mm' - end - when /3/ - case @dob.hang - when /0/ then indent,hang='30mm','-30mm' - when /1/ then indent,hang='30mm','-20mm' - when /2/ then indent,hang='30mm','-10mm' - when /3/ then indent,hang='30mm', '0mm' - when /4/ then indent,hang='30mm', '10mm' - when /5/ then indent,hang='30mm', '20mm' - when /6/ then indent,hang='30mm', '30mm' - when /7/ then indent,hang='30mm', '40mm' - when /8/ then indent,hang='30mm', '50mm' - when /9/ then indent,hang='30mm', '60mm' - end - when /4/ - case @dob.hang - when /0/ then indent,hang='40mm','-40mm' - when /1/ then indent,hang='40mm','-30mm' - when /2/ then indent,hang='40mm','-20mm' - when /3/ then indent,hang='40mm','-10mm' - when /4/ then indent,hang='40mm', '0mm' - when /5/ then indent,hang='40mm', '10mm' - when /6/ then indent,hang='40mm', '20mm' - when /7/ then indent,hang='40mm', '30mm' - when /8/ then indent,hang='40mm', '40mm' - when /9/ then indent,hang='40mm', '50mm' - end - when /5/ - case @dob.hang - when /0/ then indent,hang='50mm','-50mm' - when /1/ then indent,hang='50mm','-40mm' - when /2/ then indent,hang='50mm','-30mm' - when /3/ then indent,hang='50mm','-20mm' - when /4/ then indent,hang='50mm','-10mm' - when /5/ then indent,hang='50mm', '0mm' - when /6/ then indent,hang='50mm', '10mm' - when /7/ then indent,hang='50mm', '20mm' - when /8/ then indent,hang='50mm', '30mm' - when /9/ then indent,hang='50mm', '40mm' - end - when /6/ - case @dob.hang - when /0/ then indent,hang='60mm','-60mm' - when /1/ then indent,hang='60mm','-50mm' - when /2/ then indent,hang='60mm','-40mm' - when /3/ then indent,hang='60mm','-30mm' - when /4/ then indent,hang='60mm','-20mm' - when /5/ then indent,hang='60mm','-10mm' - when /6/ then indent,hang='60mm', '0mm' - when /7/ then indent,hang='60mm', '10mm' - when /8/ then indent,hang='60mm', '20mm' - when /9/ then indent,hang='60mm', '30mm' - end - when /7/ - case @dob.hang - when /0/ then indent,hang='70mm','-70mm' - when /1/ then indent,hang='70mm','-60mm' - when /2/ then indent,hang='70mm','-50mm' - when /3/ then indent,hang='70mm','-40mm' - when /4/ then indent,hang='70mm','-30mm' - when /5/ then indent,hang='70mm','-20mm' - when /6/ then indent,hang='70mm','-10mm' - when /7/ then indent,hang='70mm', '0mm' - when /8/ then indent,hang='70mm', '10mm' - when /9/ then indent,hang='70mm', '20mm' - end - when /8/ - case @dob.hang - when /0/ then indent,hang='80mm','-80mm' - when /1/ then indent,hang='80mm','-70mm' - when /2/ then indent,hang='80mm','-60mm' - when /3/ then indent,hang='80mm','-50mm' - when /4/ then indent,hang='80mm','-40mm' - when /5/ then indent,hang='80mm','-30mm' - when /6/ then indent,hang='80mm','-20mm' - when /7/ then indent,hang='80mm','-10mm' - when /8/ then indent,hang='80mm', '0mm' - when /9/ then indent,hang='80mm', '10mm' - end - when /9/ - case @dob.hang - when /0/ then indent,hang='90mm','-90mm' - when /1/ then indent,hang='90mm','-80mm' - when /2/ then indent,hang='90mm','-70mm' - when /3/ then indent,hang='90mm','-60mm' - when /4/ then indent,hang='90mm','-50mm' - when /5/ then indent,hang='90mm','-40mm' - when /6/ then indent,hang='90mm','-30mm' - when /7/ then indent,hang='90mm','-20mm' - when /8/ then indent,hang='90mm','-10mm' - when /9/ then indent,hang='90mm', '0mm' - end - end + _idt=10 + indent = "#{_idt*(@dob.indent.to_i-1)}mm" + hang = "#{_idt*(@dob.hang.to_i - @dob.indent.to_i)}mm" "\\begin{ParagraphHang}{#{indent}}{#{hang}}#{@dob.tmp} \\end{ParagraphHang}}" end def indent -- cgit v1.2.3