Files
ioccc/markdown.html
T

597 lines
24 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- START: two lines up starts content from: inc/top.default.html -->
<!-- END: this line ends content from: inc/top.default.html -->
<!-- START: this line starts content from: inc/head.default.html -->
<head>
<link rel="stylesheet" href="./ioccc.css">
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap" rel="stylesheet">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<title>The International Obfuscated C Code Contest</title>
<link rel="icon" type="image/x-icon" href="./favicon.ico">
<meta name="description" content="IOCCC markdown">
<meta name="keywords" content="IOCCC, markdown">
</head>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!! DO NOT MODIFY THIS FILE - This file is generated by a tool !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- END: this line ends content from: inc/head.default.html -->
<!-- -->
<!-- This web page was formed via the tool: bin/gen-top-html.sh -->
<!-- The content of main section of this web page came from: markdown.md -->
<!-- -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- !!! Do not modify this web page, instead modify the file: markdown.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: markdown.md !!! -->
<!-- !!! Do not modify this web page, instead modify the file: markdown.md !!! -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- Markdown content was converted into HTML via the tool: bin/md2html.sh -->
<!-- START: this line starts content from: inc/body.default.html -->
<body>
<!-- END: this line ends content from: inc/body.default.html -->
<!-- START: this line starts content from: inc/topbar.default.html -->
<div class="theader">
<nav class="topbar">
<div class="container">
<div class="logo">
<a href="./index.html" class="logo-link">
IOCCC
</a>
</div>
<div class="topbar-items">
<div class="item">
<span class="item-header">
Entries
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./years.html" class="sub-item-link">
Winning Entries
</a>
</div>
<div class="outfit-font">
<a href="./authors.html" class="sub-item-link">
People who have won
</a>
</div>
<div class="outfit-font">
<a href="./location.html" class="sub-item-link">
Location of authors
</a>
</div>
<div class="outfit-font">
<a href="./bugs.html" class="sub-item-link">
Bugs &amp; (Mis)features
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
Status
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./news.html" class="sub-item-link">
IOCCC News
</a>
</div>
<div class="outfit-font">
<a href="./status.html" class="sub-item-link">
Contest status
</a>
</div>
<div class="outfit-font">
<a href="./next/index.html" class="sub-item-link">
Rules &amp; Guidelines
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
FAQ
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./faq.html" class="sub-item-link">
FAQ
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#submit" class="sub-item-link">
How to enter the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_an_entry" class="sub-item-link">
Fixing IOCCC entries
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_web_site" class="sub-item-link">
Fixing the web site
</a>
</div>
<div class="outfit-font">
<a href="./faq.html#fix_author" class="sub-item-link">
Fixing author info
</a>
</div>
</div>
</div>
<div class="item">
<span class="item-header">
About
</span>
<div class="sub-item">
<div class="outfit-font">
<a href="./index.html" class="sub-item-link">
IOCCC Home
</a>
</div>
<div class="outfit-font">
<a href="./judges.html" class="sub-item-link">
The IOCCC Judges
</a>
</div>
<div class="outfit-font">
<a href="./contact.html" class="sub-item-link">
Contacting the IOCCC
</a>
</div>
<div class="outfit-font">
<a href="./thanks-for-help.html" class="sub-item-link">
Thanks for the help
</a>
</div>
</div>
</div>
</div>
</div>
</nav>
<div class="header-mobile-menu">
<noscript>
<a href="./nojs-menu.html" class="topbar-js-label">
Please Enable JavaScript
</a>
</noscript>
<button id="header-open-menu-button" class="topbar-mobile-menu">
<img
src="./png/hamburger-icon-open.png"
alt="hamburger style menu icon - open state"
width=48
height=48>
</button>
<button id="header-close-menu-button" class="hide-content">
<img
src="./png/hamburger-icon-closed.png"
alt="hamburger style menu icon - closed state"
width=48
height=48>
</button>
<div id="mobile-menu-panel" class="hide-content">
<div class="mobile-menu-container">
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Entries
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./years.html">
Winning Entries
</a>
<a class="mobile-submenu-item" href="./authors.html">
People who have won
</a>
<a class="mobile-submenu-item" href="./location.html">
Location of authors
</a>
<a class="mobile-submenu-item" href="./bugs.html">
Bugs &amp; (Mis)features
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
Status
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./status.html">
Contest status
</a>
<a class="mobile-submenu-item" href="./next/index.html">
Rules &amp; Guidelines
</a>
<a class="mobile-submenu-item" href="./news.html">
IOCCC News
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
FAQ
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./faq.html">
Frequently Asked Questions
</a>
<a class="mobile-submenu-item" href="./faq.html#submit">
How to enter the IOCCC
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_an_entry">
Fixing IOCCC entries
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_web_site">
Fixing the web site
</a>
<a class="mobile-submenu-item" href="./faq.html#fix_author">
Fixing author info
</a>
</div>
</div>
<div class="mobile-menu-wrapper">
<div class="mobile-menu-item">
About
</div>
<div class="mobile-submenu-wrapper">
<a class="mobile-submenu-item" href="./index.html">
IOCCC Home
</a>
<a class="mobile-submenu-item" href="./judges.html">
The IOCCC Judges
</a>
<a class="mobile-submenu-item" href="./contact.html">
Contacting the IOCCC
</a>
<a class="mobile-submenu-item" href="./thanks-for-help.html">
Thanks for the help
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var headerOpenMenuButton = document.getElementById("header-open-menu-button");
var headerCloseMenuButton = document.getElementById("header-close-menu-button");
var mobileMenuPanel = document.getElementById("mobile-menu-panel");
headerOpenMenuButton.addEventListener("click", () => {
headerOpenMenuButton.classList.remove("topbar-mobile-menu");
headerOpenMenuButton.classList.add("hide-content");
headerCloseMenuButton.classList.remove("hide-content");
headerCloseMenuButton.classList.add("topbar-mobile-menu");
mobileMenuPanel.classList.remove("hide-content");
mobileMenuPanel.classList.add("topbar-mobile-panel");
});
headerCloseMenuButton.addEventListener("click", () => {
headerCloseMenuButton.classList.remove("topbar-mobile-menu");
headerCloseMenuButton.classList.add("hide-content");
mobileMenuPanel.classList.add("hide-content");
mobileMenuPanel.classList.remove("topbar-mobile-panel");
headerOpenMenuButton.classList.add("topbar-mobile-menu");
headerOpenMenuButton.classList.remove("hide-content");
});
</script>
<!-- END: this line ends content from: inc/topbar.default.html -->
<!-- START: this line starts content from: inc/header.default.html -->
<div class="header">
<a href="./2011/zucker/index.html">
<img src="./png/ioccc.png"
alt="IOCCC image by Matt Zucker"
width=300
height=110>
</a>
<h1>The International Obfuscated C Code Contest</h1>
<h2>IOCCC markdown best practices</h2>
</div>
<!-- END: this line ends content from: inc/header.default.html -->
<!-- START: this line starts content from: inc/navbar.empty.html -->
<div class="navbar">
<a class="Right" href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Fmarkdown.html">&#x2713;</a>
</div>
<!-- END: this line ends content from: inc/navbar.empty.html -->
<!-- START: this line starts content from: inc/before-content.default.html -->
<div class="content" id="content">
<!-- END: this line ends content from: inc/before-content.default.html -->
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- BEFORE: 1st line of markdown file: markdown.md -->
<h1 id="ioccc-markdown-best-practices">IOCCC markdown best practices</h1>
<p>The IOCCC makes extensive use of <a href="https://daringfireball.net/projects/markdown/">markdown</a>.
For example, we <a href="faq.html#submit">submitting to the IOCCC</a>, we have people
to submit remarks about entry in markdown format. Every
<a href="years.html">winning IOCCC entry</a> uses a <code>README.md</code> markdown file
as the basis for forming the <code>index.html</code> web page for that entry.
All generated HTML pages on the <a href="https://www.ioccc.org/index.html">Official IOCCC web site</a>
start with some markdown content.</p>
<p>See the <a href="https://www.markdownguide.org/basic-syntax">markdown syntax</a> guide.
See also <a href="https://spec.commonmark.org/current/">CommonMark Spec</a>.</p>
<p>Nevertheless, the IOCCC does have certain practices that we ask authors to follow.
Some these relate to use of markdown directly, others relate to injecting HTML
into the markdown file.</p>
<p>In particular there are things we ask people to please do <strong>NOT</strong> use markdown files:</p>
<h2 id="do-not-use-name-attributes-in-html-a-tags">Do not use name attributes in HTML a tags</h2>
<p>Please do not use the HTML construct:</p>
<pre><code> &lt;a name=&quot;string&quot;&gt;\&lt;/a&gt; &lt;=== no thank you</code></pre>
<p>as those are <strong>NOT</strong> part of the HTML 5 standard.</p>
<p>Instead use:</p>
<pre><code> &lt;div id=&quot;string&quot;&gt;...\&lt;/div&gt;</code></pre>
<p>where the “…” is the HTML you want to “name”. The <strong>div</strong>
encapsulates the HTML you want to name: I.e., the target of some
“<strong>&lt;a href=”#string”&gt;</strong>” or some other “<strong>&lt;a href=”URL#string”&gt;</strong>”
for the given page URL.</p>
<p>There are certain HTML Elements that cannot have internal “<strong>&lt;div
id=”string”&gt;…&lt;/div&gt;</strong>”. For example you cannot do this:</p>
<pre><code> # &lt;div id=&quot;string&quot;&gt;This will not work&lt;/div&gt;</code></pre>
<p>For things like headings, you have to surround them as in:</p>
<pre><code> &lt;div id=&quot;string&quot;&gt;
# This will work
&lt;/div&gt;</code></pre>
<p>While some browsers will still recognize the HTML construct “<strong>&lt;a
name=”string”&gt;&lt;/a&gt;</strong>”, they may not in the future.</p>
<h2 id="do-not-use-trailing-backslash-outside-of-a-code-block">Do not use trailing backslash outside of a code block</h2>
<p>Unless the line is inside a markdown code block, please do <strong>NOT</strong>
end a markdown line with a trailing backslash (“\”). Instead use
a trailing “<strong>&lt;br&gt;</strong>”.</p>
<p>Instead of:</p>
<pre><code> In markdown,\ &lt;=== no thank you
do not use trailing\
backslashes outside of\
a code block</code></pre>
<p>use:</p>
<pre><code> In markdown,&lt;br&gt;
use trailing&lt;br&gt;
br&#39;s outside of&lt;br&gt;
a code block</code></pre>
<p>Again, use of a trailing backslash (“\”) inside a markdown code block is fine:</p>
<pre><code>```
This is OK\
inside a\
markdown code\
block
```</code></pre>
<p>This will avoid <code>pandoc(1)</code> generating deprecated HTML elements such as <code>\&lt;br /&gt;</code>.</p>
<h2 id="do-not-use-markdown-image-elements">Do not use markdown image elements</h2>
<p>Please do not use the markdown embedded image element.</p>
<p>Instead of using this markdown element to embed an image:</p>
<pre><code> ![alt text](filename.png &quot;Title&quot;) &lt;=== no thank you</code></pre>
<p>Use a “img” HTML element with “alt”, “alt”, “width” and “length”
attributes:</p>
<pre><code> &lt;img src=&quot;filename.png&quot;
alt=&quot;describe the filename.png image for someone who cannot view it&quot;
width=PIXEL_WIDTH height=PIXEL_HEIGHT&gt;</code></pre>
<p>For example, instead of:</p>
<pre><code> ![1984-anonymous-tattoo.jpg](1984-anonymous-tattoo.jpg) &lt;=== no thank you</code></pre>
<p>use this HTML:</p>
<pre><code> &lt;img src=&quot;1984-anonymous-tattoo.jpg&quot;
alt=&quot;image of a tattoo of the 1984 anonymous C code&quot;
width=600 height=401&gt;</code></pre>
<p>The problem goes beyond the fact that <code>pandoc(1)</code> generates problematic
HTML from the markdown image construct, the resulting HTML does not
have “width” and “height” information so browsers have to slow down
on rendering text around the image until it can internally determine
the image size.</p>
<h2 id="do-not-use-markdown-style-horizontal-lines">Do not use markdown style horizontal lines</h2>
<p>Please do not use “<strong>—</strong>”-style lines in markdown to create horizontal
lines, nor to separate sections.</p>
<p>Unless something is inside a markdown code block, do not start a
line with 3 or more dashes (“-”).</p>
<p>Such causes <code>pandoc(1)</code> to generate “<strong>&lt;hr /&gt;</strong>”. The “<strong>&lt;hr
/&gt;</strong>” has no effect in standard HTML 5 and interacts badly with
unquoted attribute values.</p>
<p>If a horizontal line is really needed, use:</p>
<pre><code> &lt;hr&gt;</code></pre>
<p>If a short line is needed, use:</p>
<pre><code> &lt;hr style=&quot;width:10%;text-align:left;margin-left:0&quot;&gt;</code></pre>
<h2 id="do-not-use-the-strike-html-element">Do not use the strike HTML element</h2>
<p>Please not use the HTML element:</p>
<pre><code> &lt;strike&gt;...&lt;/strike&gt; &lt;=== no thank you</code></pre>
<p>Use instead:</p>
<pre><code> &lt;del&gt;...&lt;/del&gt;</code></pre>
<h2 id="do-not-use-tt-html-elements">Do not use tt HTML elements</h2>
<p>Please do not use the tt HTML elements:</p>
<div class="sourceCode" id="cb16"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">tt</span><span class="dt">&gt;</span>The HTML 5 obsolete tt element is obsolete<span class="dt">&lt;/</span><span class="kw">tt</span><span class="dt">&gt;</span> <span class="er">&lt;</span>=== no thank you</span></code></pre></div>
<p>Instead use either a monospaced span:</p>
<div class="sourceCode" id="cb17"><pre class="sourceCode html"><code class="sourceCode html"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="dt">&lt;</span><span class="kw">span</span><span class="ot"> style</span><span class="op">=</span><span class="st">&quot;font-family: monospace;&quot;</span><span class="dt">&gt;</span>Use of monospaced font is one option<span class="dt">&lt;/</span><span class="kw">span</span><span class="dt">&gt;</span></span></code></pre></div>
<p>Or better and easier still, use an inline markdown code block:</p>
<pre><code> `inline markdown code block is easier and much better`</code></pre>
<h2 id="do-not-use-un-indented-code-clocks">Do not use un-indented code clocks</h2>
<p>Please do not start code blocks at the left-hand edge.</p>
<pre><code>```
This code block &lt;=== no thank you
is not indendted
```
```
We request that you indent the code block by 4 spaces:
</code></pre>
<pre><code> This code block
is intented 4 spaces</code></pre>
<p>````</p>
<h2 id="do-not-add-trailing-slash-on-void-html-elements">Do not add trailing slash on void HTML elements</h2>
<p>Please do not use trailing slash on <a href="https://github.com/validator/validator/wiki/Markup-»-Void-elements">void HTML
elements</a>.</p>
<p>See also this note on <a href="https://github.com/validator/validator/wiki/Markup-»-Void-elements#trailing-slashes-in-void-element-start-tags-do-not-mark-the-start-tags-as-self-closing">trailing slashes in void-element start
tags</a>.</p>
<p>The trailing slash on void HTML elements has no effect and interacts badly with unquoted attribute values.</p>
<p>For example, please do not use:</p>
<pre><code> &lt;br/&gt; &lt;=== no thank you</code></pre>
<p>Instead use just:</p>
<pre><code> &lt;br&gt;</code></pre>
<p>And for example, please do not use:</p>
<pre><code> &lt;hr/&gt; &lt;=== no thank you</code></pre>
<p>Instead use just:</p>
<pre><code> &lt;hr&gt;</code></pre>
<p>And for example, please do not use:</p>
<pre><code> &lt;img src=&quot;1984-anonymous-tattoo.jpg&quot;
alt=&quot;image of a tattoo of the 1984 anonymous C code&quot;
width=600 height=401 /&gt; &lt;=== no thank you</code></pre>
<p>Instead use just:</p>
<pre><code> &lt;img src=&quot;1984-anonymous-tattoo.jpg&quot;
alt=&quot;image of a tattoo of the 1984 anonymous C code&quot;
width=600 height=401&gt;</code></pre>
<p>etc.</p>
<h2 id="do-not-end-markdown-links-in">Do not end markdown links in ))</h2>
<p>Please do not end a markdown links with a double closed parenthesis “))”.</p>
<p>Markdown links that end in “))” complicate parsing and sometimes lead
to incorrect URLs or file paths.</p>
<p>Instead of:</p>
<pre><code> [some text](https://example.com/foo_(bar)) &lt;=== no thank you</code></pre>
<p>Use:</p>
<pre><code> [some text](https://example.com/foo_&amp;#x28;bar&amp;#x29;)</code></pre>
<p>Instead of:</p>
<pre><code> This thing ([some text](some/path)) is not ideal. &lt;=== no thank you</code></pre>
<p>Use:</p>
<pre><code> This thing, [some text](some/path), is better.</code></pre>
<h2 id="do-not-put-s-or-markdown-link-titles">Do not put (‘s or )’ markdown link titles</h2>
<p>Please do not use parenthesis inside the markdown link titles.</p>
<p>Instead of:</p>
<pre><code> [some (text)](https://example.com/cyrds) &lt;=== no thank you</code></pre>
<p>Use:</p>
<pre><code> [some &amp;#x28;text&amp;#x29;](https://example.com/cyrds)</code></pre>
<p>Instead of:</p>
<pre><code> [ls(1)](https://example.com/ls-man-page.1) &lt;=== no thank you</code></pre>
<p>Use:</p>
<pre><code> [ls&amp;#x28;1&amp;#x29;](https://example.com/ls-man-page.1)</code></pre>
<!-- AFTER: last line of markdown file: markdown.md -->
<!-- END: this line ends content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
<!-- START: this line starts content from: inc/after-content.default.html -->
</div>
<!-- END: this line ends content from: inc/after-content.default.html -->
<!-- START: this line starts content from: inc/footer.default.html -->
<!--
Copyright © 1984-2024 by Landon Curt Noll. All Rights Reserved.
You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see:
https://creativecommons.org/licenses/by-sa/4.0/
-->
<div class="footer">
<div id="copyright"><h2>Copyright and CC BY-SA 4.0 License</h2></div>
<p>All IOCCC content including this file and web page are:</p>
<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copyright &copy; 1984-2024 by Landon Curt Noll. <a href="https://creativecommons.org/faq/#what-does-some-rights-reserved-mean">Some Rights Reserved</a>.</b>
<p>This work is licensed by Landon Curt Noll under:</p>
<p><b><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1"
target="_blank" rel="license noopener noreferrer" style="display:inline-block;">&nbsp;&nbsp;&nbsp;&nbsp;CC BY-SA 4.0
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/cc.png"
alt="cc inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/by.png"
alt="person inside circle symbol">
<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;"
src="./png/sa.png"
alt="arrow looping back on itself inside circle symbol">
</a></b></p>
<p>The <b>CC BY-SA 4.0 LEGAL CODE</b> for this license is found under:</p>
<p>&nbsp;&nbsp;&nbsp;<b><a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">
https://creativecommons.org/licenses/by-sa/4.0/legalcode.en</a></b></p>
<p>You should <b>carefully review</b> all of the terms and conditions of the
<a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>
before using the licensed material.</p>
<p>You may wish to review the <b><a href="./license.html">highlights of some of the key
features and terms</a></b> of the <a href="https://creativecommons.org/licenses/by-sa/4.0/legalcode.en">actual license</a>.</p>
<h2>Coda</h2>
<p><a href="https://validator.w3.org/nu/?doc=https%3A%2F%2Fioccc-src.github.io%2Ftemp-test-ioccc%2Fmarkdown.html">Nu HTML check this web page</a></p>
<p><a href="#top">Jump to top</a> <a href="#content">Jump to Content</a> <a href="#inventory">Jump to Inventory</a></p>
</div>
<!-- END: this line ends content from: inc/footer.default.html -->
<!-- START: this line starts content from: inc/bottom.default.html -->
</body>
</html>
<!-- END: this line ends content from: inc/bottom.default.html -->