aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/texpdf_format.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2010-10-14 14:56:47 -0400
committerRalph Amissah <ralph@amissah.com>2010-10-14 14:56:50 -0400
commit1f20600f772b6006b8a87a7883a098d258bb2277 (patch)
treea33c4276e781d96b1ed68dd5f5daff4a7b57c93b /lib/sisu/v2/texpdf_format.rb
parentcodeblocks, numbered markup option, fix (diff)
texpdf, bullet text, hanging indent, fix
(works for regular text (not grouped text) (requested fix, Ben Armstrong)
Diffstat (limited to 'lib/sisu/v2/texpdf_format.rb')
-rw-r--r--lib/sisu/v2/texpdf_format.rb33
1 files changed, 32 insertions, 1 deletions
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