# HG changeset patch # User Kai T. Ohlhus # Date 1471359462 -7200 # Node ID 3732bee6951067f749aa955e2b163e69e6b40a0a # Parent 2cd1afd0f12f3259a4bee14dfcbfd44d6ec10ad1 publish.m: math formatting prevention for more than nine formulas. diff -r 2cd1afd0f12f -r 3732bee69510 scripts/general/publish.m --- a/scripts/general/publish.m Tue Aug 16 16:23:00 2016 +0200 +++ b/scripts/general/publish.m Tue Aug 16 16:57:42 2016 +0200 @@ -829,7 +829,7 @@ str = regexprep (str, '\|([^|$_*]*)\|', formatter ("monospaced", "$1")); until (strcmp (str, oldstr)) ## Restore inline "$" and block "$$" LaTeX math - for i = 1:length(math_cstr) + for i = length(math_cstr):-1:1 str = strrep (str, ["PUBLISHMATH", num2str(i)], math_cstr{i}); endfor ## Replace special symbols