aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/out_latex.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/out_latex.org')
-rw-r--r--org/out_latex.org31
1 files changed, 17 insertions, 14 deletions
diff --git a/org/out_latex.org b/org/out_latex.org
index 7e235b6..1c1442b 100644
--- a/org/out_latex.org
+++ b/org/out_latex.org
@@ -134,7 +134,6 @@ template outputLaTeX() {
#+BEGIN_SRC d
template outputLaTeXstyInit() {
import doc_reform.io_out;
- mixin spineRgxOut;
auto paper = paperLaTeX;
<<Function_output_style_write>>
<<Function_output_stylesheets_get_each_written>>
@@ -627,10 +626,14 @@ import
std.outbuffer,
std.uri,
std.conv : to;
-import doc_reform.io_out;
-mixin InternalMarkup; // watch
+import
+ doc_reform.io_out,
+ doc_reform.io_out.rgx,
+ doc_reform.io_out.rgx_latex;
mixin spineRgxOut;
static auto rgx = RgxO();
+mixin spineRgxLSC;
+static auto rgx_sc = RgxLSC();
mixin spineLanguageCodes;
auto lang = Lang();
auto paper = paperLaTeX;
@@ -921,23 +924,23 @@ struct PaperType {
) {
string _unescape_sp_char_esc()(string _txt) {
_txt = _txt
- .replaceAll(rgx.latex_special_char_escaped,
+ .replaceAll(rgx_sc.latex_special_char_escaped,
format(q"┃%s┃", "$1"))
- .replaceAll(rgx.latex_special_char_escaped_braced,
+ .replaceAll(rgx_sc.latex_special_char_escaped_braced,
format(q"┃%s┃", "$1"));
return _txt;
}
string _unescape_fontface_esc()(string _txt) {
- _txt = _txt.replaceAll(rgx.latex_identify_inline_fontface,
+ _txt = _txt.replaceAll(rgx_sc.latex_identify_inline_fontface,
format(q"┃%s%s┃", "$1", "$2"));
return _txt;
}
- _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx.latex_special_char_for_escape);
- _txt = replaceAll!(m => "{\\" ~ m[1] ~ "}")(_txt, rgx.latex_special_char_for_escape_and_braces);
+ _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx_sc.latex_special_char_for_escape);
+ _txt = replaceAll!(m => "{\\" ~ m[1] ~ "}")(_txt, rgx_sc.latex_special_char_for_escape_and_braces);
_txt = replaceAll!(m => "''")(_txt, rgx.quotes_open_and_close);
_txt = replaceAll!(m => "$\\cdot$")(_txt, rgx.middle_dot);
- _txt = replaceAll!(m => _unescape_sp_char_esc(m[0]))(_txt, rgx.latex_identify_inline_link);
- _txt = replaceAll!(m => _unescape_fontface_esc(m[0]))(_txt, rgx.latex_identify_inline_fontface);
+ _txt = replaceAll!(m => _unescape_sp_char_esc(m[0]))(_txt, rgx_sc.latex_identify_inline_link);
+ _txt = replaceAll!(m => _unescape_fontface_esc(m[0]))(_txt, rgx_sc.latex_identify_inline_fontface);
return _txt;
}
#+END_SRC
@@ -986,7 +989,7 @@ struct PaperType {
@safe string sp_char_esc_()(
string _txt,
) {
- _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx.latex_special_char);
+ _txt = replaceAll!(m => "\\" ~ m[1])(_txt, rgx_sc.latex_special_char);
return _txt;
}
#+END_SRC
@@ -1125,8 +1128,8 @@ _txt = _txt
}
string _check_link(string _link) {
_link = _link
- .replaceFirst(rgx.latex_clean_internal_link, "")
- .replaceAll(rgx.latex_special_char_for_escape_url, "\\$1");
+ .replaceFirst(rgx_sc.latex_clean_internal_link, "")
+ .replaceAll(rgx_sc.latex_special_char_for_escape_url, "\\$1");
return _link;
}
if (obj.metainfo.is_a != "code") {
@@ -1219,7 +1222,7 @@ _txt = _txt
string _tex_para;
_tex_para = q"┃%s┃";
_txt = format(_tex_para,
- _txt.replaceAll(rgx.latex_clean_bookindex_linebreak, "\n") ~ "\n\\brln\n"
+ _txt.replaceAll(rgx_sc.latex_clean_bookindex_linebreak, "\n") ~ "\n\\brln\n"
);
}
return _txt;