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

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

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