Commit Graph

217 Commits

Author SHA1 Message Date
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
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
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 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
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
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
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
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
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
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
93748ccc7b Merge branch 'extended-highlight' into my-changes 2017-05-18 11:48:01 +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
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
Leif Andersen
9da2f4f40f Add a pretitle style property for nested flows. (#94)
* Add a pretitle style property for nested flows.

This allows us to raise nested flows above the title. So that we do
things like raise the abstract above the title:

```
\begin{abstract}
Abstract text
\end{abstract}
\titleCommand{...}
```

This style is required by the acmart style guide.

* Paragraphs and nested flows extracted in the same order

* Fix `scribble/acmart`'s abstract form so that it gets lifted above `maketitle`, where it should be.
2017-03-25 10:08:18 -04:00
Matthew Flatt
5c7c8a3bd0 HTML output: fix relative-path computation for Windows drives
The relative-path computation assumed that a relative path was
always possible, but a relative path can't go from one drive
to another.

Also, the relative-path computation didn't take into account
case-insensitivity, so it failed in a different-drive way
when the drive case was different between two paths.

Closes racket/racket#1625
2017-03-24 20:05:32 -06:00
Leif Andersen
a26a7322a5 Latex macros _can_ actually have multiple optional args.
While done as a tex hack, macros in latex can have multiple optional
arguments. As such, we should support it with command-optional.

Meaning that the type of command-optional-arguments is now (Listof String)
2017-03-22 19:42:21 -04:00
Leif Andersen
558a8a5c64 Improve the scribble/acmart language
The existing scribble/acmart language in this repo felt more like latex than Scribble. This package brings scribble/acmart more inline with the existing `scribble/acmart` package that was already on the package server. In particular, this commit:

* Remove maketitle from scribble/acmart

* Extends the title form to also have the fields in `scribble/base`'s title.

* Support author information. (Like scribble/sigplans authorinfo)

* Removed unneeded functions now redundant due to the author function. Namely, affiliation based ones.

* Factor out common functions to scribble/acmart and scribble/base into private module.

These functions might make sense to be public, but since they were already private in base
I thought it made sense to leave them that way. Additionally, it might make sense to have the
file be something other than private/tag, as private/tag currently requires tag, which is
different than the normal way where its tag that requires private/tag.

* Add short-title to scribble/latex-properties

* Adds an `command-optional` property which is like `command-extras`, but is a single
optional argument placed before the mandatory ones.

* Create email, affiliation, and institution structs so that authors can have multiple of each.

* Add/improve documentation and history (and bump version number).
2017-03-21 01:06:02 -04:00
Ben Greenman
82860694a2 add font size options to scribble/acmart
Just like the 10pt option in `scribble/sigplan`,
 putting @9pt @10pt @11pt or @12pt on the #lang line of a `scribble/acmart`
 document passes to corresponding string to `\documentclass[....]`

And just like TeX, it's ok to give multiple font sizes. All but the last
 are ignored.
2017-03-17 09:39:20 -04:00
Leif Andersen
c88c62cb56 Fix captions and footnotes in scribble/acmart 2017-03-17 08:34:30 -04:00
Ben Greenman
d92b1829d5 defstruct: no newline between name & fields if no fields
If a struct has no fields, don't check if a struct's name + first field's name
are too long to print on one line

Bug report: https://groups.google.com/forum/#!topic/racket-users/6fKGky4tud8
2017-03-15 13:05:56 -04:00
David Van Horn
049bf4b07a Scribble support for new acmart.cls. (#85)
Scribble support for new acmart.cls.
2017-03-10 16:24:27 -07:00
Matthew Flatt
68c4557968 catch up docs on --xelatex
Also, adjust help text for `--doc-binding` to make it
fit in 80 columns, and clean up related documentation text.
2017-03-03 07:47:45 -07:00
Wei Tang
5e49131e44 Use XeLatex instead of XeLatex 2017-03-03 07:26:25 -07:00
Wei Tang
640488bab1 Handle Chinese Hanzi, Hiragana and Katakana in tag 2017-03-03 07:16:20 -07:00
Wei Tang
b07234e8ee Handle nested collect-element inside a traverse-element 2017-03-03 07:06:26 -07:00
Matthew Butterick
37019a1eb6 Add meta to Scribble template for mobile
Forces the narrow (one-column) layout on mobile devices.
2016-12-28 10:41:09 -08:00
Jay McCarthy
d1178fe6f4 Add doc-binding option 2016-11-29 16:03:36 -05:00
Leandro Facchinetti
30671f0636 Fix margin notes overlap
Fixes #66.
2016-11-15 15:35:10 -05:00
Matthew Flatt
28008d8442 handle 'nbsp in content->string 2016-11-15 07:26:58 -07:00
Matthew Butterick
96ff823ed8 updated Source Code Pro fonts 2016-11-05 19:16:26 -05:00
Matthew Butterick
11eea36e32 fix text wrapping of margin notes within code samples (#63)
Code samples use `pre`, which will cascade into the margin note unless stopped.
2016-11-03 13:26:46 -04:00
Stephen Chang
73907e1d3f actually use unsyntax-id in racketmod0 2016-10-12 13:15:16 -04:00
Georges Dupéron
466515d59a Fixes bug #44 (Re-provided identifiers are not tracked across submodules) 2016-10-06 13:16:01 -05:00
Matthew Flatt
30ae71202d fix references lifted to table of contents
Certain lifted reference forms carried the prefix of the original
section, but in general the section needs to be similarly carried for
rendering elements that may contain references.

Also, fix the contract on `elemref` and `elemtag` to use
`taglet?` instead of `tag?`.

Thanks to Dupéron Georges.
2016-10-01 10:51:18 -06:00
Vincent St-Amour
a69f6c6982 Add missing character to the table.
Used by the DrRacket docs, and was broken when making the table extensible.
2016-08-25 09:53:19 -05:00
Vincent St-Amour
cce1eff495 Extend special characters using a function rather than a dict.
Based on feedback from David Van Horn.
2016-08-24 16:14:03 -05:00
Vincent St-Amour
525b72ca4c Make the list of special characters user-extensible . 2016-08-24 16:14:03 -05:00
Matthew Flatt
3e1c63c93a improve rendering of titles with empty numbers 2016-08-13 12:45:50 -06:00
Matthew Flatt
495630e001 avoid bad substring when something goes weird with section numbers 2016-08-13 07:31:58 -06:00
Matthew Flatt
5b37a3ac72 examples: avoid generating an empty nested table for empty output
For something like

 #lang scribble/manual
 @(require scribble/eval)
 @interaction[(define x 2)
              x]

the `interaction` form generated an empty nested table for the zero
results from `define`. When rendering via Latex, that empty table
could create vertical whitespace. Produce zero lines in the enclosing
table, instead.
2016-08-05 09:25:37 -06:00
Matthew Flatt
aca15dcc85 Fix use of namespace-require that can create conflicts
The current expader's `namespace-require` has a bug that prevents
it from reporting a conclict when `(for-label <lib>)` creates
a conflict due to different provided bindings of the same name
at different phases from <lib>. Avoid depending on that bug.
2016-08-01 13:23:24 -06:00