diff options
Diffstat (limited to 'src/doc_reform/io_out/latex.d')
-rw-r--r-- | src/doc_reform/io_out/latex.d | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d index a47e81c..8c792ff 100644 --- a/src/doc_reform/io_out/latex.d +++ b/src/doc_reform/io_out/latex.d @@ -48,6 +48,7 @@ +/ module doc_reform.io_out.latex; +@safe: template paperLaTeX() { import std.format, @@ -58,7 +59,7 @@ template paperLaTeX() { return _mm; } struct PaperType { - @safe auto a4() { + auto a4() { struct A4 { auto portrait() { struct V { @@ -109,7 +110,7 @@ template paperLaTeX() { } return A4(); } - @safe auto a5() { + auto a5() { struct A5 { auto portrait() { struct V { @@ -160,7 +161,7 @@ template paperLaTeX() { } return A5(); } - @safe auto b4() { + auto b4() { struct B4 { auto portrait() { struct V { @@ -211,7 +212,7 @@ template paperLaTeX() { } return B4(); } - @safe auto letter() { + auto letter() { struct Letter { auto portrait() { struct V { @@ -262,7 +263,7 @@ template paperLaTeX() { } return Letter(); } - @safe auto legal() { + auto legal() { struct Legal { auto portrait() { struct V { @@ -335,7 +336,7 @@ template outputLaTeX() { mixin spineLanguageCodes; auto lang = Lang(); auto paper = paperLaTeX; - @safe string sp_char_ops()( + string sp_char_ops()( string _txt, ) { string _unescape_sp_char_esc()(string _txt) { @@ -359,7 +360,7 @@ template outputLaTeX() { _txt = replaceAll!(m => _unescape_fontface_esc(m[0]))(_txt, rgx_sc.latex_identify_inline_fontface); return _txt; } - @safe string sp_char_esc(O)( + string sp_char_esc(O)( string _txt, const O obj, ) { @@ -368,20 +369,20 @@ template outputLaTeX() { } return _txt; } - @safe string sp_char_esc_txt()( + string sp_char_esc_txt()( string _txt, ) { _txt = _txt.sp_char_ops; return _txt; } - @safe string marked_linebreaks_newlines()( + string marked_linebreaks_newlines()( string _txt, ) { _txt = _txt.split(rgx.br_linebreaks_newlines).join("\\br\n").strip; // _txt = replaceAll!(m => "\\br " ~ m[1])(_txt, rgx.br_linebreaks_newlines); return _txt; } - @safe string fontface()( + string fontface()( string _txt, ) { _txt = _txt @@ -397,7 +398,7 @@ template outputLaTeX() { .replaceAll(rgx.inline_italics, format(q"┃``%s''┃", "$1")); return _txt; } - @safe string leading_hardspaces()( + string leading_hardspaces()( string _txt, ) { string hardspaces(string _spaces) { @@ -408,7 +409,7 @@ template outputLaTeX() { _txt = replaceAll!(m => hardspaces(m[0]))(_txt, rgx.spaces_line_start); return _txt; } - @safe string nbsp_char()(string _txt) { + string nbsp_char()(string _txt) { if (_txt.match(rgx.nbsp_char)) { foreach (m; _txt.matchAll(rgx.nbsp_chars)) { int spaces_ = 0; @@ -420,7 +421,7 @@ template outputLaTeX() { } return _txt; } - @safe string spaces_to_nbsp()(string _txt) { + string spaces_to_nbsp()(string _txt) { if (_txt.match(rgx.spaces_keep)) { foreach (m; _txt.matchAll(rgx.spaces_keep)) { int spaces_ = 0; @@ -432,13 +433,13 @@ template outputLaTeX() { } return _txt; } - @safe string nbsp_char_to_space()(string _txt) { + string nbsp_char_to_space()(string _txt) { if (_txt.match(rgx.nbsp_char)) { _txt = _txt.replaceAll(rgx.nbsp_char, " "); } return _txt; } - @safe string links_and_images(O,M)( + string links_and_images(O,M)( string _txt, const O obj, M doc_matters, @@ -485,7 +486,7 @@ template outputLaTeX() { } return _txt; } - @safe string footnotes()( + string footnotes()( string _txt, ) { if (_txt.match(rgx.inline_notes_al_gen)) { @@ -500,7 +501,7 @@ template outputLaTeX() { } return _txt; } - @safe string remove_footnotes()( + string remove_footnotes()( string _txt, ) { if (_txt.match(rgx.inline_notes_al_gen)) { @@ -508,7 +509,7 @@ template outputLaTeX() { } return _txt; } - @safe string para(O)( + string para(O)( string _txt, O obj, ) { @@ -522,7 +523,7 @@ template outputLaTeX() { } return _txt; } - @safe string bookindex(O)( + string bookindex(O)( string _txt, O obj, ) { @@ -537,7 +538,7 @@ template outputLaTeX() { } return _txt; } - @safe string heading(O,M)( + string heading(O,M)( string _txt, O obj, M doc_matters, @@ -932,7 +933,7 @@ template outputLaTeX() { } return _txt; } - @safe string bullets_and_indentation(O)( + string bullets_and_indentation(O)( string _txt, O obj, ) { |