1

Can the WinEdt QuickGuide.tex be modified to work with XeLaTeX?

Joe
  • 9,080
  • Ask the inventors of WinEdt and document writers if you got the permission to change it ;-) Why should it be modified at all? What's wrong with pdflatex compilation? Please elaborate on your question. –  Jun 18 '15 at 22:49
  • @ChristianHupfer I wanted to use that template in a new document for a solutions manual but I wanted to use matlab-prettiefer using the Consolas font also. – Joe Jun 18 '15 at 22:57
  • There is a clear statement: \author{\textsc{Aleksander Simonič}\\ \small{\copyright~1993--2015}} in the QuickGuide.tex` . Ask Aleksander for permission to use the 'template' –  Jun 18 '15 at 23:02
  • Note that, in contrast, xrcs.sty explicitly says that no rights are reserved and that it is fine to use and modify it. – cfr Jun 18 '15 at 23:32

1 Answers1

2

I've just tested. There are only two lines to modify, in the %non-pdf branch:

  • line 272, among the options of hyperref, replace hypertex with xetex;
  • line 281 comment (or delete) the kerning option for microtype:

enter image description here

Furthermore, you must adapt the font settings: loading inputenc is pointless, since XeLaTeX supposes the source-code is UTF8encoded, and loading fontenc is useful only if you want also to use some non-.otf or non-.ttf fonts, that require the traditional LaTeX handling (.fd, .tfm and .vf files, &c.):

enter image description here

Finally you must load fontspec to use Opentype or Truetype fonts:

enter image description here

Bernard
  • 271,350
  • Note that it is not clear that this is legal given the discussion in the comments. Doesn't it also use inputenc, fix-cm, fontenc etc.? (I deleted the copy I downloaded in light of the comments so may be misremembering.) – cfr Jun 19 '15 at 00:56
  • Perhaps. It was just for testing. Now, if it finally comes out to be legal, the O.P. will know it's easy. – Bernard Jun 19 '15 at 01:00
  • One must certainly remove inputenc. One should add fontspec. One should adapt the font setup. – Ulrike Fischer Jun 19 '15 at 07:01
  • @Ulrike Fisher: You're right. I only showed the minimal changes in order to compile with XeLaTeX. I've added these details. – Bernard Jun 19 '15 at 10:47
  • Alex's reply was that it is in "public domain". Also @Bernard, after doing your changes, it compiles with xelatex now, but I see red boxes around the hyperlinks now in the generated pdf file. Is this just a PDF issue or something related to the modifed code? – Joe Jun 19 '15 at 21:20
  • That is because Alex probably didn't fully test the nonpdfbranch in the code. Just add these lines between lines 273 and 274 (just after ,breaklinks%): ,colorlinks% ,linkcolor={Navy}% – Bernard Jun 19 '15 at 22:20