[solved] Store my new csl file local and use in texstudio


I have difficulties using my own csl file created on Visual CSL Editor

I am using TeXstudio. Where do I place my .csl file so that I can do:

\cslsetup{style = myfancystyle}

texlive-full is installed om Manjaro linux.


The .csl file is expected to be in the same directory as the main .tex document.

The citation-style-language package in Linux distribution may be outdated. I suggest installing the latest version either with tlmgr or from https://github.com/zepinglee/citeproc-lua.

That is weird it is in the same directory.

I tried updating it via tlmgr but it has the latest available:

package: citation-style-language
category: Package
shortdesc: Bibliography formatting with Citation Style Language
longdesc: The Citation Style Language (CSL) is an XML-based language that defines the formats of citations and bibliography. There are currently thousands of styles in CSL including the most widely used APA, Chicago, Vancouver, etc. The citation-style-language package is aimed to provide another reference formatting method for LaTeX that utilizes the CSL styles. It contains a citation processor implemented in pure Lua (citeproc-lua) which reads bibliographic metadata and performs sorting and formatting on both citations and bibliography according to the selected CSL style. A LaTeX package (citation-style-language.sty) is provided to communicate with the processor.
installed: Yes
revision: 65357
sizes: doc: 273k, run: 2093k, bin: 5k
relocatable: No
cat-version: 0.3.0
cat-license: mit cc-by-sa-3
cat-topics: biblio use-lua
cat-contact-repository: GitHub - zepinglee/citeproc-lua: A Lua implementation of the Citation Style Language (CSL)
collection: collection-bibtexextra

Ok got a bit further but got a citeproc error:

Module citeproc Error: CSL parsing error: XMLDecl not at start of document [char=1]. \begin{document}

This is my tex file:


\cslsetup{style = myfancystyle}

… some content


Ok solved the last error myself too.

The csl I downloaded via the Visual CSL Editor creates a
“XML 1.0 document, Unicode text, UTF-8 (with BOM) text” file.

The following command solved it for me:

sed 1s/\xef\xbb\xbf//’ < orig.csl > new.csl

That’s Great!

Thanks for your feedback and I’ll fix this. The native file reader in Lua doesn’t handle UTF-8 BOM.