Using Markdown for Custom Origin Reports


Today I am continuing my series  of posts about support for HTML-based reports in Origin 2019b by discussing a simpler alternative to traditional HTML for creating custom reports. This alternative is called Markdown.  Markdown allows you create simple HTML-based report content without having to invest in learning actual HTML itself. Markdown exchanges the rich complexity offered by HTML for a much simplified syntax.  Behind the scenes, Origin handles converting the Markdown into rendered HTML. This lowers the bar for Origin users who don’t feel comfortable with full HTML but would still like to create simple custom reports.

There is no one official Markdown– there are many flavors and extensions to the core syntax. Origin uses the Showdownjs library internally to convert the Markdown you enter into rendered HTML and its creators provide a comprehensive reference for the flavor of syntax it supports.  If you’d like to use Markdown for creating HTML-based reports in Origin, I suggest you bookmark that page.

Using Markdown to Create a Report

If you’d like to use Markdown for an HTML report, create a new Notes window or active an existing one. With the Notes window active, go to the main Origin menu and select HTML->Syntax->Markdown. This will tell Origin you plan to use Markdown in that Notes window. (If the Notes window is already using HTML syntax, you cannot switch directly to Markdown. You must first switch to Text and then to Markdown. And you’d have to do the same if switching from Markdown to HTML syntax .)

Now just enter your Markdown and use Ctrl+M to switch between editing your code and viewing the generated report. Again, here is the link to the documentation for the flavor of Markdown Origin uses.

In the Linear Fit report* example below,  you can observe that various levels of headers are used, along with an Origin graph place holder created by Copy Page-ing a graph and Paste Link-ing.  In addition, there is a  Markdown-style tabled filled with field codes copy-paste linked from the fitting report, an italicized field code paragraph and finally an Origin table field code (I discussed these in a recent post). In case you actually miss it, there is an example of the rendered report after the code.

* A similar example is provided from the HTML main menu.

Example of Markdown-based report


Now that you know a little bit more about creating custom reports in Origin, we can wrap up this post. Thanks for reading and get started with that Markdown!


Related Posts

About Chris Drozdowski

Chris Drozdowski is a Product Support Engineer at OriginLab. He loves to talk to customers and educate them. He particularly relishes diagnosing and solving difficult, edge-case issues. As well, he contributes code to help solve problems or enhance user experience. In his down time at work, he likes to research and write about esoteric product features. Outside of work, he enjoys spending time with his family, learning even more about coding, and exploring craft beers.

View all posts by Chris Drozdowski →

Leave a Reply

Your email address will not be published. Required fields are marked *