You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</style><title>changelog</title></head><body><articleclass="markdown-body"><h1id="this-is-the-change-log-for-mdpre-markdown-preprocessor">This Is The Change Log For mdpre Markdown Preprocessor<aclass="headerlink" href="#this-is-the-change-log-for-mdpre-markdown-preprocessor" title="Permanent link"></a></h1>
<li><strong>ENHANCED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/34">Issue 34</a>: Support <code>=ifmatch</code> & <code>=ifnonmatch</code></li>
1109
+
<li><strong>ENHANCED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/34">Issue 34</a>: Support <code>=ifmatch</code> &;<code>=ifnonmatch</code></li>
1106
1110
</ul>
1107
1111
<h3id="v081-9-may-2025">v0.8.1 - 9 May, 2025<aclass="headerlink" href="#v081-9-may-2025" title="Permanent link"></a></h3>
1108
1112
<ul>
1109
1113
<li><strong>FIXED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/32">Issue 32</a>: Verbose output for <code>=def</code> doesn’t cope with colons</li>
1110
1114
<li><strong>ENHANCED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/30">Issue 30</a>: Allow Variable To Be Set To stderr Value For a Command</li>
1111
-
<li><strong>ENHANCED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/31">Issue 31</a>: Support <code>=ifempty</code> & <code>=ifnotempty</code></li>
1115
+
<li><strong>ENHANCED</strong><ahref="https://github.com/MartinPacker/mdpre/issues/31">Issue 31</a>: Support <code>=ifempty</code> &;<code>=ifnotempty</code></li>
1112
1116
</ul>
1113
1117
<h3id="v08-3-may-2025">v0.8 - 3 May, 2025<aclass="headerlink" href="#v08-3-may-2025" title="Permanent link"></a></h3>
<p>You could, for example, include the following lines in your main make file (possibly called “makefile”):</p>
1344
-
<divclass="highlight"><pre>target=user-guide
1345
-
1346
-
include fragment.mak
1347
-
</pre></div>
1348
-
1347
+
<p>```
1348
+
target=user-guide</p>
1349
+
<p>include fragment.mak
1350
+
```</p>
1349
1351
<p>This would set the make variable <code>target</code> to the value “user-guide”.
1350
1352
The result of this is that running make invokes mdpre against user-guide.mdp, creating as output user-guide.md and sending messages to user-guide.log.
1351
1353
Verbose Mode is turned on - which is probably what you want with a log file as a destination for messages.</p>
@@ -1427,16 +1429,6 @@ <h3 id="defining-variables-with-def">Defining Variables With <code>=def</code><a
1427
1429
<p>The variable name cannot contain spaces. If you try the parser will interpret anything after the first space as a value. Other than that there are no restrictions on variable names.</p>
1428
1430
<p>Defining variables is useful with the <code>=ifdef</code> and <code>=ifndef</code> statements, and their analogues.
1429
1431
See <ahref="#conditional-inclusion">Conditional Inclusion</a>.</p>
1430
-
<p>To use a variable you’ve defined with a value code the variable name preceded by an ampersand and terminated by a semicolon.
1431
-
For example:</p>
1432
-
<pre><code>=def greeting Hello
1433
-
1434
-
&greeting; World!
1435
-
</code></pre>
1436
-
<p>will produce:</p>
1437
-
<pre><code>Hello World!
1438
-
</code></pre>
1439
-
<p>If you don’t terminate the use of the variable with a semicolon it won’t be substituted. If the variable isn’t defined at the point of usage it won’t be substituted.</p>
1440
1432
<p>You can also define variables and, optionally, set their value with the <code>-d</code> command line parameter. See <ahref="#defining-variables">Defining Variables</a> for more.</p>
1441
1433
<p>For the third and fourth forms, the command string needs to be enclosed in backticks.
1442
1434
The command is platform dependent.
@@ -1459,6 +1451,22 @@ <h3 id="defining-variables-with-def">Defining Variables With <code>=def</code><a
1459
1451
=def command ls &lsFlags;
1460
1452
=def listing,myErr `&command;`
1461
1453
</code></pre>
1454
+
<h4id="substituting-variables-in-text">Substituting Variables In Text<aclass="headerlink" href="#substituting-variables-in-text" title="Permanent link"></a></h4>
1455
+
<p>To substitute a variable in text you’ve defined with its value code the variable name preceded by an ampersand and terminated by a semicolon.</p>
1456
+
<p>For example:</p>
1457
+
<pre><code>=def greeting Hello
1458
+
1459
+
&greeting; World!
1460
+
</code></pre>
1461
+
<p>will produce:</p>
1462
+
<pre><code>Hello World!
1463
+
</code></pre>
1464
+
<p>If you don’t terminate the use of the variable with a semicolon it won’t be substituted unless one of the following is true:</p>
1465
+
<ul>
1466
+
<li>The variable name is terminated by a space. (The space will be preserved.)</li>
1467
+
<li>The variable name is at the end of the line. (The newline will be preserved.)</li>
1468
+
</ul>
1469
+
<p>If the variable isn’t defined at the point of usage it won’t be substituted.</p>
1462
1470
<h3id="undefining-variables-with-undef">Undefining Variables With <code>=undef</code><aclass="headerlink" href="#undefining-variables-with-undef" title="Permanent link"></a></h3>
1463
1471
<p>Just as you can use <code>=def</code> to define a variable you can remove it from the variable table using <code>=undef</code>. For example,</p>
1464
1472
<pre><code>=undef xyzzy
@@ -1915,32 +1923,24 @@ <h3 id="creating-a-calendar-month-table-with-cal">Creating A Calendar Month Tabl
1915
1923
<p>although in md2pptx the bullets would be coloured appropriately - and mdpre actually centres the month.</p>
1916
1924
<h4id="controlling-how-day-numbers-are-displayed-with-caldays">Controlling How Day Numbers Are Displayed With <code>=caldays</code><aclass="headerlink" href="#controlling-how-day-numbers-are-displayed-with-caldays" title="Permanent link"></a></h4>
1917
1925
<p>You can style days in the calendar with CSS using the <code>class</code> attribute. For example:</p>
1918
-
<divclass="highlight"><pre>=caldays blue 14 15 16 17
1919
-
=caldays orange 18
1920
-
</pre></div>
1921
-
1926
+
<p><code>=caldays blue 14 15 16 17
1927
+
=caldays orange 18</code></p>
1922
1928
<p>In this case days 14, 15, 16, and 17 are styled with CSS class <code>blue</code>, whereas day 18 is styled with CSS class <code>orange</code>. You need to code the CSS for classes <code>blue</code> and <code>orange</code> for these specifications to be effective.</p>
1923
1929
<p><code>=caldays</code> must be specified on its own line between the <code>=cal</code> and <code>=endcal</code> lines. You can specify as many <code>=caldays</code> lines as you like within this bracket.</p>
1924
1930
<p>You can specify a range of days in the following manner:</p>
1925
-
<divclass="highlight"><pre>=caldays blue 14-17 22-24 27
1926
-
</pre></div>
1927
-
1931
+
<p><code>=caldays blue 14-17 22-24 27</code></p>
1928
1932
<p><strong>Notes:</strong></p>
1929
1933
<ol>
1930
1934
<li>In a range specification there mustn’t be spaces between the <code>-</code> and the numbers either side.</li>
1931
1935
<li>A later <code>=caldays</code> line overrides a prior one in the sequence - within a <code>=cal</code> / <code>=endcal</code> bracket.</li>
1932
1936
</ol>
1933
1937
<h4id="adding-a-key-to-the-day-numbers-styling-with-calkey">Adding A Key To The Day Numbers’ Styling With <code>=calkey</code><aclass="headerlink" href="#adding-a-key-to-the-day-numbers-styling-with-calkey" title="Permanent link"></a></h4>
1934
1938
<p>You can add bullets below the table to explain what each style means. For example:</p>
1935
-
<divclass="highlight"><pre>=calkey blue We have data for **somehow**
1936
-
=calkey orange Is focus day
1937
-
</pre></div>
1938
-
1939
+
<p><code>=calkey blue We have data for **somehow**
1940
+
=calkey orange Is focus day</code></p>
1939
1941
<p>causes the following Markdown / HTML to be generated:</p>
1940
-
<divclass="highlight"><pre>* <span class='blue'>&nbsp;</span>We have data for **somehow**
1941
-
* <span class='orange'>&nbsp;</span>Is focus day
1942
-
</pre></div>
1943
-
1942
+
<p><code>* <span class='blue'>&nbsp;</span>We have data for **somehow**
<p>As with <code>=caldays</code>, you need to code the CSS for classes <code>blue</code> and <code>orange</code> for these specifications to be effective.</p>
1945
1945
<p><code>=calkey</code> must be specified on its own line between the <code>=cal</code> and <code>=endcal</code> lines. You can specify as many <code>=calkey</code> lines as you like within this bracket.</p>
1946
1946
<p><strong>Notes:</strong></p>
@@ -1952,19 +1952,15 @@ <h4 id="adding-a-key-to-the-day-numbers-styling-with-calkey">Adding A Key To The
1952
1952
</ol>
1953
1953
<h4id="adding-information-to-a-cell-with-calnote">Adding Information To A Cell With <code>=calnote</code><aclass="headerlink" href="#adding-information-to-a-cell-with-calnote" title="Permanent link"></a></h4>
1954
1954
<p>You can add annotations to individual calendar dates with <code>=calnote</code>. For example:</p>
<li><code>=calnote 17 A</code> adds the text “A” to the cell for 17th of the month.</li>
1961
1959
<li><code>=calnote 18 <span class="green">B</span></code> adds the text “B” in (presumably) green to the cell for the 18th of the month.</li>
1962
1960
</ol>
1963
1961
<p><code>=calnote</code> must be specified on its own line between the <code>=cal</code> and <code>=endcal</code> lines. You can specify as many <code>=calnote</code> lines as you like within this bracket.</p>
1964
1962
<p>You can specify a range of days in the following manner:</p>
1965
-
<divclass="highlight"><pre>=calnote 14-17 RMF
1966
-
</pre></div>
1967
-
1963
+
<p><code>=calnote 14-17 RMF</code></p>
1968
1964
<p><strong>Notes:</strong></p>
1969
1965
<ol>
1970
1966
<li>In the examples given the text is short. It probably looks worse if the text is long.</li>
0 commit comments