%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 工学部シラバス作成用スタイルファイル: やっつけ仕事です % % syllabus.sty 12/27/1994, 1/9/1995, 10/19/1995 by T. Iwakuma % 1/12/1996 幅を 3mm 縮めた 他 % 1/24/1996 頁番号を入れることになった % 4/28/1996 \endsyllabus から \clearpage を削除 % % 10/28/1996 フォーマットが変わった % 12/17/1996 フォーマットが変わった;続き % 2/08/1997 微調整 % 12/10/1997 ◆を削除.昨年の要望事項 % 10/12/1998 latex2html マクロの変更 % 11/17/1998 書式を変更しやがった! % 11/20/1998 概要部を出力できるように,abstract を % 環境でなくコマンドに.HTML 用も変更 % 11/24/1998 概要部を処理する % % サンプルは \endinput の下: もっといい方法があるはずです % % jlatex2html で自動的に HTML 化する場合の注意はさらにその下 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % \typeout{\space\space\space Syllabus.sty : Ver. Nov-24-98, Stardate: [-30]2122.58} % \textwidth=164mm \textheight=244mm \topmargin=-11mm \headsep=20pt \oddsidemargin=-.5mm \evensidemargin=-3mm % = \oddsidemargin - 2.5mm % \arrayrulewidth=.6pt % \def\@oddfoot{\hfill --~\thepage~-- \hfill} \def\@evenfoot{\hfill --~\thepage~-- \hfill} % % OUTPUT ABSTRACT % \newif\if@syllabusout \@syllabusoutfalse \newwrite\@syllabusoutput \newdimen\@syllabuscount \@syllabuscount\z@ % \def\syllabusout{\@syllabusouttrue% \immediate\openout\@syllabusoutput=\jobname.xxx\relax} % \def\endofoutputsyllabus{% \if@syllabusout \immediate\closeout\@syllabusoutput \clearpage\pagestyle{empty}% \noindent 人間・環境系専門教育科目授業要旨 \vskip 1.5mm \hrule \vskip 1.5mm \renewcommand{\baselinestretch}{.7}\footnotesize\input{\jobname.xxx}% \fi} % % OPENING OF SYLLABUS % \def\syllabus{\par\newpage\gdef\@headerpart{}% % \noindent% \begin{tabular*}{162mm}{|@{~}c@{~}|% p{99mm}@{\extracolsep{\fill}}|p{28mm}|@{~}c@{~}|} \hline {\footnotesize\bf セメスター} & \multicolumn{1}{c|}{{\bf 授 業 科 目}} & \multicolumn{1}{c|@{~}}{{\bf 担 当 教 官}} & {\bf 単位\hspace*{0.5mm}\mbox{}} \\ \hline } % % HEADER PART % \newdimen\@vheadermax \newdimen\@vsemester \newdimen\@vclass \newdimen\@vinstructor \newdimen\@vcredit % \def\semester#1{% \if@syllabusout \begingroup \let\\=\relax \def\protect##1{\string##1\space}% \immediate\write\@syllabusoutput{\string\Semester\string{#1\string}}% \endgroup \fi \begingroup \def\protect{\noexpand\protect\noexpand}\xdef\@semester{\protect\Large #1}\endgroup \setbox\@tempboxa\hbox{\@semester}% \global\@vsemester\ht\@tempboxa \global\@vheadermax\@vsemester} % \def\class#1{% \if@syllabusout \begingroup % \let\\=\relax \def\protect##1{\string##1\space}% \def\\{\string\\\string\scriptsize} \def\protect##1{\string##1\space}% \immediate\write\@syllabusoutput{\string{#1\string}}% \endgroup \fi \begingroup \def\\{\noexpand\\}% \def\protect{\noexpand\protect\noexpand}% \xdef\@class{\protect\large\protect\shortstack[l]{% \protect\rule{0pt}{2.5ex}#1}}\endgroup \setbox\@tempboxa\hbox{\@class} \global\@vclass\ht\@tempboxa \ifdim\@vclass>\@vheadermax \global\@vheadermax\@vclass\fi} % \def\instructor#1{% \begingroup \def\\{\noexpand\\}% \def\protect{\noexpand\protect\noexpand}% \xdef\@instructor{\protect\shortstack[l]{% \protect\rule{0pt}{2.5ex}#1}}\endgroup \setbox\@tempboxa\hbox{\@instructor} \global\@vinstructor\ht\@tempboxa \ifdim\@vinstructor>\@vheadermax \global\@vheadermax\@vinstructor\fi} % \def\credit#1{% \if@syllabusout \begingroup \let\\=\relax \def\protect##1{\string##1\space}% \immediate\write\@syllabusoutput{\string{#1\string}}% \endgroup \fi \begingroup \def\protect{\noexpand\protect\noexpand}\xdef\@credit{\protect\Large #1}\endgroup \setbox\@tempboxa\hbox{\@credit}% \global\@vcredit\ht\@tempboxa % \@tempdima\@vheadermax \advance\@tempdima-\@vsemester \@vsemester.4\@tempdima \raisebox{\@vsemester}[0pt][0pt]{\@semester}~~ & % \ifdim\@vheadermax>\@vclass \@tempdima\@vheadermax \advance\@tempdima-\@vclass \@vclass.4\@tempdima \raisebox{\@vclass}[0pt][0pt]{\@class}\else \@class\fi & % \ifdim\@vheadermax>\@vinstructor \@tempdima\@vheadermax \advance\@tempdima-\@vinstructor \@vinstructor.4\@tempdima \raisebox{\@vinstructor}[0pt][0pt]{\@instructor}\else \@instructor\fi & % \@tempdima\@vheadermax \advance\@tempdima-\@vcredit \@vcredit.4\@tempdima \raisebox{\@vcredit}[0pt][0pt]{\@credit} % \\ \hline \end{tabular*} \vfill} \\[-0.5mm] \end{tabular*}} % % CLOSING OF SYLLABUS % \def\endsyllabus{\relax} % % ABSTRACT % \long\def\abstract#1{% \if@syllabusout \begingroup \let\\=\relax \def\protect##1{\string##1\space}% \immediate\write\@syllabusoutput{\string\Abstract\string{#1\string}}% % \immediate\write\@syllabusoutput{}% \endgroup \fi \noindent% \begin{tabular*}{162mm}{|l@{\extracolsep{\fill}}% p{157mm}l@{\extracolsep{\fill}}|} \hline & {\bf 科目内容概要} & \\ & #1 & \\ && \\[-1mm] \end{tabular*}} % % SCHEDULE % \newcounter{schedule} % \def\schedule{\noindent\setcounter{schedule}{1}% \begin{tabular*}{162mm}{|l@{\extracolsep{\fill}}r p{139mm}l@{\extracolsep{\fill}}|} \hline & \multicolumn{2}{l}{{\bf \mbox{}\kern-1.6mm 授業計画}}} % \def\plan{& \\ &% \ifdim\c@schedule pt>1pt% {\bf\phantom{第} \arabic{schedule}{} \phantom{回}} \else {\bf 第 \arabic{schedule}{} 回} \fi & \stepcounter{schedule} % \ifdim\c@schedule pt>16pt% \typeout{Warning: You have entered more than 15 plans.} \fi} % % \def\endschedule{& \\ \hline\end{tabular*}\vfill} \def\endschedule{& \\ &&& \\[-1mm] \end{tabular*}} % % TEXTBOOKS % \def\textbooks{\noindent% \begin{tabular*}{162mm}{|l@{\extracolsep{\fill}}% p{157mm}l@{\extracolsep{\fill}}|} \hline & {\bf 教科書・参考書} & \\ &} % % \def\endtextbooks{& \\ \hline\end{tabular*} \vfill} \def\endtextbooks{& \\ && \\[-1mm] \end{tabular*}} % % EVALUATION % \def\evaluation{\noindent% \begin{tabular*}{162mm}{|l@{\extracolsep{\fill}}% p{157mm}l@{\extracolsep{\fill}}|} \hline & {\bf 成績評価方法等} & \\ &} % % \def\endevaluation{& \\ \hline\end{tabular*} \vfill} \def\endevaluation{& \\ && \\[-1mm] \end{tabular*}} % % REMARKS % \def\remarks{\noindent% \begin{tabular*}{162mm}{|l@{\extracolsep{\fill}}% p{157mm}l@{\extracolsep{\fill}}|} \hline & {\bf 履修上の注意点: 履修要望科目等} & \\ &} % \def\endremarks{& \\ \hline\end{tabular*}} % % OUTPUT FUNCTIONS % \def\Semester#1#2#3{% \ifdim\@syllabuscount<1pt \noindent \fi \begin{minipage}[t]{0.48\textwidth}% \begin{minipage}[t]{.73\textwidth}% \raggedright #2 \end{minipage}\hfill \begin{minipage}[t]{.23\textwidth}% #3単位 \par #1セメスター \end{minipage}\vskip 1.5mm } % \long\def\Abstract#1{#1\end{minipage}% \ifdim\@syllabuscount<1pt \hfill \global\@syllabuscount=2pt \else \vskip 1.5mm \hrule \vskip 1.5mm \global\@syllabuscount\z@ \fi} % \endinput %%%%%%%%%%%%%%% % \documentstyle[11pt,syllabus]{j-article} % or {jarticle} % %%%%%%%%%%%%%%% % % \documentstyle[11pt,syllabus,html]{j-article} % or {jarticle} % もし jlatex2html で HTML 化する場合には,最初の行はこのように % \newcommand{\dummy}{dummy} % これは取らないでください. % % \renewcommand{\baselinestretch}{.9} % may not be necessary % \renewcommand{\arraystretch}{.9} % \begin{document} \begin{syllabus} \semester{4}% \class{こんな講義の名前です \\ English Name}% \instructor{私が教えます \\ 何野 某 助教授}% \credit{4}% この数行のみ,行末はすべて%が必要 <=============== \abstract{% ここには授業内容の概略を書きます. 段落を入れても構いません.式は入れないでください. } \begin{schedule} \plan 最初はイントロ \plan 次は腕試し \plan 段々難しくなる \plan そろそろ連休明けで欠席が増える \plan まだまだ本論には遠い \plan そろそろ脅しをかける \plan 突然に小テストをして出欠をとる \plan 先週のテストの解説をしてお茶を濁す \plan 本論に入る前に研究についてコマーシャル \plan 本論をじっくり説明する \plan 再度,駄目押しをしておく \plan 本論と関係無いような顔をして大事なことを喋る \plan 先週の内容と本論との差異を質問して,何も理解していない!と怒鳴る \plan 試験の内容を教えるような教えないような,いい加減な情報を流す \plan これが最後かな \end{schedule} \begin{textbooks} 最近の学生さんはお金は持っていても教科書を買わないから,書いても無駄 かもしれない,が,一応自分の著書を書いておく. 二冊並べるときは,間に空行を入れてください. \end{textbooks} \begin{evaluation} 出席点は加味しないなどといい加減なことを言って騙しておく. \end{evaluation} \begin{remarks} あれもこれも取っておかないと,俺の授業は解らないぞ,と脅す \end{remarks} \end{syllabus} % もっと担当していたら,ここからまた syllabus 環境を始める. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% もし jlatex2html に与えるために html.sty も読み込んである場合は %% 例えば次のようにリンクを明示したものを \end{syllabus} の後につけ %% ておくと便利でしょう.使う場合は1カラム目の % のみを削除 % %\begin{htmlonly} %\hrule % %\htmladdnormallink{シラバス一覧のページに戻る...}% % {http://www.hogehoge.tohoku.ac.jp/syllabus.html} %%% HOGEHOGE 学科のシラバス一覧のページがあれば,そこへのリンク % %\htmladdnormallink{HOGEHOGE 工学科のホームページに戻る...}% % {http://www.hogehoge.tohoku.ac.jp/welcome.html} %%% HOGEHOGE 学科のホームページがあれば,そこへのリンク % %\end{htmlonly} \end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% jlatex2html に与える場合の注意点 これを jlatex2html (perl スクリプト) で HTML 化する場合には,ユー ザ毎の設定ファイル .jlatex2html-init の最後の方に,次のサブルーティ ンを,EUC 漢字に変換した上で追加しておいてください. 1科目ずつ変換した方がいいです. ################################################################### # .jlatex2html-init に追加する中身はここから # EUC 漢字にしてから追加してください. # syllabus.sty のためのサブルーティン sub do_cmd_abstract { local($_) = @_; s/$next_pair_pr_rx//o; join('',"
", $&, "\n", $_); } sub do_env_schedule { local($_) = @_; join('', "
\n$_\n"); } sub do_env_evaluation { local($_) = @_; &make_evaluation($_); } sub make_evaluation { local($_) = @_; join('',"
\n$_\n"); } sub do_env_remarks { local($_) = @_; &make_remarks($_); } sub make_remarks { local($_) = @_; join('',"
\n$_\n"); } sub do_env_syllabus { local($_) = @_; join('',"$_\n"); } sub do_cmd_semester { local($_) = @_; s/$next_pair_pr_rx//o; join('', "
", $_); } ########", $&, "
\n", $_); } sub do_cmd_instructor { local($_) = @_; s/$next_pair_pr_rx//o; join('', "", $&, "
\n", $_); } sub do_cmd_credit { local($_) = @_; s/$next_pair_pr_rx//o; join('', "単位数: ", $&, "
\n
-->
sub text_cleanup {
s/(\s*\n){2,}/\n
\n/go; # Replace consecutive blank lines with a paragraph tag
s/$O\d+$C//go; # Get rid of bracket id's
s/$OP\d+$CP//go; # Get rid of processed bracket id's
# s/(\w\s*)?---?(\s*\w)?/$1-$2/go; # Dashes
s/\\( |$)/ /go; # Spacing commands
s/([^\\]?)%/$1/go; # Remove the comment character
s/\\,/ /go; # Cannot treat \, as a command because , is a delimiter ...
# Replace tilde's with spaces
s/~/ /go;
#s/^~|([^\\])~/$1 /go;
}