latex doesn't display carriage returns from mysql query -
latex doesn't display carriage returns from mysql query -
in textarea of html form allow multi line inputs such as:
hello
goodbye
this string set mysql database mysql_real_escape_string. want take string , pass straight tex document, empty lines (carriage returns suppose) not beingness output string. hence when compiled latex output
hellornrngoodbye
what need string retain carriage returns?
after our give-and-take in chat, here's figured out:
you used
shell_exec("cat ".$path."/latextemplate.tex | sed -e 's/latexcode/$latexcode/' > ".$path."/texfiles/q$id.tex");
inside php script insert latex input stored in db template file , save that. somewhere in process, newlines got dropped.
the best solution replace shell exec php equivalent loads file string, performs string replacement (unescaped) input string , stores in file.
mysql latex
Comments
Post a Comment