Scribble support for acmart

33 views
Skip to first unread message

Faré

unread,
Jan 11, 2017, 11:21:53 PM1/11/17
to Racket-Dev List
Dear Racketeers,

I've started looking into creating a package so that Scribble will
support the new acmart class in its LaTeX backend. I have a few
questions.

0- Who if anyone is maintaining the LaTeX backend to Scribble?

1- How do I insert arbitrary code in the LaTeX output stream, without
an enclosing \begin{environment}...\end{environment} ?

2- How do I output [optional arguments] to LaTeX \commands as opposed
to {compulsory arguments} or \begin...\end bodies?

3- Should I support use of the HTML backend from the same source? If
so, what is the "Right Thing" to bridge the gap between what arguments
the two backends expect (e.g. with respect to @authorinfo vs
\author\orcid\email\affiliation...)?

Looking at the code is painful. The internals look much more complex
and less documented than they could be.

Of course, if someone more proficient than I at those dark arts is
already working on an acmart package, I'll be glad to yield what I
have and/or otherwise assist.

—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
When politics are used to allocate resources, the resources all end up being
allocated to politics. — P.J. O'Rourke

Matthew Flatt

unread,
Jan 12, 2017, 7:29:42 AM1/12/17
to Faré, Racket-Dev List
At Wed, 11 Jan 2017 23:21:22 -0500, Faré wrote:
> 0- Who if anyone is maintaining the LaTeX backend to Scribble?

That's me.

> 1- How do I insert arbitrary code in the LaTeX output stream, without
> an enclosing \begin{environment}...\end{environment} ?

You can use the 'exact-chars style property on an element.

If possible, it's usually better to add a Latex macro that adds
Latex-specific things and calls the macro with regular content. Then
it's easier to make HTML and other backends work, but it's not always
easy or possible to encode what you want that way.

> 2- How do I output [optional arguments] to LaTeX \commands as opposed
> to {compulsory arguments} or \begin...\end bodies?

I don't think there's a simple way to do that, currently. When I need
optional arguments, I make another Latex macro that takes non-optional
arguments and chains to the one that that optional arguments.

> 3- Should I support use of the HTML backend from the same source? If
> so, what is the "Right Thing" to bridge the gap between what arguments
> the two backends expect (e.g. with respect to @authorinfo vs
> \author\orcid\email\affiliation...)?

Generally, it's best to support HTML output, but I don't think there's
a simple and general-purpose answer of how to make it work. It always
takes some combination of Racket and ".tex" and ".css".

Reply all
Reply to author
Forward
0 new messages