1

In previous question three days ago How to write "End" and "Thank you very much" at the end of the page?, I just want to put at the end of the page. However, I have tested with the other template and can not put the text "Thank you" at the end of the page. How can I do that? Thanks a lot

My code is here:

The contain of test_exam.tex file is here

\usepackage{exam} 
\usepackage[a4paper,tmargin=1.0cm, bmargin=1.5cm, lmargin=1.5cm, rmargin=1.5cm]{geometry}
\ContinuousNumbering 
\ShortKey
\NumberOfVersions{1}  
\SectionPrefix{\relax }
\madethi{111}
\tieudetracnghiem
\tieudedapan
\tieudeduoi
\daungoac{}{.}
\chucauhoi{Question} 
\mauchu{black}
\sotrang{4}
\renewcommand{\baselinestretch}{1.125}
\NoRearrange

The exam.sty file is here

\ProvidesPackage{exam}
\RequirePackage{ifthen}
\ProcessOptions\relax
\parskip=0pt
\parindent=0pt
\makeatletter
\newcommand\@scau{\ }
\newcounter{madetracnghiem}
\newcommand{\madethi}[1]{\setcounter{madetracnghiem}{#1}
\addtocounter{madetracnghiem}{-1}}
\newcommand{\socauhoi}[1]{\renewcommand{\@scau}{ #1}}
\makeatother
\renewcommand{\Fullpages}{\setlength{\topmargin}{0pc}
                        \setlength{\oddsidemargin}{0pc}
                        \setlength{\evensidemargin}{0pc}
                        \setlength{\headheight}{0pt}
                        \setlength{\headsep}{0pt}
                        \setlength{\textwidth}{17truecm}
                        \setlength{\textheight}{25truecm}
\setlength{\voffset}{-1cm}
}
\makeatletter
\def\tieudetracnghiem{
\begin{examtop}
\stepcounter{madetracnghiem}
\begin{minipage}[b]{0.65\textwidth}
\centering
{\bf \@tkythi}\\
\qquad\qquad\qquad\qquad{\bf  \@tmonhoc}\qquad\qquad\qquad \textbf{\fbox{Code \themadetracnghiem}}\\ \bigskip 
{\it \@tgian}\\
\end{minipage}

\end{examtop}
}

% 
\def\tieudedapan{
\begin{keytop}
\@@line{\fbox{Code \themadetracnghiem}\hfill{\bf\Large ANSWER}\hfill}
\end{keytop}
}
\def\@strang{ }
\newcommand{\sotrang}[1]{\renewcommand{\@strang}{#1}}
\def\tieudeduoi{
\renewcommand{\@oddfoot}{%
\parbox{\textwidth}{%
 \vspace*{-18pt}%
{\hfill {\it  Page\ \thepage/\@strang - Code \themadetracnghiem}}
}%
}}

\newcommand{\chucauhoi}[1]{\renewcommand{\labelenumi}{\textcolor{\@mauchu}{\bf #1\ \theenumi.}}}
\newcommand{\mauchu}[1]{\renewcommand{\@mauchu}{#1}}
\newcommand{\daungoac}[2]{\renewcommand{\@leftdot}{#1}\renewcommand{\@rightdot}{#2}}
\newcommand{\chuphuongan}[1]{\renewcommand{\@upletter}{#1}} 


\setlength{\labelwidth}{48truept}
\newcommand{\bonpa}[4]{
\examvspace*{-0.6\baselineskip}
\word{{#1}{#4}{#1}{#1}{#4}{#1}{#1}{#2}{#4}{#2}{#2}{#4}{#2}{#2}{#3}{#4}{#3}{#3}{#4}{#3}{#3}{#1}{#2}{#3}}
\word{{#2}{#1}{#4}{#3}{#1}{#4}{#3}{#1}{#2}{#4}{#3}{#2}{#4}{#3}{#1}{#3}{#4}{#2}{#3}{#4}{#2}{#2}{#1}{#1}}
\word{{#3}{#2}{#2}{#2}{#3}{#3}{#4}{#3}{#1}{#1}{#1}{#3}{#3}{#4}{#2}{#1}{#1}{#1}{#2}{#2}{#4}{#4}{#4}{#4}}
\word{{#4}{#3}{#3}{#4}{#2}{#2}{#2}{#4}{#3}{#3}{#4}{#1}{#1}{#1}{#4}{#2}{#2}{#4}{#1}{#1}{#1}{#3}{#3}{#2}}
}

\def\@datcotphai{ }
\def\@datcottrai{\examhspace*{-12pt}}

\newcommand{\datcot}[1][0]{\ifthenelse{#1=0}{
\renewcommand{\@datcotphai}{ }
}{
\renewcommand{\@datcotphai}{\parbox[t]{#1\shortitemwidth}}
}}

\newcommand{\sai}[1]{\choice{\@datcotphai{#1\@datcottrai}}}
\newcommand{\dung}[1]{\choice[!]{\@datcotphai{#1\@datcottrai}}}
\newcommand{\false}[1]{\choice{#1}}
\newcommand{\true}[1]{\choice[!]{#1}}
\newcommand{\liencau}{\renewcommand{\@tachcau}{\examvspace*{-0.7\baselineskip}}}
\newcommand{\motcot}[1]{\parbox[t]{\shortitemwidth}{#1\strut}}
\newcommand{\haicot}[1]{\parbox[t]{2\shortitemwidth}{#1\strut}}
\newcommand{\bacot}[1]{\parbox[t]{3\shortitemwidth}{#1\strut}}
\newcommand{\boncot}[1]{\parbox[t]{4.4\shortitemwidth}{#1}}
\makeatother

\abovedisplayskip=0pt plus 0pt minus 3pt
\abovedisplayshortskip=0pt plus 0pt minus 3pt
\belowdisplayskip=\abovedisplayskip
\belowdisplayshortskip=\abovedisplayshortskip
\setlength{\afterinstsep}{0truept}
\setlength{\aftersectsep}{0truept}
\setlength{\beforeinstsep}{0truept}
\setlength{\shortitemwidth}{3.5truecm}
 \setlength{\leftmargin}{0truept}
\setlength{\rightmargin}{0pc}
\setlength{\parskip}{0pc}
\def\ktrang{\makebox[1.5cm]{\hrulefill}}
\hfuzz=1pt
\sloppy

And the main.text file is here

\input{test_exam.tex}
\begin{document}

\begin{vnmultiplechoice}[ rearrange=yes, keycolumns=5]%

\begin{question}  % question 1
    Determine whether or not each of the following signal is periodic $x[n] = cos(\frac{\pi n^{2}}{8})$. If a signal is periodic, determine its fundamental period.
    \datcot
    \bonpa
    {\false{$0$.}}
    {\false{$T = 4$.}}
    {\false{$T = 6$.}}
    {\true{$T = 8$.}}
\end{question}

\begin{question}  % question 2
    Find T of the discrete signal $x[n] = cos(\pi n^{2})$?
    \datcot
    \bonpa
    {\false{$T = 0$.}}
    {\false{$T = 4$.}}
    {\true{$T = 6$.}}
    {\false{$T = 8$.}}
\end{question}
\end{vnmultiplechoice}

\end{document}

enter image description here

The template as below

https://www.dropbox.com/sh/qqxclcd8j28sfxv/AADq8McA9LjVqHWMItLbjpCua?dl=0

9
  • on which page? on the last (of the multi page document), or on the each? please elaborate.
    – Zarko
    Oct 6, 2018 at 2:49
  • @Zarko on the last page (of the multi page document) Oct 6, 2018 at 2:54
  • but for this you got (and accept) answer on your previous question (tex.stackexchange.com/questions/453418/…).
    – Zarko
    Oct 6, 2018 at 2:58
  • @Zarko in the previous question, the text is hide on the last page (answer page), but I just want to put it on the last page (question page). You can see at here overleaf.com/project/5bb80cbf5ee0fb32b449b691 Oct 6, 2018 at 3:03
  • sorry, i not use overleaf, so i cant see your document. please provide in question a complete small document with dummy text, from which we can see, what you like to achieve.
    – Zarko
    Oct 6, 2018 at 3:08

1 Answer 1

1

edit:

after discussion in chat room i recognize that document style examdesign which you use, all specific environments (questions, vnmultiplechoice) treat as floats and consequently all added text is pushed to the first page. therefore simple solution, which work with article and other standard document classes:

\documentclass{article}
\usepackage{lipsum}                   % for dummy text

\begin{document}
\lipsum[1-4]

\vfill\centerline{\Large Thank you}
\clearpage

\textbf{here follows answers}

\lipsum[1]
\end{document}

enter image description here

(red lines indicate text areas borders)

doesn't work with examendesign. shortly, your demand so far is not possible to achieve with this document class.

it my be worth to write to the package author for some advice or send to him a feature request.

1
  • I cant still apply your suggestion to it. Oct 7, 2018 at 1:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .