citations from bib not processed

PhilQuand's Avatar

PhilQuand

02 Apr, 2021 07:45 PM

// Please enter a detailed description of the issue // Description of the issue: I cannot have citations from bib file processed

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. Custom processor args : --metadata title="test" --from=markdown --to=html -s --bibliography=/Users/Philippe/zoterobib/zoterobib.bib

// If applicable please attach a sample document that causes the issue for you.

// Configuration (do not edit) Marked 2 1016 (Direct)

macOS Version: 11.2.3

additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: swiss
defaultProcessor: MultiMarkdown
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: YES
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: NO
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: YES
customMarkdownProcessor: /usr/local/Cellar/pandoc/2.13/bin/pandoc
useCustomPreprocessor: YES
customPreprocessor:
useFirstH1AsPrintTitle: YES

  1. 1 Posted by PhilQuand on 02 Apr, 2021 07:50 PM

    PhilQuand's Avatar

    I add that in a terminal , the following command :
    pandoc -s --bibliography /Users/Philippe/zoterobib/zoterobib.bib --citeproc test.md -o test.html

    give the good result (citations processed in the output test.html)

  2. Support Staff 2 Posted by Brett on 02 Apr, 2021 09:43 PM

    Brett's Avatar

    Don't you need the --citeproc flag in your custom processor settings,
    too?

    If you open Help->Show Custom Processor Log, you can see if there's
    STDERR output from pandoc when it runs. Might give us some clues.

    -Brett

  3. 3 Posted by PhilQuand on 02 Apr, 2021 09:54 PM

    PhilQuand's Avatar

    Yes -citeproc was missing... but there was no error in the logs !

    Here is a syntax for Args that makes things working :
    --from=markdown --to=html --bibliography=/Users/Philippe/zoterobib/zoterobib.bib -s --citeproc

  4. 4 Posted by Philippe Quanda... on 02 Apr, 2021 10:03 PM

    Philippe Quandalle's Avatar

    Hi Brettt,

    Yes —cité-roc was missing but there was no error in the STDERR output.

    Thanks for help !
    Philippe

  5. 5 Posted by Steve on 21 Jan, 2022 06:13 AM

    Steve's Avatar

    Hi Everyone,

    I am trialling marked 2 principally for citation management with markdown. The demos look very useful. But can't get the citation feature to work. I have "/usr/local/bin/pandoc" in the path of the custom processor and "-f markdown -t html5 --bibliography=Users/stevengrant/Desktop/Ref.bib -s --citeproc". The Ref.bib was created by bookends.
    But no success.
    Get this error reading:

    "Error reading bibliography file Users/stevengrant/Desktop/Ref.bib: (line 11939, column 685): unexpected end of input"

    Anyone know if there is any trick to get this working. Have only recently installed pandoc and not particularly familiar with it. Would be well worth the purchase if this can work for me.

    Steve

  6. Support Staff 6 Posted by Brett on 21 Jan, 2022 09:35 PM

    Brett's Avatar

    Your bibliography path needs to begin with a slash, e.g. --bibliography=/Users/... I didn't check all the other options, but let me know if fixing that obvious one solves it.

    -Brett

  7. 7 Posted by Steven Grant on 21 Jan, 2022 10:38 PM

    Steven Grant's Avatar

    Thanks Brett replied on the forum, but still doesn’t work, wondering if it is a problem with the bib file saved on desktop.

    My steps have been:

    Generated bibtex keys in bookends.
    Exported synced Bibtex file to desktop.
    "/usr/local/bin/pandoc” in custom processor path
    "-f markdown -t html5 --bibliography=/Users/stevengrant/Desktop/Ref.bib -s —citeproc” in arguments field
    Created a test document with temporary citations in the form of [@citation_key]

    But no luck, so a bit stumped, feels so close, so any suggestions appreciated.

    Steve

  8. 8 Posted by Steven Grant on 22 Jan, 2022 04:36 AM

    Steven Grant's Avatar

    Hi Brett, further to previous email, I have managed to get rid of the error message by looking at that line of the bib file (I could open in excel), and updating that reference in Bookends from the internet. But still no joy with the citations. I have typed this markdown in TextEdit.

    > # Testing the citations
    > Put a sentence here and reference[@Vinson2018]. Another sentence.
    > And a second one here.[@Birnbaum2008]

    But the rendered version is as per the attachment, square brackets are replaced with round parentheses, and the @ symbol is removed, a question mark is appearing after the cite key, and no bibliography generated.

    There’s also a line brake after “and” that shouldn’t appear, and the text width is very narrow even though the text width limit is set to 900px. This is with the Swiss CSS, but seems to render normally in some other CSS like the Github.

    Any way let me know if you have any thoughts. Can send the .bib file if it helps.

    Steve

  9. Support Staff 9 Posted by Brett on 22 Jan, 2022 02:47 PM

    Brett's Avatar

    I'm not much of a Pandoc user, and I've never dealt with bibliography or citations, so this is really outside the scope of Marked support. That said, are you able to get the same file to process from the command line using the same settings? If so, then we can try to figure out what's happening inside of Marked.

    As far as the margins go, removing the -s from your arguments should fix the issue.

  10. 10 Posted by Steven Grant on 22 Jan, 2022 11:05 PM

    Steven Grant's Avatar

    Hi Brett,

    Thanks for responding. It doesn’t process from command settings
    either, I can convert the markdown to rtf for example, but no luck with
    citations. Removing the `s` has fixed the margins, but citations not
    working seems to be specifically a pandoc issue. Even so, hope this is
    helpful to know that the citation feature is not working as expected for
    some (potential) users.

    Steve

  11. Support Staff 11 Posted by Brett on 31 May, 2022 01:03 PM

    Brett's Avatar

    I note that in the command you listed you have an en-dash instead of a double dash (on --citeproc). Is that copied straight from Marked or is that something that the forum software did to your paste?

    -Brett

  12. 12 Posted by Steven Grant on 31 May, 2022 11:58 PM

    Steven Grant's Avatar

    Hi Brett, I have no idea, but well spotted. I did have smart dashes checked on system preferences. When I have some time will try the citation feature again.

    Steve

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac