\captionof
sticks to the right side of a pspicture
environment. Is it possible to center it?\captionof
sticks to the right side of a pspicture
environment. Is it possible to center it?NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass[10pt,letterpaper]{article}
%\documentclass[10pt,letterpaper]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{pstricks, pst-node}
\usepackage{pst-eucl}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{lipsum}
\begin{document}
% Compile sequence: F2, F4, F8, F7
Triangles
eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr\\
%\setlength\intextsep{0pt}
\begin{wrapfigure}{l}{0pt}
\pspicture(0,0)(5,4)
\pstTriangle(0,0){B}(4,3){A}(4,0){C}
\pstMarkAngle{C}{B}{A}{$\alpha$}
\pstMarkAngle{B}{A}{C}{$\beta$}
\pstMarkAngle{A}{C}{B}{$\gamma$}
\pcline[linestyle=none](0,0)(4,3)
\naput[nrot=:U]{c}
\pcline[linestyle=none](0,0)(4,0)
\tbput{a}
\pcline[linestyle=none](4,0)(4,3)
\trput{b}
\endpspicture
\captionof{figure}{Straight triangle 1}
\end{wrapfigure}
\begin{wrapfigure}{r}{0pt}
\pspicture(0,0)(4,5)
\pstTriangle(0,0){B}(3,4){A}(3,0){C}
\pstMarkAngle{C}{B}{A}{$\alpha$}
\pstMarkAngle{B}{A}{C}{$\beta$}
\pstMarkAngle{A}{C}{B}{$\gamma$}
\pcline[linestyle=none](0,0)(3,4)
\naput[nrot=:U]{c}
\pcline[linestyle=none](0,0)(3,0)
\tbput{a}
\pcline[linestyle=none](3,0)(3,4)
\trput{b}
\endpspicture
\captionof{figure}{Straight triangle 2}
\end{wrapfigure}
Square triangle:
eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr
\[\alpha+\beta+\gamma=180^{\circ}\]
\[a^{2}+b^{2}=c^{2}\]
\[a=\sqrt{c^{2}-b^{2}}\]
\[b=\sqrt{c^{2}-a^{2}}\]
Trigonometry equations:
eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr
\[\sin\alpha=\frac{b}{c}\quad\cos\alpha=\frac{a}{c}\quad\tan\alpha=\frac{b}{a}\]
\[\sin\beta=\frac{a}{c}\quad\cos\beta=\frac{b}{c}\quad\tan\beta=\frac{a}{b}\]
eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr
eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr eklrewkr
%\lipsum
\end{document}
Code: Select all
Package wrapfig Warning: Collision between wrapping environments on input line 34.
wrapfigure
environment you can use the usual \caption
command.pspicture
environment is syntactically wrong (see code).Code: Select all
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{pst-eucl,pstricks-add}
\usepackage{auto-pst-pdf} % allow PSTricks code with PDFLaTeX
\usepackage{wrapfig}
\begin{document}
Triangles
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\begin{wrapfigure}[19]{l}{0pt}
\begin{pspicture}(0,0)(5,4)
\pstTriangle(0,0){B}(4,3){A}(4,0){C}
\pstMarkAngle{C}{B}{A}{$\alpha$}
\pstMarkAngle{B}{A}{C}{$\beta$}
\pstMarkAngle{A}{C}{B}{$\gamma$}
\pcline[linestyle=none](0,0)(4,3)
\naput[nrot=:U]{c}
\pcline[linestyle=none](0,0)(4,0)
\tbput{a}
\pcline[linestyle=none](4,0)(4,3)
\trput{b}
\end{pspicture}
\caption{Straight triangle 1}
\end{wrapfigure}
Square triangle:
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\[
\alpha+\beta+\gamma=180^{\circ}
\]
\[
a^{2}+b^{2}=c^{2}
\]
\[
a=\sqrt{c^{2}-b^{2}}
\]
\[
b=\sqrt{c^{2}-a^{2}}
\]
\begin{wrapfigure}{r}{0pt}
\begin{pspicture}(0,0)(4,5)
\pstTriangle(0,0){B}(3,4){A}(3,0){C}
\pstMarkAngle{C}{B}{A}{$\alpha$}
\pstMarkAngle{B}{A}{C}{$\beta$}
\pstMarkAngle{A}{C}{B}{$\gamma$}
\pcline[linestyle=none](0,0)(3,4)
\naput[nrot=:U]{c}
\pcline[linestyle=none](0,0)(3,0)
\tbput{a}
\pcline[linestyle=none](3,0)(3,4)
\trput{b}
\end{pspicture}
\caption{Straight triangle 2}
\end{wrapfigure}
Trigonometry equations:
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\[
\sin\alpha=\frac{b}{c}\quad\cos\alpha=\frac{a}{c}\quad\tan\alpha=\frac{b}{a}
\]
\[
\sin\beta=\frac{a}{c}\quad\cos\beta=\frac{b}{c}\quad\tan\beta=\frac{a}{b}
\]
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.