diff --git a/doc/config.rst b/doc/config.rst index 34d862e9a..fe8717aac 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -1077,7 +1077,7 @@ These options influence LaTeX output. "Rejne". You can also set this to ``''`` to disable fncychap. ``'preamble'`` Additional preamble content, default empty. - ``'footer'``` + ``'footer'`` Additional footer content (before the indices), default empty. * Keys that don't need be overridden unless in special cases are: @@ -1085,6 +1085,8 @@ These options influence LaTeX output. ``'inputenc'`` "inputenc" package inclusion, default ``'\\usepackage[utf8]{inputenc}'``. + ``'cmappkg'`` + "cmap" package inclusion, default ``'\\usepackage{cmap}'``. ``'fontenc'`` "fontenc" package inclusion, default ``'\\usepackage[T1]{fontenc}'``. ``'maketitle'`` diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index fc5da4163..7fae4a1b0 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -34,6 +34,7 @@ HEADER = r'''%% Generated by Sphinx. \documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(wrapperclass)s} %(inputenc)s %(utf8extra)s +%(cmappkg)s %(fontenc)s %(babel)s %(fontpkg)s @@ -138,6 +139,7 @@ class LaTeXTranslator(nodes.NodeVisitor): 'extraclassoptions': '', 'inputenc': '\\usepackage[utf8]{inputenc}', 'utf8extra': '\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}', + 'cmappkg': '\\usepackage{cmap}\n', 'fontenc': '\\usepackage[T1]{fontenc}', 'babel': '\\usepackage{babel}', 'fontpkg': '\\usepackage{times}',