Commit Graph

1047 Commits

Author SHA1 Message Date
Robby Findler
8ce213bf1c extend proc-doc to support optional arguments in an ->i contract
also refactor to be able to add some unit tests
2013-04-06 19:04:05 -05:00
David Van Horn
213430f728 Add #:lang and input-program inputs to make-base-eval and friends.
This commit extends make-base-eval, make-base-eval-factory, and
make-eval-factory with an #:eval and input-program inputs so that
these functions are more like racket/sandbox make-evaluator.
2013-04-06 09:00:41 -06:00
Ryan Culpepper
516f56fc83 added with-eval-preserve-source-locations to scribble/eval
Makes it possible to show examples of redex term->pict, etc.
2013-04-04 13:28:01 -04:00
Ryan Culpepper
293b208af7 added optional #:grammar clause to defform, etc 2013-03-30 10:00:44 -04:00
Greg Hendershott
59bba2d197 Combine adjacent code spans into one.
These result from something like

    @racket[(x y)]

being treated by Scribble as multiple RktXXX items rather than one. As
a result the Markdown emitted was:

    `(``x`` ``y``)`

But obviously instead we want:

    `(x y)`

Kludgosity alert: Although it would probably be more-correct to
consolidate the RktXXX items at the Scribble structure level, I don't
easily see how. `@racket` is baking in the concept of Racket
lexing (classifying text as various kinds of Racket elements). This is
handy when the render will be HTML or Latek, and is benignly N/A when
it will be plain text. But it's a bit square-peg/round-hole when the
render will be Markdown. Rather than attempt to "un-lex" the Scribble
structures (I'm having trouble seeing how), I'm handling it
"after-the-fact" -- adjusting the generated Markdown text.

If anyone thinks the preceding is an elaborate rationalization for an
ugly kludge, I wouldn't argue, but I would need some help
understanding the preferable way to go about it.
2013-03-29 07:23:49 -06:00
Greg Hendershott
a5f6686270 Fix problem handling examples and interaction.
Unlike plain `racketblock`, `examples` and `interaction` are
"nested". As a result we emitted bad Markdown like:

    ```racket
    Examples:
    ```racket
    some-code
    ```
    ```

Markdown code blocks can't nest, so this needs to be:

    ```racket
    Examples:
    some-code
    ```

Also: Updated the unit test with examples of `examples` and
`interaction`.
2013-03-29 07:23:49 -06:00
Robby Findler
e5d91baa2c add interaction/no-prompt and clarify that interaction-eval
doesn't catch errors
2013-03-20 22:51:39 -05:00
Robby Findler
a29f37f18b added scribble-exn->string 2013-03-20 22:51:39 -05:00
Matthew Flatt
dfcf50e165 scribble/manual: add a #:key' argument to deftech' 2013-03-19 15:48:21 -07:00
Eli Barzilay
af6be85ff5 Fix lots of indentation mistakes.
(Found by my ayatollah script...)
2013-03-14 10:55:47 -04:00
Robby Findler
11969cdfa6 trim the list of new dots down to those that our latex
setup seems to handle

(and actually add them to latex-render.rkt ...)
2013-03-13 10:13:34 -05:00
Robby Findler
3e27388571 missed some changes related to addition of dont-care values
in the lexers
2013-03-10 21:56:43 -05:00
Robby Findler
282cdcbb5b adjust xmethod macro to yield a more helpful error message 2013-03-10 17:33:55 -05:00
Matthew Flatt
9e0e2b932d scribble/srcdoc: add `begin-for-doc' 2013-03-07 21:46:48 -07:00
Matthew Flatt
8d03995b62 scribble/manual: add #:id' option to defthing'
Use this open in the HtDP language documentation in the same
way as for `defproc', which fixes the docs for `pi', `e', etc.
2013-03-05 07:48:26 -07:00
Matthew Flatt
114ab498d6 scribble: fix regression in HTML rendering
Fixes a problem with 2d5884b26a.
2013-03-04 07:53:18 -07:00
Eli Barzilay
cec73f5652 Newlines at EOFs scan. 2013-02-23 02:09:56 -05:00
Matthew Flatt
ce960756cb scribble: fix 'aux stripping for hyperlinks and HTML titles 2013-02-19 14:03:01 -07:00
Matthew Flatt
c9c4d33a2f scribble/sigplan: add `subtitle'
Based on David Van Horn's suggestion.

Also, make both `author' and `authorinfo' work (even when mixed).
2013-02-19 14:03:00 -07:00
Matthew Flatt
2d5884b26a 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.
2013-02-18 17:34:16 -07:00
Danny Yoo
7323dde0ea 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.
2013-02-18 17:19:17 -07:00
Matthew Flatt
08604b0277 scribble: preserve order of ".js", ".css", and ".tex" additions 2013-02-18 11:14:31 -07:00
Robby Findler
d5ffb1e3c0 add in the rest of the double barred chars (╬ and company)
and adjust the existing ones a little
2013-02-16 00:09:26 -06:00
Matthew Flatt
c8ae8c419a scribble Latex: support all 2d-cond characters 2013-02-15 21:09:18 -07:00
Matthew Flatt
23d0627acc 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).
2013-02-15 20:11:18 -07:00
Robby Findler
4494788017 fix rendering of example in Guide
closes PR 13517
2013-02-13 07:25:36 -06:00
Danny Yoo
db0234fb6f Amend comment. 2013-02-12 20:18:54 -07:00
Danny Yoo
29031f0972 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.
2013-02-12 19:50:13 -07:00
Robby Findler
12ebfa2cf4 make #:keywords have different color prefs in DrRacket
closes PR 13492
2013-02-05 12:32:48 -06:00
Matthew Flatt
09d4aa3d79 Scribble: add scribble/book' and scribble/report' languages
These languages set the default class for Latex rendering, and also
adjust Latex commands so that top-level sections are chapters, etc.
2013-02-01 10:15:53 -08:00
Matthew Flatt
c0c2eda628 Scribble: add 'grouper and 'hidden-number part style properties
Also, clean up documentation and implementation of 'unnumbered and
'hidden.
2013-02-01 10:15:53 -08:00
Michael Filonenko
17b8092641 extflonums
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).

[Patch provided by Michael Filonenko and revised by Matthew.]

The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).
2013-01-28 18:17:06 -07:00
Matthew Flatt
17865bfa84 scribble/latex-properties: add `command-extras'
This style property is a way to add to the Latex output that is
ignored for HTML and other output.
2013-01-24 06:43:10 -05:00
Matthew Flatt
5ab048bb5c scribble/decode: fix contract on `decode-compound-paragraph'
Add a test suite that at least tries each export of `scribble/decode'.

Merge to v5.3.2
2013-01-09 18:52:16 -07:00
Greg Hendershott
4d3a5bad04 Use Racket lexer for code blocks.
Had been specifying Scheme lexer for code blocks, while waiting for
new Racket lexer to wend its way from Pygments to Pygments.rb to
Linguist to GitHub.

That day is almost here: Linguist will soon update and deploy to
GitHub.  And Racket 5.3.2 is about to release.  As a result, I think
this is the correct time to switch to the Racket lexer: It should be
live on GitHub by the time people are using Racket 5.3.2.

/cc @rmculpepper -- I think this commit should go into the 5.3.2
release.
2013-01-09 18:52:16 -07:00
Matthew Flatt
3e8b6b9866 scribble: add +m' / ++main-xref-in' flag
The `+m' flag is a long-overdue shorthand for `++xref-in setup/xref
load-collections-xref', which links to installed documentation in
the same way as DrRacket's "Scribble HTML" button.

That is, use `+m' to link to installed documentation,

  scribble +m mine.scrbl

instead of the previously recommended

  scribble ++xref-in setup/xref load-collections-xref mine.scrbl

Merge to 5.3.2
2013-01-08 16:25:28 -07:00
Robby Findler
87d25ba02a adjust scribble/lp language so drracket syntax colors it properly
Also fix a spelling mistake (now that spell checking works) and Rackety
2013-01-04 21:39:11 -06:00
Robby Findler
9b6272674e tweak the latex rendering of ╔ and company 2012-12-30 21:11:38 -06:00
Robby Findler
022e252f45 add support for ╔ ═ ╗ ║ ╚ and ╝ to the latex renderer
Also, Rackety
2012-12-29 11:31:17 -06:00
Matthew Flatt
3f6b30a569 scibble: repair related to recent `scribble/tag' contracts 2012-12-27 12:49:30 -06:00
Robby Findler
353da62843 added make-module-language-tag and use it and make-section-tag
in a few places
2012-12-27 11:10:40 -06:00
Matthew Flatt
f29230f8f2 add `scribble/tag' and clean up some tag-related documentation and functions
Includes the addition of `make-section-tag' and `taglet?' to
`scribble/base'.
2012-12-27 09:24:14 -06:00
Greg Hendershott
faeba879e2 Fix bug with pound signs used to mark sections.
Also update tests/scribble/markdown-docs files accordingly.
2012-12-19 19:32:00 -07:00
Greg Hendershott
a3800cdc94 Render Scribble margin-note as Markdown block-quote.
More precisely, do this for nested flows with the "refcontent" style.

For instance this Scribble:

    @margin-note{Note: This is a note. Let's make it long enough that the
    markdown output will have to line-wrap, to make sure the > mark starts
    each line properly.}

Will render as this Markdown:

    > Note: This is a note. Let's make it long enough that the markdown output
    > will have to line-wrap, to make sure the > mark starts each line
    > properly.

A site like GitHub.com will render this in a block-quote style
suitable for notes:

> Note: This is a note. Let's make it long enough that the markdown output
> will have to line-wrap, to make sure the > mark starts each line
> properly.
2012-12-19 19:31:15 -07:00
Matthew Flatt
130c989888 scribble: encode URLs in 'unreserved mode 2012-12-17 07:09:27 -07:00
Matthew Flatt
6eef00a312 raco setup: fix problem with doc index database
When a tag is serializable but not `write'--`read' invariant,
then it needs to be serialized and deserialized.

Also, clarify and check in `tag?' that a tag should be
serializable.
2012-12-13 15:45:48 -07:00
Danny Yoo
db280d0941 Add scribble/doclang2 with keyword support for customization, and documentation. 2012-12-13 12:50:27 -07:00
Greg Hendershott
00a5bf63b1 Render italic and bold in Markdown.
Scribble => Markdown
  @bold{text}    **text**
@italic{text}     _text_
2012-12-12 20:58:44 -07:00
Greg Hendershott
dbffc840a9 Render @hyperlink in Markdown.
Render Scribble like

    @hyperlink["url" "content"]

as Markdown like

    [content](url)

Note that this only works for `@hyperlink`. The motivation is to
preserve content the author has explicitly written. (Previously,
`markdown-render.rkt` was discarding this; `text-render.rkt` still
does so.)

This does _not_ attempt to handle everything that `html-render.rkt`
would automatically generate and render as `<a>`. It simply can't --
things like hotlinked Racket keywords in code blocks simply won't work
in Markdown.
2012-12-11 12:40:54 -07:00
Matthew Flatt
490a474e0e fix comments
I had it all backwards: DrRacket went from "increment" to Greek
capital delta (which makes a lot more sense).
2012-12-10 10:27:44 -07:00