% Template soal ujian Universitas Pertamina v0.01
% Author: Muhammad Zaki Almuzakki
% Date : 3 May 2024
\documentclass[12pt]{article}
\newlength\topmarginheight
\setlength\topmarginheight{3.94cm}
\usepackage[a4paper,top=\topmarginheight,left=2.54cm,right=2.54cm,bottom=2.54cm]{geometry}
% \title{Template soal ujian UPER}
% \author{Muhammad Zaki Almuzakki}
% \date{May 2024}
\usepackage[T1]{fontenc}
\usepackage[scale=1,angle=0,opacity=1,color=black!60]{background}
\usepackage{tikzpagenodes}
% \usepackage{lastpage}
% \usepackage{lmodern}
\usepackage{lipsum}
\usepackage{fancyhdr}
\usepackage{tabularx}
\makeatletter
% Definition of the user commands to fill the header
% Initially they are empty
\newcommand\JenisUjian[1]{\gdef\@UPERJenisUjian{#1}}
\newcommand\SemesterGaGe[1]{\gdef\@UPERSemesterGaGe{#1}}
\newcommand\TahunAjaran[1]{\gdef\@UPERTahunAjaran{#1}}
\newcommand\ProgramStudi[1]{\gdef\@UPERProgramStudi{#1}}
\newcommand\NamaMataKuliah[1]{\gdef\UPERNamaMataKuliah{#1}}
\newcommand\KodeMataKuliah[1]{\gdef\UPERKodeMataKuliah{#1}}
\newcommand\HariDanTanggalUjian[1]{\gdef\UPERHariDanTanggalUjian{#1}}
\newcommand\KodeKelas[1]{\gdef\UPERKodeKelas{#1}}
\newcommand\DurasiPengerjaan[1]{\gdef\UPERDurasiPengerjaan{#1}}
\newcommand\SifatUjian[1]{\gdef\UPERSifatUjian{#1}}
\newcommand\NamaDosenPengampu[1]{\gdef\UPERNamaDosenPengampu{#1}}
\newcommand{\multrow}[1]{\begin{tabular}{@{}l@{}} #1 \end{tabular}}
\newcommand{\newimage}[1]{\begin{tikzpicture}
\node[draw, rectangle, minimum width = 0.5\textwidth, minimum height = 0.75cm, very thick]{};
\node[draw=white, fill=black, rectangle, rounded corners, text width = 0.375\textwidth, minimum height = 0.75cm, ultra thick, anchor=south east, xshift=2.7cm]{{\color{white}\fontsize{9}{8}\textbf{#1}}};
\end{tikzpicture}}
\newcounter{countersoal}
\newcommand\soal[1]{%
\refstepcounter{countersoal}%
\noindent\thecountersoal.~#1
}
\newcounter{countersubsoal}[countersoal]
\renewcommand\thecountersubsoal{\alph{countersubsoal}}
\newcommand\subsoal[1]{
\refstepcounter{countersubsoal}
\thecountersubsoal)~#1
}
\newcommand\instruksiPengerjaan[1]{
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize \vspace*{0.2cm}
\textbf{Instruksi Pengerjaan:}
#1
\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt \vspace*{0.5cm}
}
% We define the background: the header and the frame
\backgroundsetup{%
contents={%
\begin{tikzpicture}[remember picture,overlay]
\draw[thick] ([xshift=0cm,yshift=0.9cm]current page text area.north west) |- ([xshift=0cm,yshift=2.5cm]current page text area.north west) -- ([xshift=0cm,yshift=2.5cm]current page text area.north east) -| ([xshift=0cm,yshift=0.9cm]current page text area.north east) ;
\node[anchor=north west,xshift=0.1cm,yshift=-\topmarginheight+2.4cm] at (current page text area.north west|-current page.north west){\includegraphics[width=1.8cm]{uper-logo.jpeg}};
\node[anchor=north east,xshift=-0.15cm,yshift=-\topmarginheight+2.3cm] at (current page text area.north east|-current page.north east){{\color{black}\fontsize{14}{12}\textbf{\@UPERJenisUjian}}};
\node[rectangle, rounded corners, fill=black, anchor=north east,xshift=0.35cm,yshift=-\topmarginheight+1.75cm, minimum width=10.63cm,minimum height=0.61cm] at (current page text area.north east|-current page.north east){{\color{white}\fontsize{11}{10}\textbf{\@UPERSemesterGaGe\;\@UPERTahunAjaran\;--\;\@UPERProgramStudi}}};
\end{tikzpicture}%
}
}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[R]{\thepage}
\pagestyle{fancy}
\makeatother
\JenisUjian{UJIAN TENGAH SEMESTER}
\SemesterGaGe{Genap}
\TahunAjaran{2023/2024}
\ProgramStudi{PE}
\NamaMataKuliah{Kalkulus II}
\KodeMataKuliah{13110}
\HariDanTanggalUjian{Mei 2024}
\KodeKelas{PE2}
\DurasiPengerjaan{120 Menit}
\SifatUjian{\textit{Open Cheatsheet}}
\NamaDosenPengampu{\multrow{Muhammad Zaki Almuzakki, MSc.,\\
dosen2\\
dosen3}}
\begin{document}
\noindent
\begin{tabularx}{1.05\textwidth}{>{\raggedright\arraybackslash}c | >{\raggedright\arraybackslash}X|}
\cline{2-2}
\newimage{Mata Kuliah -- Kode Mata Kuliah} & \UPERNamaMataKuliah\;--\;\UPERKodeMataKuliah\\
\cline{2-2}
\newimage{Hari, Tanggal -- Kelas} & \UPERHariDanTanggalUjian\;--\;\UPERKodeKelas\\
\cline{2-2}
\newimage{Waktu -- Sifat} & \UPERDurasiPengerjaan\;--\;\UPERSifatUjian\\
\cline{2-2}
\newimage{Dosen/Koordinator Mata Kuliah} & \UPERNamaDosenPengampu\\\cline{2-2}
\end{tabularx}\\[2ex]
\instruksiPengerjaan{
\begin{itemize}
\item a
\item b
\end{itemize}
}
\soal{cobacoba}
\subsoal{ini sub soal}
\subsoal{ini sub soal}
\soal{cobacoba}
\subsoal{ini sub soal}
% \lipsum[2-20]
\end{document}