Fixed #79: Curly quotes present in code listings under XeTeX engine

* Used non-curly quotes in listings (`U+0022`) with XeTeX engine instead of `U+201D`.
* Updated example Markdown and example PDF to emphasise smart-vs-dumb quotes.
* Added comment that a fix for this workaround is already available but not released.
This commit is contained in:
Andrew Hodgkinson 2019-03-03 03:35:14 +13:00 committed by Pascal Wagler
parent 83c3105de7
commit fc6fb9974e
3 changed files with 21 additions and 2 deletions

View File

@ -562,6 +562,25 @@ $if(mainfont)$
$else$
\usepackage[default]{sourcesanspro}
\usepackage{sourcecodepro}
% XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887
% This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the
% fix is still unreleased.
% TODO: Remove this workaround when the new version of sourcecodepro is reelased on CTAN.
\ifxetex
\makeatletter
\defaultfontfeatures[\ttfamily]
{ Numbers = \sourcecodepro@figurestyle,
Scale = \SourceCodePro@scale,
Extension = .otf }
\setmonofont
[ UprightFont = *-\sourcecodepro@regstyle,
ItalicFont = *-\sourcecodepro@regstyle It,
BoldFont = *-\sourcecodepro@boldstyle,
BoldItalicFont = *-\sourcecodepro@boldstyle It ]
{SourceCodePro}
\makeatother
\fi
$endif$
%

View File

@ -10,8 +10,8 @@ keywords: [Markdown, Example]
## Aesculeae domus vincemur et Veneris adsuetus lapsum
Lorem markdownum Letoia, et alios: figurae flectentem annis aliquid Peneosque ab
esse, obstat gravitate.
Lorem markdownum Letoia, et alios -- "figurae flectentem annis aliquid Peneosque" ab
esse, 'obstat' gravitate.
```java
public class Example implements LoremIpsum {

Binary file not shown.