mszep / pandoc_resume

The Markdown Resume
http://mszep.github.io/pandoc_resume/
MIT License
1.62k stars 756 forks source link

Pandoc version from generated docker does not support Lua filters option #44

Closed CrisFavero closed 6 years ago

CrisFavero commented 6 years ago

The following error occurs when doing docker-compose up

resume-make    | pandoc: unrecognized option `--lua-filter=pdc-links-target-blank.lua'
resume-make    | Try pandoc --help for more information.
resume-make    | cris.html
resume-make    | resume.html
resume-make    | pandoc: unrecognized option `--lua-filter=pdc-links-target-blank.lua'
resume-make    | Try pandoc --help for more information.
resume-make    | Makefile:21: recipe for target 'html' failed
resume-make    | make: *** [html] Error 2
resume-make exited with code 2

Expected Behavior

generate all formats

Actual Behavior

HTML format fails to generate

Steps to reproduce the behavior

docker-compose up

Versions

Pandoc and context versions

pandoc --version

pandoc 1.16.0.2

context --version

resolvers | caches | path '/home/app/.texmf-var' created mtx-context | ConTeXt Process Management 0.61 mtx-context | mtx-context | main context file: /usr/share/texmf/tex/context/base/context.mkiv mtx-context | current version: 2015.05.18 12:26 OS information on non-Windows can use one of the following commands

cat /etc/*-release

app@bb8bb6360050:~/resume$ cat /etc/*-release

DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS" NAME="Ubuntu" VERSION="16.04.4 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.4 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial lsb_release -a

nitrocode commented 6 years ago

I forgot to upgrade pandoc in the docker file. For now, try changing this line Line 10 to this:

RUN apt-get install build-essential context -y
RUN wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb
RUN dpkg -i pandoc-2.2.1-1-amd64.deb

That should install the latest pandoc version which allows the lua filter. Will have to test more.

@mszep do you still want to support pandoc 1?

mszep commented 6 years ago

@nitrocode I'm happy to incorporate your solution into the dockerfile to make sure we have a recent enough version of pandoc, provided it has been shown to work :-)

CrisFavero commented 6 years ago

Worth noting while the docker file is getting updated doing apt-get update and apt-get install on two different lines is considered bad practice in Docker as the caching layer will never execute the apt-get update again

CrisFavero commented 6 years ago

I made those changes and seems to produce the expected output for the files.

mszep commented 6 years ago

Thanks @marioatlp!

DanielGGordon commented 6 years ago

@mszep @CrisFavero I have this same issue still, even after using the most recent version of this repo.

pandoc: unrecognized option `--lua-filter=pdc-links-target-blank.lua'
Try pandoc --help for more information.
Makefile:21: recipe for target 'html' failed
make: *** [html] Error 2
mszep commented 6 years ago

@DanielGGordon to confirm, are you using the dockerized version?

If not, what version of pandoc are you using? (you can find that by doing pandoc --version on the command line)

DanielGGordon commented 6 years ago
$ pandoc --version
pandoc 1.16.0.2
Compiled with texmath 0.8.4.1, highlighting-kate 0.6.1.

I am having trouble even running docker on my Ubuntu VM, it looks like I need a different version of linux (Bionic, Artful, Xenial, or Trusty)

CrisFavero commented 6 years ago

Yes, this fix was specific to the docker container. However the root cause is the same, you need to be on the newer versions of pandoc on your system for this repo to work.

On Mon, Jul 9, 2018 at 12:52 PM Daniel Gordon notifications@github.com wrote:

$ pandoc --version pandoc 1.16.0.2 Compiled with texmath 0.8.4.1, highlighting-kate 0.6.1.

I am having trouble even running docker on my Ubuntu VM, it looks like I need a different version of linux (Bionic, Artful, Xenial, or Trusty)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mszep/pandoc_resume/issues/44#issuecomment-403545926, or mute the thread https://github.com/notifications/unsubscribe-auth/AAU7yVprvl3lxrnTG86SmpCZd8lVfFCbks5uE4pSgaJpZM4T7u95 .

DanielGGordon commented 6 years ago

So maybe this is a stupid question, but how do I do that? I did sudo apt install pandoc context and sudo apt-get update before that. Do I need a specific distribution of linux to get the version of pandoc I need? Trying to do this with Ubuntu

nitrocode commented 6 years ago

@DanielGGordon install directly from the deb file from the pandoc releases page.

wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb && \
sudo dpkg -i pandoc-2.2.1-1-amd64.deb