Commit Graph

56 Commits

Author SHA1 Message Date
Matthew Flatt
fff0344f4e render non-installaction-scoped package docs with an indirection
The indirection uses a "local-redirect.js" script to rewrite
the document links to local links within the browser. This mechanism
is a step towards distributing compiled packages that include
already-built documentation, where paths to other documentation
can be different than in the build environment.

If the links are not rewritten, they are queries to
"pkg-docs.racket-lang.org", with the idea tha such a server will exist
for reading all package documentation online. Also, a package's
documentation that refer to documentation for uninstalled packages,
in which case the corresponding links will not get rewritten and
will continue to point to the server.

Rendering the "local-redirect.js" script spends a lot of time just
converting among different path formats. Various library changes in
this commit are aimed at speed up those conversions, but the big
improvement came from a `path->url-string' that shortcuts conversion
os simple Unix paths.

original commit: 9361b1e709bc7a75822c7da68530cbe0fef4ae28
2013-05-08 09:54:30 -04:00
Matthew Flatt
4e188c38da scribble: fix regression in HTML rendering
Fixes a problem with 2d5884b26a.

original commit: 114ab498d68454c831e8e57be584caadda6039cd
2013-03-04 07:53:18 -07:00
Matthew Flatt
77d079a3ed scribble: fix 'aux stripping for hyperlinks and HTML titles
original commit: ce960756cbea2fa1bafdc0497bb558af851596f6
2013-02-19 14:03:01 -07:00
Matthew Flatt
835ef02800 scribble: fix "on this page" rendering
A recent change improved "on this page" handling and also
fixed a short-circuit test to almost certainly do what
was originally intended, but the test was wrong, so just
get rid of it.

original commit: 2d5884b26a8aa96cab469b31c8b4d16190f854a9
2013-02-18 17:34:16 -07:00
Danny Yoo
a84adaeddb Revert most of the change to word break, but introduce a nbsp for browser metrics.
Related to PR 13305: I tried to use zero-width-space to force appropriate
line breaks, but unfortunately under Opera on Linux, this shows as
unsupported character glyphs.

Since I can't reliably use zero-width-space, I'm backtracking to the
prior solution on introducing spans with the mywbr class.  However,
I've added in a &nbsp element to the content of the span, as suggested
elsewhere on the web.  This appears to fix the _gcpointer issue that
Eric sees.

original commit: 7323dde0eabf54dafb85d0e882ccefbf33e5535f
2013-02-18 17:19:17 -07:00
Matthew Flatt
34f12bcd59 scribble: preserve order of ".js", ".css", and ".tex" additions
original commit: 08604b027740e515d69b677d8542eb45fc8791b2
2013-02-18 11:14:31 -07:00
Matthew Flatt
d1fc7f41da scribble: improve HTML handling of 'unnumbered and 'toc-hidden
A part with style property 'toc-hidden no longer
hides child sections, which makes it consistent with Latex/PDF
rendering.

A part with style 'grouper and 'unnumbered does not make its
child parts render as more nested, which is consistent with
'gruper without 'unnumbered. An unnumbered grouper is represented
as "" in a section-number list (while #f is still used for
unnumbered non-grouper layers).

original commit: 23d0627acc36998dc76ebd840276c80f47cab459
2013-02-15 20:11:18 -07:00
Danny Yoo
b1048aa2fa Amend comment.
original commit: db0234fb6f59ea8c8741ea68f630548d8e1e6cc1
2013-02-12 20:18:54 -07:00
Danny Yoo
f8b07bcc26 Replace <wbr> and <span class='mywbr'> </span> with zero-width-space.
The zero width space is a more robust way to add place to line-wrap,
according to: http://www.quirksmode.org/oddsandends/wbr.html

Closes PR 13305.

original commit: 29031f0972ead0d3cd26d61f163b5e5b59e9ffce
2013-02-12 19:50:13 -07:00
Matthew Flatt
1c5b304b1b Scribble: add 'grouper and 'hidden-number part style properties
Also, clean up documentation and implementation of 'unnumbered and
'hidden.

original commit: c0c2eda628c5786c18d29a3071087e268bd76109
2013-02-01 10:15:53 -08:00
Matthew Flatt
042f013e13 scribble: encode URLs in 'unreserved mode
original commit: 130c989888e3ac596fc5c5ac73c3493fd3bb924c
2012-12-17 07:09:27 -07:00
Matthew Flatt
0836269713 scribble HTML: no extra breaking at the end of an identifier
original commit: bd16f1e302ad3d3fa7a47a8739a33c1eef56969e
2012-11-29 07:18:30 -07:00
Asumu Takikawa
7a4767a341 Fix nav separator for Opera
Commit 8653bc6792b614c69b7d0aab7e329591735a0dad caused
the doc navigation to render oddly on Opera due to how
it handles &nbsp;. This commit retains the spacing
for text browsers, but fixes the navigation on Opera.

original commit: 3e81924f848731abda7415d89b4db0ada6ecb308
2012-11-27 18:03:40 -05:00
Matthew Flatt
84cef2a69a adjust some comments to further clarify
original commit: 36bfae9497a4e86aa1264726b66a43afdda0948c
2012-11-27 08:07:27 -07:00
Samuel Bronson
5a45287255 scribble/html-render: clarify mangling of entities: &mdash; &lang; &rang;
original commit: 3ee6248daa13ac4293480778ff7726e962e58e41
2012-11-27 08:04:42 -07:00
Samuel Bronson
fa69afbe71 scribble: Rename attribute pltdoc -> data-pltdoc, which is valid in HTML5.
(pltdoc isn't valid in any version of HTML.)

original commit: 5a216cc4ce2b789f4f6cd6c7f1dd4d44099fb325
2012-11-27 07:55:43 -07:00
Samuel Bronson
b647bf3ad8 Typo fix in content-type: text-html -> text/html
original commit: a66fa77e2e4e3d45aa65404a642b4d3a1fc7683a
2012-11-27 07:55:36 -07:00
Samuel Bronson
61454baac0 scribble/html-render: comment nits
original commit: e157041497046471cbd4bcb3e65259380d997fea
2012-11-27 07:55:23 -07:00
Samuel Bronson
066db6a0b4 scribble/html-render: Add missing sep-element for non-CSS browsers
original commit: 8653bc6792b614c69b7d0aab7e329591735a0dad
2012-11-27 07:55:16 -07:00
Samuel Bronson
b033e80e4e scribble/html-render: Fix typo in error message
original commit: 11df3f9b2022ddeabf376735b345c8bff0bdfebe
2012-11-27 07:55:08 -07:00
Matthew Flatt
280f5e966a raco setup: build database mapping doc tags to "out.sxref"s
The `xref' produced by `setup/xref' uses the database to delay
loading "out.sxref"s, which cuts 64-bit DrRacket's initial
footprint by around 50MB (i.e., about 20%).

