closes#4142closes#4357closes#4359
refs: #3967
Adds ``smartquotes``, ``smartquotes_action``, ``smartquotes_excludes``
configuration variables.
- if ``smartquotes`` is set to False, then Smart Quotes transform is not
applied even if a Docutils configuration file activates it,
- the current default of ``smartquotes_excludes`` deactivates Smart
Quotes for Japanese language, and also for the ``man`` and ``text``
builders.
However, currently ``make text html`` deactivates Smart Quotes for
``html`` too, and ``make html text`` activates them for ``text`` too,
because the picked environment is shared and already transformed.
- now Smart Quotes get applied also when source documents are in
Markdown or other formats.
This is subtle LaTeX thing. Prior to merge of #4370 there was a
`\texttt` which was hiding the potential problem. The fix is to leave a
brace pair in place.
Since #2627 (1.4.4), `\code`, and then again at #3116 (1.5)
`\sphinxcode` which is the new name has become more complicated than the
original `\texttt{#1}`. This was to obtain straight quotes in PDF output,
and to allow long inline literals to break across lines.
This means though that users who want to customize `\sphinxcode`, for
example to not only do `\texttt` but to use some colour, have to copy
about 10 lines of complicated LaTeX macros which should be not modified
in any way. This commit moves all the code out of `\sphinxcode` into a
separate macro `\sphinxupquote`.
The LaTeX writer will output `\sphinxcode{\sphinxupquote{foo}}` in place
of former `\sphinxcode{foo}`. Moving the `\texttt` from innermost to
outermost level is with no consequence.
Given that we install Sphinx as part of the dependencies, there's no
reason to do it twice. Skip that step.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Given that we install Sphinx as part of the dependencies, there's no
reason to do it twice. Skip that step.
Signed-off-by: Stephen Finucane <stephen@that.guru>
There's an issue with 'pkgutils' and namespace packages. This has been
reported against setuptools [1], but until this is resolved, we simply
need to live with it. Ensure said warnings are filtered from tox too and
remove some unnecessary ones.
[1] https://github.com/pypa/setuptools/issues/1111
Signed-off-by: Stephen Finucane <stephen@that.guru>
This is no longer necessary. One test needs to be modified to deal with
how 'python -m pytest' modifies the PATH.
Signed-off-by: Stephen Finucane <stephen@that.guru>
This is the recommended way to do pre-session configuration in pytest if
not using session fixtures [1].
With this, we're able to remove the custom 'test/run.py' script in its
entirety and run 'pytest' like everyone else does. We'll do this
separately to keep things simple.
[1] https://stackoverflow.com/a/12600154/613428
Signed-off-by: Stephen Finucane <stephen@that.guru>