I do conversion of many documents from XML (Unicode) to XeLaTeX.
I stumbled upon x≠5, in one document, for which my Software failed to translate the character to \neq (due to Unicode composite character).

I do parse the Logfile for 'Missing Character' and afterwards look at each case individually.
To find the error in the tex-file fast, I want to output the line number too.
If the character itself is hidden in some makro, I want to get the call line number, not the definition.

Is there any way to achieve this?
Simple grep for ̸ would find line 2 in this example, but I need line 4:

\def\someChar{≠} %def may be in another file, so grep is not sufficient
x \someChar 5

In the real world, I tried to use the line numbers from surrounding Overfull \hbox warnings, but this is error prone.
In the following log I assumed the character to be beetween line 982 and 993, but it actually was in line 886. (one section earlier)

Overfull \hbox (325.02254pt too wide) detected at line 982
\EU2/Cambria.ttf(0)/bx/n/10.54 Sta-ti-sche axiale Trag-zahl für ein-sei-tig un
d zwei-sei-tig wir-kende Lager

Underfull \hbox (badness 10000) has occurred while \output is active
\EU2/Cambria.ttf(0)/bx/n/10.54 14

Missing character: There is no ̸ (U+0338) in font [Cambria]:mode=node;script=la
Overfull \hbox (273.26788pt too wide) detected at line 993

I expect similar errors to happen, so it would be really helpful to find the relevant spots fast (so I can spend my time fixing them).

If this is not possible, are there any other hints I could use to at least narrow the region to search?

  • Why don't you want to get the line with the definition? If you want to correct it this is the place where you should do it. – Ulrike Fischer Jul 12 '18 at 12:35
  • Beside this: The Missing character: message is issued when the page is shipped out, so you can only know the page number. – Ulrike Fischer Jul 12 '18 at 12:49
  • the log shows you that it is on page 14 [14 .... That is as precise as you can easily get from xetex. – David Carlisle Jul 12 '18 at 13:53
  • I would ignore the location information, just collect up the full list of missing characters then do a global replace over the document removing those characters (eg replacing the combining negation usage here by the not equals character U+2260 – David Carlisle Jul 12 '18 at 13:56
  • @UlrikeFischer I want to know where the character is missing. If I change anything, I need to know where to look for improvements. – sbulka Jul 12 '18 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.