1

I am using gfsneohellenic with mathastext package. Most of the things are working fine except when siunitx calls for cubed or squared options. For example, in the MWE appended below there is a strange symbol with capital A and a semicircle above it which is appended to the g/cm^3 unit.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[default]{gfsneohellenic} 
\usepackage[italic]{mathastext}
\usepackage{siunitx}

\begin{document}
Even interplanetary space is not entirely empty. But the density of the 
matter in it is about \SI{5e-24}{\gram\per\cubic\centi\metre}.
The main component of interplanetary matter is atomic hydrogen. At the 
present time, it is considered that cosmic space contains several 
hydrogen atoms per \SI{1}{\gram\per\centi\metre\squared}. 
\end{document}

enter image description here

If I use regular font the symbol disappears. What is happening? How can this be resolved?

Logfile gives this list

*File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
 size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 fontenc.sty
 t1enc.def    2017/04/05 v2.0i Standard LaTeX file
 gfsneohellenic.sty    2001/12/15 v1.0 Package `gfsneohellenic.sty'
 lgrenc.def    2015/12/07 v0.13.1 LGR Greek font encoding definitions
 greek-fontenc.def    2015/08/04 v0.13 Common Greek font encoding 
 definitions
 mathastext.sty    2016/11/06 v1.3r Use the text font in math mode (JFB)
 siunitx.sty    2017/05/19 v2.7g A comprehensive (SI) units package
 expl3.sty    2017/05/13 L3 programming layer (loader) 
 expl3-code.tex    2017/05/13 L3 programming layer 
 l3pdfmode.def    2017/03/18 v L3 Experimental driver: PDF mode
 xparse.sty    2017/05/13 L3 Experimental document command parser
 amstext.sty    2000/06/29 v2.01 AMS text
 amsgen.sty    1999/11/30 v2.0 generic functions
 array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
l3keys2e.sty    2017/05/13 LaTeX2e option processing using LaTeX3 keys
translator.sty    2010/06/12 ver 1.10
keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
translator-language-mappings.tex
lgrcmr.fd    2016/03/04 v1.1 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict    
siunitx-abbreviations.cfg    2017/05/19 v2.7g siunitx: Abbreviated 
units
omlneohellenic.fd
ot1neohellenic.fd
t1cmtt.fd    2014/09/29 v2.5h Standard LaTeX font definitions
***********

File output from xelatex

*File List*
article.cls    2014/09/29 v1.4h Standard LaTeX document class
size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def    2017/04/05 v2.0i Standard LaTeX file
t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
gfsneohellenic.sty    2001/12/15 v1.0 Package `gfsneohellenic.sty'
lgrenc.def    2015/12/07 v0.13.1 LGR Greek font encoding definitions
greek-fontenc.def    2015/08/04 v0.13 Common Greek font encoding 
definitions
mathastext.sty    2016/11/06 v1.3r Use the text font in math mode (JFB)
siunitx.sty    2017/05/19 v2.7g A comprehensive (SI) units package
expl3.sty    2017/05/13 L3 programming layer (loader) 
expl3-code.tex    2017/05/13 L3 programming layer 
l3xdvipdfmx.def    
xparse.sty    2017/05/13 L3 Experimental document command parser
amstext.sty    2000/06/29 v2.01 AMS text
amsgen.sty    1999/11/30 v2.0 generic functions
array.sty    2016/10/06 v2.4d Tabular extension package (FMi)
l3keys2e.sty    2017/05/13 LaTeX2e option processing using LaTeX3 keys
translator.sty    2010/06/12 ver 1.10
keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
translator-language-mappings.tex
lgrcmr.fd    2016/03/04 v1.1 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict    
siunitx-abbreviations.cfg    2017/05/19 v2.7g siunitx: Abbreviated     
units
omlneohellenic.fd
ot1neohellenic.fd
t1lmtt.fd    2009/10/30 v1.6 Font defs for Latin Modern
***********

