{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/2069","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/2069/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/2069/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/2069/events","html_url":"https://github.com/jgm/pandoc/issues/2069","id":67801160,"number":2069,"title":"[Feature request] submit pandoc commandline options by metadata and/or separate yaml file","user":{"login":"bwl21","id":2022976,"avatar_url":"https://avatars.githubusercontent.com/u/2022976?v=3","gravatar_id":"","url":"https://api.github.com/users/bwl21","html_url":"https://github.com/bwl21","followers_url":"https://api.github.com/users/bwl21/followers","following_url":"https://api.github.com/users/bwl21/following{/other_user}","gists_url":"https://api.github.com/users/bwl21/gists{/gist_id}","starred_url":"https://api.github.com/users/bwl21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwl21/subscriptions","organizations_url":"https://api.github.com/users/bwl21/orgs","repos_url":"https://api.github.com/users/bwl21/repos","events_url":"https://api.github.com/users/bwl21/events{/privacy}","received_events_url":"https://api.github.com/users/bwl21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-11T15:54:00Z","updated_at":"2015-04-13T20:33:18Z","closed_at":null,"body":"I open this ticket according to the following post in the google group https://groups.google.com/forum/#!searchin/pandoc-discuss/definition$20list/pandoc-discuss/ZKytjti_h2Q/pcagNlG9SdsJ\r\n\r\nSumming up:\r\n\r\n1. pandoc should allow to choose at least reader extensions in the document metadata\r\n2. pandoc should allow to provide options in an extra metadata file provided by e.g. <br/>\r\n     ```--metadatafile <file>```\r\n3. pandoc should allow to customize options even in a default metadata file\r\n\r\nIn particular the change of definition list is a drastic one. The only way to deal with legacy documents is to enable compact_definition_list at any time. In a given environment there is not even a compatibility mode allowing to support both syntaxes on input and use pandoc as an implicit converter. One must chose the definition list format explicitly. The requested feature would make it easier to maintain legacy documents. For example I have documents which are adapted every other year and got the surprise ...\r\n\r\nThe metadata could be for example\r\n\r\n```markdown\r\n---\r\nmdreader:\r\n -   +fenced_code_blocks\r\n -   +compact_definition_lists\r\nmdwriter:\r\n -   -backtick_code_blocks\r\n -   +fenced_code_blocks\r\n -   +compact_definition_lists\r\npandocoptions:\r\n -   --atx-headers\r\n...\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/92490165","html_url":"https://github.com/jgm/pandoc/issues/2069#issuecomment-92490165","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/2069","id":92490165,"user":{"login":"bwl21","id":2022976,"avatar_url":"https://avatars.githubusercontent.com/u/2022976?v=3","gravatar_id":"","url":"https://api.github.com/users/bwl21","html_url":"https://github.com/bwl21","followers_url":"https://api.github.com/users/bwl21/followers","following_url":"https://api.github.com/users/bwl21/following{/other_user}","gists_url":"https://api.github.com/users/bwl21/gists{/gist_id}","starred_url":"https://api.github.com/users/bwl21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwl21/subscriptions","organizations_url":"https://api.github.com/users/bwl21/orgs","repos_url":"https://api.github.com/users/bwl21/repos","events_url":"https://api.github.com/users/bwl21/events{/privacy}","received_events_url":"https://api.github.com/users/bwl21/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T20:33:18Z","updated_at":"2015-04-13T20:33:18Z","body":"I plan to solve the issue in my environment (https://github.com/bwl21/wortsammler) such that Wortsammler first reads the metadata of the input and adjust the pandoc command line. This corresponds to the makefile proposal. In addition to this I plan to implement the config hierarchy mentioned before.\r\nDue to the non backwards compatible change in definition list, it is even necessary to choose a proper pandoc version :-) which I plan to handle in Wortsammler.\r\n\r\nMy proposal was indeed to handle the cases where plain pandoc is used \"one shot conversions\", respectively out of the box editor integrations (e.g. sublime) which act on one single file.\r\n\r\nWe all agree that the most important part is the configuration of the reader. In my Opinion, metadata is information about data. And the markdown reader configuration is meta information about the current markdown file. So I still think that adding it to the metadata block is still a valid approach. \r\nAs the metadata block can contain an arbitrary structure, there could be one more reserved entry named \"pandoc\",\r\n\r\nThis is, how I plan to represent this in Wortsammler's config file:\r\n\r\n```.yaml\r\n:pandoc:\r\n  :system_command: ! 'pandoc_1.13.1 '\r\n  :markdown_intput_switches:\r\n  - -backtick_code_blocks\r\n  - +fenced_code_blocks\r\n  - +compact_definition_lists\r\n  :markdown_output_switches:\r\n  - -backtick_code_blocks\r\n  - +fenced_code_blocks\r\n  - -compact_definition_lists\r\n```\r\n\r\nIf by whatever reason another syntax shall be applied, then I feel that xml processing instruction would be the adequate solution, not xml comments.\r\n\r\n```.xml\r\n<?pandoc mardown-reader=\"-backtick_code_blocks+fenced_code_blocks+compact_definition_lists\" ?>\r\n```\r\n"}}