无需移动文档即可标记扇区的两侧

无需移动文档即可标记扇区的两侧

我试图使用 \tkzmarksegment 将此扇区的两个半径标记为相等,但是,这样做时,图像会消失。这是出于数学作业手册的目的。我还在第一列中加入了这个问题,以便测试人员可以看到扇区最终会受到怎样的影响。有人能告诉我如何轻松地做到这一点吗?我的想法之一是计算扇区第三个角的坐标,但我知道这不能相对轻松地完成,所以想知道是否有更简单的方法?

\documentclass[12pt,a4,addpoints]{exam}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath,amssymb}
\usepackage{multicol}
\usepackage{gensymb}
\usepackage{array}
\usepackage{graphicx}
\usepackage{calculator}
\graphicspath{ {./images/} }
\usepackage{fancyhdr}
\pagestyle{fancy}
\pagestyle{head}
\usepackage{xcolor}
\usepackage{pgfplots}
\usetikzlibrary{patterns}
\usepackage{tkz-euclide}

\begin{document}
\begin{questions}
\bracketedpoints
\pointsinrightmargin

\question[10] Find the perimeter of the following (2 marks each)
        \setlength{\columnsep}{3cm}
        \begin{multicols}{2}
        \begin{parts}
            \part
                \begin{tikzpicture}[scale=0.9]

                    \coordinate (a) at (0,0);
                    \coordinate (b) at (2,4);
                    \coordinate (c) at (4,0);
                    \coordinate (d) at (2,1);
                    \draw (a) -- (b) node[midway,left=4.5pt]{1.02 m} -- (c) -- (d) node[midway,below=.3cm]{420 cm} -- cycle;
                    
                    \tkzMarkSegment[pos=0.5,mark=||](a,b);
                    \tkzMarkSegment[pos=0.5,mark=||](b,c);
                    \tkzMarkSegment[pos=0.5,mark=|](c,d)
                    \tkzMarkSegment[pos=0.5,mark=|](d,a)
                \end{tikzpicture} 

            \part
                \begin{tikzpicture}[scale=0.3]

                    \coordinate (a) at (0,0);
                    \coordinate (b) at (12,0);
                    
                    \draw (a) -- (b) node[midway,below]{12 cm} arc[start angle=0, end angle=60, radius=12 cm] coordinate (c)-- (a) node[midway,left=+2pt]{12 cm};
                    
                \end{tikzpicture}
        \end{parts}
        \end{multicols}   
    \end{questions}
\end{document}

答案1

首先,你的代码不够精简。你可以删除所有不必要的包。使用更简单的类。

TikZ其次,即使可以混合使用,这也是不好的做法tkz-euclide。这就像加载数百个宏只是为了标记段。如果您需要制作大量几何图形,tkz-euclide这是一个合适的工具,但如果您觉得舒服,TikZ那么就只使用它。

最后,tkz-euclide或者 pgfplots 加载TikZ,所以您不必自己加载它。

\documentclass[margin=12pt]{standalone}
\usepackage{tkz-euclide}
\begin{document}

\begin{tikzpicture}[scale=0.9]
\tkzDefPoints{0/0/a,2/4/b,4/0/c,2/1/d}
\tkzDrawPolygon(a,b,c,d)
                   
\tkzMarkSegments[pos=0.5,mark=||](a,b b,c)
\tkzMarkSegments[pos=0.5,mark=|](c,d d,a)
\tkzLabelSegment[above left= .5 em](a,b){1.02 m}
\tkzLabelSegment[below=.5 em](c,d){420 cm}
\end{tikzpicture} 

\begin{tikzpicture}[scale=0.3]
\tkzDefPoints{0/0/a,12/0/b}
\tkzDefPoint(60:12){c}

\tkzDrawPolySeg(c,a,b)
\tkzDrawArc(a,b)(c)
\tkzMarkSegments[pos=0.5,mark=||](a,b a,c) 
\tkzLabelSegment[below = .5 em](a,b){12 cm}
\tkzLabelSegment[above left=.5 em](a,c){12 cm}                
\end{tikzpicture}

\end{document}

如果你需要在弧上贴标签,那么\tkzLabelArc

在此处输入图片描述

相关内容