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
+17
-17
@@ -2,7 +2,7 @@
|
||||
|
||||
Make sure you have the SDL1 (not SDL2!) development environment installed.
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make
|
||||
```
|
||||
|
||||
@@ -24,7 +24,7 @@ For more detailed information see [2006 monge bugs](../../bugs.html#2006_monge).
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge expression ...
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ Incorrect formulas will ungracefully crash the program.
|
||||
|
||||
## Try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.sh
|
||||
```
|
||||
|
||||
@@ -49,7 +49,7 @@ as the number of iterations to perform.
|
||||
To use the default values, the same as [monge.c](monge.c), just do:
|
||||
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make alt
|
||||
```
|
||||
|
||||
@@ -58,13 +58,13 @@ of the variables `W`, `H` and `I`. The defaults are (respectively) 400, 300 and
|
||||
\128. If you wish to change the image size to 500x500 but keep the iterations
|
||||
the same then do:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make clobber WIDTH=500 HEIGHT=500 alt
|
||||
```
|
||||
|
||||
If you wish to keep the dimensions the same but change the iterations to 512:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
make clobber ITERATIONS=512 alt
|
||||
```
|
||||
|
||||
@@ -82,7 +82,7 @@ Use `monge.alt` exactly as you would `monge` above.
|
||||
|
||||
### Alternate try:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./try.alt.sh
|
||||
```
|
||||
|
||||
@@ -109,13 +109,13 @@ effort to work on both `i386` and `x86_64`. Portable it is! :)
|
||||
|
||||
0. Compile using the Makefile, or just run:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
gcc monge.c -o monge -O3 `sdl-config --libs --cflags`
|
||||
```
|
||||
|
||||
1. Run:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z = 0" "z = z*z + c; Abs2(z) < 4"
|
||||
```
|
||||
|
||||
@@ -171,49 +171,49 @@ Here are a few examples of fractals you can draw:
|
||||
|
||||
- Mandelbrot:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=1" "z=z*z+c; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Mandelbrot (return time variation):
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=c" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
```
|
||||
|
||||
- Julia, for `c=0.31+i*0.5`:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Julia (return time variation), `for c=0.31+i*0.5`:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z-c)>0.0001"
|
||||
```
|
||||
|
||||
- Newton, for `x^3-1`:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=c" "p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"
|
||||
```
|
||||
|
||||
- Newton-Mandelbrot:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=0" "p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"
|
||||
```
|
||||
|
||||
- Phoenix, Mandelbrot version:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=0; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
```
|
||||
|
||||
- Phoenix, Julia version for `c=0.56667-i*0.5`:
|
||||
|
||||
```sh
|
||||
```<!---sh-->
|
||||
./monge "z=c; c=0.56667-i*0.5; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"
|
||||
```
|
||||
|
||||
|
||||
+17
-17
@@ -142,7 +142,7 @@ Location: <a href="../../location.html#IT">IT</a> - <em>Italian Republic</em> (<
|
||||
|
||||
<h2 id="to-build">To build:</h2>
|
||||
<p>Make sure you have the SDL1 (not SDL2!) development environment installed.</p>
|
||||
<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></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make</code></pre>
|
||||
<p>There is alternate version that lets you redefine the width and height and number
|
||||
of iterations to use. See <a href="#alternate-code">Alternate code</a> below.</p>
|
||||
<h3 id="bugs-and-misfeatures">Bugs and (Mis)features:</h3>
|
||||
@@ -151,23 +151,23 @@ of iterations to use. See <a href="#alternate-code">Alternate code</a> below.</p
|
||||
STATUS: INABIAF - please **DO NOT** fix</code></pre>
|
||||
<p>For more detailed information see <a href="../../bugs.html#2006_monge">2006 monge bugs</a>.</p>
|
||||
<h2 id="to-use">To use:</h2>
|
||||
<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="ex">./monge</span> expression ...</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge expression ...</code></pre>
|
||||
<p>Incorrect formulas will ungracefully crash the program.</p>
|
||||
<h2 id="try">Try:</h2>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./try.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.sh</code></pre>
|
||||
<h2 id="alternate-code">Alternate code:</h2>
|
||||
<p>This alternate code lets you specify the width and height of the image as well
|
||||
as the number of iterations to perform.</p>
|
||||
<h3 id="alternate-build">Alternate build:</h3>
|
||||
<p>To use the default values, the same as <a href="monge.c">monge.c</a>, just do:</p>
|
||||
<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">make</span> alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make alt</code></pre>
|
||||
<p>But if you wish to actually make use of it you will want to redefine one or more
|
||||
of the variables <code>W</code>, <code>H</code> and <code>I</code>. The defaults are (respectively) 400, 300 and
|
||||
\128. If you wish to change the image size to 500x500 but keep the iterations
|
||||
the same then do:</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> clobber WIDTH=500 HEIGHT=500 alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make clobber WIDTH=500 HEIGHT=500 alt</code></pre>
|
||||
<p>If you wish to keep the dimensions the same but change the iterations to 512:</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">make</span> clobber ITERATIONS=512 alt</span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> make clobber ITERATIONS=512 alt</code></pre>
|
||||
<p>If you specify a value less than 1 for any of these it sets it back to the
|
||||
default. The value 1 was selected arbitrarily and such a small number as 1 will
|
||||
not do anything useful but as long as it’s at least 1 it’ll not be redefined.
|
||||
@@ -176,7 +176,7 @@ anyway.</p>
|
||||
<h3 id="alternate-use">Alternate use:</h3>
|
||||
<p>Use <code>monge.alt</code> exactly as you would <code>monge</code> above.</p>
|
||||
<h3 id="alternate-try">Alternate try:</h3>
|
||||
<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">./try.alt.sh</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./try.alt.sh</code></pre>
|
||||
<h2 id="judges-remarks">Judges’ remarks:</h2>
|
||||
<p>For those who are familiar with the previous <a href="../../authors.html">IOCCC entries</a>,
|
||||
this program is best described as “<a href="../../1994/tvr/index.html">1994/tvr</a> meets
|
||||
@@ -193,11 +193,11 @@ effort to work on both <code>i386</code> and <code>x86_64</code>. Portable it is
|
||||
<ol start="0" type="1">
|
||||
<li>Compile using the Makefile, or just run:</li>
|
||||
</ol>
|
||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a> <span class="fu">gcc</span> monge.c <span class="at">-o</span> monge <span class="at">-O3</span> <span class="kw">`</span><span class="ex">sdl-config</span> <span class="at">--libs</span> <span class="at">--cflags</span><span class="kw">`</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> gcc monge.c -o monge -O3 `sdl-config --libs --cflags`</code></pre>
|
||||
<ol type="1">
|
||||
<li>Run:</li>
|
||||
</ol>
|
||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z = 0"</span> <span class="st">"z = z*z + c; Abs2(z) < 4"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z = 0" "z = z*z + c; Abs2(z) < 4"</code></pre>
|
||||
<ol start="2" type="1">
|
||||
<li><p>Keep clicking with left or right button to zoom in or out.</p></li>
|
||||
<li><p>Use the number pad <code>+</code> and <code>-</code> to increase/decrease the iteration count when
|
||||
@@ -240,35 +240,35 @@ as you like (as understood by the C function <code>isspace()</code>).</p>
|
||||
<ul>
|
||||
<li>Mandelbrot:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=1"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=1" "z=z*z+c; Abs2(z)<4"</code></pre>
|
||||
<ul>
|
||||
<li>Mandelbrot (return time variation):</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb13"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=c" "z=z*z+c; Abs2(z-c)>0.0001"</code></pre>
|
||||
<ul>
|
||||
<li>Julia, for <code>c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb14"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z)<4"</code></pre>
|
||||
<ul>
|
||||
<li>Julia (return time variation), <code>for c=0.31+i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb15"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.31+i*0.5"</span> <span class="st">"z=z*z+c; Abs2(z-c)>0.0001"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=c; c=0.31+i*0.5" "z=z*z+c; Abs2(z-c)>0.0001"</code></pre>
|
||||
<ul>
|
||||
<li>Newton, for <code>x^3-1</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb16"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c"</span> <span class="st">"p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=c" "p=z; z=0.6666*z+0.3333/(z*z); Abs2(p-z) > 0.001"</code></pre>
|
||||
<ul>
|
||||
<li>Newton-Mandelbrot:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb17"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=0"</span> <span class="st">"p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=0" "p=z; z=z-(z*z*z + (c-1)*z - c)/(3*z*z+c-1); Abs2(p-z) > 0.001"</code></pre>
|
||||
<ul>
|
||||
<li>Phoenix, Mandelbrot version:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb18"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=0; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=0; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</code></pre>
|
||||
<ul>
|
||||
<li>Phoenix, Julia version for <code>c=0.56667-i*0.5</code>:</li>
|
||||
</ul>
|
||||
<div class="sourceCode" id="cb19"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb19-1"><a href="#cb19-1" aria-hidden="true" tabindex="-1"></a> <span class="ex">./monge</span> <span class="st">"z=c; c=0.56667-i*0.5; q=0"</span> <span class="st">"t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</span></span></code></pre></div>
|
||||
<pre class="<!---sh-->"><code> ./monge "z=c; c=0.56667-i*0.5; q=0" "t=z; z=z*z+Re(c)+Im(c)*q; q=t; Abs2(z)<4"</code></pre>
|
||||
<h3 id="compilation-and-portability">Compilation and portability</h3>
|
||||
<p>This program will only work on x86 (with an x87 FPU) or x86_64 machines,
|
||||
but it requires the SDL library.</p>
|
||||
|
||||
Reference in new issue
Block a user