Class: Tilt::DynTtmTemplate
Class Method Summary
collapse
Instance Method Summary
collapse
#evaluate, init, #init_dyndoc, #initialize_engine, #prepare, #process_dyndoc, #reinit_dyndoc
Class Method Details
.engine_initialized? ⇒ Boolean
114
115
116
|
# File 'lib/dyndoc/common/tilt.rb', line 114
def self.engine_initialized?
defined? ::DynTtm
end
|
Instance Method Details
#prepare_output ⇒ Object
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
# File 'lib/dyndoc/common/tilt.rb', line 118
def prepare_output
=begin
ttm_preamble = <<-PREAMBLE
\def\hyperlink#1#2{\special{html:<a href="\##1">}#2\special{html:</a>}}
% Incorrect link name in \TeX\ because # can't be passed properly to a special.
\def\hypertarget#1#2{\special{html:<a name="#1">}#2\special{html:</a>}}
\long\def\ttmdump#1{#1} % Do nothing. The following are not done for TtM.
\ttmdump{%
\def\title#1{\bgroup\leftskip 0 pt plus1fill \rightskip 0 pt plus1fill
\pretolerance=100000 \lefthyphenmin=20 \righthyphenmin=20
\noindent #1 \par\egroup}% Centers a possibly multi-line title.
\let\author=\title % Actually smaller font than title in \LaTeX.
\input epsf % PD package defines \epsfbox for figure inclusion
% Macro for http reference inclusion, per hypertex.
\def\href#1#2{\special{html:<a href="#1">}#2\special{html:</a>}}
\def\urlend#1{#1\endgroup}
\def\url{\begingroup \tt
\catcode`\_=13 % Don't know why this works.
\catcode`\~=11 \catcode`\#=11 \catcode`\^=11
\catcode`\$=11 \catcode`\&=11 \catcode`\%=11
\urlend}% \url for plain \TeX.
PREAMBLE
=end
CqlsDoc::Converter.ttm($curDyn.tmpl_doc.make_content(data),"-e2 -r -y1 -L").gsub(/<mtable[^>]*>/,"<mtable>").gsub("\\ngtr","<mtext>≯</mtext>").gsub("\\nless","<mtext>≮</mtext>").gsub("è","<mtext>è</mtext>")
end
|