Some TeX Developments

Coding in the TeX world

Archive for the ‘TeXworks’ Category

Windows TeXworks builds have an icon!

without comments

A quick note to say that Alain Delmoitte has released a new TeXworks binary build for Windows. This brings the binary up to date, and includes a “real” icon for the program (although this is going to change, I think).

Written by Joseph Wright

July 18th, 2009 at 7:14 pm

Posted in TeXworks

TeXworks reaches version 0.1

with 3 comments

The TeXworks program has been my main TeX editor for some time, despite having verion number “0.0.0”. There are recently been some work on getting a proper icon sorted out for the program, to replace the place holder. At the same time, Jonathan Kew has moved the version number on to 0.1. Great stuff: I’d already say it’s very usable. There is a Windows build for the latest version curtsey of Alain Delmotte: I suspect Mac and Unix users will have a little longer to wait if they want something pre-compiled.

Written by Joseph Wright

July 6th, 2009 at 7:19 pm

Posted in TeXworks

Lowering the entry barrier

without comments

There has been a very active thread recently on the TeXworks mailing list concerning how the aim of “lowering the entry barrier to the TeX world” goes beyond the basics of the TeXworks interface. There are, as always, lots of ideas, with several very important points raised.

One big issue is the separation of TeX distributions, TeX engines and TeX editors. How do you explain to a new user that their editor is not their TeX system, and that their TeX system is independent of the engine they are using. This is all complicated, and it is not easy to put it into two or three sentences! All-in-one installers help to some extent, but that can lead to confusion later.

Another issue is which format to choose as the default. Currently, this is pdfTeX (plain TeX using the pdfTeX engine). Is this a good choice for beginners? Probably not the best, but then almost every other choice has pluses and minuses. If you favour pdfTeX as the engine, using system fonts and Unicode input is more awkward. On the other hand, if XeTeX is the default engine, then there are issues with micrography and interacting with other people. Then there is the LaTeX versus ConTeXt choice, and again you can argue things both ways.

TeXworks is designed around PDF output. That is a good thing in the long term, but at the moment a lot of people still want to use the DVI route. Making that available from within TeXworks is hard to do in a cross-platform way (things that work on *nix fail on Windows).

There are other issues. For example, how much help should be built into TeXworks: again, the TeX format makes a difference here. Error-tracking is another awkward one: the differing formats again do different things.

There are a lot of difficult issues, and they are definitely worth thinking about. One day we’ll have LuaTeX finalised (and perhaps even LaTeX3), and some of these things will be sorted. But at the moment, there is lots to do.

Written by Joseph Wright

June 23rd, 2009 at 6:16 pm

Posted in TeXworks

Scripting in TeXworks

with 10 comments

Stefan Löffler has recently posted to the TeXworks mailing list that he’s sorted out a patch to integrate Lua into TeXworks. Many people will be aware that Lua is very much the scripting language of the moment in the TeX world, because of the LuaTeX project. So it makes sense to consider it as a method for scripting TeXworks. The idea has always been that TeXworks will have a simple interface but powerful features available to those who want them. So adding scripting is a vital step forward. With a light-weight scripting system available, power users can code their own features into TeXworks while leaving the basics accessible to everyone.

That doesn’t mean that Lua has to be the (only) language available: Jonathan Kew (TeXworks lead developer) has suggested QtScript (which is JavaScript-like) as a possibility. TeXworks is built using Qt, so there is a definite logic here. As Jonathan himself points out, actually having a patch available certainly means that Lua is likely to be integrated!

Written by Joseph Wright

June 9th, 2009 at 10:08 am

Posted in TeXworks

Tagged with

TeXworks for developers

without comments

The TeXworks program is aim at making using TeX easier for day-to-day TeX users. By stripping the interface down to a minimum, I feel it really succeeds. I’m sure that many experienced TeX developers prefer more “full featured” editors (such as WinEdt on Windows or AUCTeX on Linux). However, I find that I rarely use any of the more complex features of these richer editors, and so I’m using TeXworks for both day-to-day documents and writing LaTeX packages.

