Commit Graph

87 Commits

Author SHA1 Message Date
Michael Tesch
e368ac21ef proposed enhancement #4830 2018-04-20 13:13:00 +02:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
4d040abafb Fix #4079: Add notranslate class to let Google Translate know they are not translatable 2018-01-13 20:25:49 +09:00
jfbu
309f38a91f Split out fancy LaTeX macros from `\sphinxcode into \sphinxupquote`
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.
2018-01-03 08:46:19 +01:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
jfbu
70f8d4ddfc Support `:emphasize-lines:` in PDF output (closes #1238) 2017-12-10 12:37:36 +01:00
Takeshi KOMIYA
da0fda3b0b Add tests for default-role 2017-07-31 00:46:26 +09:00
shimizukawa
d497d74370 refs #3458: add sphinx.testing that are moved from /tests directory. 2017-05-14 20:47:15 +09:00
Dmitry Shachnev
edc7f30b9c Remove the custom smartypants code
Instead rely on docutils’ ‘smart_quotes’ option which is available
since docutils 0.10.

This adds support for internationalization: our code supported only
English quotes, while docutils code supports 27 different languages.

Closes #498, #580, #3345, #3472.
2017-04-25 14:17:13 +03:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Dmitry Shachnev
1717a95a77 Fix a test failure which was uncovered by the previous change
In PR #3527 the LaTeX output for quotes has changed, but the test was
not updated.
2017-03-15 11:29:50 +03:00
Dmitry Shachnev
6e0467ca77 test_markup: Make verify functions test both HTML and LaTeX outputs
Previously it would return after performing the HTML check, without
running the LaTeX one.
2017-03-14 22:34:51 +03:00
Jean-François B
3128a4327d More robust hyperlink macros in LaTeX output (refs #3317, #3340, #3533) (#3538)
More robust hyperlink macros in LaTeX output (refs #3317, #3340, #3533)
2017-03-11 16:53:53 +01:00
Takeshi KOMIYA
cf2061dfad Fix flake8 violations 2017-01-26 01:13:17 +09:00
shimizukawa
561abdd164 pytest optimizatoin:
- remote using deprecated decorators
- remove gen_with_app
- remove yield testing
- remove pytest warnings
- refactoring
2017-01-08 15:14:38 +09:00
shimizukawa
baaef9146d pytest: remove deprecated with_app decorator functions 2017-01-06 01:14:47 +09:00
Takeshi KOMIYA
50bf7960bd Uninstall sphinx directives and roles of domains after build 2016-09-21 10:48:52 +09:00
Takeshi KOMIYA
f8c1c65c21 Refactor sphinx.environment: Reimplemnt process_refonly_bullet_lists() as a transform 2016-09-15 02:29:50 +09:00
Takeshi KOMIYA
d281a32b3b Refactor sphinx.environment: Reimplement filter_messages() as a transform 2016-09-15 02:29:50 +09:00
Takeshi KOMIYA
8a9459b308 Merge branch 'stable' 2016-08-09 23:19:11 +09:00
Yoshiki Shibukawa
90b3c79895 fix html entity to fix epub error 2016-08-09 16:58:56 +09:00
jfbu
b3d8961ca8 Enhance latex text styling customizability 2016-06-17 19:48:52 +02:00
jfbu
c2d417a032 Rename SphinxVerbatim to sphinxVerbatim for latex output 2016-06-15 18:34:00 +02:00
jfbu
2cec5a25b2 Merge branch 'stable'
Conflicts:
	sphinx/domains/cpp.py
	sphinx/texinputs/sphinx.sty
	tests/test_build_latex.py
2016-06-15 18:29:58 +02:00
jfbu
5510653d6e Fix #2629. Add new config option `latex_keep_old_macro_names`
The cause of the issue was a clash about ``\titleref`` macro being already
defined in memoir class context. To avoid similar problems, this makes
the text styling macros

  ``\strong``, ``\code``, ``\bfcode``, ``\email``, ``\tablecontinued``,
  ``\titleref``, ``\menuselection``, ``\accelerator``, ``\crossref``,
  ``\termref``, ``\optional``,

also available with ``\sphinx`` prefix, with a conf.py boolean option to
let sphinx.sty only define ``\sphinx``-prefixed macros. As default value
is False, backwards compatibility is maintained.

On this occasion, some internal non-public macros have been renamed with
prefix ``\spx@``. The command

    find . -name '*.sty' -exec grep -l \\\\spx@ {} \;

has been executed in TeXLive 2015 and 2016 installations to check no
package defines macros starting with ``\spx@``.

Some internal macros having public names (because they are written by
latex.py into the body of the latex document) have been renamed to have
``\sphinx`` prefix. The macros in sphinx.sty starting with \py@, or \DU,
or \PYG have not been modified. Similarly ``\release``, ``\version``,
``\releasename``, etc... have not been renamed.
2016-06-15 08:53:24 +02:00
Takeshi KOMIYA
88c026d0bd Merge branch 'stable' 2016-06-12 00:42:47 +09:00
Takeshi KOMIYA
80921b2ab8 Fix flake8 violation under tests/ 2016-06-12 00:02:11 +09:00
jfbu
f9880bfcc8 latex: keep original Verbatim under same name, use SphinxVerbatim for own 2016-06-10 18:48:33 +02:00
Takeshi KOMIYA
9cd5ba994c Fix #2445: rst_prolog and rst_epilog affect to non reST sources 2016-05-25 21:25:04 +09:00
Takeshi KOMIYA
89360dd3f1 Add testcase for rst_prolog and rst_epilog 2016-05-25 21:24:31 +09:00
Takeshi KOMIYA
cea81e7a70 Define `\menuselection and \accelerator macros to redefine the style of menuselection` roles. 2016-02-25 20:58:01 +09:00
Georg Brandl
46d7e8558e Obligatory copyright update. 2016-01-14 22:54:04 +01:00
Takeshi KOMIYA
2c5c54aa67 Closes #1987: Fix ampersand is ignored in `:menuselection: and :guilabel:` on LaTeX builder 2015-09-01 00:29:03 +09:00
Georg Brandl
8a273d139b Fix generating emphasis nodes without semantic reason
Roles ``ref``, ``term`` and ``menusel`` now don't generate :durole:`emphasis`
nodes anymore.  If you want to keep italic style, adapt your stylesheet.
2015-02-25 15:51:47 +01:00
Takeshi KOMIYA
b563fa44f2 Fix #1620: Use VerbatimBorderColor to add frame to code-block in LaTeX 2015-01-18 15:32:17 +09:00
Georg Brandl
a23903d8d5 Merge branch 'stable' 2015-01-03 21:41:14 +01:00
Georg Brandl
567d52f199 all: update copyright 2015-01-03 21:36:32 +01:00
tk0miya
f51b945d89 Add frame to code-block in LaTeX 2014-10-08 21:52:33 +09:00
Georg Brandl
d47a7587f9 Complete test suite overhaul.
* rename a few test modules to make the names more consistent

* do not copy/use Sphinx from build/ (unnecessary without 2to3)

* use a temporary dir for *all* test projects, the source tree
  will stay pristine that way  (default is tests/build)

* speed up tests by ~3x by splitting up test projects and avoiding
  rebuilds
2014-09-21 17:17:02 +02:00
Georg Brandl
e21d669089 Test suite adapted after :option: changes. 2014-09-20 20:54:23 +02:00
tk0miya
0943375069 Fix #1476 replace <tt> tag by <code> 2014-08-12 12:12:10 +09:00
Takayuki Shimizukawa
ba4dcaa8dd use b prefix for bytes instead of sphinx.pycompat.b function. 2014-05-01 22:54:09 +09:00
Takayuki Shimizukawa
6ae3b68859 replace ur'' prefix with r'' to support py2/py3 in one source. refs #1350 2014-04-30 23:04:21 +09:00
Georg Brandl
e030031321 Update copyright year. 2014-03-01 08:18:16 +01:00
Georg Brandl
c5b4ff0adc * add a test for the parsed-literal directive
* adapt test to pygments output versus Sphinx-emulated nohighlighting output
2014-01-11 10:25:34 +01:00
Georg Brandl
1af3e3ea71 tests: replace "from util import *" by explicit imports 2013-04-01 11:39:32 +02:00
Georg Brandl
151856819c Copyright update. 2013-01-01 22:13:15 +01:00
Georg Brandl
411f82d9b9 Fix markup test with latest pygments-related updates. 2011-10-02 19:39:42 +02:00
Georg Brandl
5d936d5ff1 Fix :samp: latex tests. 2011-09-21 10:05:37 +02:00
Georg Brandl
17efae5622 merge with 1.0 2011-01-04 11:29:09 +01:00