David Huffer | 1 Sep 16:29

RE: String highlighting

On Monday, August 31, 2009 5:44 PM, Alain Forget wrote:

 > ...So I  want  all  literal  strings,  those
 > encompassed  with  a  pair  of double quotes
 > (for example, "This should be highlighted  a
 > unique  colour").  However,  there  is   one
 > exception.  If a double quote is preceded by
 > a backslash, it should then be treated as  a
 > part  of the literal string, and ignored for
 > the purposes of double quote matching...

So then couldn't this be handled with just this filter item
to identify double quotes not preceeded by an escape:

   Name:R:"
     Definition:[""""]
     Before:0~\
     After:0
     Enabled:1
     Strict Priority:0
     Priority:0
     Color:34128

and then this switch to highlight (unescaped) double-quoted text:

   Name:R:String
     Start:1R:"
     Stop:0R:"
     Start1:
     Start2:
(Continue reading)

Steve MC Han | 2 Sep 01:08
Picon
Favicon

error message pstopdf

Anyone could answer the following?
 
I tried Latex, then dvips, but when I click the pstopdf, it shows error message:
 
See WinEdt's Tex Configuration Wizard for detailed diagnosis of your Tex system.
 
How could I fix this?
 
Thanks in advance

Nicolas Vaughan | 2 Sep 08:11
Picon
Gravatar

Gather - Invalid Pointer Operation

Dear all,

I've been working for several month in a large mathematics books with WinEdt (5.6b) in LaTeX. Until now I've had no problems at all with WinEdt.

However, I began getting systematic and frequent crashes, when trying to built and/or gather and use the proyect tree.
When I try to do that, I get an  Invalid Pointer Operation error.

Besides, when I type the \label{} command (which calls up the corresponidng WinEdt macro), WinEdt crashes.

Any ideas?

Thanks!

Nicolas Vaughan

WinEdt Team | 2 Sep 17:09

Re: Gather - Invalid Pointer Operation

> I've been working for several month in a large mathematics
> books with WinEdt (5.6b) in LaTeX. Until now I've had no
> problems at all with WinEdt.
>
> However, I began getting systematic and frequent crashes, when
> trying to built and/or gather and use the proyect tree. When I
> try to do that, I get an Invalid Pointer Operation error.
>
> Besides, when I type the \label{} command (which calls up the
> corresponidng WinEdt macro), WinEdt crashes.
>
> Any ideas?

The description does not help much in determining the source of
the problem. A few questions:

Are some (or all) of your files in UTF8 format?

If so then it is possible that the crash occurs when WinEdt
scans a UTF8 file that is currently not opened for input
directives. If such a the file has no BOM and no multi-byte
characters -- it is just an ASCII file -- then WinEdt allocates
1 byte less memory than what is needed to perform UTF8 -> Ansi
conversion and this can result in a crash. This has been fixed
and you can correct it by including BOM or add a comment with
at least one multi-byte character.

If this does not explain the situation then you will need to
provide more details and isolate the problem to something
"minimal" that can be reproduced. Otherwise chances for a fix
are slim...

Subsequent crashes can easily be a consequence of the first
crash when building the tree as corrupted pointers might have
been left behind and that, of course, means trouble in the hen
house:-)

best regards,

alex

WinEdt Team | 2 Sep 17:26

Re: error message pstopdf

> Anyone could answer the following?
>
> I tried Latex, then dvips, but when I click the pstopdf, it
> shows error message:
>
> See WinEdt's Tex Configuration Wizard for detailed diagnosis of
> your Tex system.
>
> How could I fix this?

It's easy. You either have to install GS or else change the
executable for ps2pdf to something else (that comes with
MiKTeX). If you start Options -> Execution Modes Dialog and
press on Help you'll find explanations including what can be
treated as an alternative if you don't have GS. And in
Ghostscript page you'll see the status of your GS.

Best regards,

alex

This is from Help:

ps2pdf alternatives:

If you use MiKTeX 2.4 (or later) a version of Ghostscript might
be already included in your MiKTeX and the executable mgs.exe
on your PATH (together with other MiKTeX accessories). If you
prefer to run this ghostscript rather than installing a custom
one you can change the definition of the ps2pdf item to:

  ps2pdf
    Executable: mgs.exe
    Switches:   -I"%$('TeX-Root');\ghostscript\base" -dBATCH -dNOPAUSE -sDEVICE=pdfwrite 
 -r600 -dCompatibilityLevel=1.4
    Parameters: -sOutputFile="%N.pdf" -c save pop -f "%N.ps"
You may even prefer a simplified MiKTeX's interface to its GS
(without any switches):

  ps2pdf
    Executable: ps2pdf.exe
    Switches:
    Parameters: "%N.ps"

The resulting pdf file might differ depending on your version
of MiKTeX, GS and other preferences. You can use the command
prompt to see which of the above executables best meets your
needs...

The default definition is:

ps2pdf
  Executable: gswin32c.exe
  Switches:   -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -r600 -dCompatibilityLevel=1.4
  Parameters: -sOutputFile="%N.pdf" -c save pop -f "%N.ps"

Nicolas Vaughan | 2 Sep 18:41
Picon
Gravatar

Re: Gather - Invalid Pointer Operation

Hi Alex,
Thanks for your reply.

I opened all of my files in Notepad++ and save them as UTF with BOM. Now the problem's been fixed in WinEdt tree.
I wonder what could've happened!!!
(BTW: should I work with UTF with or without BOM files on WinEdt? I use no non-Latin characters, plain old ascii-in-unicode ones, but I need UTF8 as I often work in XeLaTeX.)


There's another bug that's been bothering me. Sometimes I run a command or macro in WinEdt (5.6) and then I have to undo it. Then I save the file, but I loose the last 10 or so lines in the file.
In typesetting this book, this has occurred at least five times. I've had to check my backup to correct the problem. I also added a \endinput command at the bottom of each of my source files, for me to know easily if the last lines have been erased.
One command/macro that has caused this bug is "Format Paragraph" (though it not always occur).
Could this be a unicode-related problem?


Best wishes,

Nicolas Vaughan


On Wed, Sep 2, 2009 at 10:09 AM, WinEdt Team <support <at> winedt.com> wrote:
I've been working for several month in a large mathematics
books with WinEdt (5.6b) in LaTeX. Until now I've had no
problems at all with WinEdt.

However, I began getting systematic and frequent crashes, when
trying to built and/or gather and use the proyect tree. When I
try to do that, I get an Invalid Pointer Operation error.

Besides, when I type the \label{} command (which calls up the
corresponidng WinEdt macro), WinEdt crashes.

Any ideas?

The description does not help much in determining the source of
the problem. A few questions:

Are some (or all) of your files in UTF8 format?

If so then it is possible that the crash occurs when WinEdt
scans a UTF8 file that is currently not opened for input
directives. If such a the file has no BOM and no multi-byte
characters -- it is just an ASCII file -- then WinEdt allocates
1 byte less memory than what is needed to perform UTF8 -> Ansi
conversion and this can result in a crash. This has been fixed
and you can correct it by including BOM or add a comment with
at least one multi-byte character.

If this does not explain the situation then you will need to
provide more details and isolate the problem to something
"minimal" that can be reproduced. Otherwise chances for a fix
are slim...

Subsequent crashes can easily be a consequence of the first
crash when building the tree as corrupted pointers might have
been left behind and that, of course, means trouble in the hen
house:-)

best regards,

alex


Steve MC Han | 2 Sep 18:48
Picon
Favicon

Re: error message pstopdf

Thank you very much Alex. 
 
Does this apply for TexLive also?. When I installed TexLive2007 to my old machine last time, I didn't have to do all this.
 
Best,


--- On Wed, 9/2/09, WinEdt Team <support <at> winedt.com> wrote:

From: WinEdt Team <support <at> winedt.com>
Subject: Re: [WinEdt] error message pstopdf
To: winedt+list <at> wsg.net
Date: Wednesday, September 2, 2009, 8:26 AM

> Anyone could answer the following?
>
> I tried Latex, then dvips, but when I click the pstopdf, it
> shows error message:
>
> See WinEdt's Tex Configuration Wizard for detailed diagnosis of
> your Tex system.
>
> How could I fix this?

It's easy. You either have to install GS or else change the
executable for ps2pdf to something else (that comes with
MiKTeX). If you start Options -> Execution Modes Dialog and
press on Help you'll find explanations including what can be
treated as an alternative if you don't have GS. And in
Ghostscript page you'll see the status of your GS.

Best regards,

alex

This is from Help:

ps2pdf alternatives:

If you use MiKTeX 2.4 (or later) a version of Ghostscript might
be already included in your MiKTeX and the executable mgs.exe
on your PATH (together with other MiKTeX accessories). If you
prefer to run this ghostscript rather than installing a custom
one you can change the definition of the ps2pdf item to:

ps2pdf
   Executable: mgs.exe
   Switches:   -I"%$('TeX-Root');\ghostscript\base" -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -r600 -dCompatibilityLevel=1.4
   Parameters: -sOutputFile="%N.pdf" -c save pop -f "%N.ps"
You may even prefer a simplified MiKTeX's interface to its GS
(without any switches):

ps2pdf
   Executable: ps2pdf.exe
   Switches:
   Parameters: "%N.ps"

The resulting pdf file might differ depending on your version
of MiKTeX, GS and other preferences. You can use the command
prompt to see which of the above executables best meets your
needs...


The default definition is:

ps2pdf
Executable: gswin32c.exe
Switches:   -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -r600 -dCompatibilityLevel=1.4
Parameters: -sOutputFile="%N.pdf" -c save pop -f "%N.ps"


WinEdt Team | 3 Sep 18:53

Re: Gather - Invalid Pointer Operation

> There's another bug that's been bothering me. Sometimes I run a
> command or macro in WinEdt (5.6) and then I have to undo it.
> Then I save the file, but I loose the last 10 or so lines in
> the file. In typesetting this book, this has occurred at least
> five times. I've had to check my backup to correct the problem.
> I also added a \endinput command at the bottom of each of my
> source files, for me to know easily if the last lines have been
> erased. One command/macro that has caused this bug is "Format
> Paragraph" (though it not always occur). Could this be a
> unicode-related problem?

No this is not unicode related. It would really, really help if
you could make a simple reproducible example so that I can see
the error and then fix it. Right now I don't know where to look
and I don't recall it ever happening to me.

Best regards,

alex

WinEdt Team | 3 Sep 18:52

Re: error message pstopdf

> Does this apply for TexLive also?. When I installed TexLive2007
> to my old machine last time, I didn't have to do all this.

There has to be an accessory that performs ps2pdf conversion
and WinEdt has to know how to call it and what parameters to
pass to it. By default WinEdt assumes that GS (gswin32c.exe) is
properly installed and can be found on Windows PATH. If not or
if you want to use any other executable (like Adobe's distiller
or something that comes with your TeX system) you have to enter
this accessory and parameters/ switches in Execution Modes.

It's always been like this although I might consider defaults
to use some other accessory depending on what the latest and
the greatest one (specific to TeX System) is...

Best regards,

alex

Alain Forget | 3 Sep 20:46
Picon
Picon
Favicon

RE: String highlighting

Unfortunately, it doesn't seem to help. One problem I noticed straight away
is it seems you chose priorities that are way too low. I think for string
highlighting, they need to set very high (at 9), because if something is
encased in (non-escaped) double-quotes, then it IS a literal string, and
should be highlighted as such, regardless of the contents of that string. So
for example,

x = 1 + 2  should be highlighted as R-code, so my current settings have
digits highlighted in one colour, and operators (=, +) a different colour,
and variables (x) highlighted a third colour.

"x = 1 + 2" should be all one colour, the colour of a literal string, so
string highlighting should override ANY other highlighting.

However, even if I set the priorities to 9, the Filter you suggested simply
does not appear to have any effect meaningful effect, and neither does the
Switch. If you want to try it out yourself, I could probably export my
settings and send them to you, as well as a code excerpt that demonstrates
the problem. I probably shouldn't send files to the mailing list, so please
let me know if you'd like me to export and send you my highlighting
settings.

I very much appreciate all the help you (or anyone else) can provide.

Alain

-----Original Message-----
From: David Huffer [mailto:David.Huffer <at> csosa.gov] 
Sent: September 1, 2009 10:30
To: winedt+list <at> wsg.net
Subject: RE: [WinEdt] String highlighting

On Monday, August 31, 2009 5:44 PM, Alain Forget wrote:

 > ...So I  want  all  literal  strings,  those  > encompassed  with  a
pair  of double quotes  > (for example, "This should be highlighted  a
 > unique  colour").  However,  there  is   one
 > exception.  If a double quote is preceded by  > a backslash, it should
then be treated as  a  > part  of the literal string, and ignored for  > the
purposes of double quote matching...

So then couldn't this be handled with just this filter item to identify
double quotes not preceeded by an escape:

   Name:R:"
     Definition:[""""]
     Before:0~\
     After:0
     Enabled:1
     Strict Priority:0
     Priority:0
     Color:34128

and then this switch to highlight (unescaped) double-quoted text:

   Name:R:String
     Start:1R:"
     Stop:0R:"
     Start1:
     Start2:
     Stop1:
     Stop2:
     Enabled:1
     Strict Priority:0
     Priority:0
     Color:34704
     Case Sensitive:0
     Scope Flag:1
     Scope:3
     Indented:0
     BOLN:0

Does that help?

--
 David
 
 -----------------------------------------------------
 David Huffer, Ph.D.               Senior Statistician
 CSOSA/Washington, DC           david.huffer <at> csosa.gov
 -----------------------------------------------------


Gmane