racket / scribble

Other
197 stars 91 forks source link

Disable txfonts package in scribble/acmart #272

Closed shhyou closed 3 years ago

shhyou commented 4 years ago

Commit c62d008cf include txfonts into the set of default LaTeX packages. However, txfonts changes the main font of the document, conflicting the requirement of scribble/acmart articles.

We skip txfonts by setting packageTxfonts to nop.

Closes #271.

rfindler commented 4 years ago

Looking at the docs for txfonts I don't see a way to load those new symbols but avoid changing the default fonts. Without that, some unicode characters will cause scribble to generate buggy latex (in scribble/acmart).

shhyou commented 4 years ago

Replacing txfonts with newtxmath for those 4 symbols could be another workaround though I don't know if it would introduce other glitches.

shhyou commented 3 years ago

I found that txfonts is superceded by newtx package (from, e.g. here or the official documentation). In newtx, the math symbols are provided by newtxmath and acmart.cls already included it. Therefore this change is good to go.

A separate issue is that scribble should use newtx instead of txfonts, but that is independent of this pull request.

shhyou commented 3 years ago

An example to confirm this:

#lang scribble/acmart

@title{This is a Title}
@author{A1}

@abstract{
  abstraction matters
}

@section{Section 1}

test ⊸ ⟜ ⅋  □
scribble --latex art.scrbl
sed -e 's/\\usepackage{txfonts}/\\relax/' art.tex > art-notxfonts.tex
pdflatex art-notxfonts.tex
rfindler commented 3 years ago

Thanks!

And I think it would be great to follow up on your suggestion of changing scribble too.