
私は Latex 初心者で、タイトル ページの作成に苦労しています。私の大学では、プロジェクトを提出する際にタイトル ページに特定の形式を使用するように求められているため、Latex で再作成して何度でも使用できるようにしたいと考えています。提供されたテンプレートは次のとおりです。
実装するのはそれほど難しくないはずですが、実際には実現できていません。これが私がこれまでに得たコードです:
\documentclass{article}
% Variables
\newcommand{\numerotrabajo}{1}
\newcommand{\tema}{Sistemas}
\newcommand{\ejercicio}{Placeholder}
% Packages
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\begin{document}
\begin{titlepage}
\pagestyle{fancy}
\fancyhead[L]{Test}
\title{Trabajo Práctico/Teórico N° \numerotrabajo\\Tema: \tema\\\ejercicio}
\maketitle
\begin{center}
\begin{tabular}{ l r }
\multicolumn{2}{c}{Grupo X} \\
\hline
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
\vspace{250px}
\end{tabular}
\begin{tabular}{ l l l l }
Fecha Presentación & \_\_\_\_\_\_\_\_\_\_\_\_ & Calificación & \_\_\_\_\_\_\_\_\_\_\_\_ \\
Fecha Devolución & \_\_\_\_\_\_\_\_\_\_\_\_ & Firma Profesor & \_\_\_\_\_\_\_\_\_\_\_\_ \\
\end{tabular}
\end{center}
\end{titlepage}
\end{document}
そして、次の PDF が生成されます:
ご覧のとおり、テンプレートで確認できる左上のテキストを取得するために、ファンシー ヘッダー パッケージを使用しています。何らかの理由で機能しません。また、「プレースホルダー」テキストをもう少し小さくする必要があり、理論的には手動で入力する必要があるページの一番下の行を表示するよりよい方法も必要です。
前もって感謝します。
答え1
環境titlepage
によってページスタイルがplain
; に切り替わるため、fancyhdr
が機能しません。ただし、 コマンドを使用してプレーン スタイルを再定義できます\fancypagestyle
。
「プレースホルダー」の場合、テキストはすでに「巨大」なので、皮肉にも\Large
または を使用して小さくすることができます\large
。
行には、\underline
任意の間隔で埋めるコマンド、または を使用できます\rule
。
ここに、使用するかどうかはあなた次第ですが、さらに変更を加えたバージョンがあります。いくつかの追加パッケージを使用して、テンプレートにさらに近づけることは確かに可能ですが、あなたが行った選択のいくつかを考えると、それが必要なのかどうかはわかりません。ただし、たとえば、タイトルをもっと低くしたり、中央のテーブルをテンプレートのテーブルに近づけたりしたいなど、ご要望があれば遠慮なくお尋ねください。
\documentclass{article}
% Variables
\newcommand{\numerotrabajo}{1}
\newcommand{\tema}{Sistemas}
\newcommand{\ejercicio}{\Large\bfseries Placeholder}
% Packages
\usepackage[margin=1.25in]{geometry}% change margins
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{tgheros} % a font more like the template
\pagestyle{fancy}
\fancypagestyle{plain}{%
\fancyhf{}% clear everything
\fancyhead[L]{\sffamily\itshape UTN -- Regional Buenos Aires\\
Análisis de Sistermas -- 2005\\
Curso K2002}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
}
\title{Trabajo Práctico/Teórico N° \numerotrabajo\\Tema: \tema\\[2ex]\ejercicio}
\author{}\date{}
\begin{document}
\begin{titlepage}
\sffamily% switch to sans serif font like template
\maketitle
\begin{center}
\vfill
\begin{tabular}{l r}
\multicolumn{2}{c}{Grupo X} \\
\hline
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED \\
REDACTED & REDACTED
\end{tabular}
\vfill
\begin{tabular}{ l l l l }
Fecha Presentación & \underline{\hspace*{1.3in}} & Calificación & \underline{\hspace*{1.3in}} \\[2ex]% add a bit more space
Fecha Devolución & \underline{\hspace*{1.3in}} & Firma Profesor & \underline{\hspace*{1.3in}} \\
\end{tabular}
\end{center}
\end{titlepage}
\end{document}