propagate prefix repair to to scribble/jfp' and scribble/lncs'

original commit: d841ec1bd0aac12c7d977f4be419f8c2728a6d17
This commit is contained in:
Matthew Flatt 2012-08-31 07:23:55 -06:00
parent a5f9e4bee8
commit 37c398ffbf
6 changed files with 34 additions and 7 deletions

View File

@ -6,6 +6,7 @@
"../private/defaults.rkt"
net/ftp
racket/file
scribble/latex-prefix
(for-syntax scheme/base))
(provide (except-out (all-from-out scribble/doclang) #%module-begin)
(all-from-out scribble/jfp)
@ -32,7 +33,8 @@
(define ((post-process) doc)
(add-defaults doc
(string->bytes/utf-8
(format "\\documentclass{jfp1}\n\\usepackage{times}\n\\usepackage{qcourier}\n"))
(format "\\documentclass{jfp1}\n~a\\usepackage{times}\n\\usepackage{qcourier}\n"
unicode-encoding-packages))
(scribble-file "jfp/style.tex")
(list cls-file)
#f))

View File

@ -0,0 +1,8 @@
#lang racket/base
(provide unicode-encoding-packages)
(define unicode-encoding-packages
(string-append
"\\usepackage[utf8]{inputenc}\n"
"\\usepackage[T1]{fontenc}\n"))

View File

@ -9,6 +9,7 @@
setup/main-collects
scribble/html-properties
scribble/latex-properties
scribble/latex-prefix
racket/stxparam
net/ftp
file/gunzip
@ -43,7 +44,8 @@
(define ((post-process) doc)
(add-defaults doc
(string->bytes/utf-8 "\\documentclass{llncs}\n")
(string->bytes/utf-8 (string-append "\\documentclass{llncs}\n"
unicode-encoding-packages))
(scribble-file "lncs/style.tex")
(list cls-file)
#f))

View File

@ -3,6 +3,7 @@
scribble/core
scribble/base
scribble/sigplan
scribble/latex-prefix
racket/list
"../private/defaults.rkt"
(for-syntax scheme/base))
@ -66,10 +67,9 @@ Read here for more:
(add-sigplan-styles
(add-defaults doc
(string->bytes/utf-8
(format "\\documentclass~a{sigplanconf}\n~a~a~a~a"
(format "\\documentclass~a{sigplanconf}\n~a~a~a"
options
"\\usepackage[utf8]{inputenc}"
"\\usepackage[T1]{fontenc}"
unicode-encoding-packages
(if times?
"\\usepackage{times}\n"
"")

View File

@ -2,7 +2,8 @@
@(require scribble/manual scribble/core scribble/decode
scribble/html-properties scribble/latex-properties
"utils.rkt"
(for-label racket/base))
(for-label racket/base
scribble/latex-prefix))
@(define (fake-title . str) (apply bold str))
@ -264,3 +265,15 @@ style:
]
@; ------------------------------------------------------------
@section[#:tag "latex-prefix"]{Latex Prefix Support}
@defmodule[scribble/latex-prefix]{Provides a string that is useful for
constructing a Latex document prefix.}
@defthing[unicode-encoding-packages string?]{
A string containing Latex code that is useful after a
@tt{\documentclass} declaration to make Latex work with Unicode
characters.}

View File

@ -1456,7 +1456,9 @@ be a result of @racket[path->main-collects-relative].
Languages (used with @hash-lang[]) like
@racketmodname[scribble/manual] and @racketmodname[scribble/sigplan]
add this property to a document to specify appropriate files for Latex
rendering.}
rendering.
See also @racketmodname[scribble/latex-prefix].}
@defstruct[latex-auto-extra-files ([paths (listof (or/c path-string?