以下屏幕截图的 Latex 绘图

以下屏幕截图的 Latex 绘图

有人能帮忙用乳胶画这张图片吗?

我已经做了以下事情:

在此处输入图片描述

\documentclass[12pt]{article}
\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{0in} 
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.51in}

%\pagestyle{empty}
\usepackage{tikz}
\usepackage{amsthm}
\usepackage{mathtools}
\usetikzlibrary{arrows,positioning}
\usepackage{amssymb,amsfonts}
\usepackage{fullpage}

\usepackage[ruled,vlined,linesnumbered]{algorithm2e}


 %\linespread{1.5}
\newcommand\answerbox{%%
    \fbox{\rule{1in}{0pt}\rule[-0.5ex]{0pt}{4ex}}}
\pagestyle{plain}

\begin{document}


\begin{center}

\pagestyle{empty}
    %
 \tikzstyle{int}=[draw, fill=white!20, minimum size=4em]

  \tikzstyle{init} = [pin edge={to-,thin,black}]

  \begin{tikzpicture}[node distance=2.5cm,auto,>=latex']

    \node [int,align=center] (a) {$ f \in \mathbb{Z}_p[x_1,x_2, \cdots,x_n]$\\Black Box $ \mathbf{B}$}; 
   
    \draw[<-] ([yshift=5pt]a.west)  -- node[above]{$\alpha$} ++(-4em,0em);  ++(4em,0em);   
    \draw[->] ([yshift=5pt]a.east) -- node[above]{$f(\alpha)\mod p$} ++(8em,0em); 
    \end{tikzpicture} 
 
\end{document}

答案1

你的代码完全不干净!这供你参考。

在此处输入图片描述

\documentclass[12pt]{article}
\usepackage{tikz}
\usepackage{amsthm,amssymb,mathtools}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node[draw,inner xsep=5mm,inner ysep=20mm] (a) {$f(x_1,x_2, \cdots,x_n) \in \mathbb{Z}_p[x_1,x_2, \cdots,x_n]$}; 
\draw[->] (a.east)--+(3,0)  node[midway,above]{$f(\alpha)\mod p$}; 
\draw[<-] (a.north)--+(0,2) node[midway,right]{$p$}; 
\def\d{.75}
\draw[<-] (a.west)++(0,2*\d)--+(-2,0) node[midway,above]{$\alpha_1$};   
\draw[<-] (a.west)++(0,\d)--+(-2,0) node[midway,above]{$\alpha_2$};   
\draw[<-] (a.west)--+(-2,0) node[midway,above]{$\alpha_3$};   
\draw (a.west)+(-1,-\d+.2) node{$\vdots$};   
\draw[<-] (a.west)++(0,-2*\d)--+(-2,0) node[midway,above]{$\alpha_n$};   
\end{tikzpicture} 
\end{center}
\end{document}

相关内容