Commit Graph

135 Commits

Author SHA1 Message Date
Suzanne Soy
126f7b7212 Merge tag 'v6.11' into my-changes-rebased 2021-07-06 02:31:28 +01:00
Suzanne Soy
8f15b78615 Merge tag 'v6.10' into my-changes-rebased 2021-07-06 02:28:59 +01: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