Giter Club home page Giter Club logo

dotpandoc's People

Contributors

iandol avatar plbt5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dotpandoc's Issues

Error compiling template "~/.local/share/pandoc/templates/custom.latex" (line 607, column 15)

I've forked your dotpandoc. When running pandoc, an error is found in the latex template. I'm not sure whether this results from a wrong config by me, or that the latex code indeed is compromised.

The yaml-part of my mwe.md file reads:

---
# Standard Scrivener+Pandoc Project YAML metadata
# IMPORTANT: YAML configuration files use SPACES for indentation to define structure, remember to straighten any smart quotes, and don't capitalise metadata keys like "author" or "title", they must be lowercase!
title: "Consolidating Semantic Interoperability in
Contemporary Architectural Paradigms"
author:
  - name: Paul Brandt
    affiliation: 1
    correspondence: [email protected]
    equal_contributor: true
  - name: His coAuthor
    affiliation: 2
    equal_contributor: true   
  - name: His coPromoter   
    affiliation: 3     
  - name: His promoter     
    affiliation: 1  
institute:
  - ^1^ University of Technology, The Netherlands.
  - ^2^ Ministry of Silly Walks, London, UK.
  - ^3^ Secondary University of Technology (SUT), The Netherlands.
keywords:
  - software architectures
  - semantic architectures
  - semantics
  - pragmatics
  - ontology
  - semantic principles
compiled: 11/08/2021
date: Wednesday, 11 August 2021
comments: "To err is human; ... err?"
# Select which templates pandocomatic will use
# you can enter overrides to the templates here as well
pandocomatic_:
  use-template:
    - paper-with-refs-latex

---

The pandocomatic.yaml specifies:

### Pandocomatic Configuration ###
# IMPORTANT: 
# YAML configuration files uses spaces for indentation to define structure
#
# Path values are normally relative to the Pandoc data dir: /Users/MYNAME/.pandoc
# so csl/apa.csl will be searched as /Users/MYNAME/.pandoc/csl/apa.csl
# see https://heerdebeer.org/Software/markdown/pandocomatic/#specifying-paths 
#
# This has been updated for the Pandoc V2.11 citeproc engine, not the older filter
templates:
#-----------------------------------------------------------------------------
  myrefs:
    setup: [] #runs a general script to rename or copy files before anything is run
    preprocessors: [] #runs a script on the markdown file itself
    pandoc:
      citeproc: true #this enables the built-in citeproc engine
      bibliography: "./mwe.bib" # my local bibtex file, 
      csl: "csl/apa.csl" #CSL style file, in the csl/ folder of pandoc data-dir
    metadata:
      reference-section-title: "Bibliography"
      notes-after-punctuation: false #don't put refs after .
      link-citations: true #hyperlink intext references to the bibliography
      csl-hanging-indent: true #try to add hanging indents to formatted bibliogrpahy
    postprocessors: [] #runs on the output file (unless it is binary like docx)
    cleanup: [] #general cleanup script
#-----------------------------------------------------------------------------
  paper-with-refs-latex:
    extends: ['myrefs'] #we can inherit from other templates
    pandoc:
      from: markdown
      to: latex
      template: "templates/custom.latex" #customised pandoc template
      toc: true
      toc-depth: 4
    metadata: 
      mainfont: 'Hoefler Text'
      sansfont: 'Avenir Next'
      monofont: 'Menlo'
      CJKmainfont: 'PingFang SC'
      lang: 'en-GB'
      papersize: 'A4'
      documentclass: 'article'
      fontsize: '12pt'
      linestretch: '1.75'
      geometry: 'margin=2cm'

The full error message is as follows:

pandoc	--from=markdown \
	--to=latex \
	--template=/Users/paulbrandt/.local/share/pandoc/templates/custom.latex \
	--toc \
	--toc-depth=2 \
	--citeproc \
	--bibliography=mwe.bib \
	--csl=apa.csl

Pandoc responded with:

Error compiling template "/Users/paulbrandt/.local/share/pandoc/templates/custom.latex" (line 607, column 15):
unexpected end of input
expecting "$--", "\n", "\r\n", "\r", "$", "${" or "$$"

Thank you for your support.
Best
Paul

Missing superscript numeral for affiliation after the author's name in

Hello. The PDF and Docx produced by using Pandocomatic template pdf-refs and docx-refs respective do not include a superscript numeral after the author's name, to match the name of the institute — prepended by a superscript numeral 1 — that comes below.

I am using Pandoc 2.11.3.2, Pandocomatic 0.2.7.4, and your dotpandoc files as of today's date. I have modified your pandocomatic.yamland custom.latex but only for font choice and to allow a font substitution. I have not knowingly changed anything else.

Thank you for your any help.

