I prefer the #
and ##
for Headers 1 and 2 respectively. I'd like to make my instance of PanDoc respect that when it is converting from say html
into .md
Right now it converts H1s in the older style
Header 1
========
Is there a way to change this behavior.
I use PanDoc via Atom primarily. Not sure if this will have an effect. In researching I have concluded that the Atom functionality is flowing from my macOS systems PanDoc installation. So modifying the behavior there ought to flow through. If not, I'd be willing to change my behavior and use pandoc from the terminal if need be.
Thanks.
Thanks to the responder with the answer (atx-style-headers) achieved via command line using:
--atx-headers
flag
Further explanation is available here at Pandocs documentation
Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.
You can use the program pandoc on the SCF Linux and Mac machines (via the terminal window) to convert from formats such as HTML, LaTeX and Markdown to formats such as HTML, LaTeX, Word, OpenOffice, and PDF, among others.
After installing, open your command prompt or terminal, navigate to the folder where you have saved your MS Word file, and enter the following command. As you can see, first, write pandoc to execute any pandoc command, and then write the file name of a file with extension which you want to convert to a markdown file.
A recent version of Pandoc (>= 1.12. 3) is required to use the rmarkdown package. RStudio also automatically includes this so you do not need to download Pandoc if you plan to use rmarkdown from the RStudio IDE.
Try:
pandoc --atx-headers -o try.md try.html
The output file try.md
should have only ATX-style headers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With