
영국 표준 경찰의 첫 번째 섹션을 충실히 재현하려고 노력하고 있습니다.증인 진술서 양식, MG11로 알려져 있습니다.
명세서 본문이 들어 있어야 하는 상자와 첫 페이지의 상자를 정렬하는 데 어려움을 겪고 있습니다.
더 중요한 것은 상자를 사용하면 텍스트가 여러 페이지에 걸쳐 표시될 수 있지만 이로 인해 페이지 하단이나 상단에 텍스트가 끊어지는 줄이 없습니다. 이는 다음 페이지의 증인 진술 헤더와도 겹칩니다.
지금까지 내 PDF를 생성하는 LaTeX 코드는 다음과 같습니다.
\documentclass{article}
\usepackage{dashrule}
\usepackage{listings}
\usepackage{float}
\usepackage{scrpage2}
\usepackage{mdframed}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\pagestyle{scrheadings}
\clearscrheadfoot
\usepackage{lastpage}
\usepackage[margin=0.5in]{geometry}
\ihead{}
\chead{\\\framebox[1.1\width]{RESTRICTED}\\ \LARGE{Witness Statement}\\ \footnotesize{Criminal Procedure Rules, r 27.2; Criminal Justice Act 1967, s. 9; Magistrate's Courts Act 1980, s. 5B}\\}
\ohead{\\\framebox[1.1\width]{MG11} \vspace*{0.1 in} \\Page \textbf{\pagemark} of \pageref{LastPage}}
\ifoot{Signature: \hdashrule{26em}{1pt}{1.5mm} Signature Witnessed by: \textbf{N/A}}
\cfoot{}
\ofoot{}
\setlength\parindent{0pt} % Removes all indentation from paragraphs
\begin{document}
% URN boxes drawn using table
\begin{table}
\vspace*{0.35 in}
\begin{flushright}
\begin{tabular}{llllll}
\cline{2-5}
URN:& \multicolumn{1}{|@{\hspace{2em}}l|@{\hspace{2em}}}{} & \multicolumn{1}{l|@{\hspace{2em}}}{} & \multicolumn{1}{l|@{\hspace{2em}}}{} & \multicolumn{1}{l|}{} &\\ \cline{2-5}
\end{tabular}
\end{flushright}
\end{table}
% Front page boxes drawn inside fboxes
\fbox{
\parbox{\textwidth}{
Statement of: \textbf{John Smith} \\ \\
Age of witness: \textbf{Over 18} {\hspace{23em}} Occupation: \textbf{Paper-pusher}\\
This statement (consisting of \pageref{LastPage} pages each signed by me) is true to the best of my knowledge and belief and I make it knowing that, if it is tendered in evidence, I shall be liable to prosecution if I have wilfully stated in it, anything which I know to be false, or do not believe to be true.
}
}
\fbox{
\parbox[b][2em]{\textwidth}{
Signature: \hdashrule{29em}{1pt}{1.5mm} Date: \textbf{\today}
}
}
% mdframed box for main textbox
\global\mdfdefinestyle{exampledefault}{%
linecolor=black,linewidth=1pt,%
leftmargin=0cm,rightmargin=0cm
}
\begin{mdframed}[style=exampledefault]
\Blindtext[14]
\end{mdframed}
\end{document}
참조 링크에 있는 내용을 복사할 수 있도록 상자를 수정하는 방법에 대해 조언해 줄 수 있는 사람이 있습니까?
정말 감사합니다!
답변1
첫 번째 시도 tcolorbox
- 주요 문제는 header
및 바닥글 설정으로 인해 중복이 발생하는 것입니다.
\documentclass{article}
\usepackage{dashrule}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[most]{tcolorbox}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage[margin=0.5in,top=1.25in,headheight=45pt,bottom=1in]{geometry}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyhead[C]{\begin{tabular}[b]{c}\fbox{RESTRICTED}\tabularnewline\tabularnewline\multicolumn{1}{c}{\LARGE Witness Statement}\tabularnewline\multicolumn{1}{c}{\footnotesize Criminal Procedure Rules, r 27.2; Criminal Justice Act 1967, s. 9; Magistrate's Courts Act 1980, s. 5B}\end{tabular}}
\fancyhead[RO]{\begin{tabular}[b]{|p{1.1cm}|}\hline MG11\tabularnewline\hline\multicolumn{1}{c}{}\tabularnewline \multicolumn{1}{l}{Page \textbf{\thepage} of \pageref{LastPage}}\end{tabular}}
\fancyfoot[L]{Signature: \hdashrule{26em}{1pt}{1.5mm} Signature Witnessed by: \textbf{N/A}}
\pagestyle{fancy}
\setlength\parindent{0pt} % Removes all indentation from paragraphs
\newlength{\effectiveboxwidth}
\setlength{\effectiveboxwidth}{\dimexpr\textwidth-2\fboxsep-2\fboxrule}
\begin{document}
\hfill\begin{tabular}{llllll}
\cline{2-5}
URN:& \multicolumn{1}{|@{\hspace{2em}}l|@{\hspace{2em}}}{} & \multicolumn{1}{l|@{\hspace{2em}}}{} & \multicolumn{1}{l|@{\hspace{2em}}}{} & \multicolumn{1}{l|}{} &\\ \cline{2-5}
\end{tabular}
\tcbset{witness/.style={colframe=black,sharp corners,enhanced jigsaw, colback=white}} % Common settings
\begin{tcolorbox}[after={},witness]
Statement of: \textbf{John Smith} \par
\vskip\baselineskip
Age of witness: \textbf{Over 18} \hfill Occupation: \textbf{Paper-pusher}\\
This statement (consisting of \pageref{LastPage} pages each signed by me) is true to the best of my knowledge and belief and I make it knowing that, if it is tendered in evidence, I shall be liable to prosecution if I have wilfully stated in it, anything which I know to be false, or do not believe to be true.
\end{tcolorbox}
\begin{tcolorbox}[nobeforeafter,witness]
Signature: \hdashrule{29em}{1pt}{1.5mm} Date: \textbf{\today}
\end{tcolorbox}
\begin{tcolorbox}[witness,breakable,boxrule=1pt,toprule at break=1pt,extras={toprule at break=1pt} ]
\Blindtext[14]
\end{tcolorbox}
\end{document}
개별 간격을 조정해야 합니다. 원본 양식이 없습니다.