3

I saw in a wikipedia page (Comparison of documentation generators) that pandoc can be used as a Documentation Generator (like doxygen does).

But I didn't find in pandoc's documentation or in it's site a way to extract documentation from source code comments, as others documentation generator does.

So how can I use pandoc to do this? There is a way to extract pandoc's markup language from code comments and create a PDF or HTML document from it? Or the wikipedia's comparison list is wrong?

1

1 Answer 1

2

Taking the method described in http://www.ucalgary.ca/rzach/blog/2014/05/simple-way-to-document-code-with-markdown-grep-and-pandoc.html as mb21 mentions a bash script like the one below does the job

"makedoc" #!/bin/bash grep -e "^%" -e "^$$" $1.tex | cut --bytes=3-| pandoc -f markdown -o $1.pdf 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.