Skip to content

Instantly share code, notes, and snippets.

@tim6her
Created March 25, 2018 08:49
Show Gist options
  • Save tim6her/2966117df0dbdbabe939688b328dafa8 to your computer and use it in GitHub Desktop.
Save tim6her/2966117df0dbdbabe939688b328dafa8 to your computer and use it in GitHub Desktop.
Testing pandoc
<p>This is an example input file. Comparing it with the output it generates can show you how to produce a simple document of your own.</p>
<h1 id="ordinary-text">Ordinary Text</h1>
<p>The ends of words and sentences are marked by spaces. It doesn’t matter how many spaces you type; one is as good as 100. The end of a line counts as a space.</p>
<p>One or more blank lines denote the end of a paragraph.</p>
<p>Since any number of consecutive spaces are treated like a single one, the formatting of the input file makes no difference to LaTeX, but it makes a difference to you. When you use LaTeX, making your input file as easy to read as possible will be a great help as you write your document and when you change it. This sample file shows how you can add comments to your own input file.</p>
<p>Because printing is different from typewriting, there are a number of things that you have to do differently when preparing an input file than if you were just typing the document directly. Quotation marks like “this” have to be handled specially, as do quotes within quotes: “‘this’ is what I just wrote, not ‘that’”.</p>
<p>Dashes come in three sizes: an intra-word dash, a medium dash for number ranges like 1–2, and a punctuation dash—like this.</p>
<p>A sentence-ending space should be larger than the space between words within a sentence. You sometimes have to type special commands in conjunction with punctuation characters to get this right, as in the following sentence. Gnats, gnus, etc. all begin with G. You should check the spaces after periods when reading your output to make sure you haven’t forgotten any special cases. Generating an ellipsis …  with the right spacing around the periods requires a special command.</p>
<p>LaTeX interprets some common characters as commands, so you must type special commands to generate them. These characters include the following: $ &amp; % # { and }.</p>
<p>In printing, text is usually emphasized with an <em>italic</em> type style.</p>
<p>A long segment of text can also be emphasized in this way. Text within such a segment can be given <em>additional</em> emphasis.</p>
<p>It is sometimes necessary to prevent LaTeX from breaking a line where it might otherwise do so. This may be at a space, as between the “Mr.” and “Jones” in “Mr. Jones”, or within a word—especially when the word is a symbol like that makes little sense when hyphenated across lines.</p>
<p>Footnotes<a href="#fn1" class="footnoteRef" id="fnref1"><sup>1</sup></a> pose no problem.</p>
<p>LaTeX is good at typesetting mathematical formulas like <span class="math inline"> x-3y + z = 7 </span> or <span class="math inline"> a_{1} &gt; x^{2n} + y^{2n} &gt; x&#39; </span> or <span class="math inline"> {(A, B)} = \sum_{i} a_{i} b_{i} </span>. The spaces you type in a formula are ignored. Remember that a letter like <span class="math inline">x</span> is a formula when it denotes a mathematical symbol, and it should be typed as one.</p>
<h1 id="displayed-text">Displayed Text</h1>
<p>Text is displayed by indenting it from the left margin. Quotations are commonly displayed. There are short quotations</p>
<blockquote>
<p>This is a short quotation. It consists of a single paragraph of text. See how it is formatted.</p>
</blockquote>
<p>and longer ones.</p>
<blockquote>
<p>This is a longer quotation. It consists of two paragraphs of text, neither of which are particularly interesting.</p>
<p>This is the second paragraph of the quotation. It is just as dull as the first paragraph.</p>
</blockquote>
<p>Another frequently-displayed structure is a list. The following is an example of an <em>itemized</em> list.</p>
<ul>
<li><p>This is the first item of an itemized list. Each item in the list is marked with a “tick”. You don’t have to worry about what kind of tick mark is used.</p></li>
<li><p>This is the second item of the list. It contains another list nested inside it. The inner list is an <em>enumerated</em> list.</p>
<ol>
<li><p>This is the first item of an enumerated list that is nested within the itemized list.</p></li>
<li><p>This is the second item of the inner list. LaTeX allows you to nest lists deeper than you really should.</p></li>
</ol>
<p>This is the rest of the second item of the outer list. It is no more interesting than any other part of the item.</p></li>
<li><p>This is the third item of the list.</p></li>
</ul>
<p>You can even display poetry.</p>
<blockquote>
<p>There is an environment for verse<br />
Whose features some poets will curse.</p>
<p>For instead of making<br />
Them do <em>all</em> line breaking,<br />
It allows them to put too many words on a line when they’d rather be forced to be terse.</p>
</blockquote>
<p>Mathematical formulas may also be displayed. A displayed formula is one-line long; multiline formulas require special formatting instructions. <span class="math display">\displaystyle {(\Gamma, \psi&#39;)} = x&#39;&#39; + y^{2} + z_{i}^{n}</span> Don’t start a paragraph with a displayed equation, nor make one a paragraph by itself.</p>
<div class="footnotes">
<hr />
<ol>
<li id="fn1"><p>This is an example of a footnote.<a href="#fnref1">↩</a></p></li>
</ol>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment