aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/io_out/latex.d
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc_reform/io_out/latex.d')
-rw-r--r--src/doc_reform/io_out/latex.d58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/doc_reform/io_out/latex.d b/src/doc_reform/io_out/latex.d
index cfa347c..b8e33f4 100644
--- a/src/doc_reform/io_out/latex.d
+++ b/src/doc_reform/io_out/latex.d
@@ -14,7 +14,7 @@ template outputLaTeX() {
auto lang = Lang();
auto paper() {
struct PaperType {
- auto a4() @safe {
+ @safe auto a4() {
struct A4 {
auto portrait() {
struct V {
@@ -35,7 +35,7 @@ template outputLaTeX() {
}
return A4();
}
- auto a5() @safe {
+ @safe auto a5() {
struct A5 {
auto portrait() {
struct V {
@@ -56,7 +56,7 @@ template outputLaTeX() {
}
return A5();
}
- auto b4() @safe {
+ @safe auto b4() {
struct B4 {
auto portrait() {
struct V {
@@ -77,7 +77,7 @@ template outputLaTeX() {
}
return B4();
}
- auto letter() @safe {
+ @safe auto letter() {
struct Letter {
auto portrait() {
struct V {
@@ -98,7 +98,7 @@ template outputLaTeX() {
}
return Letter();
}
- auto legal() @safe {
+ @safe auto legal() {
struct Legal {
auto portrait() {
struct V {
@@ -122,10 +122,10 @@ template outputLaTeX() {
}
return PaperType();
}
- string sp_char_esc(O)(
+ @safe string sp_char_esc(O)(
string _txt,
const O obj,
- ) @safe {
+ ) {
string _unescape_sp_char_esc()(string _txt) {
_txt = _txt
.replaceAll(rgx.latex_special_char_escaped,
@@ -147,9 +147,9 @@ template outputLaTeX() {
}
return _txt;
}
- string sp_char_esc_txt()(
+ @safe string sp_char_esc_txt()(
string _txt,
- ) @safe {
+ ) {
string _unescape_sp_char_esc()(string _txt) {
_txt = _txt
.replaceAll(rgx.latex_special_char_escaped,
@@ -169,9 +169,9 @@ template outputLaTeX() {
_txt = replaceAll!(m => _unescape_fontface_esc(m[0]))(_txt, rgx.latex_identify_inline_fontface);
return _txt;
}
- string fontface()(
+ @safe string fontface()(
string _txt,
- ) @safe {
+ ) {
_txt = _txt
.replaceAll(rgx.inline_emphasis, format(q"┃\begin{bfseries}%s\end{bfseries}┃", "$1"))
.replaceAll(rgx.inline_bold, format(q"┃\begin{bfseries}%s\end{bfseries}┃", "$1"))
@@ -185,9 +185,9 @@ template outputLaTeX() {
.replaceAll(rgx.inline_italics, format(q"┃``%s''┃", "$1"));
return _txt;
}
- string leading_hardspaces()(
+ @safe string leading_hardspaces()(
string _txt,
- ) @safe {
+ ) {
string hardspaces(string _spaces) {
_spaces = _spaces
.replaceAll(rgx.space, "\\hardspace ");
@@ -196,23 +196,23 @@ template outputLaTeX() {
_txt = replaceAll!(m => hardspaces(m[0]))(_txt, rgx.spaces_line_start);
return _txt;
}
- string nbsp_char()(string _txt) @safe {
+ @safe string nbsp_char()(string _txt) {
if (_txt.match(rgx.nbsp_char)) {
_txt = _txt.replaceAll(rgx.nbsp_char, "\\hardspace ");
}
return _txt;
}
- string nbsp_char_to_space()(string _txt) @safe {
+ @safe string nbsp_char_to_space()(string _txt) {
if (_txt.match(rgx.nbsp_char)) {
_txt = _txt.replaceAll(rgx.nbsp_char, " ");
}
return _txt;
}
- string links_and_images(O,M)(
+ @safe string links_and_images(O,M)(
string _txt,
const O obj,
M doc_matters,
- ) @safe {
+ ) {
if (obj.has.inline_links) { // TODO some images do not have inline links ... image without link
string _width_adjust(string _width) {
if (_width.to!int > 300) { _width = "300"; } // will need to vary max with papersize & orientation
@@ -253,9 +253,9 @@ template outputLaTeX() {
}
return _txt;
}
- string footnotes()(
+ @safe string footnotes()(
string _txt,
- ) @safe {
+ ) {
if (_txt.match(rgx.inline_notes_al_gen)) {
string _tex_note = q"┃\hypertarget{noteref_%s}{}\footnote[%s]{%%
\label{note_%s}%s}┃";
@@ -268,18 +268,18 @@ template outputLaTeX() {
}
return _txt;
}
- string remove_footnotes()(
+ @safe string remove_footnotes()(
string _txt,
- ) @safe {
+ ) {
if (_txt.match(rgx.inline_notes_al_gen)) {
_txt = replaceAll!(m => "")(_txt, rgx.inline_notes_al_gen);
}
return _txt;
}
- string para(O)(
+ @safe string para(O)(
string _txt,
O obj,
- ) @safe {
+ ) {
if (obj.metainfo.is_of_type == "para") {
string _tex_para;
_tex_para = q"┃\begin{tiny}\hspace{0mm}\end{tiny}{\marginpar{\begin{tiny}\hspace{0mm}\hypertarget{%s}{%s}\end{tiny}}}%s┃";
@@ -291,10 +291,10 @@ template outputLaTeX() {
}
return _txt;
}
- string bookindex(O)(
+ @safe string bookindex(O)(
string _txt,
O obj,
- ) @safe {
+ ) {
if (obj.metainfo.is_of_type == "para"
&& obj.metainfo.is_a == "bookindex"
) {
@@ -306,12 +306,12 @@ template outputLaTeX() {
}
return _txt;
}
- string heading(O,M)(
+ @safe string heading(O,M)(
string _txt,
O obj,
M doc_matters,
string _part = ""
- ) @safe {
+ ) {
if (obj.metainfo.is_a == "heading") {
string _tex_para;
string _pg_break;
@@ -641,10 +641,10 @@ string table(O,M)(
}
return _txt;
}
- string bullets_and_indentation(O)(
+ @safe string bullets_and_indentation(O)(
string _txt,
O obj,
- ) @safe {
+ ) {
string _tex_para;
string _hang; string _indent;
int _paper_margin = -10;