; docformat = 'rst' ;+ ; Text to include afer a markup node of the given type. ; ; :Private: ; ; :Returns: ; string ; ; :Params: ; type : in, required, type=string ; type of MGtmNode ; ; :Keywords: ; newline : out, optional, type=boolean, default=0 ; set to a named variable to get whether a newline should be added ; at the given node ;- function mgtmlatex::_preTag, type, newline=newline, tag=tag compile_opt strictarr case type of '' : return, '' 'bold' : return, '\textbf{' 'image': begin location = tag->getAttribute('location') src = tag->getAttribute('source') return, '\hspace{0.5em}' + string([13B, 10B, 13B, 10B]) + '\includegraphics[scale=0.6]{' + location + src + '}' end 'listing': return, '\begin{verbatim}' 'newline' : begin newline = 1 return, '' end else : return, '' endcase end ;+ ; Text to include after a markup node of the given type. ; ; :Private: ; ; :Returns: ; string ; ; :Params: ; type : in, required, type=string ; type of MGtmNode ; ; :Keywords: ; newline : out, optional, type=boolean, default=0 ; set to a named variable to get whether a newline should be added ; at the given node ;- function mgtmlatex::_postTag, type, newline=newline, tag=tag compile_opt strictarr case type of '' : return, '' 'bold' : return, '}' 'image': return, string([13B, 10B, 13B, 10B]) + '\hspace{0.5em}' 'listing': return, '\end{verbatim}' 'newline' : return, '' else : return, '' endcase end ;+ ; Define MGtmLaTeX class for processing LaTeX. ;- pro mgtmlatex__define compile_opt strictarr define = { mgtmlatex, inherits mgtmlanguage } end