# [texworks] what do the tab-width and auto-indent GUI mean?

Stefan Löffler st.loeffler at gmail.com
Tue Dec 8 16:20:08 CET 2009

Hi,

On 2009-12-06 08:44, kap4lin wrote:
> Now, I am not able to figure out two of the settings under Edit >
> Preferences > Editor:
>
> 1. Tab width (32 pt) -- I don't see any changes when 8 or 16 or 64 pt
> is used? Is this the indent width? Pressing TAB always jumps 6
> characters in the editor, no matter what this value is.
>

Yes, this is supposed to be a tab size. Unfortunately, it currently
isn't working (thanks for noticing and reporting). I have just posted a
patch to fix this, though (see
hopefully commits to svn soon.
BTW: It's supposed to read "px" instead of "pt" (this is also fixed by
my patch). And it's not generally 6 characters, as you can also work
with proportional fonts in the editor. It is indeed the amount it says
it is, e.g. 32 px.

> 2. Auto-indent mode: what do the three non-none options mean?
>

This depends on the content of your
configuration/auto-indent-patterns.txt. The default options are:
"Whitespace only"
Whenever you hit the [Return] key to start a new line from a line that
started with whitespace chars (space, tab), those whitespace chars will
be copied to the beginning of the new line.

Same as "Whitespace only", but if you have one or more "%" (LaTeX
comment chars) at the beginning of the old line they (and successive
whitespaces) will be copied to the new line, too.

"dtx prefixes"
Same as "TeX comments" except that the comment char "%" is only copied
if the line has certain formats. Most notably, if the comment starts
with "\begin{macrocode}", no comment character will be added. This is
intended primarily for LaTeX package & documentation writers, AFAIK.

HTH
Stefan