From: Fabrice Popineau <fabrice.popineau@supelec.fr>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Alan Schmitt <alan.schmitt@polytechnique.org>,
emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: BUG report [Was: computing the size of a tikz to png image during export]
Date: Mon, 29 Jan 2018 00:29:13 +0100 [thread overview]
Message-ID: <CAFgFV9MC8e4T-tNeD7Qp+iStniWmK_zMDaqm+0BiP-CB6w92WQ@mail.gmail.com> (raw)
In-Reply-To: <87lgghr2h2.fsf@nicolasgoaziou.fr>
[-- Attachment #1.1: Type: text/plain, Size: 824 bytes --]
2018-01-29 0:24 GMT+01:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
> Hello,
>
> Fabrice Popineau <fabrice.popineau@supelec.fr> writes:
>
> > Well, I think there is a problem with the current master
> > since commit 38be85124551083d269.
> >
> > The problem is that the by-backend trick which were tolerated before
> > does not work anymore.
> >
> > Tested between Org 9.1.6 as in current emacs-26.0.91 release versus
> current
> > Org master.
> >
> > More over, ignoring the no-eval parameter
> > in org-babel-parse-header-arguments
> > restores the previous behavior.
>
> Would you have an ECM? I don't know what is "the by-backend trick".
>
>
Example attached.
Actually, I wonder if you can avoid to evaluate arguments in
org-babel-parse-header-arguments
and continue to support the use of by-backend.
Regards,
Fabrice
[-- Attachment #1.2: Type: text/html, Size: 1435 bytes --]
[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 2240 bytes --]
#+TITLE: Test
#+AUTHOR: Blah
#+LATEX_CLASS: article
#+LATEX_CLASS_OPTIONS: [american]
#
# Setup tikz package for both LaTeX and HTML export:
#
#+LATEX_HEADER: \usepackage{tikz}
#+PROPERTY: header-args:latex+ :packages '(("" "tikz"))
#+PROPERTY: header-args:latex+ :imagemagick yes :fit yes
* One Diamond
#+name: diamond
#+header: :iminoptions -density 600 -resample 100x100
#+header: :file (by-backend (latex "diamond.tikz") (t "diamond.png"))
#+begin_src latex :results raw graphics
\begin{tikzpicture}
\draw (1,0) -- (0,1) -- (-1,0) -- (0,-1) -- cycle;
\end{tikzpicture}
#+end_src
#+name: CR2017-2018-fig1
#+header: :file (by-backend (html "CR2017-2018-fig1.svg") (t nil))
#+header: :imagemagick (by-backend (latex nil) (t "yes")) :fit yes
#+header: :results (by-backend (html "file") (pdf "latex") (t "raw"))
#+header: :headers \usetikzlibrary{arrows,automata,quotes,graphs,shapes,intersections,mindmap,trees,shadows,fit,positioning,calc,matrix,decorations,chains,external}
#+header: :packages '(("" "tkz-graph"))
#+begin_src latex
\begin{tikzpicture}
[node distance=1cm,on grid,auto,%scale=0.7,%
state/.style={draw,thick,circle,inner sep=3pt,minimum size=9mm,%scale=0.8,transform shape
}]
\foreach \l/\x/\y in {a/3/6, b/0/4, c/6/4, d/3/3, e/0/2, f/6/2, g/3/0}
\node[state] (q\l) at(\x , \y) {\l};
% \node[state,accepting ] (q4)[below=of q3] {4};
\foreach \u/\v/\w in {a/b/11, a/c/12, a/e/10, b/c/0, b/d/4, b/e/3, c/f/8, d/f/7, d/g/2, d/e/9, e/f/5, e/g/6, f/g/1}
\path [-, thick] (q\u) edge node {\w} (q\v);
;
% (q4) edge [loop below] node {a} (q4) (q4) edge node[right]
% {b} (q3);
%\path[use as bounding box%, draw%
%] (-3,-1) rectangle (10,14);
\end{tikzpicture}
#+end_src
#+name: fig:diamond
#+caption: A diamond.
#+attr_latex: :float t :width ""
#+results: diamond
Figure [[fig:diamond]] is a diamond.
* Setup :noexport:
#+name: setup
#+begin_src emacs-lisp :exports none :results silent
(defmacro by-backend (&rest body)
`(cl-case org-export-current-backend ,@body))
#+end_src
# Local variables:
# eval: (org-sbe "setup")
# End:
next prev parent reply other threads:[~2018-01-28 23:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-28 19:00 BUG report [Was: computing the size of a tikz to png image during export] Fabrice Popineau
2018-01-28 23:24 ` Nicolas Goaziou
2018-01-28 23:29 ` Fabrice Popineau [this message]
2018-01-29 1:34 ` Berry, Charles
2018-01-29 7:49 ` Fabrice Popineau
2018-01-30 2:26 ` Berry, Charles
2018-01-30 20:59 ` Nicolas Goaziou
2018-01-30 21:31 ` Fabrice Popineau
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=CAFgFV9MC8e4T-tNeD7Qp+iStniWmK_zMDaqm+0BiP-CB6w92WQ@mail.gmail.com \
--to=fabrice.popineau@supelec.fr \
--cc=alan.schmitt@polytechnique.org \
--cc=emacs-orgmode@gnu.org \
--cc=fabrice.popineau@centralesupelec.fr \
--cc=mail@nicolasgoaziou.fr \
/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).