{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/pandoc/issues/1963","labels_url":"https://api.github.com/repos/jgm/pandoc/issues/1963/labels{/name}","comments_url":"https://api.github.com/repos/jgm/pandoc/issues/1963/comments","events_url":"https://api.github.com/repos/jgm/pandoc/issues/1963/events","html_url":"https://github.com/jgm/pandoc/issues/1963","id":58313815,"number":1963,"title":"`\\lstinline` inside `\\subsection` in LaTeX output causes issues","user":{"login":"wilx","id":1098563,"avatar_url":"https://avatars.githubusercontent.com/u/1098563?v=3","gravatar_id":"","url":"https://api.github.com/users/wilx","html_url":"https://github.com/wilx","followers_url":"https://api.github.com/users/wilx/followers","following_url":"https://api.github.com/users/wilx/following{/other_user}","gists_url":"https://api.github.com/users/wilx/gists{/gist_id}","starred_url":"https://api.github.com/users/wilx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilx/subscriptions","organizations_url":"https://api.github.com/users/wilx/orgs","repos_url":"https://api.github.com/users/wilx/repos","events_url":"https://api.github.com/users/wilx/events{/privacy}","received_events_url":"https://api.github.com/users/wilx/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jgm/pandoc/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/jgm/pandoc/labels/Minor","name":"Minor","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-20T06:04:47Z","updated_at":"2015-02-20T09:18:16Z","closed_at":null,"body":"I am generating (some) log4cplus documentation from Markdown using Pandoc. Recently, LaTeX output compilation has started failing for me:\r\n\r\n~~~~\r\n! Extra }, or forgotten \\endgroup.\r\n<recently read> \\egroup \r\n        \r\nl.656         LIBS \r\n                 += -LC:\\log4cplus\\msvc14\\Win32\\bin.Release_Unicode -llog4cp...\r\n~~~~\r\n\r\nI had no clue what was wrong with that so I [asked a question on TeX.SE](http://tex.stackexchange.com/questions/229113/list-of-packages-known-to-use-latex2-09-definition-of-the-figure-environment-wi) after at first failing to find a solution there as well.\r\n\r\nAs you can see from the accepted answer, the problem appears to be that when `--listings` option is used with Pandoc, it generates `\\lstinline!foo!` inside `\\subsection` for \r\n\r\n~~~~\r\n## Header with `foo`\r\n~~~~\r\n\r\nThe solution appears to be to use `\\texttt` instead inside the headers.\r\n"},"comment":{"url":"https://api.github.com/repos/jgm/pandoc/issues/comments/75209529","html_url":"https://github.com/jgm/pandoc/issues/1963#issuecomment-75209529","issue_url":"https://api.github.com/repos/jgm/pandoc/issues/1963","id":75209529,"user":{"login":"mpickering","id":1216657,"avatar_url":"https://avatars.githubusercontent.com/u/1216657?v=3","gravatar_id":"","url":"https://api.github.com/users/mpickering","html_url":"https://github.com/mpickering","followers_url":"https://api.github.com/users/mpickering/followers","following_url":"https://api.github.com/users/mpickering/following{/other_user}","gists_url":"https://api.github.com/users/mpickering/gists{/gist_id}","starred_url":"https://api.github.com/users/mpickering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpickering/subscriptions","organizations_url":"https://api.github.com/users/mpickering/orgs","repos_url":"https://api.github.com/users/mpickering/repos","events_url":"https://api.github.com/users/mpickering/events{/privacy}","received_events_url":"https://api.github.com/users/mpickering/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T09:18:16Z","updated_at":"2015-02-20T09:18:16Z","body":"```\r\n> .cabal-sandbox/bin/pandoc -t latex --listings\r\n## heading `heading`\r\n\\subsection{\\texorpdfstring{heading\r\n\\texttt{heading}}{heading heading}}\\label{heading-heading}\r\n```\r\n\r\nFixed in HEAD :+1: "}}