There are still a few things I’d like to have in TeXworks that are currently lacking, but I’m hoping that as the program develops it will be possible to do some user extension and add on what I’d like. For example, I’d like to be able to use hard line wrapping (with a fixed number of characters in a line) and to delete lines of text rapidly (“killing” them). What I have been able to do so far is create some customised syntax highlighting and some completion code, similar to DTX submode for WinEdt. At the moment, the syntax highlighting I’ve gone for looks like:

[dtx patterns]

# comments
red		Y	\^\^A.*

# special characters
darkred		N	[$#^_{}&]

# Guards
gold		N	%<(?:[A-Za-z0-9!\|]+|.)>
limegreen	N	%<\*(?:[A-Za-z0-9!\|]+|.)>
crimson		N	%</(?:[A-Za-z0-9!\|]+|.)>

# Macrocode
green		N	^%[\s]{4}\\(?:begin|end)\{macrocode\}

# LaTeX environments
darkgreen	N	\\(?:begin|end)\s*\{[^}]*\}

# LaTeX packages
darkblue	N	\\usepackage\s*(?:\[[^]]*\]\s*)?\{[^}]*\}

# control sequences
blue		N	\\(?:[A-Za-z@:_]+|.)

# Non-code
grey		Y	%.*

which is certainly helping me to improve my understanding of regex writing! There are a few things I can’t seem to get working quite as I’d ideally like, but for the moment I’m happy.

For auto-completion, I’ve had to make some assumptions about the beginnings of lines, to get the % characters correct:

%%!TEX encoding = UTF-8 Unicode
arg:=\Arg{#INS#}
bcode:=    \begin{macrocode}#RET##INS##RET#%    \end{macrocode}#RET#•
benv:=\begin{environment}{#INS#}#RET#%•#RET#%\end{environment}#RET#%•
bmac:=\begin{macro}{#INS#}#RET#%•#RET#%\end{macro}#RET#%•
cc:=\changes{#INS#}{•}{•}#RET#•
cmd:=\cmd{#INS#}
cs:=\cs{#INS#}
denv:=\DescribeEnv{#INS#}
dmac:=\DescribeMacro{#INS#}
dopt:=\DescribeOption{#INS#}
ecode:=    \end{macrocode}#RET##INS#%    \begin{macrocode}#RET#•
eenv:=\end{environment}#RET#
emac:=\end{macro}#RET#
m:=\meta{#INS#}
meta:=\meta{#INS#}
pkg:=\pkg{#INS#}
\Arg{#INS#}
\changes:=\changes{#INS#}{•}{•}#RET#•
\cmd{#INS#}
\cs{#INS#}
\meta{#INS#}
\pkg{#INS#}

I’d be interested to hear how other people find TeXworks for writing TeX code, and of course for any contributions to my configuration ideas.

Written by Joseph Wright

April 12th, 2009 at 10:20 am

Posted in TeXworks

TeXworks updated

with one comment

The TeXworks program has had a few bug fixes recently, for example to get spell-checking and syntax highlighting to work together properly. For Linux users, compiling from the source is the best way to get a current build. For those of use on Windows, Alain Delmoitte is very kindly providing public builds now and then: he has updated his build to build 291. Alain is also working on a manual (in French and English) for TeXworks, available from the same site.

Written by Joseph Wright

April 12th, 2009 at 9:52 am

Posted in TeXworks

TeXworks for package authors

without comments

The TeXworks project is targetted at making life easier for new users of TeX. The clean, Mac-inspired interface certainly makes writing TeX documents very easy, as does the buit-in PDF viewer with SyncTeX ability. As a long time user of a more “traditional” editor (WinEdt), I’ve found that TeXworks is good for all of my editing, to the point that I’m not longer using WinEdt. The parred-down feature set really suits my way of working (I’ve never liked all of the editor icons in a traditional IDE), and even at this pre-release stage the advanced features (such as regex searching) are impressive.

Written by Joseph Wright

December 17th, 2008 at 8:27 pm

Posted in TeXworks