Giter Club home page Giter Club logo

Comments (3)

iandol avatar iandol commented on July 4, 2024

Hi Paul (thanks for mentioning me on the other thread, yes that works!).

I don't use PDFLaTeX but XeLaTeX as my PDF engine and don't really test with PDFLaTeX to be honest. \newfontfamily is a command for XeLaTeX and LuaLaTeX; these engines properly support unicode and more modern opentype fonts.

There has been a regression since last week even for XeLaTeX — I cannot build my workflow.scriv project any more but I could last week (I just updated my sample outputs, see e.g. https://github.com/iandol/scrivomatic/blob/master/sample-output/workflow.pdf updated 5 days ago and working fine). There was a new version of Pandoc (V2.15), and a minor TeX update. I have updated my custom.latex to copy the latest changes for Pandoc, and building now works again...

I can also build your sample. I had to tweak the metadata to use XeLaTeX and add the cleveref package (using header-includes which is pandoc metadata to add text into the latex template header):

pandocomatic_:
  pandoc:
    pdf-engine: 'xelatex'
  metadata:
    header-includes:
      - '`\usepackage{cleveref}`{=latex}'
  use-template:  
    #- paper-with-refs-latex
    - pdf

If I specify XeLaTeX in the metadata, and making minor mods for missing files and replacing your refs with mine it broadly works:

mwe3.pdf
mwe3.md
pandocomatic2.yaml.txt

I normally do not use Pandoc to make the PDF, but output TEX and do it myself (i.e. use paper-with-refs-latex template so Pandoc makes a tex file then I run it through latexmk using scrivomatic automatically with the -B option or manually on the command-line). If I do that, I can fix the minor issue with the first ✉ character:

─❯ pandocomatic --debug -c pandocomatic2.yaml mwe3.md
pandoc	--pdf-engine=xelatex \
	--from=markdown \
	--to=latex \
	--template=/Users/ian/.local/share/pandoc/templates/custom.latex \
	--toc \
	--toc-depth=2 \
	--standalone \
	--filter=/Users/ian/.local/share/pandoc/filters/assimilateMetadata.rb \
	--citeproc \
	--bibliography=/Users/ian/.local/share/pandoc/Core.bib \
	--csl=/Users/ian/.local/share/pandoc/csl/apa6.csl
Pandocomatic needed 1.3 seconds to convert '/Users/ian/Desktop/workflow-mmd/mwe3.md' to 'mwe3.tex'.
─❯ latexmk -logfilewarnings -interaction=nonstopmode -f -pv -time -xelatex mwe3.tex

mwe3.pdf

Now if I specify pdflatex as the engine, I get this:

mwe3.pdf

You see the first page has a minor error but that can be removed; indeed I have now put these lines in an IF statement so they shouldn't be called anymore if using PDFLaTeX... You can upgrade the custom.latex template...

from dotpandoc.

iandol avatar iandol commented on July 4, 2024

Some notes:

  1. You should use nonumberfigures: false in your metadata — I set it to true as I use Scrivener to generate figure numbers and my cross-references.
  2. Not sure why you use PDFLaTeX, but note - postprocessors/fixLaTeX.rb will inject \fixfont for certain characters as it assumes you are using XeLaTeX or LuaLaTeX; so you will probably want to disable this postprocessor. See https://github.com/iandol/dotpandoc/blob/master/postprocessors/fixLaTeX.rb#L12 for the details...
  3. You can add more packages using header-includes — or you can edit custom.latex and make your own template to include these. I think header-includes works well for simple additions.

from dotpandoc.

plbt5 avatar plbt5 commented on July 4, 2024

Indeed, using --pdf-engine=xelatex did the trick. I'm not sure why I used the pdflatex-engine; I think it is reminiscent of my code from 10yrs back or so.

I'll close the issue!
Thanks for your support.

from dotpandoc.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.