original commit: 8c1b5db81553b54b35e753441efd0465426707a3
2012-11-23 18:44:50 -07:00
Matthew Flatt
8002d98e5d scribble: more control over version formatting
Add "Version" in front of a version name via `.version:before' or
`.versionNoNav:before' and `\SVersionBefore', so that they can
be configured through overriding CSS or Latex macro declarations.

Also, improve the documentation for how the `#:version' argument
of `title' is propagated to a `part' style property.

Closes PR 13227

original commit: a830f77403a1f51de7359c7946b01ef10d401cee
2012-11-02 07:45:57 -06:00
Robby Findler
7189e553a0 fix apparent type error in the definition of in-plt?
original commit: 54301ad5ede34fc5000e1a0effa342036b9c0ba9
2012-10-27 18:37:59 -05:00
Matthew Flatt
f3e1a7425c Scribble: fix problem with URL redirection
original commit: 4cc475ad688ac38c74388d45504cb883f93fa4d7
2012-09-13 11:05:52 -06:00
Matthew Flatt
e15bf50937 scribble/html-properties: allow URLs in css-addition' and js-addition'
original commit: 3fb42cf3f1b49e1cdf024c32a8f969011c2be9b3
2012-09-11 18:52:59 -06:00
Matthew Flatt
4a512f6a66 racket/html-properties: add `js-addition'
original commit: 9162fc25042364c128be0b850c730a93ff910679
2012-09-11 17:39:12 -06:00
Matthew Flatt
f470e3c3a7 scribble HTML: add head-extra' and support for attributes'
For a part that corresponds to an HTML page.

original commit: dc925d2d8cb4802281981cd3a271c07f74234c4d
2012-09-11 17:18:14 -06:00
Matthew Flatt
607f02a331 scribble HTML render: avoid intermediate XML structure
As pointed out by Danny Yoo to save time during the rendering phase

original commit: 612c4ff5240594b8d884ce2d68701cd40ba50fc1
2012-06-28 09:15:57 -06:00
Matthew Flatt
4fc0b01398 scribble: adjust `def...' box to show a background label in HTML
For example, a syntactic form box is labeled with "SYNTAX". Forms
such as `defform' and `defthing' now support a `#:kind' option
for setting the label.

original commit: 5ff3087677ec98ea626cca25b085f3c32138d5ca
2012-06-17 09:19:58 +08:00
Matthew Flatt
f1aa676101 misc changes to speed up doc search generation
Cuts about 30% of the time on my machine.

original commit: 815fd1b49c7b7857aa08fd15c5ec77655ac84859
2012-06-08 16:08:55 +08:00
Matthew Flatt
3ac30a1f35 scribble: fix duplicate call to `render-element' callback
This change should cut the time to generate the search index
roughly in half.

original commit: 00e1ed9369d8401ef349f9c9fb9475d30ab2cda1
2012-06-08 16:08:55 +08:00
Eli Barzilay
36eea932a8 A bunch of fprintf' -> eprintf' conversions (and a few related things).
original commit: 17090fca4f19298f01d03fea419edb20f315d040
2012-05-06 12:06:00 -04:00
Matthew Flatt
70332eb7ce make HTML rednering work when a `part' has not tags
original commit: 2d87d48ebdb831fafc398a603c2582bb87ce8592
2012-03-25 19:25:35 -06:00
Matthew Flatt
e151e32b82 change Scribble xref formats, so that HTML info works for Latex
There's no particular reason that any one format will have all
the information that other formats need, but it conveniently works
for now that HTML info can subsume Latex info.

