Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why this change fixes the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To determine where the additional vertical space was coming from I wrapped the
\parbox{}
in an\fbox{}
. This indicated that it was from the\break
outside the\parbox
. By moving that inside the\parbox
results were consistent regardless of bibitem length, but without negative adjustment were too large. By iteration arrived at the value of-1.7ex
. I had previously been using a custom template with\break
replaced by\\[-0.7ex]
to get spacing that matched the document. Technically why, I don't know.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just seems a bit "magic" and unprincipled...I wonder if there's a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just removing the
\break
? Is it needed?It seems to work fine without it and I don't get the extra space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During my testing I had initially tried that, but when using a more complex document using
article
andscrartcl
the linespacing was removed between bibitems:but having used the above input file with
article
,scrartcl
,apa6
(with theman
class option) andbeamer
it works correctly, so there must be something (not obvious) in that document which is causing the issue which I will sort out.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I think it would be incorrect in terms of the CSL spec. I believe the current implementation is accurate.
With
entry-spacing="0"
and\setlength{\itemsep}{#2\baselineskip}}}
:and
entry-spacing="0"
and\setlength{\itemsep}{\parskip}}}
:The spacing is approaching what it is when
entry-spacing="1"
. The paragraph spacing has nothing to do with the entry spacing, which had me confused until I read the spec more carefullyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree it's more accurate this way. I just think it's a bit awkward that, with the default 6pt parskip that pandoc gives you without
indent
, you have a choice between a bigger or a smaller space between bib entries, but no way to get the same...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually prefer the way it is 😃.
This is going to be the case with all documents where
entry-spacing="0"
andindent: false
, regardless if using a KOMA class, theparskip
package, or the pandoc default of6pt plus 2pt minus 1pt
. In my custom template I used to have theentry-spacing
depend onindent
. But, I was wrong, due to my ignorance from not having read the spec, assuming 0 meant zero spacing (not zero additional spacing), 1 was line spacing (actually 0)... and which clearly others do too e.g. #7296. But, I can appreciate the visual appeal:rather than moving up to
entry-spacing="1"
:However, if you decide to implement this please don't make it the default, but rather an option, or better yet as a filter, so that at least the default is compliant with the spec. Of course, for those wanting something special, it is always possible to use
header-includes
:I have completed testing the latex CSL functionality. I have tested with the KOMA, APA, and standard classes, together with beamer. All combinations of linespacing (single, onehalf and double) work correctly with
entry-spacing
values of 0, 1 and 2, using bibliographies of approx 50–200 items. Thanks very much for your efforts with this, I am really happy with the results.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for the extensive testing! I'll close this.