Tag Info

Hot answers tagged

10

In the first definition, the argument is delimited by a space and a \par token: \long\def\testA#1 {\begin{quote}#1\end{quote}} \long\def\testB#1 \par{\begin{quote}#1\end{quote}} \ifx\testA\testB\message{EQUAL}\else\message{DIFFERENT}\fi prints EQUAL The first end-of-line in \testA is converted to a space token; the second one is converted to a \par ...


5

TeX processes its input using several processors: input processor -> token processor -> expand processor -> main processor A gastro-anatomical terminology is mentioned in the TeXbook for this but I never use this terminology. The Input processor reads lines from file, appends \endlinechar and (maybe) re-encodes the line and outputs each line as a buffer ...


5

Here is a solution using the enumitem package where I had used an empty label, and set the leftmargin of the top level list as 0pt: Notes: The showframe package was used just to show the page margins. It is not needed in your actual use case. Code: \documentclass{article} \usepackage{enumitem} \usepackage{showframe} ...


5

You don't use the parskip package in memoir: it's listed among the ones that the class emulates (page xxix of the manual). In section 3.3.1 it is explained how to set a nonzero \parskip, but I'd like, first, to quote from the manual: 3.3.1 Paragraphs In traditional typography the first line of a paragraph, unless it comes immediately after a chapter ...


4

I would not recommend changing \parskip or any other parameters which often are used in unexpected places and will inevitably have unintended consequences down the road. You could just rewrite the definition for \paragraph as follows: \let\originalparagraph\paragraph \makeatletter \renewcommand\paragraph{%% \@startsection{paragraph}%% ...


3

The problem is a space that somehow sneaks in the definition of \sectionmark: \documentclass[11pt,oneside,article]{memoir} \usepackage{lipsum} % Begin Section format \newcommand{\marginbox}[1]{% \parbox[t][0pt]{10em}{% \upshape\sffamily\raggedright\mbox{}#1}% } \newcommand{\marginhead}[1]{% ...


3

From the manual of the verse package: \documentclass{article} \usepackage{verse} \begin{document} \settowidth{\versewidth}{In a cavern, in a canyon,} \poemtitle{Clementine} \begin{verse}[\versewidth] \poemlines{2} \begin{altverse} \flagverse{1.} In a cavern, in a canyon, \\ Excavating for a mine, \\ Lived a miner, forty-niner, \label{vs:49} \\ And his ...


3

One way to do this is to adjust the fourth argument supplied to \@startsection as part of article's definition of \paragraph: \documentclass{article} \setlength{\parindent}{0pt}% Just for this example \begin{document} Hello \paragraph{A paragraph} Some more text And we continue. \bigskip \hrulefill \bigskip \makeatletter ...


2

Here's just a “semi-generalization” (with expl3) of the solution provided by egreg. I tried exactly that before asking this question (just touching catcodes of ^^M and using an auxiliar command, inspired by the definition of \obeylines) but, unfortunately for me, it didn't work (I need more training with catcodes and groups and where to change catcodes and ...


2

Change the definition of \paragraph so that it is like \subsubsection and not an inline title. \documentclass[11pt,a4paper]{article} \makeatletter \renewcommand\paragraph{% \@startsection{paragraph}{4}{\z@}% {-3.25ex \@plus-1ex \@minus-.2ex}% the same spacing above, but negative {1sp}% no space after the title ...


2

What you want is, I believe, \addvspace. The problem with \par can be tackled with a group. \documentclass{article} \makeatletter \newcounter{aelistcnt} \newcommand\alist{\ae@list} \def\ae@list{%% \refstepcounter{aelistcnt}%% \par \addvspace{2ex plus 0pt minus 2ex}% \begingroup \let\ae@@par\par \def\par{\ae@par}% \parshape 1 2em ...


2

There is no difference between these two code fragments. Adding white space to your code makes it more readable. LaTeX recognizes an empty line as a new paragraph. If you have more free lines they are ignored. This is a big advantage of LaTeX and also prevents the setting of blank lines as a page break or spaces as tabs.


1

1) Add \setlength{\parskip}{-5mm} before \begin{document} or add \vspace {-1ex} after each paragraph. 2) Add \hspace{-1em} between each paragraph definition and text. Modify values as needed.


1

As mentioned in the comments, you could use the tabbing package: \documentclass{article} \begin{document} \begin{tabbing} \hspace{30pt}\=\hspace{30pt}\=\kill some text some text some text \\ some text some text some text \\ \> some indented text some indented text some indented text \\ \> some indented text some indented text some ...


1

Others have mentioned enumerations, but perhaps have overlooked the request for material between items. An out-of-the-box solution for this is provided by the enumitem package, where there is the possibility of labelling an enumerate with a series name. Following instances can then use enumerate together with resume \begin{enumerate}[series=numpars] ...


1

You could load the packages ragged2e and arrayand test with something like >{\RaggedRight\justifying}p{3cm}. But the easiest solution is simply: \usepackage{microtype}. Edit: Both solutions seem not to work with XETEX. See this example: \documentclass[a4paper, onehalfspacing, 12pt, english]{article} ...


1

You have to give up something, if you want to keep justification, and white space control, you need to give up something else. this gives up on the usual hyphenation rules: There are still some gaps but try it with your final font choice, you can always add more hyphenation entries. \documentclass[a4paper, onehalfspacing, 12pt]{article} ...


1

An ad hoc solution. It should be polished, in particular, the definition is to be moved outside verse. \documentclass{article} \begin{document} \let\oldnl=\\ \newcount\evenv \begin{verse} \evenv1\relax% \def\\{\advance\evenv by1\ifodd\evenv\oldnl\else\oldnl\hspace*{2em}\fi}% $\,$\\ To be, or not to be, that is the question—\\ Whether 'tis Nobler in the ...



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