What is the best way to have a paragraph align in the center of the page using restructuredText for pdf (rst2pdf)?
You can use the following:
.. class:: center
This paragraph will be centered.
If you want to use center tag (as described above) on rst2html.py (Docutils 0.12), you should create a css file, namely mystyle.css by adding the following line to it:
.center {text-align: center;}
For converting your rst file, namely, myrst.rst to html file, use the following command
rst2html myrst.rst myrst.html --stylesheet=mystyle.css,html4css1.css
By using this method, the following code works well.
.. class:: center
This paragraph will be centered.
Related
I wanna add some text such as true:coin above the special Latex arrow \hookrightarrow.Any methods I tried is doesn't work.
I use Latex in the markdown editor in web browser.
Both
$$\hookrightarrow^{xxx}$$
and
$$\hookrightarrow[]{xxx}$$
isn't work.
I want the result is that the xxx is abolve the arrow \hookrightarrow.
I am sorry i get it.
Using $$\xhookrightarrow[]{true:coin}$$.It is useful.
I want to create a multi lined edit text that can hold buttons but also have the ability to add free form text.
It should behave like the tag text box of stackoverflow that is under the body of the question when you ask a question on stackoverflow.
I thought about one layout that holds buttons (e.g. tags) and an edit text right after said layout. But as I want it to be multi-lined and if there was a line break, I'm not sure how the edit text should behave, since it couldn't be a quadratic box anymore.
Can you point me in the right direction? I've seen a post about making parts of an edittext uneditable. I could do this and put buttons over it, but the buttons might be a little bigger than the underlying text.
Do you know of alternatives?
I hope you get the point, if not I'll draw the control.
You can achieve same by using FlowLayout. Keep on adding text/button view it will automatically wraps contents to next line
I want to align the items in the QListView centered like on this image:
Currently I manage to aligenn them only left:
In the property inpector of QtCreateor I have found nothing related to alignment. Also the style-sheet documentation for QListView tells nothing about the alignment.
Is this only to acheive using custom delegates?
I think you will have to subclass the QStyledItemDelegate object which is responsible to customize the rendering of your items.
Here is a link to the doc.
There are also some samples availaible on the Qt website:
Star Delegate
I comming back if I find a solution: I need the same effect as yours.
A perfect example of what I am trying to do is the Instagram comments.
Suppose we have a user and a list of text (the comment). I want my UIView to have the username in some font style and clickable along with text next to it and wrapping around to the next line (which is not clickable).
It might be easier to understand if you just look at this:
Notice how the username is clickable and separated from the text, but the text wraps around to the next line. How can I do this?
I am generating PDF file using TCPDF, when I try to use inbuilt functions for setting margin, i.e. $pdf->SetMargins(), it doesn't work. My main purpose for it to remove extra space for ul and li tags, because it is disturbing my pdf format and text content mixing into each other.
Any help would be appreciated.
Set margins is for the document itself and it will not affect the ul or lis on the document. You got to set the styling for those yourself. One tip is to do the styling all inline (just pretend that you building up a page for 1990).