greyscalepress/manifestos

won't build with latest pandoc (build process requires upgrade)

gingerbeardman opened this issue · 2 comments

The script won't complete the build using the latest pandoc.

$ ./build.sh
--latex-engine has been removed.  Use --pdf-engine instead.
Try pandoc --help for more information.
  • Current pandoc is 2.16.2 (2021-11-21)
  • Expected pandoc is 1.14.0.1 (2015-05-28)

I tried a simple change swapping --latex-engine to --pdf-engine and the are more errors:

$ ./build.sh
Error producing PDF.
! LaTeX Error: File `flushend.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name: 
! Emergency stop.
<read *> 
         
l.37 ^^M

I guess because the workflow is centered around LaTeX?

At this point I stopped going down the rabbit hole.

So, I think it's worth upgrading this repot to use the latest tools, but I'm not experienced enough with the build process to attempt it further.

edit: error is in /template/customV2.latex which means I have not installed the LaTeX extensions correctly.

Progress since installing extensions.

I think the build script could check to see if the extensions are installed and if not prompt to install them.

Will file a PR with changes when I have this working.

Currently:

$ ./build.sh
Error producing PDF.
! Argument of \str_uppercase:n has an extra }.
<inserted text> 
                \par 
l.104   \setmainlanguage{}

which refers to this section:

\ifxetex
\usepackage{polyglossia}
\setmainlanguage{$mainlang$}
\setotherlanguages{$for(otherlang)$$otherlang$$sep$,$endfor$}
\else
\usepackage[shorthands=off,$lang$]{babel}
\fi

  1. I removed line 137 \setmainlanguage{$mainlang$}

This builds, with warnings.

[WARNING] Missing character: There is no ^^90 (U+0090) in font HK Grotesk/OT:script=latn;
[WARNING] Missing character: There is no 中 (U+4E2D) (U+4E2D) in font HK Grotesk/OT:script=latn;lan
[WARNING] Missing character: There is no 国 (U+56FD) (U+56FD) in font HK Grotesk/OT:script=latn;lan
[WARNING] Missing character: There is no 电 (U+7535) (U+7535) in font HK Grotesk/OT:script=latn;lan
[WARNING] Missing character: There is no 信 (U+4FE1) (U+4FE1) in font HK Grotesk/OT:script=latn;lan

So:

  1. Remove U+0090 character from "Once upon a time�" in 2007-avant-pop.md
  2. Changed **电信 to China Telecom in 2015-01-new-clues.md

This builds, without warnings.

Perhaps not ideal but it builds me a PDF.