Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-21 Thread Leu Zhe
Hi Nick,

Thanks you for your help.

Finally I found a solution by referring the examples in texample.net.
I just replaced the \documentclass{article} to
 documentclass[varwidth]{standalone},
then it works perfectly.

I am not familiar enriched-mode, too.
It is also very strange that why i can not receive the email in my gmail...

Thank you anyway.

Leu


Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-21 Thread Bastien
Hi Leu,

Leu Zhe lzhe...@gmail.com writes:

 I just replaced the \documentclass{article} to  documentclass
 [varwidth]{standalone},
 then it works perfectly.

Thanks for sharing this trick, hard to find, so even more valuable
when made public.

-- 
 Bastien



Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-20 Thread Bastien
Nick Dokos ndo...@gmail.com writes:

 Unfortunately, you seem to have attached it as text/enriched and it is
 messed up. Can you please attach it as text/plain?

I attach it just in case.



test.org
Description: Lotus Organizer

-- 
 Bastien


Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-20 Thread Nick Dokos
Bastien b...@gnu.org writes:

 Nick Dokos ndo...@gmail.com writes:

 Unfortunately, you seem to have attached it as text/enriched and it is
 messed up. Can you please attach it as text/plain?

 I attach it just in case.

Didn't know about enriched-mode - thanks!

But back to the original question: with the redefined
org-format-latex-header, I get errors (probably because the preview is
produced by running latex, whereas the redefined header seems to require
xetex). Without the redefined header, I get a preview which does *not*
have large margins. So the header is probably the culprit: I would start
deleting things from it, until the problem disappears. In particular,
the fullpage.sty settings look suspicious to me. Maybe somebody who has
set up previews with xe(la)tex can provide a more helpful answer
(doesn't that require code changes to org?)

-- 
Nick




Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-17 Thread Nick Dokos
Leu Zhe lzhe...@gmail.com writes:

 Hi ndokos,

 Thanks for you advice. 
 I added a attachment which matches my problem.

 Best regards!


 Content-Type: text/enriched
 Text-Width: 70

 #+LATEX_HEADER: \usepackage{tikz}
 #+LATEX_HEADER: \usepackage[siunitx]{circuitikz}


 x-colorparamdodger blue/param* A tikz preview test in org-mode

 /x-color
 ...

Unfortunately, you seem to have attached it as text/enriched and it is
messed up. Can you please attach it as text/plain?

Thanks!
-- 
Nick




[O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-16 Thread Leu Zhe
Hi, everyone!

I always use org-preview-latex-fragment command to preview the LaTeX code,
which is awesome.
It can effectively crop and suit the size of produced png to the content.

However, recently I start to preview some tikz code.
I can greatly produce the good results except one problem:
The preview can never reduce the spare margin of the produced images, which
left large blank space there. However, when I preview other LaTeX code
after deleting tikz preamble, everything is fine.

So is there anyone who has some idea to reduce the large margins?


Leu


Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-16 Thread Nick Dokos
Leu Zhe lzhe...@gmail.com writes:

 Hi, everyone!

 I always use org-preview-latex-fragment command to preview the LaTeX
 code, which is awesome.  It can effectively crop and suit the size of
 produced png to the content.

 However, recently I start to preview some tikz code.   I can greatly
 produce the good results except one problem: The preview can never
 reduce the spare margin of the produced images, which left large blank
 space there. However, when I preview other LaTeX code after deleting
 tikz preamble, everything is fine.

 So is there anyone who has some idea to reduce the large margins?


It helps if you provide a small example: otherwise, even if one is
willing to take a stab at it, one has to create one from scratch. Given
that just about all of us have limited time, that reduces the
probability that you will get an answer.

Nick




Re: [O] Preview tikz in org-mode (reduce margins of produced images)

2014-05-16 Thread Leu Zhe
Hi ndokos,

Thanks for you advice.
I added a attachment which matches my problem.

Best regards!


test.org
Description: Binary data