From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: how to change the resizebox for a generated tikz diagram? Date: Wed, 24 Feb 2016 08:51:21 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40120) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYUEK-0006Z3-6t for emacs-orgmode@gnu.org; Wed, 24 Feb 2016 02:51:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYUEE-0006u9-W5 for emacs-orgmode@gnu.org; Wed, 24 Feb 2016 02:51:28 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:13028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYUEE-0006u2-Ol for emacs-orgmode@gnu.org; Wed, 24 Feb 2016 02:51:22 -0500 In-Reply-To: (Alan Schmitt's message of "Tue, 23 Feb 2016 11:37:46 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, On 2016-02-23 11:37, Alan Schmitt writes: > When exporting this source block to beamer > > #+header: :file (by-backend (beamer "foldleft.tikz") (t "foldleft.png")) > #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geome= try 800 > #+header: :results file raw > #+header: :headers '("\\usepackage{tikz}") > #+begin_src latex > \usetikzlibrary{matrix,arrows} > \begin{tikzpicture}[scale=3D2, every node/.style=3D{transform shape}] > \matrix (m) [matrix of nodes, row sep=3D2em, column sep=3D3em] > { & $[x_1;$ & $x_2;$ & $\ldots;$ & $x_n]$ & \\ > $acc$ & \node (f1) [circle, draw] {$f$}; & \node (f2) [circle,draw] {$f= $}; & & \node (fn) [circle,draw] {$f$}; & \texttt{fold\_left } $f$ \; $acc$= \; $[x_1; x_2; \ldots; x_n]$\\ > }; > \draw (m-2-1) edge[->,thick] (f1); > \draw (f1) edge[->,thick] (f2); > \draw (f2) edge[->,thick,dotted] (fn); > \draw (fn) edge[->,thick] (m-2-6); > \draw (m-1-2) edge[->,thick] (f1); > \draw (m-1-3) edge[->,thick] (f2); > \draw (m-1-5) edge[->,thick] (fn); > \end{tikzpicture} > #+end_src > > I get the following > > \resizebox{.9\linewidth}{!}{\input{foldleft.tikz}} > > How can I change the parameter of the resizebox command? I tried adding > a line > #+attr_latex :width \linewidth > as I usually do for images, but it is not taken into account. I've found a workaround: I add #+name: foldleft before the block, and then I can put the attr_latex before an explicit result block: #+attr_latex: :width \linewidth #+results: foldleft Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82 (2016-01, Mauna Loa Obs.): 402.52 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWzWD5AAoJEAQNCjtO0uXHUf8IAMJjKMliBz3NjMFQpUnvB3vX TwjDjiEu7zr7Q7J/0OUPSQuSR7IPtnEby0kCTBF/wro/P/z48PilR0J4vHPw7tmh WVCVIOk6+1ebND4UlrYbeKICG1xMVFhHwCunboCoCfiFq2+IPHqRR1B/kWk8F6pj ZFu2Thf/B966aDRIfY5p3aIVvrTE6RisjbvfUSw/fZSxVUTFCA54ACC32v060Zre kNJltVgeNTX9qEJ6qtIzb35QxvAEgMV0KAct4RpuNITwWGxsEKVao0O2M3bx1wy9 lo1BDMVaJAdj3kxi3wn9KNpcmrvOqnIshXM7yewgmErJjp0cnHonDdzqIR0mgF0= =lSbf -----END PGP SIGNATURE----- --=-=-=--