0

I would like to have the ability to control the vertical separation between #2 and #3. What can I do ? I do not intend that this functionality includes any nested lists or centred environments, that would misalign #3.

\documentclass[a4paper,10pt]{article}

\ExplSyntaxOn

\NewDocumentCommand{\dkmKtlog}{ O{0.3cm} m m } { \begingroup \setlength{\parindent}{0pt} \setlength{\leftskip}{#1} \hspace*{-\leftskip} \parbox[b]{\linewidth}{\normalfont\bfseries [#2]}\par \nopagebreak\ignorespaces #3\par \endgroup }

\ExplSyntaxOff

\begin{document}

\dkmKtlog[0cm]{1999-DEF8}{ Deligne Pierre, Etingof Pavel, et al., 1999; ``Quantum Fields and Strings: A Course for Mathematicians.'' Vol. 1--2. With Freed Daniel S., Jeffrey Lisa C., Kazhdan David, Morgan John W., Morrison David R., Witten Edward. }

\end{document}

Ragonese
  • 171
  • 4
  • 3
    Please give a more complete example, including the document class you are using. When I use your command definition in a regular document (report) I don't see any extra space, only the skip between lines (natural). – Mane32 Feb 29 '24 at 00:24
  • 3
    you have not provided a usable example but there will just be \parskip and the \baselineskip minus the depth of the last row of #2 and the height of the first row of #3. You are also missing % from ends of lines. as noted in your previous question if you set \leftskip directly in that way any nested lists or centred environments in #3 will be mis-aligned. – David Carlisle Feb 29 '24 at 00:32
  • 1
    @JohnKormylo No, the code is under \ExplSyntaxOn. – egreg Feb 29 '24 at 11:25
  • 2
    What vertical space? – egreg Feb 29 '24 at 11:27
  • Between [1999-DEF8] and [Deligne...]. I would like the ability to contral the vertical s-pacing between the two lines of text. – Ragonese Feb 29 '24 at 11:30
  • Have found that using \setlength{\parskip}{0pt} after \setlength{\parindent}{0pt} removed the extra spacing between the two paragraphs. – Ragonese Feb 29 '24 at 13:36
  • What is the usefulness of having \parbox in this implementation ? – Ragonese Feb 29 '24 at 13:41
  • @egreg - It seems like people are starting to use ExplSyntax just to avoid adding spaces. I suppose you could do the same thing with a tikzpicture, except the definitions would be local. Would \@bsphack \@esphack work as well? – John Kormylo Feb 29 '24 at 15:27
  • @JohnKormylo Those commands are for controlling printed spaces, not for code. – egreg Feb 29 '24 at 15:29
  • In other words, if all you wanted to do is avoid printing spaces, yes. – John Kormylo Feb 29 '24 at 15:31

0 Answers0