

For example, TeX, and LaTeX both use the “.tex” extension. This can be useful if you’re working with a file format that shares a file extension with other related formats. The -f (from) and -t (to) options are used to tell pandoc which file formats you want to convert from and to. Our sample Markdown file, sample.md, contains the short section of Markdown shown in the image below.Ī neat touch is the alternative text for the image is also used to automatically generate a caption for the figure.

The -o (output) option tells pandoc the name of the file we wish to create: pandoc -o sample.html sample.md Here, we’re going to generate an HTML file from a Markdown file. pandoc can usually work out which file formats you’re working with from their filenames. RELATED: What Is Markdown, and How Do You Use It? Converting Filesįile conversions are straightforward. We’ll cover more examples of all of these in the next section. Then, enclose the path to the image in parentheses. Type any alternative text for the image in the brackets. To insert an image, type an exclamation point immediately before brackets ( !).To create a hyperlink, enclose the name of the site in square brackets ( ), and the URL in parentheses like so: ().To create a numbered list, start each line with a digit followed by a period, and then insert a space before the text.To create a bulleted list, start each line of the list with an asterisk and insert a space before the text.Use one hash for a top-level heading, two for a second-level, and so on. Text is separated from the hash by a space. Headings are represented by the number sign/hash mark ( #).To emphasize text with italics, wrap it in asterisks.
