No example to add indented text after doc creation, except lorem epsum example
See original GitHub issueThere is no more examples that explains how to indent our text blocks.
One of the way is
doc = Document(data=NoEscape(lorem))
that you can find at https://jeltef.github.io/PyLaTeX/latest/examples/config.html.
But what if I want to add the indented text after doc creation using
doc = Document()
statement
So that beautiful letterhead pdf documents could be created.
The PyLaTex doc is excellent but I am not finding any example related to the above issue.
I am not sure whether there is any way to do this(already present in the documentation).
I tried a lot but failed. Suggest me any example please.
What I want is I want to create letterhead documents something like in this https://www.latextemplates.com/cat/formal-letters.
I am able to add logo, right header text etc. but I am unable to indent text blocks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top GitHub Comments
And regarding the import error. You should do
from pylatex.section import Paragraph
. Apparently it’s not exported in the main module.Thanks for your appreciable help @JelteF .
I am trying to use
font_size = "10pt"
withDocument()
constructor but it is failing to affect the font size.ISSUSES:-
if I am using
doc.create(Paragraph(""))
then it is adding space at the beginning of each paragraph.doc.content_separator = "\n\n\n\n"
,doc.content_separator = "\n\n"
,doc.content_separator = "\t\t"
all are producing the same pdf.CODE SNIPPET:-
Just check
font_size
in the above code snippet.And suggest me the way to overcome these issues. You can also check my complete code snippet below.
When I am executing the above code it works fine, 2nd time & 3rd time it shows erros, finally again 4th time it runs fine. I am not sure about this issue.
Please help me to understand this issue as I want to progress quickly with the usage of
PyLaTeX
.