QuickLaTeX on the Wordpress Blog [Plugin]
I've installed QuickLaTeX plugin on my blog. Especially QuickLaTeX can render tikz images on the posts. Now I'm using MathJax on the blog, so actually I don't need some equation rendering functions in QuickLaTeX plugin. However MathJax cannot render some tikz images, we may need this plugin to render only some plots, graphs and so on.
QuickLaTex Plugin Download : http://www.holoborodko.com/pavel/quicklatex
I introduce some simple examples of QuickLaTeX below. If we write like
\ begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=60] {cos(x)*cos(y)};
\end{axis}
\end{tikzpicture}
then QuickLaTeX renders like
\begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=60] {cos(x)*cos(y)};
\end{axis}
\end{tikzpicture}
If you think rendering time is so long, then we may reduce the sampling numbers to plot the image as below.
\ begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=20] {sin(x)*sin(y)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}
\addplot3[surf,domain=0:360,samples=20] {sin(x)*sin(y)};
\end{axis}
\end{tikzpicture}
Here are some other typical examples which can be found in http://www.texample.net/tikz/examples/all.
\ begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}[xlabel=Time (weeks),ylabel=Individuals,
width=12cm,height=6cm
]
\addplot coordinates {(1,8) (2,9) (4,7) (5,13)
(6,12) (8,18) (9,17) (10,22) (11,41) (12,32)
(13,24) (14,21) (16,21.5) (21,19.4) (25,21.02)};
\node[coordinate,pin={below:{Control}}] at (axis cs:16,21.5) {};
\addplot coordinates {(1,4) (2,3) (4,5) (5,7)
(6,9) (7,8) (8,12) (9,23) (10,38) (11,34)
(12,35) (13,33.2) (14,27) (16,25) (21,24.4) (25,24.9)};
\node[coordinate,pin={above:{Treatment}}] at (axis cs:21,24.4) {};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
[/preamble]
\begin{axis}[xlabel=Time (weeks),ylabel=Individuals,
width=12cm,height=6cm
]
\addplot coordinates {(1,8) (2,9) (4,7) (5,13)
(6,12) (8,18) (9,17) (10,22) (11,41) (12,32)
(13,24) (14,21) (16,21.5) (21,19.4) (25,21.02)};
\node[coordinate,pin={below:{Control}}] at (axis cs:16,21.5) {};
\addplot coordinates {(1,4) (2,3) (4,5) (5,7)
(6,9) (7,8) (8,12) (9,23) (10,38) (11,34)
(12,35) (13,33.2) (14,27) (16,25) (21,24.4) (25,24.9)};
\node[coordinate,pin={above:{Treatment}}] at (axis cs:21,24.4) {};
\end{axis}
\end{tikzpicture}
\ begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,fill=red!20,draw,font=\sffamily\Large\bfseries}]
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows}
[/preamble]
\node[main node] (1) {A};
\node[main node] (2) [below left of=1] {B};
\node[main node] (3) [below right of=2] {C};
\node[main node] (4) [below right of=1] {D};
\path[every node/.style={font=\sffamily\small}]
(1) edge node [left] {a} (4)
edge [bend right] node[left] {b} (2)
edge [loop above] node {c} (1)
(2) edge node [right] {d} (1)
edge node {0.1} (4)
edge [loop left] node {100} (2)
edge [bend right] node[left] {20} (3)
(3) edge node [right] {0.04} (2)
edge [bend right] node[right] {40} (4)
edge [loop below] node {1} (3)
(4) edge node [left] {e} (3)
edge [loop right] node {f} (4)
edge [bend right] node[right] {g} (1);
\end{tikzpicture}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,fill=red!20,draw,font=\sffamily\Large\bfseries}]
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usetikzlibrary{arrows}
[/preamble]
\node[main node] (1) {A};
\node[main node] (2) [below left of=1] {B};
\node[main node] (3) [below right of=2] {C};
\node[main node] (4) [below right of=1] {D};
\path[every node/.style={font=\sffamily\small}]
(1) edge node [left] {a} (4)
edge [bend right] node[left] {b} (2)
edge [loop above] node {c} (1)
(2) edge node [right] {d} (1)
edge node {0.1} (4)
edge [loop left] node {100} (2)
edge [bend right] node[left] {20} (3)
(3) edge node [right] {0.04} (2)
edge [bend right] node[right] {40} (4)
edge [loop below] node {1} (3)
(4) edge node [left] {e} (3)
edge [loop right] node {f} (4)
edge [bend right] node[right] {g} (1);
\end{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{gnuplot]
[/preamble]
\ begin{tikzpicture}[scale=2]
\shade[top color=red,bottom color=gray!50]
(0,0) parabola (1.5,2.25) |- (0,0);
\draw (1.05cm,2pt) node[above]
{\$\displaystyle\int_0^{3/2} \!\!x^2\mathrm{d}x\$};
\draw[style=help lines] (0,0) grid (3.9,3.9)
[step=0.25cm] (1,2) grid +(1,1);
\draw[->] (-0.2,0) -- (4,0) node[right] {x};
\draw[->] (0,-0.2) -- (0,4) node[above] {f(x)};
\foreach \x/\xtext in {1/1, 1.5/1\frac{1}{2}, 2/2, 3/3}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {\xtext};
\foreach \y/\ytext in {1/1, 2/2, 2.25/2\frac{1}{4}, 3/3}
\draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {\ytext};
\draw (-.5,.25) parabola bend (0,0) (2,4) node[below right] {x^2};
\end{tikzpicture}
[+preamble]
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{gnuplot]
[/preamble]
\begin{tikzpicture}[scale=2]
\shade[top color=red,bottom color=gray!50]
(0,0) parabola (1.5,2.25) |- (0,0);
\draw (1.05cm,2pt) node[above]
{$\displaystyle\int_0^{3/2} \!\!x^2\mathrm{d}x$};
\draw[style=help lines] (0,0) grid (3.9,3.9)
[step=0.25cm] (1,2) grid +(1,1);
\draw[->] (-0.2,0) -- (4,0) node[right] {$x$};
\draw[->] (0,-0.2) -- (0,4) node[above] {$f(x)$};
\foreach \x/\xtext in {1/1, 1.5/1\frac{1}{2}, 2/2, 3/3}
\draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$\xtext$};
\foreach \y/\ytext in {1/1, 2/2, 2.25/2\frac{1}{4}, 3/3}
\draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {$\ytext$};
\draw (-.5,.25) parabola bend (0,0) (2,4) node[below right] {$x^2$};
\end{tikzpicture}
댓글 0