Undefined control sequence - l.38 \newfontfamily\fixfont

I'm running pandocomatic while using your dotpandoc templates. I'm stuck with producing a pdf from that, producing:

paulbrandt$ pandocomatic -b -c ./pandocomatic.yaml ./mwe.md 
The pandoc option 'verbatim' (with value 'true') is not recognized by paru. This option is skipped.
pandoc	--to=latex \
	--standalone \
	--from=markdown \
	--template=/Users/paulbrandt/.local/share/pandoc/templates/custom.latex \
	--toc \
	--toc-depth=2 \
	--filter=/Users/paulbrandt/.local/share/pandoc/filters/assimilateMetadata.rb \
	--citeproc \
	--bibliography=mwe.bib \
	--csl=apa.csl \
	--output=/Users/paulbrandt/Workspace/pandocomaticMWE/mwe/issue-dotPandoc/mwe.pdf
Error producing PDF.
! Undefined control sequence.
l.38 \newfontfamily

Whereas generating a tex output works flawlessly:

paulbrandt$ pandocomatic -b -c ./pandocomatic.yaml ./mwe.md 
The pandoc option 'verbatim' (with value 'true') is not recognized by paru. This option is skipped.
pandoc	--from=markdown \
	--to=latex \
	--template=/Users/paulbrandt/.local/share/pandoc/templates/custom.latex \
	--toc \
	--toc-depth=2 \
	--standalone \
	--filter=/Users/paulbrandt/.local/share/pandoc/filters/assimilateMetadata.rb \
	--citeproc \
	--bibliography=mwe.bib \
	--csl=apa.csl
Pandocomatic needed 0.9 seconds to convert '/Users/paulbrandt/Workspace/pandocomaticMWE/mwe/issue-dotPandoc/mwe.md' to 'mwe.tex'.

Both commands take the same mwe.md document as input, the only difference being the pandocomatic template definition in the YAML-block. This one fails:

---
# Standard Scrivener+Pandoc Project YAML metadata
<...snip...>
pandocomatic_:
  use-template:  
    - pdf  
#    - paper-with-refs-latex
---

.... whereas this one succeeds:

<...snip...>
pandocomatic_:
  use-template:  
#    - pdf  
    - paper-with-refs-latex
---

I can explain that as follows: with the second latex-setup, pandoc just generates a tex file (in its first stage) which it doesn't process anymore, whereas in the second pdf-setup pandoc initiates a second stage after that, processing the tex-file that has been generated in the first stage. Since the first stage result contains the custom.latex template (merged together with the mwe.md text), it makes sense that the error is produced only for the pdf-setup.

This is consistent with simply running pdflatex on the file that has been generated successfully in the first stage of pandoc:

paulbrandt$ pdflatex mwe.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2022/dev) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
... <snip> ...
! Undefined control sequence.
l.38 \newfontfamily
                   \fixfont[]{Cambria}
? 

My conclusion is that this issue is not caused by pandocomatic nor by the mwe.md, but by an unknown latex command that is introduced by the template, i.e., \fixfont. Indeed, looking at mwe.tex around line 38 we observe:

     1	% Options for packages loaded elsewhere
     2	\PassOptionsToPackage{unicode}{hyperref}
     3	\PassOptionsToPackage{hyphens}{url}
     4	\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
     5	\PassOptionsToPackage{space}{xeCJK}
 <...snip...>
    16	\ifPDFTeX
    17	  \usepackage[T1]{fontenc}
    18	  \usepackage[utf8]{inputenc}
    19	  \usepackage{textcomp} % provide euro and other symbols
    20	\else % if luatex or xetex
<...snip...>
    36	\fi
    37	% use Cambria/Arial Unicode to fix some font substitution problems for e.g. {\fixfont⬄}
    38	\newfontfamily\fixfont[]{Cambria}
    39	\newfontfamily\fixfontB[]{Arial Unicode MS}
    40	% customise titles
    41	\usepackage{xcolor}
    42	\usepackage{titlesec}

Unfortunately, I don't know how to resolve this.

Please find the relevant files attached (where I've replaced the yaml extension to a txt extension for having git accept it). Although these files are used as MWE, it seems logic to conclude that they are in fact irrelevant because any tex-file that includes the custom.latex template should generate exactly the same error. If not, then there's something wrong in my analysis.

Thanks for your support!

author variable for eisvogel template

After an upgrade to assimilateMetadata (in general, latest state of dotpandowc), I get the author field in the eisvogel templates as "true", as opposed to the author string itself. It seems to work ok for the latex template. I can't seem to figure out the issue. Any ideas? Can anyone replicate?

Missing Fonts

It would be nice if you could share the fonts you are using in the pandocomatic.yaml file and the source where you got them. I would like to successfully recreate the sample output you generated. Thanks!

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.