Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file for customizing output #327

Closed
stomar opened this issue Oct 27, 2011 · 4 comments
Closed

Config file for customizing output #327

stomar opened this issue Oct 27, 2011 · 4 comments

Comments

@stomar
Copy link
Contributor

stomar commented Oct 27, 2011

There should be a feature for customizing the output writer's behavior (a command line option specifying a configuration file).

This would be very helpful for documents in foreign languages (e.g. in connection with the --smart option and the style for the used "curly" quotes). It would also be useful for authors who need to meet certain styling conventions, possibly different for different documents.

Some things that should be customizable:

  • general
    • table of contents entry for the epub cover image (default: "Title Page")
  • with the --smart option
    • curly quotes (opening/closing/inner/outer separately)
    • dashes (substitution of -- and ---)

Best regards,
Marcus

@stepnem
Copy link

stepnem commented Oct 28, 2011

To quote from my mail from Fri, 21 Oct 2011 11:46:21 +0200 which somehow
didn't seem to have made it to the pandoc list:

Actually one might also want to apply such configuration to only a
part of the text (say in a multilingual document), so the granularity
should IMO be "sub-documental".

This could also cover things like the "don't convert newlines to spaces
for Chinese text" I asked for recently.

@bpj
Copy link

bpj commented Oct 30, 2011

Other things:

  • Headings for TOC, footnotes and bibliography
  • The symbol/text used for footnote backlinks
  • The markup used for block/span types, e.g.
    for the markdown writer:
Emph:
  start: _
  end: _
Strong:
  start: __
  end: __

@jgm jgm changed the title Customization of output style Config file for customizing output Apr 28, 2017
@nichtich
Copy link
Contributor

nichtich commented Apr 3, 2018

This issue seems to mix two feature requests:

  • additional options to configure writers, especially for internationalization (e.g. headings for TOC, footnotes and bibliography...)
  • support of setting such options in a config file

The former could be implemented by configurable extensions (see below).

The latter was also discussed before in #2069. I would welcome a way to read all pandoc options (as listed with pandoc --help) from a config file. By now only some of these options can be set as document metadata (option -M / --metadata) but others such as pdf-engine, self-contained... not. The requested config file format could look like this:

---
pdf-engine: xelatex
self-contained: true
metadata:  
  key: value...
variable:
  key: value...
extension:
  foobar:
    Emph:
      start: _
      end: _
---

Example usage:

  • pandoc -t html (adds --self-contained from config file)
  • pandoc -t markdown+foobar

@mb21
Copy link
Collaborator

mb21 commented May 5, 2018

This issue seems to mix two feature requests:

Agreed.

  • additional options to configure writers, especially for internationalization (e.g. headings for TOC, footnotes and bibliography...)

There has been progress on this: see Translations.hs and --abbreviations (c93d069) for example. For additional suggestions, please open (and look for) more specific issues – or maybe ask on pandoc-discuss first.

  • support of setting such options in a config file

see #4627

@mb21 mb21 closed this as completed May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants