Comments (8)
Since this is usually the first result when people are searching this problem, I'm going to add to it.
I recently updated to RStudio 1.4.1103 and with that came an update to pandoc version 2.11.2. A similar error to the above arose when I was trying to compile a document that had worked before the update. I'd previously fixed this exact problem, but now it's back. In the template.tex
, adding the following fixed the problem for me:
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing
{% don't indent paragraphs
\setlength{\parindent}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi
% set entry spacing
\ifnum #2 > 0
\setlength{\parskip}{#2\baselineskip}
\fi
}%
{}
\usepackage{calc} % for \widthof, \maxof
\newcommand{\CSLBlock}[1]{#1\hfill\break}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\maxof{\widthof{#1}}{\csllabelwidth}}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth}{#1}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
from wg21.
I had the same problem. It turns out that in the latest version, Pandoc's default LaTeX template (pandoc -D latex
) contains this additional section
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newenvironment{cslreferences}%
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
$endif$
and my old modified template did, of course, not. You can fix the problem by inserting the new section into your custom template.
from wg21.
This has come back again in 2.11.1.1 but can be fixed in the template by changing "cslreferences" to "CSLReferences"
from wg21.
@mpusz Thanks for filing / @allefeld Thanks for digging into the issue!
from wg21.
Example of a failing paper: https://github.com/mpusz/wg21-papers/blob/master/src/2007R0_std_from_chars_should_work_with_std_string_view.md.
from wg21.
If you're still running into this problem, you're likely on an older version of this project. If you can, please pull the latest version which will install a local, pinned version of pandoc which I will be explicitly keeping in sync.
from wg21.
If you're still running into this problem, you're likely on an older version of this project. If you can, please pull the latest version which will install a local, pinned version of pandoc which I will be explicitly keeping in sync.
Hi, sorry, my reply wasn't explicitly for this repo. I'm running into this issue with RMarkdown. I posted here because when searching for the cslreference problem, this Issue is the first result for me (and so I presume with many other users) and os just trying to provide the solution/workaround. Apologies again for any confusion and for using your Issue as a forum
from wg21.
Thanks @MyKo101 for this helpful solution! While I do not use RMarkdown, I still had this issue when using Pandoc to convert markdown files for articles.
Final remark, I had to modify one of your lines slightly (was probably just a typo):
\newenvironment{CSLReferences}[3] % #1 hanging-ident, #2 entry spacing
becomes
\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing
from wg21.
Related Issues (20)
- Add instructions for Debian
- Support escaped Markdown in inline code. HOT 1
- Non git submodule consumption HOT 4
- Don't download the C++ icon for the HTML version.
- Improve the style in HTML HOT 1
- TonyTable Captions broken HOT 2
- HTML title just has markdown eaten
- Broken with Pandoc 2.10 HOT 4
- Python 3.9 posixpath not happy HOT 2
- caption type is blockquote that hinders some other filters HOT 1
- Improve readability on phones HOT 1
- title html tag is mangled if title contains any of <>_
- Add hyperlink that goes directly to other WG21 papers HOT 1
- Cannot generate a .pdf file if there are no external references HOT 2
- Abandoned, non-functional code base? HOT 3
- automatically install texlive-xetex? HOT 1
- Spacing is inconsistent between references that have a URL and ones that don't HOT 1
- Run example is not correct. HOT 3
- Problems with emphasis inside code blocks. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wg21.