I have a text-based data file that contains the text of short prayers called collects. There is one for each Sunday of the year. The file contains dates in the left hand column, and the collects in the right hand column.
Using the datatool package, the template for a booklet I produce weekly for my wife is now able to look up the data file and pick the correct collect for any given date. That is all working well.
Such collects are usually are formatted with line-breaks to make them easy to read in short phrases. After trying several different suggestions as to how to create such line-breaks within the field, the only one that I could get to work for me was the command \DTLpar from datatool. This breaks the line without truncating the rest of the field. All that remains for me is to go through each collect, breaking it up into short phrases, each phrase ending with "\DTLpar". Though a little clumsy, it works fine.
When read into the booklet, they looks like normal line-breaks. However, \DTLpar is not governed by the line spacing that regulates the rest of the LaTeX document. The \DTLpar spacing appears to be fixed as 1.5 or double spacing. I would prefer to have single spacing, or less of a gap between the lines of the collect. I see nothing about that in the datatool manual, and I could not find any reference to it outside the manual.
Is there a way that I could reduce the default line-spacing produced by \DTLpar?
General ⇒ \DTLpar height
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
\DTLpar height
Without
minimal working example I can give you only some general information: so it uses the current

\DTLpar
is defined as Code: Select all
\DeclareRobustCommand{\DTLpar}{\par}
\parindent
, \parskip
and \parfillskip
. You can either change these lengths or redefine \DTLpar
(again using \DeclareRobustCommand
) to add positive or negative vertical space.Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

\DTLpar height
I grateful for this helpful advice that you have given me, with several options. I shall try them and report back, probably later today.
\DTLpar height
@Ijon Tichy, thanks very much for your help.
In the preamble, I added:
In the page, I have put:
That did exactly what I wanted. Thank you.
However, I am curious about what the syntax might be to use \DeclareRobustCommand instead of \setlength{\parskip}.
Thanks, again for solving this for me.
Calum
In the preamble, I added:
\DeclareRobustCommand{\DTLpar}{\par}
In the page, I have put:
{
\setlength{\parskip}{0\baselineskip plus 2pt}
\newcommand{\pubcoll}{\bliadhna-\mios-\latha}
\DTLfetch{goirid}{soy}{\pubcoll}{collect}
}
That did exactly what I wanted. Thank you.
However, I am curious about what the syntax might be to use \DeclareRobustCommand instead of \setlength{\parskip}.
Thanks, again for solving this for me.
Calum
- Ijon Tichy
- Posts: 640
- Joined: Mon Dec 24, 2018 10:12 am
\DTLpar height
You should not need
\DeclareRobustCommand{\DTLpar}{\par}
, because it is the default.Sorry, but I can no longer participate here as the administrator is trampling on my wishes on one of his other platforms. 

\DTLpar height
I have now removed
\DeclareRobustCommand{\DTLpar}{\par}
, as I note that it is not required.