How to left-justify paragraph in Sphinx

734 views
Skip to first unread message

Hor Meng Yoong

unread,
Dec 23, 2018, 2:12:37 AM12/23/18
to sphinx-users
Hi,

  I am trying to left-justify my contents.  I came across verbatimcontinuedalign and verbatimcontinuesalign but I do not know how to set it in the conf.py.  Could you help? Thanks.

Best regards
Hor Meng

Komiya Takeshi

unread,
Dec 23, 2018, 3:16:40 AM12/23/18
to sphinx...@googlegroups.com
Hi,

They are only used when code-block which across pages in LaTeX (PDF) output
(for example, alignment for "continued from previous page" label).
I guess this is not what you want.

And sphinx does not focus the layout of output format. AFAIK, there
are no common way to layout. To do that, you need to hack stylesheet
and other script.

Thanks,

2018年12月23日(日) 16:12 Hor Meng Yoong <yoo...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

Luc Saffre

unread,
Dec 23, 2018, 8:00:28 AM12/23/18
to sphinx...@googlegroups.com
Maybe using a line block?

| These lines are
| broken exactly like in
| the source file.

http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

Luc

Hor Meng Yoong

unread,
Dec 23, 2018, 9:38:39 AM12/23/18
to sphinx...@googlegroups.com
Dear All,

  I managed to find the solution from https://www.overleaf.com/learn/latex/Text_alignment

My conf.py has the following configuration:

latex_elements = {
    'papersize': 'a4paper',
    'pointsize': '12pt',
    'preamble': r'''
    \usepackage[none]{hyphenat}
    \usepackage[document]{ragged2e}
    '''
}

It works now. Thanks.
Reply all
Reply to author
Forward
0 new messages