我想用 LaTeX 绘制下图,但有点困难。我该怎么做?
%\usepackage[dvips,pdftex]{graphicx}
\documentclass[a4paper,12pt]{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{color}
\usepackage[dvips]{epsfig}
\usepackage[dvips]{graphicx}
\usepackage{float}
\usepackage[latin1]{inputenc}
\usepackage[brazil]{babel}
\usepackage{tikz}
\usepackage{multicol}
\usepackage{cancel}
\usepackage[unicode=true,bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,breaklinks=true,backref=true,linkcolor=black,colorlinks=true]%
{hyperref}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{LastRevised=Thursday, March 14, 2019 23:50:47}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\setlength{\topmargin}{-1.5cm} \setlength{\oddsidemargin}{0.0cm}
\setlength{\evensidemargin}{0.0cm} \setlength{\textheight}{24cm}
\setlength{\textwidth}{16.5cm}
\renewcommand{\baselinestretch}{1.25}
\begin{document}
\begin{titlepage}
\[\]
\begin{center}
%\tiny,\small,\large,\Large,\LARGE, \huge,\Huge,\HUGE
{ \Large \sc Universidade Federal do Maranhão}
\vskip 0.5cm
{ \Large \sc Centro de Ciências Exatas e Tecnologia}
\vskip 0.5cm {\Large \sc Matheus Rodrigues Linhares Guimarães}
\vskip 3 cm {\LARGE \sc \textbf{VARIÁVEIS COMPLEXAS}}
\begin{figure}[H]
\centering
\[
\includegraphics[width=100mm]{./Figuras/capa5.png}
\]
\end{figure}
\vskip 2cm
\vfill
{\sc 2019.1}
\end{center}
\end{titlepage}%
\end{document}
完成代码后,我该如何将其放置在 \ begin {figure} [H] \ centering \ [ \ includegraphics [width = 100mm] {./ Figures / layer5.png} ] \ end {figure} 的位置,这样就不需要图形了?
答案1
笔记:代码按照我认为的“质量递增”的顺序排列,即最好的是最后一个。
像这样?
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes,angles}
\begin{document}
\begin{tikzpicture}
\draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(4,0) node[right] {$Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (25:2);
\coordinate (n) at (-95:2);
\coordinate (p) at (145:2);
\coordinate (o) at (0,0);
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\draw (a) node[above right] {$z=|z|e^{i\theta}$};
\draw (b) node[below] {$|z|$};
\draw (2,0) node[below] {$|z|^{1/3}$};
\draw (m) node[right] {$|z|^{1/3}e^{i\theta/3}$};
\draw (n) node[below] {$|z|^{1/3}e^{i(\theta+4\pi)/3}$};
\draw (p) node[above] {$|z|^{1/3}e^{i(\theta+2\pi)/3}$};
\draw (.1,1.5)--(0,1.5) node[left] {$i$};
\draw (1.5,.1)--(1.5,0) node[below] {$1$};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\pic[draw,dashed,thick,"$\theta$",angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\end{tikzpicture}
\end{document}
改良版:
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes,angles,positioning}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={fill=white,inner sep=2pt}]
\draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(4,0) node[right] {$Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (25:2);
\coordinate (n) at (-95:2);
\coordinate (p) at (145:2);
\coordinate (o) at (0,0);
\draw (a) node[above right] {$z=|z|e^{i\theta}$};
\draw (b) node[below right] {$|z|$};
\draw (2,0) node[below left=0cm and -2em] {$|z|^{1/3}$};
\draw (m) node[right] {$|z|^{1/3}e^{i\theta/3}$};
\draw (n) node[below] {$|z|^{1/3}e^{i(\theta+4\pi)/3}$};
\draw (p) node[above] {$|z|^{1/3}e^{i(\theta+2\pi)/3}$};
\draw (.1,1.5)--(0,1.5) node[left] {$i$};
\draw (1.5,.1)--(1.5,0) node[below] {$1$};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\end{scope}
\pic[draw,dashed,thick,"$\theta$",angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\end{tikzpicture}
\end{document}
谢谢@土拨鼠,我认为这个数字在数学上更真实;-)
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes,angles,positioning}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={fill=white,inner sep=2pt}]
\draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(4,0) node[right] {$Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (80/3:2);
\coordinate (n) at ({80/3-120}:2);
\coordinate (p) at ({80/3+120}:2);
\coordinate (o) at (0,0);
\draw (a) node[above right] {$z=|z|e^{i\theta}$};
\draw (b) node[below right] {$|z|$};
\draw (2,0) node[below left=0cm and -2em] {$|z|^{1/3}$};
\draw (m) node[right] {$|z|^{1/3}e^{i\theta/3}$};
\draw (n) node[below] {$|z|^{1/3}e^{i(\theta+4\pi)/3}$};
\draw (p) node[above] {$|z|^{1/3}e^{i(\theta+2\pi)/3}$};
\draw (.1,1.5)--(0,1.5) node[left] {$i$};
\draw (1.5,.1)--(1.5,0) node[below] {$1$};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\end{scope}
\pic[draw,dashed,thick,"$\theta$",angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\end{tikzpicture}
\end{document}
另一种选择:\Im
而不是Im
和\Re
而不是Re
(@塞巴斯蒂亚诺的要求):
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes,angles,positioning}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={fill=white,inner sep=2pt}]
\draw (0,-4)--(0,4) node[above] {$\Im$} (-4,0)--(4,0) node[right] {$\Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (80/3:2);
\coordinate (n) at ({80/3-120}:2);
\coordinate (p) at ({80/3+120}:2);
\coordinate (o) at (0,0);
\draw (a) node[above right] {$z=|z|e^{i\theta}$};
\draw (b) node[below right] {$|z|$};
\draw (2,0) node[below left=0cm and -2em] {$|z|^{1/3}$};
\draw (m) node[right] {$|z|^{1/3}e^{i\theta/3}$};
\draw (n) node[below] {$|z|^{1/3}e^{i(\theta+4\pi)/3}$};
\draw (p) node[above] {$|z|^{1/3}e^{i(\theta+2\pi)/3}$};
\draw (.1,1.5)--(0,1.5) node[left] {$i$};
\draw (1.5,.1)--(1.5,0) node[below] {$1$};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\end{scope}
\pic[draw,dashed,thick,"$\theta$",angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\end{tikzpicture}
\end{document}
谢谢@JasperHabicht在这个答案,现在我可以优化节点文本和行之间的分隔空间:
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes,angles,positioning}
\usepackage[outline]{contour}
\contourlength{2pt}
\begin{document}
\begin{tikzpicture}
\draw (0,-4)--(0,4) node[above] {$\Im$} (-4,0)--(4,0) node[right] {$\Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (80/3:2);
\coordinate (n) at ({80/3-120}:2);
\coordinate (p) at ({80/3+120}:2);
\coordinate (o) at (0,0);
\draw (a) node[above right] {\contour{white}{$z=|z|e^{i\theta}$}};
\draw (b) node[below right] {\contour{white}{$|z|$}};
\draw (2,0) node[below left=0cm and -2em] {\contour{white}{$|z|^{1/3}$}};
\draw (m) node[right] {\contour{white}{$|z|^{1/3}e^{i\theta/3}$}};
\draw (n) node[below] {\contour{white}{$|z|^{1/3}e^{i(\theta+4\pi)/3}$}};
\draw (p) node[above] {\contour{white}{$|z|^{1/3}e^{i(\theta+2\pi)/3}$}};
\draw (.1,1.5)--(0,1.5) node[left] {\contour{white}{$i$}};
\draw (1.5,.1)--(1.5,0) node[below] {\contour{white}{$1$}};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\pic[draw,dashed,thick,"$\theta$",angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\end{tikzpicture}
\end{document}
babel
您的代码无法编译,因为和之间存在冲突(?)quotes
(我不知道是否属实)。
我们可以通过不再使用来修复它quotes
:
%\usepackage[dvips,pdftex]{graphicx}
\documentclass[a4paper,12pt]{article}%
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{indentfirst}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{color}
\usepackage[dvips]{epsfig}
\usepackage[dvips]{graphicx}
\usepackage{float}
\usepackage[latin1]{inputenc}
\usepackage[brazil]{babel}
\usepackage{tikz}
\usepackage{multicol}
\usepackage{cancel}
\usepackage[unicode=true,bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,breaklinks=true,backref=true,linkcolor=black,colorlinks=true]%
{hyperref}%
\setcounter{MaxMatrixCols}{30}
%TCIDATA{OutputFilter=latex2.dll}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{LastRevised=Thursday, March 14, 2019 23:50:47}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%BeginMSIPreambleData
\providecommand{\U}[1]{\protect\rule{.1in}{.1in}}
%EndMSIPreambleData
\setlength{\topmargin}{-1.5cm} \setlength{\oddsidemargin}{0.0cm}
\setlength{\evensidemargin}{0.0cm} \setlength{\textheight}{24cm}
\setlength{\textwidth}{16.5cm}
\renewcommand{\baselinestretch}{1.25}
\usetikzlibrary{angles,positioning}
\begin{document}
\begin{titlepage}
\vspace{1cm}
\begin{center}
%\tiny,\small,\large,\Large,\LARGE, \huge,\Huge,\HUGE
{ \Large \sc Universidade Federal do Maranhão}
\vskip 0.5cm
{ \Large \sc Centro de Ciências Exatas e Tecnologia}
\vskip 0.5cm {\Large \sc Matheus Rodrigues Linhares Guimarães}
\vskip 3 cm {\LARGE \sc \textbf{VARIAVEIS COMPLEXAS}}
\begin{center}
\begin{tikzpicture}
\begin{scope}[every node/.style={fill=white,inner sep=2pt}]
\draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(4,0) node[right] {$Re$};
\draw[dashed] (0,0) circle (3) circle (2);
\coordinate (a) at (80:3);
\coordinate (b) at (3,0);
\coordinate (m) at (80/3:2);
\coordinate (n) at ({80/3-120}:2);
\coordinate (p) at ({80/3+120}:2);
\coordinate (o) at (0,0);
\draw (a) node[above right] {$z=|z|e^{i\theta}$};
\draw (b) node[below right] {$|z|$};
\draw (2,0) node[below left=0cm and -2em] {$|z|^{1/3}$};
\draw (m) node[right] {$|z|^{1/3}e^{i\theta/3}$};
\draw (n) node[below] {$|z|^{1/3}e^{i(\theta+4\pi)/3}$};
\draw (p) node[above] {$|z|^{1/3}e^{i(\theta+2\pi)/3}$};
\draw (.1,1.5)--(0,1.5) node[left] {$i$};
\draw (1.5,.1)--(1.5,0) node[below] {$1$};
\draw (0,0)--(a) (0,0)--(m) (0,0)--(n) (0,0)--(p);
\draw[dashed] (m)--(n)--(p)--cycle;
\end{scope}
\pic[draw,dashed,thick,angle radius=0.8cm,angle eccentricity=1.3] {angle=b--o--a};
\draw (45:0.8) node[above right] {$\theta$};
\fill[black] (a) circle (2pt) (b) circle (2pt) (m) circle (2pt) (n) circle (2pt) (p) circle (2pt) (2,0) circle (2pt);
\end{tikzpicture}
\end{center}
\vskip 2cm
\vfill
{\sc 2019.1}
\end{center}
\end{titlepage}%
\end{document}