Writing in a file.txt a Latex's format of tables with java -


this question has answer here:

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

Popular posts from this blog

apache - setting document root in antoher partition on ubuntu -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -

Process 'command 'F:\android-sdk\build-tools\21.1.2\aapt.exe'' finished with non-zero exit value 1 -