LyX ⇒ Left alignment and indentation
Left alignment and indentation
My document requires a specific format which includes left alignment (instead of full justification) and indentation at the beginning of each paragraph (default).
However, it doesn't seem possible to combine these two commands. When I select the main text and choose left alignment via the paragraph settings, the indentation disappears although it is still selected in the text format settings. Instead, there is a small space between paragraphs in the created PDF. The formatting in Lyx looks fine.
Is there a way I can get both requirements working at the same time?
Thanks very much for your help.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Left alignment and indentation
Code: Select all
\documentclass{article}
\usepackage{blindtext}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\raggedright}{\parindent\z@}{}{}{}
\makeatother
\begin{document}
\raggedright
\blindtext
\blindtext
\end{document}
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Left alignment and indentation
a similar solution was posted by Thorsten here: Ragged Right Justification cancels Indentation.
Code: Select all
\newlength{\saveparindent}
\setlength{\saveparindent}{\parindent}
\raggedright
\setlength{\parindent}{\saveparindent}
Code: Select all
\usepackage{etoolbox}
\makeatletter
\patchcmd{\raggedright}{\parindent\z@}{}{}{}
\makeatother
Re: Left alignment and indentation
- Stefan Kottwitz
- Site Admin
- Posts: 10335
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Left alignment and indentation
could you please export your LyX document to LaTeX and post it as attachment? Of course you can remove confidential content, the most important to now is the preamble.
Stefan
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Left alignment and indentation
Never does directly after a sectioning command, or in other words, this is by design. Please load package indentfirst to get the first paragraph after sectioning commands as well.The document does not directly start with left alignment