Writing in a file.txt a Latex's format of tables with java -
this question has answer here:
- how escape “\” characters in java 5 answers
i'm trying automatically files.txt tables in latex's format, , want write java next string using .write
writer.write("\centering"+"\r\n");
but i'm not allowed so, eclipse marks "\centering" , says
invalid escape sequence (valid ones \b \t \n \f \r \" \' \\ )
i tried separating "\"+\centering" didn't work either there way this?
you need escape backslash '\' doubling it: \\
writer.write("\\centering"+"\r\n");
Comments
Post a Comment