Tag Info

Hot answers tagged

14

Here's a nopars environment: \documentclass[a4paper,12pt]{memoir} \usepackage{polyglossia} \usepackage{fontspec} \usepackage{csquotes} \setmainlanguage{german} \newenvironment{nopars} {\par\def\par{\unskip\nobreak\quad\P\nobreak\enspace}} {\endgraf} \begin{document} \begin{nopars} Dies hier ist ein Blindtext zum Testen von Textausgaben. Wer diesen ...


10

\quad means \hskip 1em\relax. You have to give a length directly as the argument to \parindent. So use \setlength{\parindent}{2em}. \documentclass{article} \usepackage{showframe} %% just for demo \setlength{\parindent}{2em} \begin{document} A\\ \hspace*{2em}A \end{document} You can find the meaning of \quad by texdef \quad in terminal. And to find the ...


6

The setting of \parskip in \newcommand\restoretopreviousdepth{%% \bgroup \parskip0pt \par\prevdepth\ae@tpd \egroup} does nothing as \parskip is used when TeX leaves vertical mode to start a new paragraph, and that (if it happens at all) happens after the \egroup so the previous value will be used.


5

In order to make use of things like the \medievalpage[] layout, you need to follow memoir's documentation. On their own, such commands will either have no effect or cause havoc. Moreover, combining them with geometry won't work. You must use memoir's commands to layout the page. It will also be better to avoid the conflict with fancyhdr by not using it. ...


5

For completeness, here's what I actually ended up with, using an argument to set an initial before the redefinition: \newenvironment{textblock}[1] {#1\def\par{\unskip\nobreak\quad{\color{red}\P}\nobreak\enspace}} {\endgraf} This allows me to use a lettrine at the beginning, which is somehow a required use case: ...


4

The default with the standard classes are paragraphs, whose first lines are indented and without additional space inbetween: \documentclass{article} \usepackage{lipsum} \begin{document} \lipsum[2-4] \end{document} Package parskip adds space between paragraphs and the paragraphs start without indentation: \documentclass{article} \usepackage{lipsum} ...


3

Latex tries hard to not have a single line of the paragraph go over a page, but if the page does break there it has no way of saying that's a particularly bad place to have a top float. You could try increasing \widowpenalty (from its default of 150) to encourage the last line of a paragraph to stay with the paragraph on the previous page (or for two lines ...


3

Do you need this one? \documentclass{article} \makeatletter \newcommand\ignorenextpar{% \unskip\@ifnextchar\par{ \@gobble}{ }% } \makeatother \begin{document} This is the beginning of a line;\ignorenextpar and this is the end of the line. The above blank line should not be ignored.\ignorenextpar This should be normally spaced \end{document} A ...


2

There are some issues here, but I focused on the spacing stuff... Two lines of text, separated with an empty line --> LaTeX will start a new paragraph \captionof adds some vertical spacing above and below to prevent the caption to be to near to the figure/table \begin{center}...\end{center} introduces additional spacing. If all of this should not affect ...


2

\documentclass{article} \begin{document} {\def\par{\ifhmode\unskip\fi\space\ignorespaces} This is the beginning of a line; and this is the end of the line. } \end{document}


2

lt chooses a better pagebreak in this case if you allow the table to be [h] so it is out of the queue before the long table starts. \documentclass[a4paper,12pt, oneside]{book} %enable linespacing commands% \usepackage{setspace} %set onehalf line spacing \onehalfspacing %enable H option that prevent figure floats \usepackage{float} %used to import ...


2

This is an update on egreg's answer and - beware - I did not test the code (I only somewhat proved it correct, to quote the author of TeX) \newenvironment{nopars} {\par\def\par{\if\@currenvir\@nopars\unskip\nobreak\quad\P\nobreak\enspace\else\endgraf\fi}} {\endgraf} This should cope at least with anything that introduces a nested environment ...


1

As far I know there is nothing wrong setting a negative \parindent and \lefskip, but another control sequence that you can use is \hangindent at the begining of one paragraph. Note that you cannot set this by default in the preamble for all the document because it is reseted after \par, but you can use some like \everypar{\hangindent3em} after ...



Only top voted, non community-wiki answers of a minimum length are eligible