3

I want to generate pdf by using Sphinx. Sphinx generates pdf through LaTeX. But I have to add unicode=true to package hyperref of LaTeX:

\usepackage[unicode=true]{hyperref}

But Sphinx has generated a default sphinx.sty file that containing configuration of package hyperref when I ran make latex. I have to add unicode=true to this file every time after running make latex with Sphinx, then make all-pdf with latex to generate the pdf.

Is there any method to modify this parameter of package hyperref in the Sphinx's configure file, so that I can run make latexpdf with Sphinx to finish the two steps once?

migrated from stackoverflow.com Jun 19 '13 at 14:35

This question came from our site for professional and enthusiast programmers.

  • Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Martin Schröder Jun 19 '13 at 16:35
4

just add \hypersetup{unicode=true} to conf.py:

latex_elements = {
    'preamble': '''
        \\hypersetup{unicode=true}
     '''
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.