Tag Info

New answers tagged

2

A simplification of the already answered: \documentclass{article} \def\D{\par\noindent\makebox[1em][l]{-- }\hangindent1em} \begin{document} \subsubsection*{This is a header} \D This is a detail \D This is a detail that has too many words in it and consequently runs onto The next line of the page, and I want it to have a hanging indent. \end{document}


2

\documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1--\,\,#1} \newlength{\mylen} \settowidth{\mylen}{--\,\,} \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want ...


8

\documentclass{article} \newcommand{\detail}[1]{\par\noindent\hangindent=\mylen\hangafter1-- #1} \newlength{\mylen} \settowidth{\mylen}{-- } \begin{document} \noindent\textbf{This is a header} \detail{This is a detail.} \detail{This is a detail that has too many words in it and consequently runs onto the next line of the page, and I want it to ...


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} ...


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 ...


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 ...


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.


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 ...


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

\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}


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. ...


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 ...


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 ...


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 ...



Top 50 recent answers are included