From: Leu Zhe <lzhes43@gmail.com>
To: ndokos@gmail.com, "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Preview tikz in org-mode (reduce margins of produced images)
Date: Sat, 17 May 2014 13:52:13 +0900 [thread overview]
Message-ID: <CALjq+LaT6Xe4Z=kZomiep34tAG9dFni4VB6iEfOdxfEpFouzmQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 97 bytes --]
Hi ndokos,
Thanks for you advice.
I added a attachment which matches my problem.
Best regards!
[-- Attachment #1.2: Type: text/html, Size: 193 bytes --]
[-- Attachment #2: test.org --]
[-- Type: application/octet-stream, Size: 4464 bytes --]
Content-Type: text/enriched
Text-Width: 70
#+LATEX_HEADER: \usepackage{tikz}
#+LATEX_HEADER: \usepackage[siunitx]{circuitikz}
<x-color><param>dodger blue</param>* A tikz preview test in org-mode
</x-color>
<x-bg-color><param>#EAEAFF</param><x-color><param>#008ED1</param>#+begin_src latex
</x-color></x-bg-color><x-color><param>#859900</param>\begin</x-color>{<x-color><param>#268bd2</param>tikzpicture</x-color>}[scale=2]
<x-color><param>#859900</param>\draw</x-color>[color=black, thick]
(0,0) to [short,o-] (6,0){} <x-color><param>#93a1a1</param>% Baseline for connection to ground
</x-color> <x-color><param>#93a1a1</param>% Input and ground
</x-color> (0,1) node[]{<x-color><param>#859900</param>\large</x-color>{<x-color><param>#859900</param>\textbf</x-color>{<bold>INPUT</bold>}}}
<x-color><param>#93a1a1</param>% Connection of passive components
</x-color> (5,0) node[ground]{} node[circ](4.5,0){}
(0,2) to [pC, l=$C_1$, o-] (0.5,2)
to [R,l=$R_1$,](1.5,2)
to node[short]{}(2.6,2)
(1.5,2) to [C, l=$C_2$, *-] (1.5,3) -| (5,3)
(2.2,2) to [R, l=$R_2$, *-*] (2.2,3)
(2.2,3) to [pC, l=$C_3$, *-] (2.2,5) -| (3,5)
<x-color><param>#93a1a1</param>% Transistor Bipolar Q1
</x-color> (3,0) to [R,l=$R_5$,-*] (3,1.5)
to [Tnpn,n=npn1] (3,2.5)
(npn1.E) node[right=3mm, above=5mm]{$Q_1$} <x-color><param>#93a1a1</param>% Labelling the NPN transistor
</x-color> (4,0) to [pC, l_=$C_4$, *-] (4, 1.5)--(3,1.5)
(2.2,0) to [vR, l=$R_3$, *-*] (2.2,2)
(3,2.5) to node[short]{}(3,3)
(3,5) to [pR, n=pot1, l_=$R_4$, *-] (3,3)
(3,5) to [R, l=$R_6$, *-] (5,5)
to [short,*-o](5,5.5) node[right]{$V_S=40 V$}
<x-color><param>#93a1a1</param>% Mosfet Transistors
</x-color> (5,3) to [Tnigfetd,n=mos1] (5,5)
(mos1.B) node[anchor=west]{$Q_2$} <x-color><param>#93a1a1</param>% Labelling MOSFET Q2 Transistor
</x-color> (pot1.wiper) to [R, l=$R_7$] (4.5,4) -| (mos1.G)
(5,1.5) to [Tpigfetd,n=mos2] (5,2.5)
(5,0) to (mos2.S)
(3,2.5) to [R, l=$R_8$, *-] (4.5,2.5)
-| (mos2.G)
(mos2.B) node[anchor=west]{$Q_3$} <x-color><param>#93a1a1</param>% Labelling MOSFET Q3 Transistor
</x-color> <x-color><param>#93a1a1</param>% Output
</x-color> (6,3) to [pC, l=$C_5$,-*](5,3)
(6,3) to [short,-o] (6,2){}
(mos1.S)--(mos2.D)
(6,0) to [short,-o] (6,1){} node[above=7mm]{<x-color><param>#859900</param>\large</x-color>{<x-color><param>#859900</param>\textbf</x-color>{<bold>SPEAKER</bold>}}}
;
<x-color><param>#859900</param>\end</x-color>{<x-color><param>#268bd2</param>tikzpicture</x-color>}
<x-bg-color><param>#EAEAFF</param><x-color><param>#008ED1</param>#+end_src
</x-color></x-bg-color>
with tikz package in the premeable, even I preview <x-color><param>SaddleBrown</param>$$\mu$$</x-color>, it would produce large margins.
The <x-color><param>#b58900</param>=org-format-latex-header=</x-color> is set as below in .
<x-bg-color><param>#EAEAFF</param><x-color><param>#008ED1</param>#+begin_src emacs-lisp
</x-color></x-bg-color>(custom-set-variables
'(org-format-latex-header <x-color><param>#2aa198</param>"\\documentclass{article}
\\usepackage[usenames]{color}
\\usepackage[allowlitunits]{siunitx}
\\usepackage{booktabs}
\\usepackage{array}
%\\usepackage{tikz}
%\\usetikzlibrary{calc}
\\usepackage{multirow}
\\usepackage{threeparttable}
%\\usepackage[active, float]{preview}
%\\PreviewEnvironment{tikzpicture}
\\usepackage[labelsep=period]{caption}
\\usepackage[cm-default,no-math]{fontspec}
\\defaultfontfeatures{Mapping=tex-text}
\\setmainfont{Times New Roman}
\\setsansfont{Arial}
\\usepackage{mathspec}
\\setmathfont(Digits){Times New Roman}
\\setmathfont(Latin){Times New Roman}
\\usepackage{xeCJK}
\\setCJKmainfont[BoldFont={IPAGothic}]{IPAMincho}
\\setCJKsansfont{msgothic.ttc}
\\pagestyle{empty} % do not remove
% The settings below are copied from fullpage.sty
\\setlength{\\textwidth}{\\paperwidth}
\\addtolength{\\textwidth}{-3cm}
\\setlength{\\oddsidemargin}{1.5cm}
\\addtolength{\\oddsidemargin}{-2.54cm}
\\setlength{\\evensidemargin}{\\oddsidemargin}
\\setlength{\\textheight}{\\paperheight}
\\addtolength{\\textheight}{-\\headheight}
\\addtolength{\\textheight}{-\\headsep}
\\addtolength{\\textheight}{-\\footskip}
\\addtolength{\\textheight}{-3cm}
\\setlength{\\topmargin}{1.5cm}
\\addtolength{\\topmargin}{-2.54cm}"</x-color>))
<x-bg-color><param>#EAEAFF</param><x-color><param>#008ED1</param>#+end_src</x-color></x-bg-color>
next reply other threads:[~2014-05-17 4:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 4:52 Leu Zhe [this message]
2014-05-17 15:28 ` Preview tikz in org-mode (reduce margins of produced images) Nick Dokos
2014-05-21 1:59 ` Bastien
2014-05-21 4:42 ` Nick Dokos
-- strict thread matches above, loose matches on Subject: below --
2014-05-21 6:22 Leu Zhe
2014-05-21 7:32 ` Bastien
2014-05-16 8:34 Leu Zhe
2014-05-16 16:42 ` Nick Dokos
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALjq+LaT6Xe4Z=kZomiep34tAG9dFni4VB6iEfOdxfEpFouzmQ@mail.gmail.com' \
--to=lzhes43@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.