<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 5 Mar 2025 at 11:07, Philip Taylor <<a href="mailto:P.Taylor@hellenic-institute.uk">P.Taylor@hellenic-institute.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>OK, adding "\input luaotfload.sty" appears to allow access to
      some (but not yet all) system fonts (LuaTeX states that it cannot
      find "Avenir LT Std 45 Book")</p>
    <p>
      </p><blockquote type="cite"><font face="monospace">luaotfload | db :
          Reload initiated (formats: otf,ttf,ttc); reason: Font "Avenir
          LT Std 45 Book" not found.</font>
        <p style="margin:0px;text-indent:0px"><font face="monospace">luaotfload | resolve : sequence of 3
            lookups yielded nothing appropriate.</font></p>
        <p style="margin:0px;text-indent:0px"><font face="monospace">! Font \mlfont=Avenir LT Std 45 Book at 6pt
            not loadable: metric data not found</font></p>
        <p style="margin:0px;text-indent:0px"><font face="monospace"> or bad.</font></p>
        <p style="margin:0px;text-indent:0px"><font face="monospace">l.66 \font \mlfont = "Avenir LT Std 45
            Book" at 6 pt</font></p>
      </blockquote>
      — the reason for that remains to be investigated.  However, I now
      have another problem.  I make frequent use of XeTeX's <font face="monospace">\strcmp</font> primitive — is there a LuaTeX
      equivalent ?</div></blockquote><div> </div><div>LaTeX has been providing a strcmp implementation in Lua for decades so for the vast majority of users such issues (the point of the thread started by Peter) simply don't exist. If you choose to use plain tex and ignore decades of development by other people that's fine but you then need to actually do the work of doing those implementations, but to give you a start latex uses</div><div><br></div><div> \begin{macro}[no-user-doc]{\tex_strcmp:D}<br>%   Compare two strings, expanding to |0| if they are equal,<br>%   |-1| if the first one is smaller and |1| if the second one is smaller.<br>%   Here \enquote{smaller} refers to codepoint order which does not correspond to<br>%   the user expected order for most non-ASCII strings.<br>%    \begin{macrocode}<br>local minus_tok = token_new(string.byte'-', 12)<br>local zero_tok = token_new(string.byte'0', 12)<br>local one_tok = token_new(string.byte'1', 12)<br>luacmd('tex_strcmp:D', function()<br>  local first = scan_string()<br>  local second = scan_string()<br>  if first < second then<br>    put_next(minus_tok, one_tok)<br>  else<br>    put_next(first == second and zero_tok or one_tok)<br>  end<br>end, 'global')<br>%    \end{macrocode}<br>% \end{macro}</div><div><br></div><div>You might want to call it \strcmp rather than \tex_strcmp:D but otherwise it should work put it inside \directlua{...}</div><div><br></div><div>David</div><div><br></div><div>I removed tex-live list, it's unrelated to tex-live and I'm sure Karl has other things to do with TL2025 release</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><p></p>
    <p>-- <br>
      <i>Philip Taylor</i><br>
    </p>
  </div>

</blockquote></div></div>