Markdown text is always left-aligned. Is there a way to do right-align and justification in Markdown?
To be precise, I'm using Markdown in Jupyter Notebook (IPython).
Markdown text is always left-aligned. Is there a way to do right-align and justification in Markdown?
To be precise, I'm using Markdown in Jupyter Notebook (IPython).
Aligning text in native markdown is not possible. However, you can align the text using inline HTML tags.
<div style="text-align: right"> your-text-here </div>
To justify, replace right
with justify
in the above.
If you want to right-align in a form, you can try:
| Option | Description |
| ------:| -----------:|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
https://learn.getgrav.org/content/markdown#right-aligned-text
If you want to use justify align in Jupyter Notebook use the following syntax:
<p style='text-align: justify;'> Your Text </p>
For right alignment:
<p style='text-align: right;'> Your Text </p>
If you want to use this answer, I found out that when you are using MacDown on MacOs, you can <div style="text-align: justify">
at the beginning of the document to justify all text and keep all code
formating. Maybe it works on other editors too, for you to try ;)