Re: [PATCH RFC v2 3/9] docs-rst: Don't mangle with UTF-8 chars on LaTeX/PDF output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Tue, 16 Aug 2016 14:35:16 +0200
Markus Heiser <markus.heiser@xxxxxxxxxxx> escreveu:

> Am 16.08.2016 um 14:16 schrieb Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx>:
> 
> ...
> > The only issue there was the name of the math extension, with is also
> > sphinx.ext.pngmath. On a plus side, I was also able to remove one of the
> > hacks, by applying the enclosed patch (this doesn't work on 1.4 yet - 
> > I suspect it requires some extra stuff to escape).
> > 
> > So, for me, we're pretty much safe using xelatex, as it works fine for
> > Sphinx 1.3 and 1.4 (and, with Sphinx 1.2, provided that the user asks to
> > continue the build, just like what's needed with pdflatex on such
> > version).
> > 
> > To make it generic, we'll need to patch conf.py to detect the Sphinx
> > version, and use the right math extension, depending on the version.
> > Also, as you proposed, Due to Sphinx version is 1.2, we'll need to use a
> > custom-made Makefile for tex.
> > 
> > As xelatex support was added for version 1.5, we don't need to care
> > about it.  
> 
> I haven't checked on which version which math-extension was
> replaced. But it is easy to detect the sphinx version in conf.py.
> Add these lines to conf.py::
> 
>   import sphinx
>   major, minor, patch = map(int, sphinx.__version__.split("."))
> 
> The "minor" is what you are looking for.
> 
>   if minor > 3:
>       extensions.append("sphinx.ext.imgmath")
>   else:
>       extensions.append("sphinx.ext.pngmath")

Worked, thanks!

Added on the patch series I submitted.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux