% roomPoster.tex
% 2017-02-05 Taku Yamanaka (Osaka Univ.)
%	Added \closedDoor.

\newcommand{\jpsNameFont}{}
\newcommand{\roomNameY}{}

\newcommand{\roomPoster}[3]{%
%	#1: JPS room name
%	#2: #lines for JPS room name
%	#3: original room#
	\thiswatermark{
		% banner at the top
%		\KLShowOrigin
		\put(0,\bannerY){\textcolor{\themeBackgroundColor}{\rule{\textwidth}{\bannerheight mm}}}
		\put(0,\bannerUnderlineY){\textcolor{\themeTextColor}{\rule{\textwidth}{\bannerUnderlineWidth mm}}}
		\put(0,\topBannerTextY){%
			\parbox{\textwidth}{\fbanner \textcolor{\themeTextColor}{\textbf{\hspace{\topBannerTextX mm}\bannerText}}}
		}
%		\put(0,\bottomBannerY){\textcolor{\themeBackgroundColor}{\rule{\textwidth}{\bottomBannerHeight mm}}}

		\ifthenelse{\equal{#2}{normal}}{%
			\renewcommand{\jpsNameFont}{\fstandard}%
			\renewcommand{\roomNameY}{\roomNameYNormal}
		}{%
			\ifthenelse{\equal{#2}{small}}{%
				\renewcommand{\jpsNameFont}{\fsmall}%
				\renewcommand{\roomNameY}{\roomNameYSmall}
			}{%
				\renewcommand{\jpsNameFont}{\fsmaller}%
				\renewcommand{\roomNameY}{\roomNameYSmaller}
			}%
		}%

	        \fontfamily{phv}\selectfont
		\bfseries%
%		\fstandard%
		\put(0,\roomNameY){%
			\parbox{\textwidth}{%
				\begin{spacing}{0.85}
					\jpsNameFont
					\centering \textcolor{\roomTextColor}{#1}
				\end{spacing}
			}%
		}

		\put(10,\originalNameY){{\ftiny \textcolor{\roomTextColor}{#3}}}
				
	}
	\vspace*{0mm}
	\clearpage
}

\newcommand{\entranceDoor}[3]{%
%	#1: JPS room name
%	#2: #lines for JPS room name
%	#3: original room#
	\thiswatermark{
		% banner at the top
%		\KLShowOrigin
		\put(0,\bannerY){\textcolor{\themeBackgroundColor}{\rule{\textwidth}{\bannerheight mm}}}
		\put(0,\bannerUnderlineY){\textcolor{\themeTextColor}{\rule{\textwidth}{\bannerUnderlineWidth mm}}}
		\put(0,\topBannerTextY){%
			\parbox{\textwidth}{\fbanner \textcolor{\themeTextColor}{\textbf{\hspace{\topBannerTextX mm}\bannerText}}}
		}

		\ifthenelse{\equal{#2}{normal}}{%
			\renewcommand{\jpsNameFont}{\fentranceRoom}%
			\renewcommand{\roomNameY}{\entranceRoomNameYNormal}
		}{%
			\ifthenelse{\equal{#2}{small}}{%
				\renewcommand{\jpsNameFont}{\fsmall}%
				\renewcommand{\roomNameY}{\entranceRoomNameYSmall}
			}{%
				\renewcommand{\jpsNameFont}{\fentranceRoomSmaller}%
				\renewcommand{\roomNameY}{\entranceRoomNameYSmaller}
			}%
		}%

	        \fontfamily{phv}\selectfont
		\bfseries%
%		\fstandard%
		\put(0,\roomNameY){%
			\parbox{\textwidth}{%
				\begin{spacing}{0.85}
					\jpsNameFont
					\centering \textcolor{\roomTextColor}{#1}
				\end{spacing}
			}%
		}

		\put(200,\originalNameY){{\ftiny #3}}
		\put(\entranceTextX,\entranceTextY){\textcolor{\themeTextColor}{\fentrance Entrance}}
		\put(\nametagX,\nametagY){\includegraphics[width=\nametagW]{../std_figs/nameplate2.pdf}}
				
	}
	\vspace*{0mm}
	\clearpage
}

\newcommand{\closedDoor}[4]{%
%	#1: JPS room name
%	#2: #lines for JPS room name
%	#3: original room#
%	#4: direction of the entrance: L or R
	\thiswatermark{
		% paint background
		\put(0,-\mytextheight){\textcolor{\pageBackgroundColor}{\rule{\textwidth}{\textheight}}}

		% banner at the top
		\put(0,\bannerY){\textcolor{\themeBackgroundColor}{\rule{\textwidth}{\bannerheight mm}}}
		\put(0,\topBannerTextY){%
			\parbox{\textwidth}{\fbanner \textcolor{\themeTextColor}{\textbf{\hspace{\topBannerTextX mm}\bannerText}}}
		}

	        \fontfamily{phv}\selectfont

		% banner at the bottom
		\put(0,\bottomBannerY){\textcolor{\themeBackgroundColor}{\rule{\textwidth}{\bottomBannerHeight mm}}}
		\put(\bottomBannerTextX,\bottomBannerTextY){%
			\parbox{\textwidth}{\fNoEntryBanner \textcolor{\themeTextColor}{\textbf{\noEntryBannerText}}}
		}
		
		\put(200,\originalNameY){{\ftiny #3}}
		
		\ifthenelse{\equal{#2}{normal}}{%
			\renewcommand{\jpsNameFont}{\fnormal}%
%			\renewcommand{\roomNameY}{\entranceRoomNameYNormal}
		}{%
			\ifthenelse{\equal{#2}{small}}{%
				\renewcommand{\jpsNameFont}{\fsmall}%
%				\renewcommand{\roomNameY}{\entranceRoomNameYSmall}
			}{%
				\renewcommand{\jpsNameFont}{\fentranceRoomSmaller}%
%				\renewcommand{\roomNameY}{\entranceRoomNameYSmaller}
			}%
		}%

		\renewcommand{\大会本部}{\jffourSmall 大会本部}
		\bfseries%
%		\fnormal%
		\jpsNameFont%
		\ifthenelse{\equal{#4}{L}}{%
			\Left{#1}
		}{%
			\ifthenelse{\equal{#4}{R}}{%
				\Right{#1}
			}{%
            			\ifthenelse{\equal{#4}{B}}{%
            				\Back{#1}
            			}{%
                                        	\put(\RminipageX,\LRminipageY){%
        						\begin{minipage}[c]{\textwidth}
%                                    			\fnormal
							\jpsNameFont%
                                    			\bfseries%
        							\centering
                                    			#1
                                    		\end{minipage}
					}
        				}
			}
		}
	}
	\vspace*{0mm}
	\clearpage
}

\newcommand{\roomPlate}[4]{%
	\pagecolor{\themeBackgroundColor}
	\roomPoster{#1}{#2}{#3}	% front (blackboard)
	\entranceDoor{#1}{#2}{#3}	% entrance
%	\roomPoster{#1}{#2}	% entrance
	\ifthenelse{\equal{#4}{}}{%
		\entranceDoor{#1}{#2}{#3} % entrance
	}{%
		\closedDoor{#1}{#2}{#3}{#4}	% for closed door
	}
}

\newcommand{\freeRoomPlate}[4]{%
	\definecolor{darkgreen}{rgb}{0,0.5,0}
	\begingroup
%		\pagecolor{darkgreen}
		\renewcommand{\roomTextColor}{freeRoomColor}
		\roomPoster{{\jfsmall 休憩室#1}}{#2}{#3}
		\roomPoster{{\jfsmall 休憩室#1}}{#2}{#3}
		\roomPoster{{\jfsmall 休憩室#1}}{#2}{#3}
	\endgroup
}
