Discussion:
Workaround for hanging indents in bibliography
schivmeister
2013-11-30 18:55:55 UTC
Permalink
An older thread had a workaround for this issue:
https://groups.google.com/forum/#!topic/pandoc-discuss/-P-a4wblmW0

The reporter seems to say that it works, but unfortunately, it only works
for the second item onwards if I insert a "References" section at the end.

References
========
\setlength{\parindent}{-0.2in}

\setlength{\leftskip}{0.2in}

\setlength{\parskip}{8pt}

What I do now:

References
========
---
\setlength{\parindent}{-0.2in}

\setlength{\leftskip}{0.2in}

\setlength{\parskip}{8pt}

That adds a horizontal rule, but the whole thing really doesn't look good.
Without the heading the bibliography is really pointless. If anyone has
some improvement on this workaround (particularly, those who regularly use
markdown for academic writing, you should have to deal with this), I'd
really appreciate your input. Thanks!

(Going through bibtex compilation is not an option, since I might as well
be writing plain latex, with which I'm very comfortable)
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/f549e545-29db-4653-90e6-dd10f1a838f6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
John MacFarlane
2013-11-30 23:51:15 UTC
Permalink
This seems to have to do with LaTeX's default of not indenting
the first paragraph after a section header.

Perhaps try adding this to the beginning of the LaTeX code after
'References'?
Post by schivmeister
An older thread had a workaround for this
issue: [1]https://groups.google.com/forum/#!topic/pandoc-discuss/-P-a4w
blmW0
The reporter seems to say that it works, but unfortunately, it only
works for the second item onwards if I insert a "References" section at
the end.
References
========
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
References
========
---
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
That adds a horizontal rule, but the whole thing really doesn't look
good. Without the heading the bibliography is really pointless. If
anyone has some improvement on this workaround (particularly, those who
regularly use markdown for academic writing, you should have to deal
with this), I'd really appreciate your input. Thanks!
(Going through bibtex compilation is not an option, since I might as
well be writing plain latex, with which I'm very comfortable)
--
You received this message because you are subscribed to the Google
Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
[2]https://groups.google.com/d/msgid/pandoc-discuss/f549e545-29db-4653-
90e6-dd10f1a838f6%40googlegroups.com.
For more options, visit [3]https://groups.google.com/groups/opt_out.
References
1. https://groups.google.com/forum/#!topic/pandoc-discuss/-P-a4wblmW0
2. https://groups.google.com/d/msgid/pandoc-discuss/f549e545-29db-4653-90e6-dd10f1a838f6%40googlegroups.com
3. https://groups.google.com/groups/opt_out
Ray Rashif
2013-12-01 07:48:16 UTC
Permalink
Thanks John, but TeX bails on this:

pandoc: Error producing PDF from TeX source.
! Missing control sequence inserted.
<inserted text>
\inaccessible
l.216 \let@

To my limited understanding that either means I lack the package for these
macros or I have to use them in the preamble (in this case the template).
However, I didn't investigate this further because I chanced upon another
workaround. Previously, I forgot to show how the output looked:

References

[1] Doe, J. ... <- this happens due to the setlengths, I suppose
line 2 <- as you can see, not indented

[2] Walker, P. ... <- proper
line 2 <- proper (indented)

So the manual formatting (which I really hate to be doing but in this case
we have not much choice) actually messes up the logic, like you said, of
the default behaviour for the first paragraph. So, if only I could add
something that didn't show up but was considered part of the line...ahh,
turns out \noindent is just the thing:

References {-}
========
\noindent
\vspace{-2em}
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}
\setlength{\parskip}{15pt}

For readjusting vertical space I prefer the LaTeX \vspace for its paragraph
scope (if I understand it right), instead of the TeX \vskip. So, I guess we
could consider this resolved for now. Thanks again for your support!
Post by John MacFarlane
This seems to have to do with LaTeX's default of not indenting
the first paragraph after a section header.
Perhaps try adding this to the beginning of the LaTeX code after
'References'?
Post by schivmeister
An older thread had a workaround for this
issue: [1]
https://groups.google.com/forum/#!topic/pandoc-discuss/-P-a4w
Post by schivmeister
blmW0
The reporter seems to say that it works, but unfortunately, it only
works for the second item onwards if I insert a "References" section
at
Post by schivmeister
the end.
References
========
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
References
========
---
\setlength{\parindent}{-0.2in}
\setlength{\leftskip}{0.2in}
\setlength{\parskip}{8pt}
That adds a horizontal rule, but the whole thing really doesn't look
good. Without the heading the bibliography is really pointless. If
anyone has some improvement on this workaround (particularly, those
who
Post by schivmeister
regularly use markdown for academic writing, you should have to deal
with this), I'd really appreciate your input. Thanks!
(Going through bibtex compilation is not an option, since I might as
well be writing plain latex, with which I'm very comfortable)
--
You received this message because you are subscribed to the Google
Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it,
send
Post by schivmeister
To view this discussion on the web visit
[2]
https://groups.google.com/d/msgid/pandoc-discuss/f549e545-29db-4653-
Post by schivmeister
90e6-dd10f1a838f6%40googlegroups.com.
For more options, visit [3]https://groups.google.com/groups/opt_out.
References
1. https://groups.google.com/forum/#!topic/pandoc-discuss/-P-a4wblmW0
2.
https://groups.google.com/d/msgid/pandoc-discuss/f549e545-29db-4653-90e6-dd10f1a838f6%40googlegroups.com
Post by schivmeister
3. https://groups.google.com/groups/opt_out
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1b0487f6-9f5e-446c-969b-ddfbaf2262f2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Joost Kremers
2013-12-01 09:43:07 UTC
Permalink
Post by John MacFarlane
This seems to have to do with LaTeX's default of not indenting
the first paragraph after a section header.
Perhaps try adding this to the beginning of the LaTeX code after
'References'?
It's probably easier to just do `\indent` right after the header. That'll produce a horizontal width the size of the standard indentation.

HTH
--
Joost Kremers
Life has its moments
Loading...