我在 Microsoft Windows 上运行 TeXworks 和 MikTeX,在文档中我拥有您在下面看到的代码。编译结果为一个 pdf 文件,我可以看到此图片中的文本,但看不到线条或圆圈。尽管如此,当我打印它时,线条和圆圈都在那里。我是否可以采取不同的措施使线条和圆圈可见?
\setlength{\unitlength}{0.66mm}
\begin{picture}(100,100)(0,0)
\label{picture of bitangent plane}
\put(40,50){\circle{60}} % left big circle
\put(140,50){\circle{60}} % right big circle
\put(122,74){\circle*{2}} % dot at e^{i\theta} on right circle
\put(122,26){\circle*{2}} % dot at e^{-i\theta} on right circle
\put(58,26){\circle*{2}} % dot at e^{-i\theta} on left circle
\put(70,50){\circle*{2}} % dot at -1 on left circle
\put(38,11){\line(4,3){104}} % line
\put(140,80){\circle*{2}} % dot at i on right circle
\put(140,20){\circle*{2}} % dot at -i on right circle
\put(170,50){\circle*{2}} % dot at 1 on right circle
\put(110,50){\circle*{2}} % dot at -1 on right circle
\put(10,50){\circle*{2}} % dot at 1 on left circle
\put(40,80){\circle*{2}} % dot at i on left circle
\put(40,20){\circle*{2}} % dot at -i on left circle
\put(58,74){\circle*{2}} % dot at e^{i\theta} on left circle
\put(116,76){$e^{i\theta}$} % right
\put(115,19){$e^{-i\theta}$} % right
\put(62,76){$e^{i\theta}$}
\put(59,19){$e^{-i\theta}$} % left
\put(173,49){$1$} \put(5,49){$1$}
\put(101,49){$-1$} \put(72,49){$-1$}
\put(140,83){$i$} \put(40,83){$i$}
\put(137,14){$-i$} \put(35,14){$-i$}
\put(70,5){\text{The bitangent plane.}}
\end{picture}
答案1
您的圈子太小,您会收到警告:
LaTeX Warning: \oval, \circle, or \line size unavailable on input line 6.
LaTeX Warning: \oval, \circle, or \line size unavailable on input line 7.
加载pict2e
包。
我还修复了边界框并将图片放在figure
环境中。您的\label
命令放错了位置。
\documentclass{article}
\usepackage{pict2e}
\begin{document}
\begin{figure}
\centering
\setlength{\unitlength}{0.66mm}
\begin{picture}(180,100)(0,0)
\put(40,50){\circle{60}} % left big circle
\put(140,50){\circle{60}} % right big circle
\put(122,74){\circle*{2}} % dot at e^{i\theta} on right circle
\put(122,26){\circle*{2}} % dot at e^{-i\theta} on right circle
\put(58,26){\circle*{2}} % dot at e^{-i\theta} on left circle
\put(70,50){\circle*{2}} % dot at -1 on left circle
\put(38,11){\line(4,3){104}} % line
\put(140,80){\circle*{2}} % dot at i on right circle
\put(140,20){\circle*{2}} % dot at -i on right circle
\put(170,50){\circle*{2}} % dot at 1 on right circle
\put(110,50){\circle*{2}} % dot at -1 on right circle
\put(10,50){\circle*{2}} % dot at 1 on left circle
\put(40,80){\circle*{2}} % dot at i on left circle
\put(40,20){\circle*{2}} % dot at -i on left circle
\put(58,74){\circle*{2}} % dot at e^{i\theta} on left circle
\put(116,76){$e^{i\theta}$} % right
\put(115,19){$e^{-i\theta}$} % right
\put(62,76){$e^{i\theta}$}
\put(59,19){$e^{-i\theta}$} % left
\put(173,49){$1$} \put(5,49){$1$}
\put(101,49){$-1$} \put(72,49){$-1$}
\put(140,83){$i$} \put(40,83){$i$}
\put(137,14){$-i$} \put(35,14){$-i$}
\end{picture}
\caption{The bitangent plane}\label{fig:bitangentplane}
\end{figure}
\end{document}
答案2
LaTeX 的picture
环境仅支持有限范围的斜率和半径,因为圆和线是使用字体字形构造的:
LaTeX Warning: \oval, \circle, or \line size unavailable on input line 9.
软件包pict2e
通过使用图形命令来规避这些限制:
\documentclass{article}
\usepackage{amsmath}
\usepackage{pict2e}
\begin{document}
\setlength{\unitlength}{0.66mm}
\begin{picture}(175,90)(5,3)
\label{picture of bitangent plane}
\put(40,50){\circle{60}} % left big circle
\put(140,50){\circle{60}} % right big circle
\put(122,74){\circle*{2}} % dot at e^{i\theta} on right circle
\put(122,26){\circle*{2}} % dot at e^{-i\theta} on right circle
\put(58,26){\circle*{2}} % dot at e^{-i\theta} on left circle
\put(70,50){\circle*{2}} % dot at -1 on left circle
\put(38,11){\line(4,3){104}} % line
\put(140,80){\circle*{2}} % dot at i on right circle
\put(140,20){\circle*{2}} % dot at -i on right circle
\put(170,50){\circle*{2}} % dot at 1 on right circle
\put(110,50){\circle*{2}} % dot at -1 on right circle
\put(10,50){\circle*{2}} % dot at 1 on left circle
\put(40,80){\circle*{2}} % dot at i on left circle
\put(40,20){\circle*{2}} % dot at -i on left circle
\put(58,74){\circle*{2}} % dot at e^{i\theta} on left circle
\put(116,76){$e^{i\theta}$} % right
\put(115,19){$e^{-i\theta}$} % right
\put(62,76){$e^{i\theta}$}
\put(59,19){$e^{-i\theta}$} % left
\put(173,49){$1$} \put(5,49){$1$}
\put(101,49){$-1$} \put(72,49){$-1$}
\put(140,83){$i$} \put(40,83){$i$}
\put(137,14){$-i$} \put(35,14){$-i$}
\put(70,5){\text{The bitangent plane.}}
\end{picture}
\end{document}
\documentclass{book}\usepackage{pict2e}\begin{document}\def~#1,#2
{\p#1,#2{\circle*{2}}}\def\p#1,#2#{\put(#1,#2)}\def\m#1,#2,#3 #4
{\p#1,#3{#4}\p#2,#3{#4}}\unitlength0.66mm\picture(170,87)~53,23
\m35,135,47 \circle{60} \p33,8{\line(4,3){104}}~117,71 ~117,23 ~65,47
~135,77 ~135,17 ~165,47 ~105,47 ~5,47 ~35,77 ~35,17 ~53,71 \m57,111,73
$e^{i\theta}$ \m54,110,16 $e^{-i\theta}$ \m0,168,46 $1$ \m67,96,46 $-1$
\m35,135,80 $i$ \m30,132,11 $-i$
\p65,2{The bitangent plane.}\endpicture\end{document}
答案3
仅定义圆心和半径的解决方案:
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{figure}
\psset{unit=0.66mm} \def\CRadius{30 }
\begin{pspicture}(175,70)
\pnodes(40,35){M1}(140,35){M2}
\pscircle(M1){\CRadius} % left big circle
\pscircle(M2){\CRadius} % right big circle
\psCircleTangents(M1){\CRadius}(M2){\CRadius}%
\psdots(CircleTO1)(CircleTO2)(CircleTO3)(CircleTO4)%
(CircleTI1)(CircleTI2)(CircleTI3)(CircleTI4)
\rput(M1){\psdots(\CRadius;180)(\CRadius;0)}
\rput(M2){\psdots(\CRadius;180)(\CRadius;0)}
\pcline[nodesep=-17,linecolor=red](CircleTI3)(CircleTI4)%
\uput[45](CircleTI1){$e^{i\theta}$} \uput[135](CircleTI4){$e^{i\theta}$}
\uput[225](CircleTI2){$e^{-i\theta}$}\uput[-45](CircleTI3){$e^{-i\theta}$}
\uput[180](!\psGetNodeCenter{M1}M1.x \CRadius sub M1.y){1}
\uput[0](!\psGetNodeCenter{M1}M1.x \CRadius add M1.y){-1}
\uput[180](!\psGetNodeCenter{M2}M2.x \CRadius sub M2.y){-1}
\uput[0](!\psGetNodeCenter{M2}M2.x \CRadius add M2.y){1}
\uput[90](CircleTO1){$i$} \uput[90](CircleTO2){$i$}
\uput[-90](CircleTO3){$-i$}\uput[-90](CircleTO4){$-i$}
\end{pspicture}
\caption{The bitangent plane}
\end{figure}
\end{document}
答案4
减少现有答案中使用的字符数量。
\documentclass[pstricks,border=12pt,12pt]{standalone}
\usepackage{pst-node,pst-plot}
\psset{plotpoints=9,unit=3}
\degrees[8]
\makeatletter
\newcommand\Right[2][1 1]{%
\psscalebox{#1}{%
\rput(!2 sqrt 0){\curvepnodes{0}{8}{1 t \pst@angleunit PtoC}{#2}\pscircle{1}}%
\foreach \i/\t in {0/1,2/i,3/e^{i\theta},4/-1,5/e^{-i\theta},6/-i}{\qdisk(#2\i){2pt}\uput[\i](#2\i){\psscalebox{#1}{$\t$}}}%
}}
\makeatother
\begin{document}
\begin{pspicture}(-2.5,-1.5)(2.5,1.5)
\Right{A}\Right[-1 1]{B}\pcline[nodesep=-1](A3)(B5)
\end{pspicture}
\end{document}
高尔夫版(446 个字符)
\documentclass[pstricks]{standalone}\usepackage{pstricks-add}\degrees[8]\makeatletter\def\R#1#2{\psscalebox{#1}{\rput(!2 sqrt 3 mul 0){\curvepnodes[plotpoints=9]{0}{8}{3 t \pst@angleunit PtoC}{#2}\pscircle{3}}\foreach \i/\t in {0/1,2/i,3/e^{i\theta},4/-1,5/e^{-i\theta},6/-i}{\qdisk(#2\i){.1}\uput[\i](#2\i){\psscalebox{#1}{$\t$}}}}}\begin{document}\pspicture(-9,-5)(9,5)\R{1 1}{A}\R{-1 1}{B}\pcline[nodesep=-1](A3)(B5)\endpspicture\end{document}