4464Re: [NH] DOCTYPE and HTMLTidy error
- Mar 21, 2004On 17/3/2004 19:10, Marcelo de Castro Bastos invited the wrath of the
gods by saying:
> On an unrelated note: does anybody else has trouble with Notetab *not*OK, I accidentally found a workaround that seems to be solving the
>showing HTMLTidy's error report... even when you *know* there are errors
>(because you deliberately inserted them to try and force an error report)?
problem. Can't explain WHY it works, only that it does.
Basically, instead of setting up NoteTab to open tidy.exe directly, I
set it up to call a batch file which will, then, call the regular Tidy
program. For some reason, when Tidy is called by this roundabout way,
it behaves in the expected way, while when called directly, it kept
giving me grief. (I did this in order to try to find out what were the
command-line parameters NoteTab was sending Tidy. Turns out there was
just one: the one telling Tidy to use the tidy.cfg configuration file.
But unexpectedly the problem I was having disappeared...) Maybe this
approach could help solving other recalcitrant, odd Tidy behavior problems.
This has an added side-benefit: you can add any other commands to the
batch file in order to do additional stuff before or after running Tidy.
Right now I can't find anything useful to do with this new trick, but
there must be something.
Oh, how to do it? Well, the easiest way is like this:
1. Create a text file called tidy.cmd or tidy.bat (tidy.cmd won't work
with Windows 9x or ME; Windows NT/2000/XP accepts either extension, and
there is some obscure reasons to believe that the .cmd suffix is
somewhat better). The content of this file should be:
@"C:\Program Files\Notetab Light\tidy.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
(Or change it to whatever is the path to your tidy.exe file)
2. Put this file wherever you prefer. It might be on your NoteTab
folder, on the folder you keep Tidy, some folder in your path, or
anywhere else -- Notetab won't mind. I prefer keeping it in a folder in
my path, so I can call Tidy by the command-line from any folder while
still keeping a separate folder for Tidy and without adding another
folder to the path -- but that's just me. You might have different needs.
3. This is very important: REMOVE temporarily your tidy.exe from the
place it usually is kept. Don't delete it, you will need it later. Just
move it to another place.
4. Invoke Ctrl-F7 from Notetab. NT will complain that it can't find
tidy.exe. Browse to the correct folder and EDIT the file name on the
bottom in order to read "tidy.bat" or "tidy.cmd" (whatever you used)
instead of tidy.exe. Click OK. This will invoke the batch file (although
right now it won't work right, because tidy.exe isn't on the expected
place. Ignore the error message).
5- Return tidy.exe to its regular place. Test it by invoking Ctrl-F7
from Notetab again. It should work. If it doesn't, check again all the
paths and filenames.
Marcelo de Castro Bastos
- << Previous post in topic Next post in topic >>