我创建了一个包含文本、方程式和 tikz 图片的表格 [使用 Geogebra 创建并使用 \resizebox 缩放]。
作为一名初学者,我发现很难将内容居中并从图表中删除原点标签。有人能帮我解决这个问题吗?我还想寻求一些建议来增强我的代码,以避免混淆。谢谢。
\documentclass[11pt,dvipsnames,landscape,twocolumn]{article}
\usepackage{mathtools}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\usepackage[utf8]{inputenc}
\usepackage{tkz-euclide}
\usepackage{multicol}
\usepackage[left=0.4in,right=0.5in,top=0.5in,bottom=0.6in, headheight=2cm, headsep=6pt ,paperwidth=11in,paperheight=8.5in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{array, booktabs, mathrsfs, charter, blindtext, varwidth, tabu}
\usepackage[expert]{mathdesign}
\begin{document}
\framebox{Trigonometric Integrals}
\begin{center}
\begin{tabular}{cccc}
\toprule
\addlinespace[3pt]
\textsc{\fontsize{10}{7.2}\selectfont \parbox{1.8cm}{Integrand\\[3pt] Contains:}} & \textsc{\fontsize{10}{100}\selectfont \parbox{5.9cm}
{\begin{center}
Substitution
\end{center}}} &
\textsc{\fontsize{10}{7.2}\selectfont \parbox{2cm}{Restriction\\[3pt]
\centering $\theta \in [0,2\pi]$}}\par \\
\addlinespace[1.5pt]
\midrule
$\sqrt{a^2 - u^2}$ &
\parbox{5.5cm}{let $u = a\sin \theta$ \quad
$du = a\cos \theta \; d\theta$
then \boldmath{$\sqrt{a^2-u^2} = a\cos \theta $}}
&
\resizebox{1.3cm}{1.3cm}{\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[-,,color=black] (-1.5,0.) -- (1.5,0.);
\foreach \x in {.,.}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below]
{\footnotesize $\x$};
\draw[-,color=black] (0.,-1.5) -- (0.,1.5);
\foreach \y in {.,.}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left]
{\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-1.5,-1.5) rectangle (1.5,1.5);
\draw [shift={(0.,0.)}]
plot[domain=-1.5707963267948966:1.5707963267948966,variable=\t]({1.*1.*cos(\t r)+0.*1.*sin(\t r)},{0.*1.*cos(\t r)+1.*1.*sin(\t r)});
\begin{scriptsize}
\draw [fill=black] (0.,1.) circle (3.5pt);
\draw [fill=black] (0.,-1.) circle (3.5pt);
\end{scriptsize}
\end{tikzpicture}}
\\
\bottomrule
\end{tabular}
\end{center}
\end{document}
答案1
要缩放图片,您只需使用环境键scale
即可tikzpicture
。
画半个圆而不是
\draw [shift={(0.,0.)}]
plot[domain=-1.5707963267948966:1.5707963267948966,variable=\t]({1.*1.*cos(\t r)+0.*1.*sin(\t r)},{0.*1.*cos(\t r)+1.*1.*sin(\t r)});
您可以简单地添加
\draw (0,-1) arc [start angle=-90, end angle=90, radius=1cm];
要将图片置于表格单元格的中心,您可以添加
baseline=(current bounding box.center)
代码
\documentclass[11pt,dvipsnames,landscape,twocolumn]{article}
\usepackage{mathtools}
\usepackage{pgf,tikz}
\usepackage{mathrsfs}
\usetikzlibrary{arrows}
\pagestyle{empty}
\usepackage[utf8]{inputenc}
\usepackage{tkz-euclide}
\usepackage{multicol}
\usepackage[left=0.4in,right=0.5in,top=0.5in,bottom=0.6in, headheight=2cm, headsep=6pt ,paperwidth=11in,paperheight=8.5in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{array, booktabs, mathrsfs, charter, blindtext, varwidth, tabu}
\usepackage[expert]{mathdesign}
\begin{document}
\framebox{Trigonometric Integrals}
\begin{center}
\begin{tabular}{cccc}
\toprule
\addlinespace[3pt]
\textsc{\fontsize{10}{7.2}\selectfont \parbox{1.8cm}{Integrand\\[3pt] Contains:}} & \textsc{\fontsize{10}{100}\selectfont \parbox{5.9cm}
{\begin{center}
Substitution
\end{center}}} &
\textsc{\fontsize{10}{7.2}\selectfont \parbox{2cm}{Restriction\\[3pt]
\centering $\theta \in [0,2\pi]$}}\par \\
\addlinespace[1.5pt]
\midrule
$\sqrt{a^2 - u^2}$ &
\parbox{5.5cm}{let $u = a\sin \theta$ \quad
$du = a\cos \theta \; d\theta$
then \boldmath{$\sqrt{a^2-u^2} = a\cos \theta $}}
&
\begin{tikzpicture}[scale=0.5,baseline=(current bounding box.center)]
\draw (-1.5,0) -- (1.5,0);
\draw (0.,-1.5) -- (0.,1.5);
\draw (0,-1) arc [start angle=-90, end angle=90, radius=1cm];
\fill (0,1) circle (3.5pt);
\fill (0,-1) circle (3.5pt);
\end{tikzpicture}
\\
\bottomrule
\end{tabular}
\end{center}
\end{document}
输出