davidar / pandiff

Prose diffs for any document format supported by Pandoc
MIT License
293 stars 24 forks source link

MWE for bibliography #24

Open swhalemwo opened 3 years ago

swhalemwo commented 3 years ago

Thanks for this great program! I'm looking to convert changes between two tex files to docx; including in-text references and a bibliography. However, specifying a bibliography has no effect, and adding a csl file results in an error message:

/usr/lib/node_modules/pandiff/node_modules/command-line-args/dist/index.js:1350
        throw err
        ^

UNKNOWN_OPTION: Unknown option: --csl=/path/to/apa.csl
    at commandLineArgs (/usr/lib/node_modules/pandiff/node_modules/command-line-args/dist/index.js:1347:21)
    at Object.<anonymous> (/usr/lib/node_modules/pandiff/cli.js:77:6)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  optionName: '--csl=/path/to/apa.csl'
}

I'm effectively running pandiff --csl=/path/to/apa.csl --bibliography=/path/to/references.bib -o output.doxc old.tex new.tex

Is there something I'm doing wrong? Otherwise it would also be helpful to have a MWE for this kind of case.

infologie commented 3 years ago

I'm encountering the same issue on macOS 11.4. I'm running this:

pandiff v1.md v2.md \
--bibliography=references.bib \
--csl=iso690-author-date-fr-no-abstract.csl \
-o diff.docx

(I use relative paths since all the files are within the same directory.)

I'm getting this:

/usr/local/lib/node_modules/pandiff/node_modules/command-line-args/dist/index.js:1353
        throw err
        ^

UNKNOWN_OPTION: Unknown option: --csl=iso690-author-date-fr-no-abstract.csl
    at commandLineArgs (/usr/local/lib/node_modules/pandiff/node_modules/command-line-args/dist/index.js:1350:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/pandiff/cli.js:77:6)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
    at internal/main/run_main_module.js:17:47 {
  optionName: '--csl=iso690-author-date-fr-no-abstract.csl'
}

Any feedback would be greatly appreciated. And thank you @davidar for creating and sharing this tool, it's fantastic.