msprev / panzer

pandoc + styles
BSD 3-Clause "New" or "Revised" License
160 stars 13 forks source link

WARNING: no global style definitions found #42

Closed lyndondrake closed 6 years ago

lyndondrake commented 6 years ago

Hi,

I must be making a basic mistake, but I can't get panzer to recognise my style definitions. I get this warning when I run panzer:

WARNING: no global style definitions found

but I have styles in:

$ ls ~/.panzer/styles/
styles.yaml

Any thoughts?

msprev commented 6 years ago

I'm not sure... What does your style.yaml file contain? If it is empty then panzer won't be able to find any definitions there.

lyndondrake commented 6 years ago
Base:
  latex:
    metadata:
      papersize: a4
      mainfont: Skolar PE
      mainfontoptions: Numbers=OldStyle

Article:
  parent:
    - Base
  all:
    metadata:
      numbersections: true
  latex:
    metadata:
      documentclass: article
      papersize: a4
      mainfont: Skolar PE
      mainfontoptions: Numbers=OldStyle
      numbersections: true
      fontsize: 12pt
  pdf:
    metadata:
      documentclass: article
      papersize: a4
      mainfont: Skolar PE
      mainfontoptions: Numbers=OldStyle
      numbersections: true
      fontsize: 12pt
      standalone: true
    commandline:
      pdf-engine: `xelatex`
msprev commented 6 years ago

There is a typo:

pdf-engine: `xelatex`

should be:

pdf-engine: "`xelatex`"

The YAML parser in pandoc will choke unless the backticked characters are quoted. BTW, panzer should have kicked out an error message before bailing on reading the style definition:

ERROR:     ![WARNING] Could not parse YAML metadata at line 339 column 19: found character that cannot start any token