From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/4] mk: Add 'make doc-pdf' target to convert guide docs to pdf Date: Mon, 02 Feb 2015 14:35:19 +0100 Message-ID: <2564393.TY2qeNvaqR@xps13> References: <1421255657-19521-1-git-send-email-john.mcnamara@intel.com> <13813522.nhRjWB08pe@xps13> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Mcnamara, John" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2015-02-02 13:10, Mcnamara, John: > From: Thomas Monjalon [mailto:thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] > > > + # Change the svg image includes to png in the latex docs. > > > + $(Q)sed -i 's/\.svg/.png/g' $(RTE_OUTPUT)/doc/latex/guides/$*/*.tex > > > > No, you could avoid that if every image references where x.* instead of > > x.svg or x.png. > > The image extension should always be .* in rst to be format agnostic. > > Then there is a (configurable) rule to choose the best format. > > This works for the html output but Sphinx throws a warning for the > latex output since Sphinx doesn't support svg for that target. As a > result the relative image include in the Latex file is incorrect and > fails. So the sed conversion is a workaround. I think it's possible. Look at this link: http://stackoverflow.com/questions/6473660/using-sphinx-docs-how-can-i-specify-png-image-formats-for-html-builds-and-pdf-im In this example, SVG files are converted into PDF files, not PNG. -- Thomas