Skip to content

Commit

Permalink
step version: v0.6
Browse files Browse the repository at this point in the history
- Since TeX will automatically add `.tex` to the latexmkrc files, I name them `*.cfg` first then use a shell script to rename afterwards.
- `fduthesis-en.ltx` -> `fduthesis-en.tex`.
- Add `make-tds.sh`.
- Now `get-doc-en.lua` can capture arguments from shell.
  • Loading branch information
stone-zeng committed Nov 30, 2017
1 parent 501f8a8 commit 5f0da7a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ latexmkrc-en
build/
logo/
support/
TDS/
temp/
tools/

# Other
git-comment.md
TODO.md
source/*.ltx
source/*.md
source/*.tex
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## 欢迎使用 fduthesis - 复旦大学论文模板!

在您使用 `fduthesis` 之前,请务必仔细阅读模板文档
[fduthesis.pdf](https://github.com/Stone-Zeng/fduthesis/releases/download/v0.5/fduthesis.pdf)
[fduthesis.pdf](https://github.com/Stone-Zeng/fduthesis/releases/download/v0.6/fduthesis.pdf)
该文档也可通过如下命令生成:

latexmk fduthesis.dtx
Expand All @@ -25,7 +25,7 @@
## Welcome to fduthesis - LaTeX thesis template for Fudan University!

Before you using `fduthesis`, please read the document
[fduthesis.pdf](https://github.com/Stone-Zeng/fduthesis/releases/download/v0.5/fduthesis.pdf)
[fduthesis.pdf](https://github.com/Stone-Zeng/fduthesis/releases/download/v0.6/fduthesis.pdf)
carefully. This file can be generated with the following commands
as well:

Expand Down
6 changes: 3 additions & 3 deletions scripts/get-doc-en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

-- Generate the English version of the documentation.

local input_file_name = "../source/fduthesis.dtx"
local output_file_name = "../source/fduthesis-en.ltx"
local input_file_name = arg[1]
local output_file_name = arg[2]

local file_banner = "%%\n"
.. "%% This is file `fduthesis-en.ltx',\n"
.. "%% This is file `fduthesis-en.tex',\n"
.. "%% generated with Lua script `get-doc-en.lua'.\n"
.. "%%\n"
.. "%% The original source files were:\n"
Expand Down
33 changes: 33 additions & 0 deletions scripts/make-tds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env sh

mkdir -p TDS/doc/latex/fduthesis/
mkdir -p TDS/tex/latex/fduthesis/
mkdir -p TDS/source/latex/fduthesis/
mkdir -p TDS/temp/

cp source/*.dtx TDS/temp/

cd TDS/temp/
xetex fduthesis.dtx
texlua ../../scripts/get-doc-en.lua "fduthesis.dtx" "fduthesis-en.tex"
cd ../..

mv TDS/temp/*.dtx TDS/source/latex/fduthesis/
mv TDS/temp/*.ins TDS/source/latex/fduthesis/
mv TDS/temp/*.cls TDS/tex/latex/fduthesis/
mv TDS/temp/*.sty TDS/tex/latex/fduthesis/
mv TDS/temp/*.def TDS/tex/latex/fduthesis/
mv TDS/temp/*.tex TDS/doc/latex/fduthesis/
mv TDS/temp/README.md TDS/doc/latex/fduthesis/
mv TDS/temp/latexmkrc.cfg TDS/doc/latex/fduthesis/latexmkrc
mv TDS/temp/latexmkrc-en.cfg TDS/doc/latex/fduthesis/latexmkrc-en
cp source/*.pdf TDS/doc/latex/fduthesis/

cd TDS/
rm -r temp/

zip -r fduthesis.tds.zip .
cd ..
mv -f TDS/*.zip .

rm -r TDS/
22 changes: 9 additions & 13 deletions source/fduthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
% fdulogo.sty,
% fdulogo-example.tex,
% fduthesis-cover.tex,
% fudan-*.pdf,
% fudan-*.png,
% fduthesis-cover.pdf,
% fduthesis-en.ltx,
% fduthesis-en.tex,
% fduthesis.pdf,
% fduthesis-en.pdf,
% latexmkrc,
Expand Down Expand Up @@ -159,10 +156,7 @@ Copyright (C) 2017 by Xiangdong Zeng <[email protected]>.
fdulogo.sty,
fdulogo-example.tex,
fduthesis-cover.tex,
fudan-*.pdf,
fudan-*.png,
fduthesis-cover.pdf,
fduthesis-en.ltx,
fduthesis-en.tex,
fduthesis.pdf,
fduthesis-en.pdf,
latexmkrc,
Expand Down Expand Up @@ -194,8 +188,10 @@ Copyright (C) 2017 by Xiangdong Zeng <[email protected]>.
\usedir{doc/latex/fduthesis}
\nopreamble\nopostamble
\file{README.md} {\from{\jobname.dtx}{readme}}
\file{latexmkrc.} {\from{\jobname-doc.dtx}{latexmk}}
\file{latexmkrc-en.} {\from{\jobname-doc.dtx}{latexmk-en}}
% ``.cfg'' is only for internal/temporal use.
% They will be renamed by external scripts.
\file{latexmkrc.cfg} {\from{\jobname-doc.dtx}{latexmk}}
\file{latexmkrc-en.cfg} {\from{\jobname-doc.dtx}{latexmk-en}}
}

\obeyspaces
Expand Down Expand Up @@ -230,7 +226,7 @@ Copyright (C) 2017 by Xiangdong Zeng <[email protected]>.
%<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e}
%<class|class-en|doc|logo>\RequirePackage{expl3}
%<*!(driver|install|ex-logo|cover)>
%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.5 2017-09-30 12:00:00Z Xiangdong Zeng <[email protected]> $
%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.6 2017-11-30 12:00:00Z Xiangdong Zeng <[email protected]> $
%<class> {Thesis template for Fudan University}
%<class>\ProvidesExplClass{\ExplFileName}
%<class-en> {Thesis template for Fudan University (English version)}
Expand Down Expand Up @@ -514,7 +510,7 @@ Copyright (C) 2017 by Xiangdong Zeng <[email protected]>.
% 较好的方法是使用 TDS 安装包:
% \begin{itemize}
% \item 从 GitHub 上下载 \cls{fduthesis} 的
% \href{https://git.io/vbIN2}{TDS 安装包};
% \href{https://git.io/vbIKa}{TDS 安装包};
% \item 按目录结构将 \file{fduthesis.tds.zip} 中的文件复制到 \TeX{}
% 发行版的本地 TDS 根目录;
% \item 执行 \bashcmd{texhash} 刷新文件名数据库以完成安装。
Expand All @@ -523,7 +519,7 @@ Copyright (C) 2017 by Xiangdong Zeng <[email protected]>.
%^^A! you need to download and install it from GitHub. Recommended
%^^A! way is to use the TDS ZIP file:
%^^A! \begin{itemize}
%^^A! \item Download the href{https://git.io/vbIN2}{TDS ZIP file}
%^^A! \item Download the href{https://git.io/vbIKa}{TDS ZIP file}
%^^A! for \cls{fduthesis};
%^^A! \item Copy all the files in \file{fduthesis.tds.zip} into the
%^^A! local TDS directory of \TeX{} distribution.
Expand Down

0 comments on commit 5f0da7a

Please sign in to comment.