lhs2TeX uses T3 fonts #24

Closed
andreasabel opened this Issue Nov 1, 2012 · 9 comments

Projects

None yet

3 participants

@andreasabel

Sheridan, who publishes for ACM, does not like T3 fonts. However, lhs2tex --agda does make use of T3 fonts via:

\RequirePackage[utf8x]{inputenc}

If I remove this, my unicode characters are garbled in the lhs2tex-generated code. Does anoyone know a smart workaround besides replacing all the unicode characters manually by some math symbols in the .tex file?

@asr
asr commented Nov 1, 2012

Hi Andreas,

The following code works for me.

\documentclass{article}
%include agda.fmt

\begin{document}
\begin{code}
module UnicodeTest where
\end{code}

\begin{code}
data ℕ : Set where
  zero :succ : ℕ
\end{code}
\end{document}
$ pdffonts UnicodeTest.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
IBJATH+SFSX1000                      Type 1            yes yes no       4  0
ACGTEE+SFSS1000                      Type 1            yes yes no       5  0
TZYURE+MSBM10                        Type 1            yes yes no       6  0
ZFUGAR+CMR10                         Type 1            yes yes no       7  0
ASZHDD+CMSY10                        Type 1            yes yes no       8  0
VZMLCI+SFRM1000                      Type 1            yes yes no       9  0

But, for using more unicode symbols, I did the following modification asr/lhs2tex@3469e4d

@andreasabel

Thanks. Funnily, this works also for me, but my big file does not. Maybe the problems show in conjunction with other packages. I have to find out.

@kosmikus
Owner

I somehow doubt that this is directly related to lhs2TeX, as I've never had problems with any of my Agda papers. But I'm willing to look into it.

@andreasabel

I have shrank my file down to the following test case:

\documentclass{sigplanconf} % not reproducible with article
\usepackage{textgreek} % not reproducible without textgreek
%include agda.fmt

\begin{document}
\begin{code}
postulate μ : Set
\end{code}
\end{document}

It seems like a bad interaction between sigplanconf, textgreek, and the unicode stuff in agda.fmt.

@andreasabel

I have also shrank the lhs2tex generated .tex file to the following:

\documentclass{sigplanconf} % not reproducible with article
\usepackage{textgreek} % not reproducible without textgreek
\RequirePackage[utf8x]{inputenc}

\providecommand\textmu{\ensuremath{\mu}}

\begin{document}
$\textsf{μ}$
\end{document}

@kosmikus
Owner

This for me leads to

$ pdffonts testcase.pdf
name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
KQLDSU+gsmn0900                      Type 1            yes yes no       4  0
JWOGWQ+NimbusRomNo9L-Regu            Type 1            yes yes no       5  0

With \listfiles, I get


 *File List*
sigplanconf.cls    2011/11/08 v2.5 ACM SIGPLAN Proceedings
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
  natbib.sty    2010/09/13 8.31b (PWD, AO)
textgreek.sty    2011/10/09 v0.7 Greek symbols in text
  lgrenc.def    2008/06/17 v2.3 Greek Encoding
inputenc.sty    2008/03/30 v1.1d Input encoding file
   utf8x.def    2004/10/17 UCS: Input encoding UTF-8
     ucs.sty    2004/10/17 UCS: Unicode input support
uni-global.def    2012/04/20 UCS: Unicode global data
  lgrcmr.fd    2008/06/17 v2.3 Greek Computer Modern
  ot1ptm.fd    2001/06/04 font definitions for OT1/ptm.
 ucsencs.def    2011/01/21 Fixes to fontencodings LGR, T3
   uni-3.def    2012/04/20 UCS: Unicode data U+0300..U+03FF
 lgrcmss.fd    2008/06/17 v2.3 Greek Computer Modern Sans Serif
@andreasabel

I have

File List
sigplanconf.cls 2011/11/08 v2.5 ACM SIGPLAN Proceedings
article.cls 2005/09/16 v1.4f Standard LaTeX document class
size10.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
natbib.sty 2003/06/06 7.1 (PWD)
textgreek.sty 2011/10/09 v0.7 Greek symbols in text
lgrenc.def 2001/01/30 v2.2e Greek Encoding
inputenc.sty 2006/05/05 v1.1b Input encoding file
utf8x.def 2004/10/17 UCS: Input encoding UTF-8
ucs.sty 2004/10/17 UCS: Unicode input support
uni-global.def 2004/10/17 UCS: Unicode global data
lgrcmr.fd 2001/01/30 v2.2e Greek Computer Modern
ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
ucsencs.def 2003/11/29 Fixes to fontencodings LGR, T3
uni-3.def 2004/10/17 UCS: Unicode data U+0300..U+03FF
lgrcmss.fd 2001/01/30 v2.2e Greek Computer Modern Sans Serif

This suggests e.g. that my lgr stuff might be outdated (whatever it is). I am still working on Mac OS X 10.5.8, with the 2007 texlive suite (update attempts have failed so far).

@andreasabel

On our system machines we have

File List
sigplanconf.cls 2011/11/08 v2.5 ACM SIGPLAN Proceedings
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
natbib.sty 2009/07/16 8.31 (PWD, AO)
textgreek.sty 2011/10/09 v0.7 Greek symbols in text
lgrenc.def 2008/06/17 v2.3 Greek Encoding
inputenc.sty 2008/03/30 v1.1d Input encoding file
utf8x.def 2004/10/17 UCS: Input encoding UTF-8
ucs.sty 2004/10/17 UCS: Unicode input support
uni-global.def 2004/10/17 UCS: Unicode global data
lgrcmr.fd 2008/01/04 v1.0 Greek Computer Modern
ot1ptm.fd 2001/06/04 font definitions for OT1/ptm.
ucsencs.def 2003/11/29 Fixes to fontencodings LGR, T3
uni-3.def 2004/10/17 UCS: Unicode data U+0300..U+03FF
lgrcmss.fd 2008/01/04 v1.0 Greek Computer Modern Sans Serif

and there no T3 fonts are used. So my outdated system is to blame here. Sorry for that. At least, I learned a bit about these font issues...

Thanks for the help!

@andreasabel andreasabel closed this Nov 2, 2012
@kosmikus
Owner

FWIW, I'm quite sure this can be fixed without updating the whole system. Perhaps it can even be fixed by inserting a harmless extra command in agda.fmt. However, as I cannot currently reproduce this, it's difficult for me to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment