Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix latexmk not using xetex #7167

Closed

Conversation

Honigmelone
Copy link

Fix latexmk working with xetex

Hi, i dont know if my problem is universal but I fixed it and this was my solution. Feel free to edit or anything. I previously used this emacs configuration: https://github.com/basille/.emacs.d/ where latexmk works with xetex. By comparing the configurations I came up with this solution. Why it works with this change is black magic to me.

Problem Description:
When editing an xetex document in auctex LatexMk chooses pdflatex and fails.
How to reproduce:

  1. create xelatex document with the following content:
\documentclass{article}
\usepackage{fontspec}
\begin{document}
This is a unicode Test: Ä
\end{document}
%%% Local Variables:
%%% coding: utf-8
%%% mode: latex
%%% TeX-engine: xetex
%%% TeX-master: t
%%% End:
  1. Press C-c C-c and choose Latexmk as command

Observed behaviour: 👀 💔

ERROR: Fatal fontspec error: "cannot-use-pdftex"

--- TeX said ---
! 
! The fontspec package requires either XeTeX or LuaTeX to function.
! 
Observed behaviour: :eyes: :broken_heart:
ERROR: Fatal fontspec error: "cannot-use-pdftex"

--- TeX said ---
! 
! The fontspec package requires either XeTeX or LuaTeX to function.
! 
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

l.41  }

--- HELP ---
No help available

Expected behavior:
LaTeX: successfully formatted {1} page

@TheBB
Copy link
Collaborator

TheBB commented Sep 22, 2016

I appreciate the help but this can't be the solution. First it loads a package on startup, which we must avoid, second there is already code to load the package when tex loads. Does (featurep 'auctex-latexmk) evaluate to false in a tex file?

@Honigmelone
Copy link
Author

It evaluates to t no matter if i reload latexmk or not.

@github-actions
Copy link

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this PR is still need merging!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Sep 30, 2020
@github-actions github-actions bot closed this Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants