Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

French quotation marks html and Latex #1906

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions xsl/pretext-html.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8773,12 +8773,26 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.

<!-- Left (Double) Quote -->
<xsl:template name="lq-character">
<xsl:text>&#x201c;</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are << rather than " -->
<xsl:text>&#x00AB;&#xa0;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>&#x201c;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Right (Double) Quote -->
<xsl:template name="rq-character">
<xsl:text>&#x201d;</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are >> rather than " -->
<xsl:text>&#xa0;&#x00BB;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>&#x201d;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Left Double Bracket -->
Expand Down
37 changes: 32 additions & 5 deletions xsl/pretext-latex.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -7846,12 +7846,26 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.

<!-- Left (Double) Quote -->
<xsl:template name="lq-character">
<xsl:text>``</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are << rather than " -->
<xsl:text>{}\guillemotleft~ </xsl:text> <!-- guillemet preceded by space followed by non breaking space -->
</xsl:when>
<xsl:otherwise>
<xsl:text>``</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Right (Double) Quote -->
<xsl:template name="rq-character">
<xsl:text>''</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are >> rather than " -->
<xsl:text>~\guillemotright{} </xsl:text> <!-- guillemet preceded by non breaking space and followed by a space -->
</xsl:when>
<xsl:otherwise>
<xsl:text>''</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- Left Double Bracket -->
Expand Down Expand Up @@ -8109,11 +8123,24 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
<!-- right thing. Double quotes are unmolested since -->
<!-- they will work fine even in consecutive runs -->
<!-- We have to override the RTF routines here. -->

<xsl:template match="q">
<xsl:text>``</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are << rather than " -->
<xsl:text>{}\guillemotleft~ </xsl:text> <!-- guillemet followed by non breaking space -->
</xsl:when>
<xsl:otherwise>
<xsl:text>``</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates />
<xsl:text>''</xsl:text>
<xsl:choose>
<xsl:when test="$document-language = 'fr-CA' or $document-language = 'fr-FR'"> <!-- If french, double quotation marks are >> rather than " -->
<xsl:text>~\guillemotright{} </xsl:text> <!-- guillemet preceded by non breaking space followed by space -->
</xsl:when>
<xsl:otherwise>
<xsl:text>''</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- We look left (up the tree) and right -->
Expand Down