I would like to draw two differents pictures. One of them consists of two rectangles, one with text and the other (below the first) with fillable text, as shown below:
Here is text of this length is just normal text, and the fillable text consists in three TextField of the hyperref package separated by a /, like the date DD/MM/YYYY.
The other picture is very similar but the only difference is that the fillable text is deleted:
However, I am not able to produce the combination of the two rectangles in one (so that the bottom one is centered) using tikzset.
MWE:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usetikzlibrary{shapes.multipart}
\tikzset{pics/fillable subject/.style n args={1}{code={\node[draw,text height=1.5ex,text width=5em,rounded corners] (#1) {\TextField[name=day,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~/~\TextField[name=month,width=1em,charsize=7pt,maxlen=2,bordercolor={1 1 1}]~/~\TextField[name=year,width=2em,charsize=7pt,maxlen=4,bordercolor={1 1 1}]\\};}}}
\begin{document}
\begin{Form}
\begin{tikzpicture}
\pic at (0,0) {fillable subject={Geography}};
\end{tikzpicture}
\end{Form}
\end{document}
Requirements
- There are two pictures:
fillable subjectandnon-fillable subject. fillable subjectmust have one argument: the name of the subject (Math, History, etc.).non-fillable subjectmust have no arguments.- Each picture has a specified size, it does not change depending on the length of the text.
- There are a lot of them in one
tikzpictureenvironment, so the code should be as handle as possible, since we can add several pictures one next to the other. - We must be able to create an arrow between two pictures that connect the upper rectangles.
Note
The background color of the TextField command does not matter.
This is what I want:
Thanks!!





\\inside the argument ofsubject/.styleI get! Paragraph ended before \@TextField was complete. Is it possible to eliminate the redundant line break? I do not know why it happens. – manooooh Mar 08 '19 at 02:11\\by{}. Perhaps you can mention that the blue boxes only appear on certain viewers. – Mar 08 '19 at 02:31