{"action":"opened","issue":{"url":"https://api.github.com/repos/brucemiller/LaTeXML/issues/709","labels_url":"https://api.github.com/repos/brucemiller/LaTeXML/issues/709/labels{/name}","comments_url":"https://api.github.com/repos/brucemiller/LaTeXML/issues/709/comments","events_url":"https://api.github.com/repos/brucemiller/LaTeXML/issues/709/events","html_url":"https://github.com/brucemiller/LaTeXML/issues/709","id":128020034,"number":709,"title":"Should LaTeXML pretend to be pdftex, or xelatex?","user":{"login":"dginev","id":348975,"avatar_url":"https://avatars.githubusercontent.com/u/348975?v=3","gravatar_id":"","url":"https://api.github.com/users/dginev","html_url":"https://github.com/dginev","followers_url":"https://api.github.com/users/dginev/followers","following_url":"https://api.github.com/users/dginev/following{/other_user}","gists_url":"https://api.github.com/users/dginev/gists{/gist_id}","starred_url":"https://api.github.com/users/dginev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dginev/subscriptions","organizations_url":"https://api.github.com/users/dginev/orgs","repos_url":"https://api.github.com/users/dginev/repos","events_url":"https://api.github.com/users/dginev/events{/privacy}","received_events_url":"https://api.github.com/users/dginev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/brucemiller/LaTeXML/labels/Authorea","name":"Authorea","color":"fef2c0"},{"url":"https://api.github.com/repos/brucemiller/LaTeXML/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/brucemiller/LaTeXML/labels/packages","name":"packages","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-21T21:09:58Z","updated_at":"2016-01-21T21:09:58Z","closed_at":null,"body":"Here is an interesting preamble (originally from Pandoc's latex writer) for detecting the latex processor. LaTeXML currently throws errors on it, chiefly because of missing packages (ifxetex and ifluatex), but it's an interesting question what the desired result should be:\r\n\r\n```latex\r\n\\documentclass[]{article}\r\n \\usepackage{ifxetex,ifluatex}\r\n \\ifnum 0\\ifxetex 1\\fi\\ifluatex 1\\fi=0 % if pdftex\r\n   \\def\\who{pdftex}\r\n \\else % if luatex or xelatex\r\n   \\ifxetex\r\n     \\def\\who{xelatex}\r\n   \\else\r\n     \\def\\who{luatex}\r\n   \\fi\r\n \\fi\r\n\r\n\\begin{document}\r\n  \\who\r\n\\end{document}\r\n```\r\n\r\nRunning with pdflatex returns \"pdftex\", running with xelatex returns \"xelatex\". Running with latexml returns luatex, and a bunch of erros, which is understandable.\r\n\r\nWho is latexml ?"}}