Skip to content

Commit

Permalink
Braille and latex
Browse files Browse the repository at this point in the history
  • Loading branch information
ascholerChemeketa committed Nov 21, 2024
1 parent 55420dd commit b02055f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions xsl/pretext-braille-preprint.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,10 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
</xsl:if>
<xsl:text>. </xsl:text>
<xsl:choose>
<xsl:when test="self::figure|self::listing">
<xsl:when test="self::figure">
<xsl:apply-templates select="." mode="caption-full"/>
</xsl:when>
<xsl:when test="self::table|self::list">
<xsl:when test="self::table|self::list|self::listing">
<xsl:apply-templates select="." mode="title-full"/>
</xsl:when>
</xsl:choose>
Expand Down
20 changes: 12 additions & 8 deletions xsl/pretext-latex-common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- and "listing" always, and always for panels of a side-by-side -->
<!-- not already handled as subnumbered panels. -->
<!-- Only the type-number is bolded, caption in #1 is plain text -->
<xsl:when test="(self::figure|self::listing) or $b-panel">
<xsl:when test="self::figure or $b-panel">
<xsl:text>lower separated=false, </xsl:text>
<xsl:text>before lower={{</xsl:text>
<xsl:text>\textbf{#1~</xsl:text>
Expand All @@ -3164,9 +3164,9 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<xsl:text>}}, </xsl:text>
</xsl:when>
<!-- Case for titles placed above with "regular" numbers, -->
<!-- just remaining "table" and "list", as per CMoS -->
<!-- just remaining "table", "list" and "listing", as per CMoS -->
<!-- Only the type-number is bolded here, caption in #1 is bold text -->
<xsl:when test="self::table|self::list">
<xsl:when test="self::table|self::list|self::listing">
<xsl:text>title={{</xsl:text>
<xsl:text>\textbf{#1~</xsl:text>
<xsl:choose>
Expand Down Expand Up @@ -3353,8 +3353,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.

<!-- FIGURE-LIKE: -->
<!-- 2019-08-08: ad-hoc for now, named-styles will evolve -->
<!-- "figure" and listing" are very similar (captions) -->
<!-- "table" and "list" are very similar (titles) -->
<!-- "table", "list", and "listing" are very similar (titles) -->
<!-- NB: these will be used for "plain" 2D displays and for -->
<!-- when these are the panels of a "sidebyside". So within -->
<!-- environments we bold titles (table and list) as produced, -->
Expand All @@ -3366,10 +3365,15 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- NB: there could be 4 more styles, conditioning all 8 on -->
<!-- "ancestor::*[self::figure]" (or "not()") to manage the -->
<!-- panels of a subnumbered sidebyside. -->
<xsl:template match="figure|listing" mode="tcb-style">
<xsl:template match="figure" mode="tcb-style">
<xsl:text>bwminimalstyle, middle=1ex, blockspacingstyle, fontlower=\blocktitlefont</xsl:text>
</xsl:template>

<!-- panels of a subnumbered sidebyside. -->
<xsl:template match="listing" mode="tcb-style">
<xsl:text>bwminimalstyle, blockspacingstyle, bottomtitle=2ex, fonttitle=\blocktitlefont</xsl:text>
</xsl:template>

<!-- This style is "breakable" to allow for "tabular" realized as "longtable". -->
<!-- Normally a table will not break at all, so the breakability of the -->
<!-- tcolorbox is not really relevant. This is in lieu of trying to make -->
Expand Down Expand Up @@ -8602,7 +8606,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- 1: caption text -->
<!-- 2: standard identifier for cross-references -->
<!-- 3: empty, or a hard-coded number from -common -->
<xsl:template match="figure|listing">
<xsl:template match="figure">
<xsl:if test="@landscape and $b-latex-print">
<xsl:text>\begin{sidewaysfigure}%&#xa;</xsl:text>
</xsl:if>
Expand Down Expand Up @@ -8645,7 +8649,7 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- 1: title text, bolded here, not in environment -->
<!-- 2: standard identifier for cross-references -->
<!-- 3: empty, or a hard-coded number from -common -->
<xsl:template match="table|list">
<xsl:template match="table|list|listing">
<xsl:if test="@landscape and $b-latex-print">
<xsl:text>\begin{sidewaystable}%&#xa;</xsl:text>
</xsl:if>
Expand Down

0 comments on commit b02055f

Please sign in to comment.