original commit: a1fd742ed022035732b4a0c778168cc6b862933a
2012-01-11 16:39:52 -07:00
Matthew Flatt
ef02b4039c scribble: fix HTML rendering of table in nested flow starting item
original commit: 07342303e5eb63c0d255cacaa49faabc8c667d19
2011-12-03 08:41:15 -07:00
Matthew Flatt
4622f11e5f scribble: fix HTML navigation when the main part has 'toc
original commit: 9bd50695b5778902d626fa707cd2ebe7d59dba03
2011-09-15 07:12:58 -06:00
Matthew Flatt
f622c4755c scribble: more nowraps in HTML output
Avoids line-wraps for `examples' output and in function contracts

original commit: 7a2e1aa9001ec002892be146b7e5b425fa757c01
2011-09-12 19:17:08 -06:00
Matthew Flatt
6f4f63d692 add column-attributes' support and use it to fix struct' rendering
original commit: ad7fddf878f0cb288adcb72a3fadc7e2644ce54f
2011-08-05 10:03:38 -06:00
Matthew Flatt
db4d7c9add Scribble: support for "boxable" blocks in Latex output
For example, if you make a multi-column table with a
`racketblock' in each column, then the columns size
to fit the code --- instead of forcing the table width
to match the page width and forcing each column to take
an equal share width.

original commit: b7afb3cf8fbbf448af18805db2f32c130ba4d47b
2011-08-05 10:03:38 -06:00
Matthew Flatt
2e8e709b7f Scribble: style adjustments to deter code wrapping
For HTML, the style used in the output of `racketblock' now
disables line wrapping, and the Rkt text styles inherit
line-wrap behavior. This doesn't solve the general problem
of code overflowing the horizontal space, but it makes the
failure mode usefully better.

A new 'vertical-inset nested-flow style is used by
`defproc', `defform', etc. It has no effect for HTML,
but it introduces suitable vertical space for Latex output
(in case you want to use `defproc' in a SIGPLAN-format
paper, for example).

original commit: 4ac85de974ec2e6326df129745228b3ffcbb778f
2011-08-05 10:03:37 -06:00
Eli Barzilay
45a9cd48c2 ".ss" -> ".rkt" scan done.
original commit: 3157955d40f89d83fb3d5fa7a2f20639cda69579
2011-07-02 10:37:53 -04:00
Matthew Flatt
87f668de09 Scribble: add `alt-tag' HTML property to set HTML tag in output
original commit: c38118f0e5286affb480fcc9c4d30a09a75c4ec7
2011-04-04 14:33:38 -06:00
Matthew Flatt
befd85c2d8 Scribble: simplify content that is conditioned on the render mode
including a new `scriblib/render-cond' library

original commit: df2a875ff4aaff90b20906a80dff6218470eb455
2011-04-04 10:45:02 -06:00
Matthew Flatt
742843af7b Scribble: change the way `racketblock' etc. indent/inset works
- introduce 'code-inset style for nested blocks
 - use style instead of spaces for code indentation
 - sigplanconf adds vertical space around 'code-inset
 - more ...0 variants to compose better

original commit: bbc5533938b1dac8f14005210fa9fe552dfa7e8c
2011-03-30 15:12:30 -06:00
Matthew Flatt
e199fb6177 fix Scribble serialization of search-redirected links
original commit: f64b52052f797d15517d1718d1f73a454291ecf8
2011-01-11 13:24:34 -07:00
Matthew Flatt
a14bdb7d66 change Scribble HTML to use `object' tag for SVG
original commit: a9bedcc69dae9790ad910285d5c75c2e4314d033
2011-01-10 16:41:17 -07:00
Matthew Flatt
1d4626a4c1 support ".svg" in scribble/base' image' for HTML output
original commit: b2877336f74a7ae2f8d73d3d78ee8eacfccf4e2a
2011-01-10 16:41:16 -07:00
Matthew Flatt
456a7529e6 change Scribble HTML renderer to typeset em dashes with &8212;
Closes PR 11049
 Closes PR 11539

original commit: 0b1b3772f53263a21dbfb40d5a1b97e926994dbc
2010-12-14 06:48:25 -07:00
Matthew Flatt
6fb5dc58de scribble: render `pict' content directly
--- actually, any value that is convertible to PNG/PDF

original commit: 0f86dc15afe6d0bf48a77f8aec7d66fda356082b
2010-11-26 20:40:43 -07:00
Eli Barzilay
33646442c8 More "~n" -> "\n" changes
original commit: 8e0f8dd39c3744472b450021f003f9cbe8cbcb62
2010-08-26 12:11:00 -04:00