[texworks] [tex-live] texworks in TL 2010

Bruno Voisin bvoisin at me.com
Sun Nov 14 11:21:01 CET 2010


On 13 nov. 2010, at 13:12, Axel E. Retif wrote:

> On Nov 13, 2010, at 05:11 AM, "Philip Taylor (Webmaster, Ret'd)" <P.Taylor at Rhul.Ac.Uk> wrote: 
>  
>> This doesn't work for me, Axel : I have just tried
>>  
>> > % !TEX TS-program = xelatex
>> > % !TEX encoding = UTF-8
>> [...]
>>  
>> and am told
>>  
>> > This is TeX, Version 3.1415926 (Web2C 2010)
>> > (./SS.tex
>> > ! Undefined control sequence.
>> 
>  
> I'm replying from my Windows box. I pasted your example in TeXworks and immediately he typesetting format changed from pdfLaTeX to XeLaTeX. The logs says
>  
> This is XeTeX, Version 3.1415926-2.2-0.9997.4 (Web2C 2010)
> restricted \write18 enabled.
> entering extended mode
> (./prueba.tex
> LaTeX2e <2009/09/24>
> ...

Strange. According to the source code at <http://code.google.com/p/texworks/source/browse/trunk/src/TeXDocument.cpp#2599>, the engine specification should accept both TeXworks' and TeXShop's syntax (ie without and with TS-), and also be case-insentitive for the engine name:

                /* Search for engine specification */
                QRegExp re("% *!TEX +(?:TS-)?program *= *([^\\x2029]+)\\x2029", Qt::CaseInsensitive);
                pos = re.indexIn(peekStr);
                if (pos > -1) {
                        QString name = re.cap(1).trimmed();
                        int index = engine->findText(name, Qt::MatchFixedString);
                        if (index > -1) {
                                if (index != engine->currentIndex()) {
                                        engine->setCurrentIndex(index);
                                        statusBar()->showMessage(tr("Set engine to \"%1\"").arg(engine->currentText()), kStatusMessageDuration);
                                }
                                else
                                        statusBar()->clearMessage();
                        }
                        else {
                                statusBar()->showMessage(tr("Engine \"%1\" not defined").arg(name), kStatusMessageDuration);
                        }
                }

Bruno Voisin


More information about the texworks mailing list