Re: [PATCH v2.1 6/6] [media] docs-rst: auto-generate PDF image files

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

 



Em Wed, 09 Nov 2016 13:29:43 +0200
Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> escreveu:

> On Wed, 09 Nov 2016, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> wrote:
> > Em Wed, 09 Nov 2016 08:43:47 +0200
> > Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> escreveu:
> >  
> >> Hi Mauro,
> >> 
> >> Thank you for the patch.
> >> 
> >> On Tuesday 08 Nov 2016 07:55:47 Mauro Carvalho Chehab wrote:  
> >> > From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
> >> > 
> >> > The PDF files are actually generated offline from their SVG
> >> > or PNG source files. Move the logic to build them in runtime.
> >> > 
> >> > NOTE: due to the way Sphinx works, the PDF images should be
> >> > generated inside the Kernel source tree, as otherwise Sphinx
> >> > won't find it, not obeying what's specified by "O=" makefile
> >> > parameter.    
> >> 
> >> Can't we fix that ?  
> >
> > Not sure if Sphinx upstream would accept a patch adding the
> > build dir as a place to seek for source files. If if they do,
> > that would mean that we would need to stick with the Sphinx
> > versions with such fix.
> >
> > Someone could, instead, write a Sphinx extension that would
> > handle the image include tags on a different way, overriding the
> > default behavior if the output target is LaTeX and calling
> > ImageMagick, teaching Sphinx to seek for the generated image
> > at the output directory. I've no idea if it is doable, as I
> > never tried to write a Sphinx extension.  
> 
> I think it is, and this is a *much* cleaner design.

Yes, if doable, it will be cleaner, as it will be one less hack for
PDF generation. IMHO, Sphinx should be doing it upstream, as it makes
no sense to support different image formats depending on its output.

> > Another alternative would be to copy all *.rst, *.png and *.svg 
> > from Documentation/ into the "O=" target, and tell Sphinx that
> > the source dir is there. That's doable, but will increase the 
> > documentation build time.  
> 
> s/time/complexity/.

Complexity will actually reduce with cp (at least while such feature
doesn't reach Sphinx upstream), as it would be one less Kernel-specific
script.

Thanks,
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