Trivial yet true: an error-free TeX document compilation requires for a matching system environment configuration.
Specifically for citing there seem to be some compatibility problems and for newbies even understanding problems how to reference sources. As I have troubles with it myself, I focus on it in this question, but I would use same approach for further configuration.
Justification. From the system engineering point of view, it is good to have a machine readable spec for an environment installation required to "compile" your code. My favourite tool for that and also quite popular is Docker so I use it to demonstrate what I am trying to achieve.
Hypothesis: it should be possible to take an OOB TeX environment captured in Docker and run it against a reference document, to get a PDF just through one call. Maybe some tweaks will be needed like installing additional packages but with Docker it is quite easy.
To explore the above hypothesis, here is a setup of 4 experiments. None of them works in terms of achieving a PDF document with quotes instead of ? signs. I cannot estimate which of these (or another one) would represent most up-to-date state of the art setup of packages to go on with tweaking/troubleshooting. But I wish to find out!
Sidenote. It is great that community shares both sophisticated codes and sophisticated environments, but sometimes some DevOps work is needed to close the gap between both.
Community-provided reference OOB environments of my choice:
Community-provided test documents to produce a PDF document with bibliography:
To reproduce the below experiments, you need the Docker daemon in your Mac or Linux environment; Windows 10 supports Docker as well but there are still some problems with shared volumes.
Experiment A-01 (miktex-mweb)
Call:
docker run -ti -v miktex:/miktex/.miktex \
-v `pwd`:/miktex/work miktex/miktex \
pdflatex mweb-biblatex.tex
Result:
(/root/.miktex/texmfs/install/tex/latex/biblatex/lbx/english.lbx)
No file mweb-biblatex.aux.
No file mweb-biblatex.bbl.
LaTeX Warning: Citation 'key' on page 1 undefined on input line 17.
LaTeX Warning: Empty bibliography on input line 19.
[1{/root/.miktex/texmfs/data/pdftex/config/pdftex.map}] (mweb-biblatex.aux)
LaTeX Warning: There were undefined references.
Package biblatex Warning: Please (re)run Biber on the file:
(biblatex) mweb-biblatex
(biblatex) and rerun LaTeX afterwards.
Here it seems there is a gap between the example assuming biber to be used and the OOB MikTex distro assuming biber wouldn't be used. Could I just pass some tweaked argument to the above call? Something like maybe (of course possible to put proper order of calls in a bash script)?
docker run -ti -v miktex:/miktex/.miktex -v `pwd`:/miktex/work --user root miktex/miktex bash -c "apt -y update && apt-get -y install biber && pdflatex mweb-biblatex.tex && biber mweb-biblatex.tex"
UPD we know now that biber can't be installed via MPM in Linux, and an apt-get would deliver an incompatible version.
Experiment A-02 (MikTeX-ACM)
Call:
docker run -ti --user=root -v miktex:/miktex/.miktex -v `pwd`:/miktex/work miktex/miktex pdflatex sample-sigconf.tex
Result:
Sorry, but miktex-makepk did not succeed for the following reason:
GSF2PK failed on rtxr.pfb.
Here some new missing package/configuration is coming up. So OOB MikTeX is not working with a reference ACM as a newbie might expect.
Experiment B-01 [SOLVED] (TexLive-mweb)
Call:
docker run --rm --volume $PWD:/workdir --workdir /workdir makisyu/texlive-2017 pdflatex mweb-biblatex.tex
Result: missing biber as well.
No file mweb-biblatex.bbl.
LaTeX Warning: Citation 'key' on page 1 undefined on input line 17.
LaTeX Warning: Empty bibliography on input line 19.
UPD Solution: biber is already present in the texlive distribution. To produce a PDF with references, use the following instructions.
pdflatex mweb-biblatex
biber mweb-biblatex
pdflatex mweb-biblatex
pdflatex mweb-biblatex
Experiment B-02 [SOLVED] (Texlive-acm) GitHub issue
Call:
docker run --rm --volume $PWD:/workdir --workdir /workdir makisyu/texlive-2017 pdflatex sample-sigconf.tex
Result: here is no biber related error, but natbib is not working in a similar way.
Package natbib Warning: Citation `Amsthm15' on page 3 undefined on input line 2
95.
UPD - working solution is in this case:
pdflatex sample-sigconf
bibtex sample-sigconf
pdflatex sample-sigconf
pdflatex sample-sigconf
Conclusion. Sure there will be many more ways of getting any of these 4 setups done but I consider that minimal working examples as well as prominent working templates should be accompanied by accordingly confgured environments.
An acceptable answer I expect for this question will contain solutions or at least references to such which I will then test.
pdflatex mweb-biblatex.texonce. To succesfuly build a document you would need to runpdflatex mweb-biblatex; pdflatex mweb-biblatex; biber mweb-biblatex; pdflatex mweb-biblatex. If you don;t want to do this manually try for examplelatexmk mweb-biblatexwhich will automatically run all the required steps. – samcarter_is_at_topanswers.xyz Feb 24 '18 at 15:08-v miktex:/miktex/.miktex
-v
pwd:/miktex/workmiktex/miktex
bash -c "apt -y update && apt-get -y install biber && pdflatex mweb-biblatex && pdflatex mweb-biblatex && biber mweb-biblatex && pdflatex mweb-biblatex" Result: LaTeX Warning: Overwriting file `./mweb-biblatex.bib'.
(/root/.miktex/texmfs/install/tex/latex/biblatex/lbx/english.lbx) (mweb-biblatex.aux) No file mweb-biblatex.bbl.
LaTeX Warning: Citation 'key' on page 1 undefined on input line 17.
– J. Doe Feb 24 '18 at 15:20biber mweb-biblatex? If yes, can you please post it? – samcarter_is_at_topanswers.xyz Feb 24 '18 at 15:39rootis not really the root account? – cfr Feb 24 '18 at 23:361000:1000which seems weirdly confusing, but I suppose this is just because I don't understand the concept adequately. Note that MikTeX, unlike TeX Live, doesn't typically involve a full installation. Often, it is configured with on-the-fly package installation, so that stuff gets installed if and when needed. I'd think TeX Live would be a better option for something self-sufficient. (But I don't actually get the point, so I might be wrong about this.) – cfr Feb 24 '18 at 23:59apt-get -y install bibertry to use the miktex package manager to install a biber version which is compatible with your biblatex version. – samcarter_is_at_topanswers.xyz Feb 25 '18 at 00:10