[racket] Setting LaTeX Prefix, style and extra files from within file in DrR

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Oct 11 08:53:40 EDT 2014

At Fri, 10 Oct 2014 17:03:18 +0100, Stephen De Gabrielle wrote:
> I think I'm going about this the wrong way.
> 
> What I wanted to do was switch from LaTeX (before I had to learn to much),
> to racket (still learning), but bring a nice package I had from latex[1].
> I did try dropping the location of my tma.sty code into your example[2],
> but assuming 'its all just LaTex/Tex' seems to be wrong as the error[0] I
> get tells me that my LaTeX definitions are missing when pdfLaTeX tries to
> make the PDF.

Unfortunately, it will be difficult to customize Scribble's Latex-based
output without understanding Latex. Maybe we can get you just far
enough with this customization...

To answer your original question: Yes, you can use
`make-latex-defaults` that way. Instead of using `part` directly, it's
easiest to use `title`, so that you don't have to fill in all the
fields of `part`.

Another piece of the puzzle is that `\myname`, etc., need to appear in
the Latex output before the title. A Scribble paragraph with the
'pretitle style property will do that.

The enclosed "latex-default-ex.scrbl" illustrates.


Normally, I'd expect `make-text-addition` to work in the way that
Matthias suggested, which would mean this simplification of
"latex-default-ex.scrbl":

 @(define tma-style
    (style
     #f
     (list
      (make-tex-addition #"\\usepackage{cancel}\\usepackage{tma}"))))

But `make-tex-addition` causes "tma.sty" to be pulled in later, and
apparently that conflicts with one of the packages that Scribble uses.
Such is life with Latex, and the simplification doesn't work.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: latex-default-ex.scrbl
Type: application/octet-stream
Size: 788 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20141011/d05e7e4d/attachment.obj>

Posted on the users mailing list.