Support reference to page numbers of an element tag#242
Support reference to page numbers of an element tag#242chihyang wants to merge 1 commit intoracket:masterfrom
Conversation
For docs such as pdf, page number reference is sometimes very useful. To support page reference, a new kind of tag is added to scribble/base. Besides, a new command 'PageRef' is added to scribble.tex. Its argument is a page number. By default, it shows 'page' before the page number. Users can redefine this command to get different outputs.
|
@mflatt @samth This is a pull request working in progress. I am not sure if it is suitable for merging into the main scribble repo. So I put it here for discussion. Support for page number reference in PDF is very useful. Support for page number reference in HTML or other formats seems less meaningful, because most of time there is no fix-sized paper in such documents (maybe this is why This is also a problem about how to use tags more conveniently: how can I use something like LaTeX For example, once we can use the "real" content of a tag, I can define the following style: \newcommand{\PageRef}[1]{page~\pageref{#1}}then in the style file: (define PageRef
(make-style "PageRef" (list (make-tex-addition "pageref.tex"))))then in the scribble file: ;;; tag here
(elemtag "a-tag")
;;; use the tag somewhere else
(elem #:style PageRef (encode-tag "a-tag"))Because |
This is a pull request working in progress.
For docs such as pdf, page number reference is sometimes very useful. To support page reference, a new kind of tag is added to scribble/base. Besides, a new command
PageRefis added to scribble.tex. Its argument is a page number. By default, it shows 'page' before the page number. Users can redefine this command to get different outputs.