I have specific logical symbols like ⇒,∨,∧,¬ and I want to write text with these symbols to docx document. With short symbols ∨,∧,¬ all fine, but symbol ⇒ overlaps with next character like
but it should look like
My code looks like
MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
P p = factory.createP();
R run = factory.createR();
p.getContent().add(run);
Text text = factory.createText();
text.setValue("((q⇒p)∧q)⇒p");
run.getContent().add(text);
mdp.addObject(p);
How to correct writing long symbols like ⇒?
You can use docx4j code generation to get what you want.
Create a document in Word which looks how you want it, then save as docx.
To generate code based on that docx, do one of the following:
or 2. install/use our Word AddIn; get it at http://www.docx4java.org/forums/docx4jhelper-addin-f30/docx4j-helper-addin-v1-final-available-t2253.html
If you are still having problems, post the XML you created in Word, or the code you generated following the above steps.