Note: this article is for Windows platforms only.
After a lot of trial-and-error — not to mention a wee bit of teeth gnashing, hair pulling, and weeping uncontrollably — I have finally managed to get Texmaker USB configured work with MiKTeX Portable. Since there seems to be a relative dearth of information on this particular setup on the Web, I thought I’d detail the setup for anyone else trying to get these two programs to communicate. It’s a bit of work to set up, but the bonus is that it doesn’t require any batch files to run and each module can be updated independently.
First of all, you need to create an empty folder somewhere. I called mine LaTeX Portable. Then, download the following programs:
When you’re done, you should have three subdirectories in your LaTeX Portable folder, one each for MiKTeX Portable, Texmaker USB, and Foxit Reader Portable.
LaTeX Portable
|_____FoxitReaderPortable
|_____miktex-portable
|_____texmakerwin32usb
Then, go to http://pages.cs.wisc.edu/~ghost/ and download the latest versions of Ghostscript and GSView (8.64 and 4.9, respectively, at the time of this writing). Both of these files are self-extracting executable archives. Save them to your computer. Rather than running the .exe files, use a program like 7-zip to extract their contents to your LaTeX Portable directory. Again, you’ll need to create a new directory for each of these archives to extract the files into. When you’re done, your folder structure should look something like this:
LaTeX Portable
|_____FoxitReaderPortable
|_____ghostscript
|_____GSView
|_____miktex-portable
|_____texmakerwin32usb
Inside your ghostscript directory, you’ll see:
ghostscript
|_____gs864w32
|_____gs8.64
|_____filelist.txt
|_____setupgs.exe
|_____uninstgs.exe
Copy the gs8.64 directory into your GSView directory, then delete the ghostscript directory. Your LaTeX Portable folder structure should now look like:
LaTeX Portable
|_____FoxitReaderPortable
|_____GSView
|_____gs8.64
|_____gsview
|_____pstotext
|_____miktex-portable
|_____texmakerwin32usb
The next step is to configure Texmaker to access the MiKTeX Portable and Ghostscript/GSView files. Launch Texmaker, then click on Options -> Configure Texmaker. The Commands screen should pop up by default. We’re going to modify most of these fields so that Texmaker can process your .tex files while still being able to run from a USB stick on any Windows computer.

LaTeX: "../miktex-portable/miktex/bin/latex.exe" --src -interaction=nonstopmode %.tex %0 "%N%T"
dvips: "../miktex-portable/miktex/bin/dvips.exe" -o %.ps %.dvi
Bibtex: "../miktex-portable/miktex/bin/bibtex.exe" %
Makeindex: "../miktex-portable/miktex/bin/makeindex.exe" %.idx
Dvi Viewer: "../miktex-portable/miktex/bin/yap.exe" -1 -s @%.tex %.dvi
PS Viewer: "../GSView/GSviewPortable.exe" %.ps
PdfLaTeX: "../miktex-portable/miktex/bin/pdflatex.exe" -interaction=nonstopmode %.tex
Dvipdfm: "../miktex-portable/miktex/bin/dvipdfm.exe" %.dvi
ps2pdf: "../miktex-portable/miktex/bin/ps2pdf.exe" %.ps
Pdf Viewer: "../FoxitReaderPortable/FoxitReaderPortable.exe" %.pdf
metapost: "../miktex-portable/miktex/bin/mpost.exe" --interaction nonstopmode
ghostscript: "../GSView/gs8.64/bin/gswin32c.exe"
Set your QuickBuild to run PdfLaTeX + View PDF. Once you make these changes, your portable LaTeX setup should be all configured and ready to work on any USB stick.
Inverse Search
To set up Yap to run inverse search, it’s important to run it as an administrator (Right-click -> ‘Run as Administrator’) so that it will be able to permanently save your setting. Go to View -> Options -> Inverse DVI Search. Click ‘New’. Type
Texmaker
in Name and
"%f" -line %l
where it says to specify the program arguments. YAP doesn’t support relative paths, so you’ll have to point YAP at the absolute path to Texmaker. Once you’ve completed all three of these steps, click ‘Ok’ and Texmaker will be displayed in the list. Select Texmaker, click Apply, and Ok. You should now be able to conduct both Forward and Inverse search.
Additional resources:
GSview 4.9 and Ghostscript 8.60 Portable
“Forward/Inverse search” with Texmaker
Bulk Clean-up of ‘Approved’ Spam Comments
By Jim on December 5, 2009
I recently had to clean up the database for a WordPress installation where several thousand spam comments had managed to slip by the filters and get themselves approved. Naturally, going through and marking each individual one as spam would have been a mind-numbing and infuriating process, and there is no ‘Check for Spam’ button in the approved comments queue. Obviously, you can’t allow those spam comments to just sit there, so here’s the solution. Fair warning: it’s a bit geeky.
Log into your phpMyAdmin interface and navigate to the comments table (wp_comments by default). Click on the SQL tab ,paste this snippet of code in, and click ‘Go.’
This will bump all approved comments back to a pending status, which you can then go into and click the ‘Check for Spam’ button. Depending on your server’s settings and the number of spam comments you have to deal with (7000+ in my case), you may end up with a timeout error of some kind, which is ok. Just back up your browser and repeat the check process until all spam comments have been filtered into the appropriate queue. What you should have left are your legitimate comments. (Any leftover spam you should be able to clean up manually without too much trouble.)
From there, depending on how many legitimate comments you have remaining in the pending queue, you can either do a bulk approve using WordPress’s native functions or simply reverse the SQL command you issued above:
Voila! Like magic (and with a bit of brute force), you’ve just gotten rid of a LOT of approved spam comments. It’s not necessarily the most elegant solution, but it beats having to click on every spam comment and preserves all the legitimate comments your readers have made.
Oh, and don’t forget to empty out your spam queue.
Posted in WordPress | Tagged comments, moderation, MySQL, spam | Leave a response