Skip to content

Commit

Permalink
Merge pull request #2 from pandoc-ext/mistakes-specimens
Browse files Browse the repository at this point in the history
Fix mistakes found in specimens
  • Loading branch information
nandac authored Jun 30, 2024
2 parents 5dbdb56 + 15158d3 commit a62c5b6
Show file tree
Hide file tree
Showing 7 changed files with 144 additions and 108 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The _same_ classes may be used when generating HTML, but that requires the suppo

For those who prefer [Sass](https://sass-lang.com/) a [specimen Sass file](https://github.com/pandoc-ext/fonts-and-alignment/blob/main/specimens/specimen.sass) has also been provided to generate CSS. Again copy and modify it as required.

The corresponding specimen HTML document is available [here](https://htmlpreview.github.io/?https://github.com/nandac/fonts-and-alignment/blob/main/specimens/specimen.html).
The corresponding specimen HTML document is available [here](https://htmlpreview.github.io/?https://github.com/pandoc-ext/fonts-and-alignment/blob/main/specimens/specimen.html).

Prerequisites
-----------------------------------------------------------------
Expand Down
71 changes: 60 additions & 11 deletions specimens/specimen.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* Noto Sans, Noto Serif and Fira Mono fonts from Google change as needed */
@import url("https://fonts.googleapis.com/css2?family=Fira+Mono&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* The below styles are not defined in fonts and alignment filter
* but are kept here to ease the readability of the rendered HTML content */
body {
Expand All @@ -11,7 +12,39 @@ body {
width: 60%;
}

span.bold, span.emphasis, span.italic, span.lower, span.medium, span.monospace, span.normalfont, span.sans, span.serif, span.slanted, span.smallcaps, span.upper, span.upright, span.bf, span.em, span.it, span.md, span.tt, span.nf, span.sf, span.rm, span.sl, span.sc, span.up, span.tiny, span.xxsmall, span.xsmall, span.small, span.normal, span.large, span.xlarge, span.xxlarge, span.huge {
span.bold,
span.emphasis,
span.italic,
span.lower,
span.medium,
span.monospace,
span.normalfont,
span.sans,
span.serif,
span.slanted,
span.smallcaps,
span.upper,
span.upright,
span.bf,
span.em,
span.it,
span.md,
span.tt,
span.nf,
span.sf,
span.rm,
span.sl,
span.sc,
span.up,
span.tiny,
span.xxsmall,
span.xsmall,
span.small,
span.normal,
span.large,
span.xlarge,
span.xxlarge,
span.huge {
color: maroon;
}

Expand Down Expand Up @@ -126,32 +159,48 @@ a:hover {
}

/* Text Alignments */
div.center, div.centering {
div.center,
div.centering {
text-align: center;
}
div.flushright, div.raggedleft {

div.flushright,
div.raggedleft {
text-align: right;
}
div.flushleft, div.raggedright {

div.flushleft,
div.raggedright {
text-align: left;
}

/* Underline Styles */
span.dashuline, span.dau {
span.dashuline,
span.dau {
text-decoration: underline dashed;
}
span.dotuline, span.dou {

span.dotuline,
span.dou {
text-decoration: underline dotted;
}
span.uline, span.u {

span.uline,
span.u {
text-decoration: underline;
}
span.uuline, span.uu {

span.uuline,
span.uu {
text-decoration: underline double;
}
span.uwave, span.uw {

span.uwave,
span.uw {
text-decoration: underline wavy;
}
span.sout, span.so {

span.sout,
span.so {
text-decoration: line-through;
}
52 changes: 26 additions & 26 deletions specimens/specimen.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,32 @@
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="Nandakumar Chandrasekhar" />
<meta name="dcterms.date" content="2022-02-22" />
<meta name="dcterms.date" content="2024-06-30" />
<title>Fonts and Alignment Lua Filter Sample Outputs</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="specimen.css" />

<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<header id="title-block-header">
<h1 class="title">Fonts and Alignment Lua Filter Sample Outputs</h1>
<p class="author">Nandakumar Chandrasekhar</p>
<p class="date">2022-02-22</p>
<p class="date">2024-06-30</p>
</header>
<h2 id="font-styles-for-inline-elements">Font Styles for Inline
Elements</h2>
Expand Down Expand Up @@ -72,9 +71,10 @@ <h3 id="sans-serif-font-inline">Sans-serif Font Inline</h3>
ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.</p>
<h3 id="serif-font-inline">Serif Font Inline</h3>
<p><span class="serif">This text should be in serif.</span> Lorem ipsum
dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua.</p>
<p><span class="serif">This text should be in serif.</span> <span
class="sans">Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua</span>.</p>
<h3 id="slanted-font-inline">Slanted Font Inline</h3>
<p><span class="slanted">This text should be slanted.</span> Lorem ipsum
dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
Expand All @@ -96,73 +96,73 @@ <h3 id="upright-font-inline">Upright Font Inline</h3>
<h3 id="font-style-for-links">Font Style for Links</h3>
<table>
<thead>
<tr class="header">
<tr>
<th style="text-align: left;">Font Styles</th>
<th style="text-align: left;">Output</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<tr>
<td style="text-align: left;">Bold Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="bf">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Emphasis Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="em">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Italic Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="it">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Lowercase Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="lower">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Medium Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="md">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Monospace Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="tt">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Normal Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="nf">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Sans-serif Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="sf">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Serif Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="rm">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Slanted Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="sl">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Small Capitals Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="sc">GitHub Homepage</a></td>
</tr>
<tr class="even">
<tr>
<td style="text-align: left;">Uppercase Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="upper">GitHub Homepage</a></td>
</tr>
<tr class="odd">
<tr>
<td style="text-align: left;">Upright Font</td>
<td style="text-align: left;"><a href="https://github.com"
class="up">GitHub Homepage</a></td>
Expand Down Expand Up @@ -216,8 +216,8 @@ <h3 id="small-capitals-bold-and-italic-for-inline">Small Capitals, Bold
<p><span class="sc bf it">This text should be small capitals, bold and
italic.</span> Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<h3 id="monospace-extra-small-text-and-bold-for-inline">Monospace, Extra
Small Text and Bold for Inline</h3>
<h3 id="extra-small-text-and-bold-for-inline">Extra Small Text and Bold
for Inline</h3>
<p><span class="tt xsmall bf">This text should be in monospace, extra
small size and bold.</span> Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore
Expand Down
Binary file modified specimens/specimen.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion specimens/specimen.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Noto Sans, Noto Serif and Fira Mono fonts from Google change as needed */
@import url('https://fonts.googleapis.com/css2?family=Fira+Mono&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap')
@import url("https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap");

// Variables that correspond to the LaTeX font values set in the YAML block
$fontsize: 16px
Expand Down
Loading

0 comments on commit a62c5b6

Please sign in to comment.