From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Jani Nikula <jani.nikula@intel.com>,
linux-media@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
ksummit-discuss@lists.linuxfoundation.org
Subject: Re: [Ksummit-discuss] Including images on Sphinx documents
Date: Tue, 8 Nov 2016 08:50:36 -0200 [thread overview]
Message-ID: <20161108085036.304fdfea@vento.lan> (raw)
In-Reply-To: <20161107170504.25j4rwfohhqp67fw@x>
Em Mon, 7 Nov 2016 09:05:05 -0800
Josh Triplett <josh@joshtriplett.org> escreveu:
> On Mon, Nov 07, 2016 at 09:46:48AM -0200, Mauro Carvalho Chehab wrote:
> > That's said, PNG also doesn't seem to work fine on Sphinx 1.4.x.
> >
> > On my tests, I installed *all* texlive extensions on Fedora 24, to
> > be sure that the issue is not the lack of some extension[1], with:
> >
> > # dnf install $(sudo dnf search texlive |grep all|cut -d. -f 1|grep texlive-)
> >
> > When running LaTeX in interactive mode, building just the media
> > PDF file with:
> >
> > $ cls;make cleandocs; make SPHINXOPTS="-j5" DOCBOOKS="" SPHINXDIRS=media latexdocs
> > $ PDFLATEX=xelatex LATEXOPTS="-interaction=interactive" -C Documentation/output/media/latex
> >
> > I get this:
> >
> > LaTeX Warning: Hyper reference `uapi/v4l/subdev-formats:bayer-patterns' on page
> > 153 undefined on input line 21373.
> >
> > <use "bayer.png" > [153]
> > ! Extra alignment tab has been changed to \cr.
> > <template> \endtemplate
> >
> > l.21429 \unskip}\relax \unskip}
> > \relax \\
> > ?
> >
> > This patch fixes the issue:
> > https://git.linuxtv.org/mchehab/experimental.git/commit/?h=dirty-pdf&id=b709de415f34d77cc121cad95bece9c7ef4d12fd
> >
> > That means that Sphinx is not generating the right LaTeX output even for
> > (some?) PNG images.
>
> \includegraphics normally works just fine for PNG images in PDF
> documents.
I didn't try to fix the Sphinx output in LaTeX format when a PNG
image is used, but, from the above log, clearly it did something
wrong. Perhaps there's something bad defined at the sphinx.sty file,
or it simply generates the wrong LaTeX code when the image
is not on PDF format.
> [...]
> > And it may even require "--shell-escape" to be passed at the xelatex
> > call if inkscape is not in the path, with seems to be a strong
> > indication that SVG support is not native to texlive, but, instead,
> > just a way to make LaTeX to call inkscape to do the image conversion.
>
> Please don't require --shell-escape as part of the TeX workflow. If
> LaTeX can't handle the desired image format natively, it needs
> conversion in advance.
Agreed. I sent a patch series to linux-doc, doing the conversion in
advance:
https://marc.info/?l=linux-doc&m=147859902804144&w=2
Not sure why, but the archives don't have all patches yet.
Anyway, the relevant one is this:
https://git.linuxtv.org/mchehab/experimental.git/commit/?h=pdf-fixes&id=5d41c452c787f6a6c755a3855312435bc439acb8
It basically calls ImageMagick "convert" tool for all png and
pdf files currently at the documentation (they're all at media,
ATM).
Thanks,
Mauro
next prev parent reply other threads:[~2016-11-08 10:57 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 9:55 Including images on Sphinx documents Mauro Carvalho Chehab
2016-11-07 10:53 ` Jani Nikula
2016-11-07 11:46 ` Mauro Carvalho Chehab
2016-11-07 17:05 ` [Ksummit-discuss] " Josh Triplett
2016-11-08 10:50 ` Mauro Carvalho Chehab [this message]
2016-11-16 16:03 ` Arnd Bergmann
2016-11-16 20:26 ` Mauro Carvalho Chehab
2016-11-17 11:07 ` Arnd Bergmann
2016-11-17 11:28 ` Jani Nikula
2016-11-17 12:39 ` Mauro Carvalho Chehab
2016-11-17 14:52 ` Theodore Ts'o
2016-11-17 15:16 ` Mauro Carvalho Chehab
2016-11-17 15:28 ` Johannes Berg
2016-11-17 16:25 ` James Bottomley
2016-11-17 15:32 ` Mauro Carvalho Chehab
2016-11-17 16:02 ` Linus Torvalds
2016-11-17 16:04 ` Linus Torvalds
2016-11-18 9:15 ` Jani Nikula
2016-11-18 10:23 ` Daniel Vetter
2016-11-19 17:15 ` Jonathan Corbet
2016-11-19 17:38 ` Andrew Lunn
2016-11-19 17:50 ` Bart Van Assche
2016-11-19 17:55 ` David Woodhouse
2016-11-19 18:45 ` Linus Torvalds
2016-11-19 22:59 ` David Woodhouse
2016-11-20 14:26 ` Mauro Carvalho Chehab
2016-11-19 20:54 ` Mauro Carvalho Chehab
2016-11-19 21:09 ` Linus Torvalds
2016-11-21 10:39 ` Johannes Berg
2016-11-21 14:06 ` Mauro Carvalho Chehab
2016-11-21 15:41 ` James Bottomley
2016-11-21 15:44 ` Johannes Berg
2016-11-21 15:47 ` Jani Nikula
2016-11-21 19:48 ` Mauro Carvalho Chehab
2016-11-13 21:00 ` Jonathan Corbet
2016-11-14 14:16 ` Mauro Carvalho Chehab
2016-11-09 12:27 ` Mauro Carvalho Chehab
2016-11-07 17:01 ` [Ksummit-discuss] " Josh Triplett
2016-11-09 9:22 ` Markus Heiser
2016-11-09 11:16 ` Jani Nikula
2016-11-09 11:27 ` Mauro Carvalho Chehab
2016-11-09 11:45 ` Jani Nikula
2016-11-09 11:27 ` Markus Heiser
2016-11-09 11:58 ` Jani Nikula
2016-11-09 22:11 ` Markus Heiser
2016-11-10 10:35 ` Jani Nikula
2016-11-11 11:22 ` Jani Nikula
2016-11-11 11:45 ` Markus Heiser
2016-11-11 9:34 ` Mauro Carvalho Chehab
2016-11-13 19:52 ` Jonathan Corbet
2016-11-14 13:30 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161108085036.304fdfea@vento.lan \
--to=mchehab@s-opensource.com \
--cc=jani.nikula@intel.com \
--cc=josh@joshtriplett.org \
--cc=ksummit-discuss@lists.linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).