From patchwork Mon Aug 15 21:22:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9282211 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF6E9607FD for ; Mon, 15 Aug 2016 21:23:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD24B28E8A for ; Mon, 15 Aug 2016 21:23:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C21F728E8E; Mon, 15 Aug 2016 21:23:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 659BA28E8A for ; Mon, 15 Aug 2016 21:23:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075AbcHOVXb (ORCPT ); Mon, 15 Aug 2016 17:23:31 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51016 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbcHOVXR (ORCPT ); Mon, 15 Aug 2016 17:23:17 -0400 Received: from 177.17.139.99.dynamic.adsl.gvt.net.br ([177.17.139.99] helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZPLo-00015N-9u; Mon, 15 Aug 2016 21:23:16 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.87) (envelope-from ) id 1bZPLk-0000BZ-8I; Mon, 15 Aug 2016 18:23:12 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Jonathan Corbet , Mauro Carvalho Chehab , Markus Heiser , linux-doc@vger.kernel.org Subject: [PATCH RFC v2 9/9] HACK: make pdfdocs build with media books Date: Mon, 15 Aug 2016 18:22:00 -0300 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --------------------------------- PLEASE DO NOT APPLY THIS UPSTREAM --------------------------------- This hack addresses two issues with pdf generation from media books: 1) Sphinx doesn't do the right thing if a block of code is inside a table. This sounds a Sphinx bug. Perhaps it can be fixed by preloading some LaTeX code. 2) the file output doesn't do the right thing for PDF. This is likely due to the lack of some escape chars when generating the output rst file. This hack makes the document to build fully. Please notice that tables are not built well yet, as most are too big. We can very likely fix several of them by rotating the page to landscape. Signed-off-by: Mauro Carvalho Chehab --- Documentation/Makefile.sphinx | 1 + Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 8 ++++---- Documentation/media/uapi/v4l/vidioc-querycap.rst | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx index aa7ff32be589..8aa4fffda860 100644 --- a/Documentation/Makefile.sphinx +++ b/Documentation/Makefile.sphinx @@ -49,6 +49,7 @@ ifeq ($(HAVE_PDFLATEX),0) @echo " SKIP Sphinx $@ target." else # HAVE_PDFLATEX $(call cmd,sphinx,latex) + (cd $(BUILDDIR); for i in *.rst; do echo >$$i; done) $(Q)$(MAKE) PDFLATEX=xelatex -C $(BUILDDIR)/latex endif # HAVE_PDFLATEX diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst index 4715261631ab..7df7bee142b6 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst @@ -107,10 +107,10 @@ one until ``EINVAL`` is returned. .. _v4l2-fourcc: - .. code-block:: c - - #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) - +.. .. code-block:: c +.. +.. #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) +.. Several image formats are already defined by this specification in :ref:`pixfmt`. diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst index b10fed313f99..96ea81344696 100644 --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst @@ -118,16 +118,16 @@ specification the ioctl returns an ``EINVAL`` error code. - :cspan:`2` - .. code-block:: c - - #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) - - __u32 version = KERNEL_VERSION(0, 8, 1); - - printf ("Version: %u.%u.%u\\n", - (version >> 16) & 0xFF, - (version >> 8) & 0xFF, - version & 0xFF); +.. .. code-block:: c +.. +.. #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +.. +.. __u32 version = KERNEL_VERSION(0, 8, 1); +.. +.. printf ("Version: %u.%u.%u\\n", +.. (version >> 16) & 0xFF, +.. (version >> 8) & 0xFF, +.. version & 0xFF); - .. row 6