Update: I upgraded to MacTeX 2018, but the problem still persists. Here is the file list for the 2018 compilation

*File List*
article.cls    2014/09/29 v1.4h Standard LaTeX document class
size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
fontenc.sty
t1enc.def    2017/04/05 v2.0i Standard LaTeX file
t1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
gfsneohellenic.sty    2001/12/15 v1.0 Package `gfsneohellenic.sty'
lgrenc.def    2015/12/07 v0.13.1 LGR Greek font encoding definitions
greek-fontenc.def    2015/08/04 v0.13 Common Greek font encoding 
definitions
mathastext.sty    2016/11/06 v1.3r Use the text font in math mode (JFB)
siunitx.sty    2018-03-20 v2.7m A comprehensive (SI) units package
expl3.sty    2018/03/05 L3 programming layer (loader) 
expl3-code.tex    2018/03/05 L3 programming layer 
l3xdvipdfmx.def    
xparse.sty    2018/02/21 L3 Experimental document command parser
amstext.sty    2000/06/29 v2.01 AMS text
amsgen.sty    1999/11/30 v2.0 generic functions
array.sty    2018/04/07 v2.4g Tabular extension package (FMi)
l3keys2e.sty    2018/02/21 LaTeX2e option processing using LaTeX3 keys
translator.sty    2018/01/04 v1.12 Easy translation of strings in LaTeX
keyval.sty    2014/10/28 v1.15 key=value parser (DPC)
lgrcmr.fd    2017/07/29 v1.2 Greek European Computer Regular
t1neohellenic.fd
translator-basic-dictionary-English.dict    
siunitx-abbreviations.cfg    2017/11/26 v2.7k siunitx: Abbreviated     units
omlneohellenic.fd
ot1neohellenic.fd
t1lmtt.fd    2009/10/30 v1.6 Font defs for Latin Modern
***********

Update: Solved! As suggested by jfbu I copy pasted from MWE here back to texshop and the problem was solved. I had copy pasted the original text from a pdf which had an extra character at the end of these two entries. Somehow texshop did not show these, but pasting it in a plain texteditor showed these two extra characters as blocks.

Damitr
  • 1,889
  • 4
    I do not see this with TeXLive 2018 and pdflatex. Can you add \listfiles do preamble and report the *File List* as found in log file? –  Jun 04 '18 at 06:28
  • I am using xelatex for compiling – Damitr Jun 04 '18 at 06:30
  • 3
    I do not see the problem either with xelatex at my locale. –  Jun 04 '18 at 06:31
  • 2
    mathastext has no Greek related activity (without specific options) but it has an influence on math alphabets. Thus the only advice coming to mind (as I can't reproduce) is to try the defaultalphabets option. –  Jun 04 '18 at 06:38
  • I am using this with Mactex2017. I did not get your point about the file list. – Damitr Jun 04 '18 at 06:39
  • 1
    If you add \listfiles to the preamble, the log file will contain a list of all used packages with version numbers and dates, which can help in debugging. –  Jun 04 '18 at 06:40
  • 1
    I have tried with TeXLive 2017 (which is same as MacTeX 2017) and I do not see the problem either with the MWE you posted. –  Jun 04 '18 at 06:42
  • the log file shows something like this: – Damitr Jun 04 '18 at 06:43
  • 1
    you should add the File List to your question, it is too long for comment. –  Jun 04 '18 at 06:43
  • 2
    The MWE works for me on a fully updated MikTeX 2.9 with all three engines (pdfLaTeX, LuaLaTeX, XeLaTeX). Can you add \listfiles to the very top of your document and post the output of the *File List* at the end of the .log file? – moewe Jun 04 '18 at 07:20
  • please see the updated question – Damitr Jun 04 '18 at 07:34
  • 1
    Mhhh naturally a few of my packages are newer, most notably siunitx and the expl3/l3... packages as well as lgrcmr.fd. It is not impossible that there was a siunitx incompatibility/bug that was fixed. Can you install MacTeX 2018 (you don't need to uninstall MacTeX 2017 and can switch between the two using a handy app - I forgot its name, but it should be pre-installed). – moewe Jun 04 '18 at 07:40
  • your file list seems to indicate your MacTeX2017 never got updated. But I think you can't update it anymore now that MacTeX2018 is in place. I can't reproduce the problem neither with fully updated TeXLive2016, not with fully update TeXLive2015. –  Jun 04 '18 at 08:03
  • I observe with TL2015, 2016, 2017, 2018 that the file list contains loading of l3xdvipdfmx.def, but your file list has l3pdfmode.def 2017/03/18 v L3 Experimental driver: PDF mode. Can you try using the command line to issue xelatex yourfile.tex and report if it changes anything to output. –  Jun 04 '18 at 08:05
  • 4
    oh well, your file list of course comes from using pdflatex. Please be consistent in the info you provide. Anyway I can not reproduce problem with TL2014, 2015, 2016, 2017, 2018. You may have un unlucky TL2017 status with some transient bug in siunitx or something else perhaps. –  Jun 04 '18 at 08:09
  • my bad, the texshop was left in pdflatex mode and hence that output. But I am facing same problem in pdflatex too. I have updated the file list with xelatex. maybe i will try updating to mactex2018 and report back – Damitr Jun 04 '18 at 08:58
  • 1
    My packages are still slightly newer than yours even with MacTeX 2018. You could try and update, see https://tex.stackexchange.com/q/55437/35864. But seeing that jfbu confirmed the MWE worked with all previous TL versions it is quite unlikely that that will help (still, better try it in case it was a short-lived bug). Can you post the complete .log file of a pdfLaTeX run with a fully updated system on a plaintext paste site such as https://pastebin.com/? Maybe that helps to uncover what is going on. – moewe Jun 04 '18 at 11:16
  • 1
    I went to https://github.com/josephwright/siunitx to git clone and checkout v1.7m which is what you have. I still can't reproduce. Can you reproduce the problem when you copy paste the MWE from here? And you never said if the problem requires mathastext. Is there a problem or not if mathastext is not used? –  Jun 04 '18 at 12:12
  • 1
    It worked! I am not sure why it did. I copy-pasted from the MWE here and it worked. I am not sure what exactly was the problem. Why should copy pasting the text of MWE here would produce a different result?The mathastext was required for my document to maintain consistency in numbers and text in mathmode. Sorry if I sent you people on a wild goose chase. – Damitr Jun 04 '18 at 12:33
  • 1
    I also tried with putting in working repertory the LaTeX3 files of 2018/03/05 (from their github repo) so the only remaining difference in the file list is array.sty 2018/04/30 v2.4h which is a bit newer than yours. I still can't reproduce. Ah ok I see you new comment. Your original buffer must have some encoding problem. The extra character in PDF is in T1 encoding the one at slot position 128. I understood mathastext is required in your document, the question was whether it was requierd to display the problem, which you still don't say. –  Jun 04 '18 at 12:35
  • The particular place it was appearing was appearing only when siunitx with powers was used, for regular siunitx this was not an issue. Even with mathastext commented I am still getting the problem in the older MWE in my buffer. So no, it was not a mathastext problem. But since I wasnt sure I just went ahead with the minimum packages I thought were relevant. – Damitr Jun 04 '18 at 12:39
  • 1
    well then it was not a MWE, as the problem still persisted by removing extra stuff. I will remove the mathastext tag and I advice you shorten title. –  Jun 04 '18 at 12:49
  • 5
    I'm voting to close this question as off-topic because the issue was due to unspecified encoding issues – egreg Jun 04 '18 at 12:51

1 Answers1

3

Turns out the OP had some encoding problem in the text editor used, and reproducing the problem from copying pasting the posted MWE was impossible whatever the package versions used.