Commit Graph

253 Commits

Author SHA1 Message Date
Reuben Thomas
e6d95a0367 scribble.tex, scribble/book.tex: fix trivial comment typo (#217) 2019-11-05 10:00:17 -05:00
Sam Tobin-Hochstadt
e25a02fd15 Relicense this repository under the Apache v2 and MIT licenses.
* Move licensing information to the top level of the repo.
* Add README.md file with license and contributing info.
2019-11-04 12:48:39 -05:00
Matthew Flatt
f46083a40c LaTeX output: \protect before \colorbox
Avoid problems when `\colorbox` ends up in a section title.
2019-10-31 14:26:21 -06:00
Matthew Flatt
431bb95c7b improve markdown renderer, including support for section links 2019-10-16 05:36:48 -06:00
Dominik Joe Pantůček
97078b60ed scribble/srcdoc: add class*-doc and class-doc provide forms (#213)
* scribble/srcdoc: add `class*-doc` and `class-doc` provide forms.

* Add missing require of racket/class which contains the class? predicate.

* Add @history stanza to class*-doc and class-doc scribblings and bump version number in scribble-lib/info.rkt to 1.30.
2019-10-01 23:01:06 -04:00
Dominik Pantůček
7da79dd62b Fix raised exception on erroneous thing-doc usage. 2019-09-25 13:32:30 -04:00
Matthew Flatt
50862d0132 fix typesetting for curried procedures
The indentation for multi-line typesetting is weird, because it still
uses the table-basd layout that lines up all arguments independent of
nesting. But at least the parentheses are not broken.

Relevant to #211
2019-09-21 17:56:55 -06:00
Matthew Flatt
d9b6f0eab2 upgrade to latest acmart.cls 2019-09-03 18:56:51 -06:00
Ben Greenman
4a88753757 autobib: book-chapter fixes
- move `)` for contract-out
- fix keyword in contract
- add `to-string` uses
2019-05-02 00:05:55 -04:00
mlemmer
dce36bfc18 Add book-chapter-location to autobib (#182) 2019-05-01 23:36:11 -04:00
Ben Greenman
7635f21788
search box: change '"s" for search' behavior (#202)
1. Focus on the search box for either "s" or "S"
   ... accepting only "s" makes sense to me, but the comment said it
   accepted "S" and well why not
2. Look for a "keyup" event instead of key press, so that pressing "s"
   ONLY focuses on the box and does not focus-and-write-the-letter-"s"

"keyup" events apparently don't have a useful `charCode` field so this
PR looks at the `keyCode` field instead
2019-05-01 23:35:18 -04:00
Matthew Flatt
5460642214 make verbatim suppress line breaks in HTML output 2019-02-27 14:53:49 -07:00
Ben Greenman
6ae6e1eb90 htmls: don't overwrite index.html
when rendering multiple html files to a directory `d`, add
`d/index.html` to the set of files-to-be-writted to avoid overwriting
the main index with a part that happens to have the same tag
2019-02-09 00:24:57 -05:00
Matthew Flatt
5f44d7dd55 scribble: document methods of base render% class 2019-02-01 16:41:50 -07:00
Ben Greenman
0196af8d75 update acmart.cls to v.1.55 2019-01-30 17:55:03 -05:00
Robby Findler
aeda087b67 add longrightarrow
please merge to release branch
2019-01-14 10:35:20 -06:00
shuhung
194e4d15cd Sync the doc of author #:email with the contract (#186) 2019-01-02 15:40:27 -05:00
shuhung
31ff97f502 Add email-string to typeset email with exact-chars (#187)
Closes #185.
2019-01-02 14:44:57 -05:00
Robby Findler
cfcb32870f add \partial 2018-11-29 08:50:56 +01:00
Robby Findler
3d6e02b8b3 improve eval:check's error message to include the expected and actual results 2018-11-24 14:44:51 +01:00
Robby Findler
fbeaeef62e add harpoons 2018-10-31 09:58:51 -05:00
Ben Greenman
1a5f2a44bd
add optional #:note to 'bib-entry' (#176)
Add an optional argument to bib-entry to typeset a comment directly
after a citation --- with no punctuation between the end of the citation
and start of the comment.

Example: making an annotated bibliography, with an element that appears just
below each citation
2018-09-12 22:03:51 -04:00
Leif Andersen
d9e0462393 Add an identifier for acmart's nonacm flag. (#181)
* Add an identifier for acmart's nonacm flag.

* Add defidform of nonacm to docs.

* Add the rest of the missing flags

* Forgot one more line.
2018-09-12 22:03:04 -04:00
Ben Greenman
52334a508b acmart: add 'shortauthors' function 2018-09-02 20:16:52 -04:00
Ben Greenman
ddefcc1018 acmart: update acmart.cls to version 1.54 2018-09-02 20:12:07 -04:00
Milo Turner
9051e6d882 pressing "S" on the page body focuses to the search box 2018-06-12 08:47:35 -06:00
David Benoit
5b639ebb82 point send-main-page to racket website when docs not found 2018-06-12 08:46:50 -06:00
Philip McGrath
a2d2f0472f scribble/bnf: Add contracts & correct docs 2018-06-12 08:44:09 -06:00
Matthew Flatt
58b270adba defform: typeset ...+ as meta like ...
Within `defform`, `...+` should be treated like `...` and made to not
refer to a `...+` binding. (The identifier `...+` is bound by
`syntax/parse`, so it's not difficult to end up with a for-label
binding of `...+`.)
2018-06-01 18:00:23 +08:00
Georges Dupéron
48ce9faac6 Fixes #120: margin notes can collide with each other (#174) 2018-05-17 15:55:58 -04:00
Leif Andersen
67bfe3af4a
Parameterize figure captions by language. (#173)
* Acmart font requirements
* Parameterize for different languages.
* Update acmart to v1.53
* Added three new document types to match acmart 1.53
2018-05-11 17:25:24 -04:00
Matthew Flatt
e7cf458de9 support subscript decimals in Latex/PDF output 2018-05-07 19:54:23 -06:00
Ben Greenman
457d3f9a3f fix: *defthing 'names'
Change `defthing` so it always passes a `(listof (or/c #f symbol?))`
 as the fourth argument to `*defthing`.
2018-03-31 14:32:16 -04:00
Ben Greenman
d4d38e1ac4 lncs: add basic .css file
Copy `scribble/sigplan`'s style file to `scribble/lncs` because
 the HTML renderer expects to find an `lncs.css` file.
2018-03-31 00:25:50 -04:00
Ben Greenman
e2ea830361 defthing: use #:id expression instead of 'id'
Change implementation of `defthing` so that if the user gives an
`id-expr` via the `#:id` keyword, then `defthing` never uses the default
`id`.
2018-03-31 00:25:34 -04:00
Ben Greenman
6e00000bb5 acmart: avoid mathabx '\bigtimes'
The 'acmart' class includes a '\bigtimes' command from the 'newtxmath'
package, if available. Scribble includes a '\bigtimes' command from the
'mathabx' package. These cannot co-exist.

If `newtxmath` is available, this PR does not import `mathabx` in acmart
documents.

If `newtxmath` is not available, this PR includes `mathabx` like normal
(same as all previous versions of `scribble/acmart`)
2018-03-31 00:23:45 -04:00
sorawee
7bd320f939 Change llncs's download path, fix racket/racket#1973 (#163)
The path is changed to ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip
which is the official file listed at
http://www.springer.com/us/computer-science/lncs/conference-proceedings-guidelines
2018-03-13 19:58:54 -06:00
Ben Greenman
c226128747 fix secref contract
Change contract for secref's `#:doc` argument to match the documentation
 and the keyword's default value.
2018-02-11 20:31:03 -05:00
Ben Greenman
05037353bd scribble.tex: add phantomsections
Add `\phantomsection`s to the "*starx" macros so the generated sections
 are valid link targets for hyperref.

Note that `\phantomsection` is provided by the `hyperref` package,
 which is currently loaded by the `\packageHyperref` macro at the top
 of `scribble-lib/scribble/scribble.tex`.
2018-02-11 19:48:43 -05:00
Leif Andersen
710f517caf Add include-abstract.
The docs claimed it was there, but we missed it when creating
scribble/acmart. As such, this commit adds it in.
2018-02-01 13:15:07 -05:00
Robby Findler
1d8221a321 use <img> tags instead of <object> tags for svgs 2018-01-04 11:08:42 -07:00
Matthew Flatt
00739632cf tabular: add #:sep-properties
Also, correct the documentation about the interaction of
`#:sep` and property lists, and make the previous column's
properties used consistently for a separator column.
2018-01-04 11:03:36 -07:00
Matthew Flatt
9c5a45985b html-properties: add xexpr-property
For injecting literal HTML (or, using `cdata`, literal anything) into
the rendered HTML of a document. If you must.
2017-12-28 16:22:07 -06:00
Matthew Flatt
5f29095f02 scribble/book-index: more book-like index style for Latex/PDF
Merge index entries that have the same key and use cleveref to
render the page-number sequence.
2017-12-18 11:07:02 -07:00
Matthew Flatt
9f799cd86e scriblib/autbib: fix the "." in "al."
Make the "." in "al." an abbreviation-ending period, instead of a
sentence-ending period.
2017-12-04 15:02:54 -07:00
Matthew Butterick
5ae38495cd
Revert font change in boxed class 2017-12-04 12:35:24 -08:00
Matthew Butterick
7389a4780e updated CSS for documentation 2017-12-02 16:07:34 -08:00
Matthew Butterick
52f24b0203
Embolden Racket Guide and Racket Reference links on TOC
A special CSS selector, so they don’t have to be bold everywhere
2017-11-21 10:40:58 -08:00
Alexis King
10ce45004b scribble/example: Don't inset twice when using alts with #:no-prompt 2017-11-06 14:16:43 -08:00
Matthias Felleisen
0d0fda8321 fixing obvious bug in figure -> ref-proc 2017-10-30 19:05:29 -04:00
Leif Andersen
564f441d99 Add authorsaddresses field to acmart
This was added in a recent version of the acmart style and is
required to set (or remove) the addresses field at the bottom of
the first page in some styles.
2017-10-18 20:38:03 -04:00
Matthew Flatt
7278568040 section links plus scriblib/{autobib,figure}: better match acmart
Add a `link-render-style` syntax property to control the rendering of
section links --- so that HTML output can say "section <number>", and
so that Latex/PDF output can have just the section number hperlinked
(as in acmart).

It seems unfortunate that the link rendering is so hardwired into each
rendering back-end, but maybe this can be made even more configurable
in the future. Meanwhile, Latex macros already provide an additional
layer of rendering control (but not enough, it turns out, to easily
perform the same adjustments as the 'number mode that matches acmart).

For `scriblib/figure` make `figure-ref` and `Figure-ref` similarly
sensitive to the link-rendering style.

For `scriblib/autobib`, change the hyperlinking of references
so that the color can be overridden, and make `scribble/acmart`
override it.
2017-10-11 11:19:44 -06:00
Matthew Flatt
732d631951 Latex/PDF: hyperlink local references
The Latex renderer was not linking local references because Latex
output was intended as a printing-to-paper alternative to HTML.
For writing papers with acmart, however, local PDF hyperlinks
are relevant. So, enable them.
2017-10-09 12:00:10 -06:00
Matthew Flatt
1e81f0005a scribble/decode: add 'no-index to avoid part titles in index
Using 'no-index makes sense for a book, for example.
2017-10-09 08:34:23 -07:00
Matthew Flatt
af75ceeec3 scribble/decode: fix problems with end-of-file section starters
Closes #146
2017-10-09 07:04:45 -07:00
Matthew Flatt
84f5301ac0 scriblib/figure: more configuration of style 2017-09-26 08:13:03 -06:00
Matthew Flatt
ad6deb7366 upgrade acmart.cls 2017-09-26 07:45:10 -06:00
Matthew Flatt
dd92ebd2d9 acmart: fix contract on nested-flow forms, like acks
A nested flow's argument to be decoded a pre-flow instead of a
pre-content.
2017-09-08 16:37:24 -06:00
Matthew Flatt
6f73b1aef6 acmart: fix grantsponsor and grantnum
Generating a block is inconsistent with `acks`.
2017-09-08 16:37:24 -06:00
Matthew Flatt
ca1f9482c0 acmart: disable redefinition of \rmdefault
Changing `\rmdefault` breaks `ccsdesc`, for example.
2017-09-08 16:37:24 -06:00
Jay McCarthy
7f8004be1f Add local vs global distinction 2017-09-05 15:15:31 +01:00
Jay McCarthy
426cf50f11 Make package names links 2017-09-05 10:37:53 +01:00
Robby Findler
d3b0f98e0e correct the specification of the blueboxes.rktd file
closes racket/drracket#118
2017-08-27 18:16:02 -05:00
Matthew Flatt
9f5fe0859d change base handling of convertible values as content
If a value is convertible to 'text, then use that conversion.

Otherwise, convert using `write` instead of always using "???".

Also, correct documentation to include convertible values among
the valid forms of content, and document the new conversion rules
there.
2017-08-21 08:41:09 -06:00
Vincent St-Amour
178935f55c Allow autobib references to be interposed on. 2017-08-15 13:06:57 -05:00
Robby Findler
01b279d5ba added author+date-square-bracket-style 2017-08-14 07:23:29 -05:00
Matthew Flatt
0931c3577a avoid 'up and 'same when detecting link destinations
Simplify complete paths before exploding, so that 'up and 'same will
no show up for comparisons.

Closes #133
2017-08-11 07:55:45 -06:00
Stephen Chang
f707394839 autobib book-location: fix capitalization of ordinal editions 2017-08-02 13:17:38 -04:00
David Van Horn
1b4d15957c Provide ccsdesc, use exact-chars.
The ccsdesc function was defined, but not provided.  Also added use of
exact-chars since its argument contains characters such as "~" which
should not be converted to \sim.
2017-08-02 13:16:59 -04:00
Ben Greenman
8a85572679 scribble/eval: fix contract for scribble-exn->string 2017-08-01 22:29:47 -04:00
Matthew Flatt
cda63b21de adjust section counting when 'grouper and 'unnumbered are mixed
I'm not certain that mixing 'grouper and non-'grouper parts at a given
level makes sense. Still, this adjustment brings Scribble section
counting more in line with Latex, so that section links are less
likely to have the wrong number label.
2017-07-27 07:36:10 -06:00
Leif Andersen
fd7e8c5bc3
acmart.cls v1.42 -> v1.43 2017-07-26 10:37:53 -04:00
Georges Dupéron
45e1d7e4f0 Fixed rendering of non-dotted pairs in defform 2017-07-20 10:47:36 +02:00
Stephen Chang
332444bf2b swap latex rendering of phi and varphi 2017-07-11 13:25:26 -04:00
Ben Greenman
ca0e56af6a acmart.cls v1.42 2017-07-09 00:53:57 -04:00
Ben Greenman
995a847c33 acmart: remove 'tocstyle' package
Prevent 'scribble/acmart' documents from loading the 'tocstyle' package,
 because this package conflicts with 'acmart.cls'.
(Specifically, 'tocstyle' should be loaded before 'hyperref', but 'acmart.cls'
 loads 'hyperref'.)

Without 'tocstyle', Scribble's 'table-of-contents' function produces an OK
 table of contents.

See also:
  https://tex.stackexchange.com/questions/378547/using-tocstyle-with-acm-acmart-style/
2017-07-09 00:53:57 -04:00
David Van Horn
0e5e7040f8 Restore invisible-element-to-collect-for-acmart-extras. 2017-07-07 14:57:03 -05:00
David Van Horn
a4875b8fe5 Use exact-chars for URL arguments in badge commands. 2017-07-07 14:57:03 -05:00
David Van Horn
f19be46ac4 Add PhD thesis support in scriblib/bibtex. 2017-07-07 14:57:03 -05:00
Robby Findler
ee8f881153 add some missing symbols to latex generation 2017-07-02 23:59:53 -05:00
Leif Andersen
5525db3c5e
Update the acmart.cls 2017-06-27 10:49:37 -04:00
Ben Greenman
c4b4e4c929 acmart: a little better for empty documents
1. Change `add-acmart-styles` to add an element WITHOUT the `pretitle` style
   for the collects phase. With this, an empty `#lang scribble/acmart` document
   builds an empty PDF.
2. Add documentation for a "minimal" `scribble/acmart` document.
2017-06-22 20:11:37 -04:00
Matthew Flatt
cf7f7f32b7 change history rendering to start each change on its own line
Closes #114
2017-06-22 15:39:27 -06:00
Matthew Flatt
c3d4ebc737 move scribble/example contracts to scribble/eval
Moving the contracts to the original exports ensures that the bindings
from both modules are the same. In particular, making the bindings
different caused the documentation to have missing links.
2017-06-20 14:11:50 -06:00
Ben Greenman
37ee75d3bf add contracts to scribble/example
Add contracts to `scribble/example` exports, and tests to make sure
 negative blame gets assigned as expected.

Closes #117
2017-06-05 16:36:21 -05:00
Ben Greenman
f069b975fb acmart: simplify @title implementation
Change LaTeX implementation of `@title` to just use `\title` --- don't try to extract a subtitle.

- - -

This fixes a bug, where the `Title` meta-data in the PDF for a document titled
 "Foo" was "oo" (same title with first letter missing). So, e.g., Google chrome
 would show "oo" as the tab title for the document.

- - -

Why not try to fix subtitle extraction?
  1. I don't think we need it in `scribble/acmart`, because there's a separate `@subtitle` command
  2. Not sure how to extract a subtitle without using `\let` inside `\title`, but doing so generates 2 LaTeX warnings:

     ```
       Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
       (hyperref)                removing `\<let>-command' on input line 674.

       Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding):
       (hyperref)                removing `\SSubtitle' on input line 674.
     ```

The "visual" bug was probably due to this warning; after removing the `\let`
 and `\SSubtitle` then only `\SubtitleDrop` and the actual title are left.
I guess `\SSubtitleDrop` removed the first character of the title.
(Why only the first character? I don't know.)

The LaTeX warning from `hyperref` is probably because acmart expects the
 argument to `\title` to be a raw string. Though, the docs don't explicitly
 say this. They only say "It is expected that this command [`\title`] is inserted
 by the author of the manuscript."
2017-05-31 13:52:01 -04:00
Ben Greenman
b289b76536 autobib: add contracts to *-location functions
add contracts to location-formatting functions,
and make sure those functions convert their inputs to strings,
and fix a documentation bug in `techrpt-location`
2017-05-23 23:34:02 -04:00
Leif Andersen
4c8ac8e021
Fix contract docs for departments in scribble/acmart.
(I placed the wrong contract in the docs. The correct one is the one
defined in the module.)
2017-05-23 14:22:39 -04:00
Georges Dupéron
47c94c3afc Last,First format for names in bibtex
Handle comma-separated Last,First and Last,Jr,First format for names in bibtex, as well as "von", "de la", "van de", and other separators that start with lowercase letters
2017-05-19 16:42:48 -04:00
Leif Andersen
a8dec74ffa Add commands for cite-author and cite-year to autobib. (#111)
These commands work like natbib's citeauthor and citeyear commands,
and facilities making possessive citations. For example:

> Thanks to @(cite-author foo)'s (@(cite-year foo)) paper on stuff...

These identifiers are added with `define-cite` as keywords, and thus
can be omitted with no downside for backwards compatibility.

@(define-cite cite citet generate-bib
   #:cite-author cite-author
   #:cite-year cite-year)

Also in this commit:

* Add documentation.

* Add tests for autobib

* Bump version and add history.
2017-05-18 13:07:20 -04:00
Georges Dupéron
93748ccc7b Merge branch 'extended-highlight' into my-changes 2017-05-18 11:48:01 +02:00
Georges Dupéron
d7e2d45f20 Merge branch 'bibtex-comma-separated-names' into my-changes 2017-05-18 11:47:58 +02:00
Georges Dupéron
05f85e8463 Changed BibTeX parser to recognize any sequence of words starting with a lower case letter as the "von"-like part of the author name 2017-05-18 11:45:40 +02:00
Leif Andersen
ba2e1d6ca7 Top-matter text needs to be 'pretitle.
As per the acmart pdf, top matter matterial needs to appear
before the `\maketitle` command. As such, we need to use the
`pretitle` paragraph style.
2017-05-17 13:51:46 -04:00
Georges Dupéron
d34569cebe Changed " +" to "\\s+" in parse-author. Added more test for Last,First format for names in bibtex. 2017-05-17 17:33:07 +02:00
Georges Dupéron
00eabe8305 Extended support for highlighting 2017-05-15 20:59:42 +02:00
Leif Andersen
ae0a0dfba0 Add {} to \ifx in subtitle.
This is apparently needed because otherwise the `#1` argument is fragile.

This can be seen any time a tile with an m-dash `---` in it.
2017-05-02 18:53:35 -04:00
Ben Greenman
57cecc0588 patch for '\Large' in jfp1.cls
Fixes an incompatibility between jfp1.cls and the 'relsize' package.

Justification for the fix:

1. `pdflatex` fails on this document

```
    \documentclass{jfp1}
    \begin{document}
    \maketitle
    hello {\Large world}
    \end{document}
```

2. `pdflatex` succeeds on this document

```
    \documentclass{jfp1}
    \renewcommand\Large{\@setfontsize\@xvpt{18}}
    \begin{document}
    \maketitle
    hello {\Large world}
    \end{document}
```

I do not know why (1) fails.
The new line in (2) is copied from `jfp1.cls`.
2017-05-02 14:55:21 -04:00
Matthew Flatt
18e467ef9e disable _ prefix handling in racketmodname and other places
In places where module names are typeset, such as `racketmodname`,
there's no way to disable the special treatment of `_` as an
identifier prefix as in `racket`. Even using
`make-element-id-transformer` doesn't work, because the module-name
datum is explcitly disconnected from binding withing `racketmodname`.
2017-04-14 06:52:16 -06:00
Leif Andersen
8e22565759 Add optional SHyphen Latex macro to prevent hyphens from appearing in @racket[...] identifiers
* Prevent hyphens from appearing in @racket[...] identifiers when they overflow.

* Add SHyphen command.

A style file can redefine SHyphen to toggle how they want to
hyphen their text

* Add documentation
2017-04-12 17:40:16 -04:00