add hack-a-round for language specified markdown code blocks
When language is specified in a markdown code block such as:
````
```c
printf("Hello, world!\n");
```
````
is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.
A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment. For example:
````
```<!---c-->
printf("Hello, world!\n");
```
````
This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better "_hack-a-round_" to the "markdown code language
specifier" problem is found.
The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:
```
<pre class="<!---c-->"><code> .. </code></pre>
```
We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.
For now, this hack-a-round will have to do.
This commit is contained in:
1 parent
3919df50fb
commit
b66c79254a
700 files changed
+7052
-7056
No files matched your search
+10
-10
@@ -141,7 +141,7 @@ Location: <a href="../../location.html#US">US</a> - <em>United States of America
|
||||
<!-- START: this line starts content for HTML phase 21 by: bin/pandoc-wrapper.sh via bin/md2html.sh -->
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> all</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make all</code></pre>
|
||||
<p>If you do not have a page up or page down key you might wish to see the
|
||||
<a href="#alternate-code">Alternate code</a> section below. You may redefine all the keys
|
||||
and the time step with predefined macros, however, so one lacking page up / page
|
||||
@@ -164,11 +164,11 @@ Instructions</a> section.</p>
|
||||
to use. The name of the macro in the header file is what you need to set the
|
||||
macros to, depending on what controls you wish to redefine. For instance, to set
|
||||
the throttle up and down to <code>u</code> and <code>d</code>:</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> clobber IT=XK_u DT=XK_d all</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make clobber IT=XK_u DT=XK_d all</code></pre>
|
||||
<p>because in the header file you can see that <code>XK_u</code> corresponds to <code>u</code> and <code>XK_d</code>
|
||||
corresponds to <code>d</code>:</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode c"><code class="sourceCode c"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="pp">#define XK_d </span><span class="bn">0x0064</span><span class="pp"> </span><span class="co">/* U+0064 LATIN SMALL LETTER D */</span></span>
|
||||
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a> <span class="pp">#define XK_u </span><span class="bn">0x0075</span><span class="pp"> </span><span class="co">/* U+0075 LATIN SMALL LETTER U */</span></span></code></pre></div>
|
||||
<pre class="<!---c-->"><code> #define XK_d 0x0064 /* U+0064 LATIN SMALL LETTER D */
|
||||
#define XK_u 0x0075 /* U+0075 LATIN SMALL LETTER U */</code></pre>
|
||||
<p>Note that the <a href="keysym.h">keysym.h</a> file is not complete from X11; it’s just the
|
||||
more likely candidates (and some that are probably unlikely :-) ).</p>
|
||||
<p>The upper case letters would be <code>XK_U</code> and <code>XK_D</code> and you can search the header
|
||||
@@ -181,7 +181,7 @@ instructions. Since you can use the original entry to redefine these this is not
|
||||
a problem and is purely a convenience .. if only for those who are okay with the
|
||||
preselected alternative keys.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> horizon.sc pittsburgh.sc <span class="kw">|</span> <span class="ex">./banks</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> cat horizon.sc pittsburgh.sc | ./banks</code></pre>
|
||||
<p>See the author’s remarks in <a href="#scenery">scenery</a> for more details on the scenery
|
||||
files.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
@@ -208,7 +208,7 @@ you should use the original entry as described in the to build section above.</p
|
||||
letters on the left side of the keyboard which is easier to use if one is using
|
||||
the right side for movement. These are hard coded, as noted.</p>
|
||||
<p>To use the default settings for the alternate build:</p>
|
||||
<div class="sourceCode" id="cb6"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">make</span> alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<p>You may change the other keys as described in the build instructions, above, but
|
||||
this alt code can be seen as an alternative for those who don’t have or don’t
|
||||
want to use page up and page down.</p>
|
||||
@@ -289,11 +289,11 @@ landscape.</p></li>
|
||||
<p>Follow a flowing river from the sky.</p></li>
|
||||
</ul>
|
||||
<p>A few examples of how to input scenery:</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> horizon.sc pittsburgh.sc <span class="kw">|</span> <span class="ex">./banks</span></span>
|
||||
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> mountains.sc bb.sc <span class="kw">|</span> <span class="ex">./banks</span></span>
|
||||
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">cat</span> mountains.sc river.sc pyramids.sc <span class="kw">|</span> <span class="ex">./banks</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> cat horizon.sc pittsburgh.sc | ./banks
|
||||
cat mountains.sc bb.sc | ./banks
|
||||
cat mountains.sc river.sc pyramids.sc | ./banks</code></pre>
|
||||
<p>You can simulate flying through a cloud bank as well:</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./banks</span> <span class="op"><</span> /dev/null</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./banks < /dev/null</code></pre>
|
||||
<p>You will usually want at least a horizon, though.</p>
|
||||
<p>The format of scenery files is simple, by the way. They’re just
|
||||
a list of 3D coordinates, and the simulator simply draws line
|
||||
|
||||
Reference in new issue
Block a user