TransWikia.com

AUCTeX/RefTeX with import package in emacs, known problem from 2013 but is there a fix now?

TeX - LaTeX Asked by Umut Tabak on October 30, 2020

I realized this issue with import in AUCTeX/RefTeX mode today which was also mentioned in the below thread from some years ago:

AUCTeX/RefTeX, the `import` package and cross reference

RefTeX apparently can not resolve the nice equation/section labels as a list to select from after a C-c-) if I would like to refer to these labels, which is extremely handy.

Since it has been some time now, I was wondering if this issue was solved with RefTeX or not.

2 Answers

I suspect the editor recognition of file names used for subimport is hopeless, because the leading portion of the path is implicit. Some different input syntax for import and includefrom might allow the editor to recognize files.

makeatletter
newcommandkeeppath[2]{% #1=input or include. #2=file path and name
  begingroup
  ifxinput#1relax def7{noexpandimport}else
  ifxinclude#1relax def7{noexpandincludefrom}else
   def7{noexpand#1}fifi % probably should be error
  filename@parse{#2}% get filename@area, filename@base, filename@ext
  edef8{7{filename@area}{filename@base %
      ifxrelaxfilename@extelse .filename@extfi}}%
  expandafterendgroup8}

Then use keeppathinput{foo/bar} instead of import{foo/}{bar} and use keeppathinclude{foo/bar} instead of includefrom{foo/}{bar}.

Maybe I should add this alternate syntax to import.sty. Test it well, and if it is good, I will add it.

Answered by Donald Arseneau on October 30, 2020

I'm afraid the situation hasn't changed since then.

Answered by Arash Esbati on October 30, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP