Method: MaRuKu::Out::Latex#to_latex_header

Defined in:
lib/maruku/output/to_latex.rb

#to_latex_headerObject



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/maruku/output/to_latex.rb', line 289

def to_latex_header
	h = TexHeaders[self.level] || 'paragraph'
	
	title = children_to_latex
	if number = section_number
		title = number + title
	end
	
	if id = self.attributes[:id]
		# drop '#' at the beginning
		if id[0,1] == '#' then id = [1,id.size] end
		%{\\hypertarget{%s}{}\\%s*{{%s}}\\label{%s}\n\n} % [ id, h, title, id ]
	else
		%{\\%s*{%s}\n\n} % [ h, title]
	end
end