Skip to content

Commit 70ebbd6

Browse files
committed
* zh-tw for 00-02
1 parent d9f0dfe commit 70ebbd6

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

contents/traditional-mandarin/00-02-找到你的道路.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**找到你的道路**
1+
# 找到你的道路
22

33
正如我們在書中所討論的,線性的書籍敘事有個顯著的缺點,就是強迫每個讀者走上單一的學習道路。雖然本書的線上版本通過大量使用超連結來避免這個問題,但實體版比較不容易為讀者導航。為了部分緩解這個問題,我們以「循環」的方式構建文本,讀者可以從各種起點開始閱讀,之後再回到「更早」的材料。
44

scripts/make-book-zh-tw.pl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
---
2323
HEADER
2424

25-
$all .= read_file($_) =~ s/&/\\&/rg for glob("contents/english/00-00-*.md");
25+
$all .= (read_file($_) =~ s/^#+\s+(.+)/\n**$1**/rg). "\n\n" for glob("contents/traditional-mandarin/00-0[13]-*.md");
2626

2727
sub read_file {
2828
my $filename = shift;
@@ -70,11 +70,12 @@ sub write_file {
7070
7171
write_file(
7272
'00-01.tex', (
73-
map { read_file($_) =~ s/\*\*(.*?)\*\*/\\textbf{$1}/rg }
74-
glob 'contents/traditional-mandarin/00-01-*.md'
73+
map { read_file($_) =~ s/\*\*(.*?)\*\*/\\textbf{$1}/rg =~ s/^#+\s+(.+)/\\textbf{$1}/rg =~ s/&/\\&/rg }
74+
glob 'contents/traditional-mandarin/00-02-*.md'
7575
)
7676
);
7777
78+
7879
print "Generating PDF (this may take a while)...\n";
7980
8081
# Pre-running twice to generate emoji PDFs

0 commit comments

Comments
 (0)