Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hyperlinks and margin-note templates. #8

Merged
merged 1 commit into from
Jun 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions pkgs/racket-doc/scribblings/guide/guide-utils.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,42 @@
(italic (link "http://www.htdp.org" "How to Design Programs")))

(define (tool name . desc)
(apply item (bold name) ", " desc))
(apply item (bold name) "" desc))

(define (moreguide tag . s)
(apply margin-note
(decode-content (append
(list
finger (secref tag) " (later in this guide)"
" explains more about ")
finger (secref tag) "一节(本手册后文)中"
"解释了有关 ")
s
(list ".")))))
(list " 的更多详情。")))))

(define (guideother . s)
(apply margin-note
(cons finger (decode-content s))))

(define (refdetails* tag what . s)
(define (refdetails* tag what zh-postfix . s)
(apply margin-note
(decode-content (append (list magnify (ext-refsecref tag))
(list what)
s
(list ".")))))
(list zh-postfix "。")))))

(define (refdetails tag . s)
(apply refdetails* tag " provides more on " s))
(apply refdetails* tag "提供了关于" "的更多信息" s))

(define (refalso tag . s)
(apply refdetails* tag " also documents " s))
(apply refdetails* tag "也提供了" "的文档" s))

(define (refdetails/gory tag . s)
(apply refdetails* tag " documents the fine points of " s))
(apply refdetails* tag "阐述了" "的要点" s))

(define (refsecref s)
(secref #:doc '(lib "scribblings/reference/reference.scrbl") s))

(define (ext-refsecref s)
(make-element #f (list (refsecref s) " in " Racket)))
(make-element #f (list Racket "的" (refsecref s) "一节中")))

(define Racket (other-manual '(lib "scribblings/reference/reference.scrbl")))

Expand Down
2 changes: 1 addition & 1 deletion pkgs/racket-doc/scribblings/guide/lists.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@; @title{Lists, Iteration, and Recursion}

@title{列表,迭代与递归}
@title[#:tag "Lists__Iteration__and_Recursion"]{列表,迭代与递归}

@; Racket is a dialect of the language Lisp, whose name originally stood
@; for ``LISt Processor.'' The built-in list datatype remains a prominent
Expand Down
2 changes: 1 addition & 1 deletion pkgs/racket-doc/scribblings/guide/simple-data.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

@; @title{Simple Values}

@title{简单的值}
@title[#:tag "Simple_Values"]{简单的值}

@; Racket values include numbers, booleans, strings, and byte strings. In
@; DrRacket and documentation examples (when you read the documentation
Expand Down
4 changes: 2 additions & 2 deletions pkgs/racket-doc/scribblings/guide/truth.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@; @title{Pairs, Lists, and Racket Syntax}

@title{序对、列表和 Racket 语法}
@title[#:tag "Pairs__Lists__and_Racket_Syntax"]{序对、列表和 Racket 语法}

@; The @racket[cons] function actually accepts any two values, not just
@; a list for the second argument. When the second argument is not
Expand Down Expand Up @@ -262,7 +262,7 @@ map
@; way. You can see this if you put a @litchar{'} in front of a form that has a
@; @litchar{'}:

@litchar{'} 会以相当字面的方式展开为 @racket[quote] 形式。如果你在带有 @litchar{'}
@litchar{'} 会按其字面意思展开为 @racket[quote] 形式。如果你在带有 @litchar{'}
的形式前面再加一个 @litchar{'},就会看到这一点:

@interaction[
Expand Down
10 changes: 5 additions & 5 deletions pkgs/racket-doc/scribblings/guide/welcome.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ racket
(extract "the cat out of the bag")
]

then it is a complete program that prints ``cat'' when run. You can
run the program within DrRacket or using @racket[enter!] in
@exec{racket}, but if the program is saved in @nonterm{src-filename},
you can also run it from a command line with
@; then it is a complete program that prints ``cat'' when run. You can
@; run the program within DrRacket or using @racket[enter!] in
@; @exec{racket}, but if the program is saved in @nonterm{src-filename},
@; you can also run it from a command line with

那么它就是个在运行时会打印“cat”的完整程序。你可以使用 DrRacket 或在
@exec{racket} 中使用 @exec{racket} 来运行该程序。但如果该程序保存在
Expand Down Expand Up @@ -309,7 +309,7 @@ you can also run it from a command line with
来将其转换为可执行脚本。此外,你还需要在命令行中用 @exec{chmod +x
@nonterm{filename}} 为其赋予可执行权限。

只要 @exec{racket} 在用户的可执行文件搜索路径(即 @tech{PATH}
只要 @exec{racket} 在用户的可执行文件搜索路径(即 @deftech{PATH}
环境变量)中,该脚本就能工作。如果在 @tt{#!} 之后使用
@exec{racket} 的完整路径(@tt{#!} 和路径之间留有一空格),
那么用户的可执行文件搜索路径就无关紧要了。}
Expand Down