Skip to content

Commit

Permalink
build: update install and release scripts [ci skip]
Browse files Browse the repository at this point in the history
- Include emblem and name figures in tds zip.
- Close #32.
  • Loading branch information
stone-zeng committed May 6, 2018
1 parent 7d57f2e commit d7726f1
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 18 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
style = {
font-size = 5,
fullwidth-stop = catcode,
logo = {fudan-name-black.pdf},
},
info = {
title = {论文标题},
Expand Down Expand Up @@ -138,10 +137,7 @@ template author.
\documentclass{fduthesis-en}
\fdusetup{
style = {
font-size = 5,
logo = {fudan-name-black.pdf},
},
style/font-size = 5,
info = {
title = {论文标题},
title* = {Thesis Title},
Expand Down
4 changes: 3 additions & 1 deletion install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ cp -f "../doc/fduthesis-template.tex" .
cp -f "../source/fduthesis.dtx" .
cp -f "../source/fduthesis-doc.dtx" .
cp -f "../source/fduthesis-logo.dtx" .
cp -f "../testfiles/support/fudan-name.pdf" .
cp -f "../logo/pdf/fudan-emblem-a-black.pdf" "./fudan-emblem.pdf"
cp -f "../logo/pdf/fudan-emblem-new-a-black.pdf" "./fudan-emblem-new.pdf"
cp -f "../logo/pdf/fudan-name-black.pdf" "./fudan-name.pdf"

xetex "fduthesis.dtx" > /dev/null

Expand Down
4 changes: 3 additions & 1 deletion install-win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ copy /Y "..\doc\fduthesis-template.tex" .
copy /Y "..\source\fduthesis.dtx" .
copy /Y "..\source\fduthesis-doc.dtx" .
copy /Y "..\source\fduthesis-logo.dtx" .
copy /Y "..\testfiles\support\fudan-name.pdf" .
copy /Y "..\logo\pdf\fudan-emblem-a-black.pdf" ".\fudan-emblem.pdf"
copy /Y "..\logo\pdf\fudan-emblem-new-a-black.pdf" ".\fudan-emblem-new.pdf"
copy /Y "..\logo\pdf\fudan-name-black.pdf" ".\fudan-name.pdf"

xetex "fduthesis.dtx" > NUL

Expand Down
27 changes: 16 additions & 11 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ SRC_DIR=$TDS_DIR/source/latex/$JOB_NAME
TEX_DIR=$TDS_DIR/tex/latex/$JOB_NAME
DOC_DIR=$TDS_DIR/doc/latex/$JOB_NAME

LOGO_DIR=$WORKING_DIR/logo/pdf
DOC_EN_SCRIPT=$WORKING_DIR/scripts/get-doc-en.lua

mkdir -p $TEMP_DIR
Expand All @@ -27,10 +28,12 @@ mkdir -p $SRC_DIR
mkdir -p $TEX_DIR
mkdir -p $DOC_DIR

cp $WORKING_DIR/source/*.dtx $TEMP_DIR
cp $WORKING_DIR/source/*.pdf $TEMP_DIR
cp $WORKING_DIR/doc/$JOB_NAME-template.tex $TEMP_DIR
cp $WORKING_DIR/testfiles/support/fudan-name.pdf $TEMP_DIR
cp $WORKING_DIR/source/*.dtx $TEMP_DIR
cp $WORKING_DIR/source/*.pdf $TEMP_DIR
cp $WORKING_DIR/doc/$JOB_NAME-template.tex $TEMP_DIR
cp $LOGO_DIR/fudan-emblem-a-black.pdf $TEMP_DIR/fudan-emblem.pdf
cp $LOGO_DIR/fudan-emblem-new-a-black.pdf $TEMP_DIR/fudan-emblem-new.pdf
cp $LOGO_DIR/fudan-name-black.pdf $TEMP_DIR/fudan-name.pdf

cd $TEMP_DIR
xetex $JOB_NAME.dtx > /dev/null
Expand All @@ -46,14 +49,16 @@ cp $TEMP_DIR/*.cls $TEX_DIR
cp $TEMP_DIR/*.def $TEX_DIR
cp $TEMP_DIR/*.sty $TEX_DIR

# This file should not be put in doc/
mv $TEMP_DIR/fudan-name.pdf $TEX_DIR
# These files should not be put in doc/
cp $TEMP_DIR/fudan-emblem.pdf $TEX_DIR
cp $TEMP_DIR/fudan-emblem-new.pdf $TEX_DIR
cp $TEMP_DIR/fudan-name.pdf $TEX_DIR

cp $TEMP_DIR/*.md $DOC_DIR
cp $TEMP_DIR/*.tex $DOC_DIR
cp $TEMP_DIR/*.pdf $DOC_DIR
cp $TEMP_DIR/latexmkrc.cfg $DOC_DIR/latexmkrc
cp $TEMP_DIR/latexmkrc-en.cfg $DOC_DIR/latexmkrc-en
cp $TEMP_DIR/*.md $DOC_DIR
cp $TEMP_DIR/*.tex $DOC_DIR
cp $TEMP_DIR/$JOB_NAME*.pdf $DOC_DIR
cp $TEMP_DIR/latexmkrc.cfg $DOC_DIR/latexmkrc
cp $TEMP_DIR/latexmkrc-en.cfg $DOC_DIR/latexmkrc-en

# Make TDS zip
cd $TDS_DIR
Expand Down
25 changes: 25 additions & 0 deletions source/fduthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
% fdulogo-example.tex,
% fduthesis-cover.tex,
% fduthesis-en.tex,
% fudan-emblem.pdf,
% fudan-emblem-new.pdf,
% fudan-name.pdf,
% fduthesis.pdf,
% fduthesis-en.pdf,
% fduthesis-code.pdf,
Expand Down Expand Up @@ -100,6 +103,9 @@ To install `fduthesis`, you can use one of the following methods:
- `fduthesis.def`
- `fdudoc.cls`
- `fdulogo.sty`
- `fudan-emblem.pdf`
- `fudan-emblem-new.pdf`
- `fudan-name.pdf`

Do not forget to update the filename database afterwards.

Expand Down Expand Up @@ -167,6 +173,9 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
fdulogo-example.tex,
fduthesis-cover.tex,
fduthesis-en.tex,
fudan-emblem.pdf,
fudan-emblem-new.pdf,
fudan-name.pdf,
fduthesis.pdf,
fduthesis-en.pdf,
fduthesis-code.pdf,
Expand Down Expand Up @@ -296,6 +305,8 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \changes{v0.7}{2018/01/31}{不再需要 \file{fduthesis-user.def}。}
% \changes{v0.7}{2018/03/04}{所有选项更改为用连字符隔开的形式。}
% \changes{v0.7a}{2018/04/09}{更新文档,发布至 CTAN。}
% \changes{v0.7b}{2018/04/29}{支持 \TeXLive{} 2018。}
% \changes{v0.7b}{2018/05/06}{将校名、校徽图片添加至发行版。}
%
% \CheckSum{0}
%
Expand Down Expand Up @@ -589,6 +600,9 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
% 参数配置文件(\file{.def})复制到 \TeX{} 发行版本地 TDS 树
% 的 \path{texmf-local/tex/latex/fduthesis/} 目录下,并执行
% \bashcmd{mktexlsr} 刷新文件名数据库,方可完成安装。
% \item 使用 \cls{fduthesis} 撰写论文时,您还需要从代码仓库下的
% \file{testfiles/support} 目录中复制 \file{fudan-name.pdf}
% 文件至工作目录,以确保封面中的校名图片可以正确显示。
% \end{itemize}
%^^A! Although not recommended, you may generate the whole template
%^^A! from source code as well:
Expand All @@ -612,6 +626,11 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! into \path{texmf-local/tex/latex/fduthesis/} under the local
%^^A! TDS tree of \TeX{} distribution. Then run \bashcmd{mktexlsr}
%^^A! to update the ls-R database.
%^^A! \item When writing your thesis with \cls{fduthesis}, you need
%^^A! to copy the file \file{fudan-name.pdf} (can be found in the
%^^A! \file{testfiles/support} directory of the Git repository) to
%^^A! your working directory, to make sure that the logo in the
%^^A! cover can be displayed correctly.
%^^A! \end{itemize}
%^^A!
%
Expand Down Expand Up @@ -656,6 +675,9 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
% \cls{fduthesis} 的初始参数,不建议您自行改动 \\
% \file{fdudoc.cls} & 用户手册文档类 \\
% \file{fdulogo.sty} & 复旦大学视觉识别系统 \\
% \file{fudan-emblem.pdf} & 校徽 \\
% \file{fudan-emblem-new.pdf} & 校徽(重修版) \\
% \file{fudan-name.pdf} & 校名图片 \\
% \file{README.md} & 简要自述 \\
% \ifdefined\FDUCODEDOC
% \file{fduthesis.pdf} & 中文用户手册 \\
Expand Down Expand Up @@ -685,6 +707,9 @@ Copyright (C) 2017, 2018 by Xiangdong Zeng <xdzeng96@gmail.com>.
%^^A! for \cls{fduthesis}. Please do \emph{not} modify it. \\
%^^A! \file{fdudoc.cls} & Document class for user guides. \\
%^^A! \file{fdulogo.sty} & Fudan University's visual identity. \\
%^^A! \file{fudan-emblem.pdf} & University emblem. \\
%^^A! \file{fudan-emblem-new.pdf} & University emblem (revised version). \\
%^^A! \file{fudan-name.pdf} & Figure of university name. \\
%^^A! \file{README.md} & The brief introduction. \\
%^^A! \file{fduthesis.pdf} & User's guide in Chinese. \\
%^^A! \file{fduthesis-en.pdf} & User's guide in English (this
Expand Down

0 comments on commit d7726f1

Please sign in to comment.