You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be handy to have a function that shortens the syntax for something like this:
{{p some_answer }}
{%p line for line in range(10-((some_answer/80) | int) %} (where 80 is the actual number of characters that fit on a line, at least on average--you can check what actually fits on your page based on the font, etc, and 10 represents the existing number of blank lines (replace with real numbers))
____________________
{%p endfor %}
The text was updated successfully, but these errors were encountered:
fromdocximportDocumentfromdocx.sharedimportPt# Create a new Documentdoc=Document()
# Add a paragraphp=doc.add_paragraph()
# Set a single tab stop at the right margin (assumed to be at 6 inches for US Letter size)tab_stop=p.paragraph_format.tab_stops.add_tab_stop(Pt(6*72), leader='underline')
# Add underlined text with a right tab to extend the underlinerun=p.add_run('Your Text Here\t')
run.underline=True# Save the documentdoc.save('your_doc.docx')
It would be handy to have a function that shortens the syntax for something like this:
The text was updated successfully, but these errors were encountered: