From: Vladimir Nikishkin <lockywolf@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: How do I set attr_latex for the babel-block outputs?
Date: Mon, 25 May 2020 12:47:31 +0800 [thread overview]
Message-ID: <CA+A2iZZHAqhs1m6kUMnGCsfb_uEpZGSxmuPT2pNKAtG7mBEb6Q@mail.gmail.com> (raw)
And the same question: I am drawing pictures for my book suing TikZ and babel.
This is my code (almost and mwe):
#+name: figure-1-2
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 300
#+header: :fit yes :headers '("\\usepackage{tikz}")
#+header: :buffer on
#+begin_src latex :results value graphics file :exports both :file
figure-1-2-tree.png
\usetikzlibrary{trees}
\begin{tikzpicture}[color=gray]
\node {sqrt} % root
child { node {sqrt-iter}
child[sibling distance=5cm] { node{ good-enough }
child[sibling distance=2cm] { node { square } }
child[sibling distance=2cm] { node { abs } } }
child { node{ improve }
child { node { average } } } };
\end{tikzpicture}
#+end_src
The #+RESULTS has a link
[file:figure-1-2-tree.png]]
below it.
However, after export the picture is rendered \textwidth-wide.
If I manually set
#+attr_latex: :width 8cm above the #+RESULTS, it is displayed as
expected, but If I recompute the picture, it is pasted above my
manually added attr line.
As far as I understand, the "graphics" Format is essentially
org-mode-text. Is it possible to set proper width attributes?
--
Yours sincerely, Vladimir Nikishkin
next reply other threads:[~2020-05-25 4:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 4:47 Vladimir Nikishkin [this message]
2020-05-27 11:05 ` How do I set attr_latex for the babel-block outputs? Eric S Fraga
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+A2iZZHAqhs1m6kUMnGCsfb_uEpZGSxmuPT2pNKAtG7mBEb6Q@mail.gmail.com \
--to=lockywolf@gmail.com \
--cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).