Skip to content

Instantly share code, notes, and snippets.

@tingletech
Last active November 16, 2021 23:37
Show Gist options
  • Save tingletech/70007eb8e1e2632c3f49f623c789c096 to your computer and use it in GitHub Desktop.
Save tingletech/70007eb8e1e2632c3f49f623c789c096 to your computer and use it in GitHub Desktop.
curl https://glossapsycholinguistics.journalpub-dev.escholarship.org/article/id/19/ --silent | xmllint --html --xmlout - 2>/dev/null | xsltproc ./glosstract.xsl - > 19.html
<!-- Glossing -->
ol {
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 40px;
}
ol ol {
margin-block-start: 0px;
margin-block-end: 0px;
}
ol.gloss-sentence {
display: inline !important;
padding: 0;
margin: 0;
list-style: none;
}
.gloss-item {
overflow: auto;
}
.gloss-sentence li {
padding-left: 4px !important;
padding-bottom: 2px;
}
.gloss-sentence ol {
list-style: none !important;
}
.gloss-sentence img {
width: auto !important;
padding-top: 5px;
}
ol.gloss-word {
padding-left: 0px !important;
padding-right: .5em !important;
padding-top: 0 !important;
padding-bottom: 0 !important;
margin-bottom: 2px !important;
background: white !important;
display: inline-block !important;
margin-inline-start: 0 !important;
}
.gloss-first {
padding-left: 0 !important;
}
.gloss-header {
float: left;
display: flex;
min-width: 40px;
}
.gloss-wrapper {
overflow: auto;
margin-top: 10px;
margin-bottom: 10px;
padding: 0;
}
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- this template matches first -->
<xsl:template match="/">
<link rel="stylesheet" href="gloss.css" ></link>
<xsl:apply-templates select="//article"/>
</xsl:template>
<!-- trim out some elements from the janeway output -->
<xsl:template match="section[@class='no-padding meta'][1]
|div[@data-sticky-container=''][1]
|div[@class='summary'][1]
">
</xsl:template>
<!-- identity transform -->
<xsl:template match="@*|*|processing-instruction()|comment()">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
diff --git a/templates/journal/print.html b/templates/journal/print.html
index e4224ca..98152b9 100644
--- a/templates/journal/print.html
+++ b/templates/journal/print.html
@@ -6,7 +6,15 @@
|{{ journal_settings.general.journal_name | striptags }} </title>
<head>
+ <base href=".."/>
{% include "elements/article_meta_tags.html" %}
+ <link href="/static/OLH/css/app.css" rel="stylesheet">
+ <link href="/static/common/css/common.css" rel="stylesheet">
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet">
+
+
+ <link href="/static/OLH/css/default_override.css" rel="stylesheet">
+ <link href="/static/OLH/css/journal2_override.css" rel="stylesheet">
</head>
<body>
<p class="uppercase">{{ article.section.name }}</p>
@@ -36,4 +44,4 @@
{% include "elements/journal/how_to_cite.html" with article=article %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment