Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-liu committed Mar 14, 2015
2 parents 164ffb6 + d9fc480 commit df3f55d
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 75 deletions.
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.swp
*~
*.ind
doc/zhmakeindex.idx
*.bbl
*.blg
*.ilg
*.aux
*.out
doc/zhmakeindex.pdf
doc/zhm-version.tex
bin/
23 changes: 0 additions & 23 deletions .hgignore

This file was deleted.

2 changes: 0 additions & 2 deletions CJK/maketables.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

// +build ignore

// 本程序生成 zhmakeindex/CJK 使用的汉字数据表。
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The PDF documentation is also available for details.

More information, bugfix releases and bug tracker are available at:

https://code.google.com/p/zhmakeindex/
https://github.com/leo-liu/zhmakeindex

COPYRIGHT AND LICENCE
=====================
Expand Down
2 changes: 1 addition & 1 deletion build-dist.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if exist VERSION (
) else (
set zhmVersion=devel
)
for /f "delims=" %%i in ('hg parent --template "{rev}({node|short})"') do set zhmRevision=%%i
for /f "delims=" %%i in ('git rev-parse --short HEAD') do set zhmRevision=%%i
set FLAGS=-ldflags "-X main.Version %zhmVersion% -X main.Revision %zhmRevision%"

set GOOS=windows
Expand Down
2 changes: 1 addition & 1 deletion doc/make.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if exist ..\VERSION (
)
echo }>> zhm-version.tex
echo \def\zhmRevision{%%>> zhm-version.tex
hg parent --template "{rev}({node|short})" >> zhm-version.tex
git rev-parse --short HEAD >> zhm-version.tex
echo }>> zhm-version.tex

echo ==========^> Compiling document...
Expand Down
41 changes: 24 additions & 17 deletions doc/zhmakeindex.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
% $Id$
\documentclass[UTF8,hyperref]{ctexart}

\usepackage{etoolbox}
Expand Down Expand Up @@ -113,7 +112,7 @@
\def\zhmVersion{???}%
\def\zhmRevision{???}}

\title{\zhm\thanks{版本 \zhmVersion-rev\zhmRevision} 中文索引处理程序}
\title{\zhm\thanks{版本 \zhmVersion-\zhmRevision} 中文索引处理程序}
\author{刘海洋}
\date{2015 年 3 月 6 日}

Expand Down Expand Up @@ -238,7 +237,7 @@ \section{索引项输入语法}
\begin{idxexample}
"\indexentry{简介}{15}" \\
\sindex
简介, 15
简介, 15
\end{idxexample}
其语法为:
\begin{syntax}
Expand Down Expand Up @@ -302,7 +301,7 @@ \section{索引项输入语法}
\sitem 代数方程 \\
\ssitem 二次方程, 3 \\
\ssitem 线性方程, 2 \\
\sitem 解, 1
\sitem 解, 1
\end{idxexample}
每一级别内部都可以分别指定排序的键与输出值,例如:
\begin{idxexample}
Expand All @@ -323,7 +322,7 @@ \section{索引项输入语法}
括号被忽略,输出时会自动加上(用\autoref{tab:oldoutputstyle} 中的
\kw{encap_prefix}, \kw{encap_infix}, \kw{encap_suffix} 项配置)。例如:
\begin{idxexample}
"\indexentry{字体|emph}{2}"
"\indexentry{字体|emph}{2}"
\sindex
字体, \emph{2}
\end{idxexample}
Expand Down Expand Up @@ -813,38 +812,46 @@ \section{版权与许可}
\begin{verbatim}
build-dist.cmd
input.go
install.cmd
main.go
MENIFEST
numberedreader.go
output.go
radicalstrokes.go
pagenumber.go
radical_collator.go
readings.go
reading_collator.go
README
sorter.go
strokes.go
stroke_collator.go
style.go
style_test.go
VERSION
doc/make.cmd
doc/zhmakeindex.bib
doc/zhmakeindex.mst
doc/zhmakeindex.tex
examples/compositepage.idx
examples/gb2312.idx
examples/mixedpage.idx
examples/numbers.idx
examples/rangeencap.idx
examples/suffix.ist
examples/symorder.idx
examples/zh.ist
kpathsea/dynamic_other.go
kpathsea/dynamic_windows_386.go
kpathsea/kpathsea.go
maketables/make-table.cmd
maketables/maketables.go
CJK/make-table.cmd
CJK/maketables.go
CJK/radicalstrokes.go
CJK/strokes.go
CJK/readings.go
\end{verbatim}
以及编译源文件得到的二进制文件 \path{zhmakeindex.exe} 或 \path{zhmakeindex}、
PDF 文档 \path{zhmakeindex.pdf} 组成。
\index{Unicode}
大部分汉字数据来自 Unicode 项目(\url{http://www.unicode.org/}):
\begin{verbatim}
maketables/CJKRadicals.txt
maketables/Unihan_DictionaryLikeData.txt
maketables/Unihan_RadicalStrokeCounts.txt
maketables/Unihan_Readings.txt
\end{verbatim}
大部分汉字数据来自 Unicode 项目(\url{http://www.unicode.org/})。
\index{海峰五笔}
部分字形数据来自海峰五笔项目(\url{http://okuc.net/sunwb/}):
Expand Down
2 changes: 0 additions & 2 deletions input.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

package main

import (
Expand Down
4 changes: 2 additions & 2 deletions install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ if exist VERSION (
) else (
set zhmVersion=devel
)
for /f "delims=" %%i in ('hg parent --template "{rev}({node|short})"') do set zhmRevision=%%i
for /f "delims=" %%i in ('git rev-parse --short HEAD') do set zhmRevision=%%i
set FLAGS=-ldflags "-X main.Version %zhmVersion% -X main.Revision %zhmRevision%"

go install %FLAGS%

endlocal
endlocal
2 changes: 1 addition & 1 deletion kpathsea/kpathsea.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 提供 kpathsea 库的基本文件查找功能
package kpathsea
package kpathsea // import "github.com/leo-liu/zhmakeindex/kpathsea"

import (
"os"
Expand Down
8 changes: 3 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// $Id$

// zhmakeindex: 带中文支持的 makeindex 实现
package main
package main // import "github.com/leo-liu/zhmakeindex"

import (
"flag"
Expand Down Expand Up @@ -40,7 +38,7 @@ func main() {

setupLog(option)

log.Printf("zhmakeindex 版本:%s-rev%s\t作者:%s\n", Version, Revision, ProgramAuthor)
log.Printf("zhmakeindex 版本:%s-%s\t作者:%s\n", Version, Revision, ProgramAuthor)

if option.style != "" {
log.Printf("正在读取格式文件 %s……", option.style)
Expand Down Expand Up @@ -218,5 +216,5 @@ zhmakeindex [-c] [-i] [-o <ind>] [-q] [-r] [-s <sty>] [-t <log>]
fmt.Fprintf(os.Stderr, " -%-6s %-8s %s\n", f.Name, f.DefValue, f.Usage)
}
})
fmt.Fprintf(os.Stderr, "\n版本:%s-rev%s\t作者:%s\n", Version, Revision, ProgramAuthor)
fmt.Fprintf(os.Stderr, "\n版本:%s-%s\t作者:%s\n", Version, Revision, ProgramAuthor)
}
2 changes: 0 additions & 2 deletions numberedreader.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id: numberedreader.go,v 46e1b534c25a 2014/02/25 18:14:30 leoliu $

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions output.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions pagenumber.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

package main

import (
Expand Down
4 changes: 1 addition & 3 deletions radical_collator.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// $Id$

package main

import (
"fmt"
"unicode"
"unicode/utf8"

"code.google.com/p/zhmakeindex/CJK"
"github.com/leo-liu/zhmakeindex/CJK"
)

// 汉字按部首-除部首笔画数排序,汉字按部首分组排在英文字母组后面
Expand Down
4 changes: 1 addition & 3 deletions reading_collator.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// $Id$

package main

import (
"unicode"
"unicode/utf8"

"code.google.com/p/zhmakeindex/CJK"
"github.com/leo-liu/zhmakeindex/CJK"
)

// 汉字按拼音排序,按拼音首字母与英文一起分组
Expand Down
2 changes: 0 additions & 2 deletions sorter.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

package main

import (
Expand Down
4 changes: 1 addition & 3 deletions stroke_collator.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// $Id$

package main

import (
"strconv"
"unicode"
"unicode/utf8"

"code.google.com/p/zhmakeindex/CJK"
"github.com/leo-liu/zhmakeindex/CJK"
)

// 汉字按笔画排序,汉字按笔画分组排在英文字母组后面
Expand Down
4 changes: 1 addition & 3 deletions style.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// $Id$

package main

import (
Expand All @@ -13,7 +11,7 @@ import (

"golang.org/x/text/transform"

"code.google.com/p/zhmakeindex/kpathsea"
"github.com/leo-liu/zhmakeindex/kpathsea"
)

// 输入格式
Expand Down

0 comments on commit df3f55d

Please sign in to comment.