Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Thursday, September 10, 2009

Sumatra: Quick PDF viewer for Windows


If you use pdfLaTeX under Windows, you are maybe tired of waiting Acrobat reader to open, each time you compile your document and want to check the preview. I like Acrobat for its professional features but I rarely need them. For all other occasions where I just want to quickly check a PDF file, Acrobat is just a pain to launch.
I have tested FoxReader in the past but I was not fullt happy with it. I think that I have now found the perfect quick PDF reader, thanks to a post in the Lyx's users-forum: Sumatra PDF Reader. It has even a full screen mode that works quite well (even Acrobat's better fills the screen). It gets along quite well with any LaTeX editor (Lyx, TexMaker, Scientific Word, etc.).
It is also quite easy to drive using keyboard shortcuts, as you can learn this in the "manual".

Friday, June 19, 2009

A very nice and free text editor: Notepad++



Notepad++ is a free text editor with a lot of very useful functionality and it has replaced PSPAD for me.

You can edit source code in many languages, benefitting from syntax highlighting and auto-insertion of the main commands.

It places itself in the context menu of the explorer, for facilitating the quick opening of any text files from a right click in the explorer. It is difficult to exhaustively indicate all its functions.

It is based on the Scintilla platform; it is both very easy to use and very powerful.

Here are the features of Notepad++, as indicated on the web site:

  • Syntax Highlighting and Syntax Folding
  • WYSIWYG
  • User Defined Syntax Highlighting
  • Auto-completion
  • Multi-Document
  • Multi-View
  • Regular Expression Search/Replace supported
  • Full Drag 'N' Drop supported
  • Dynamic position of Views
  • File Status Auto-detection
  • Zoom in and zoom out
  • Multi-Language environment supported
  • Bookmark
  • Brace and Indent guideline Highlighting
  • Macro recording and playback

     
Link: http://notepad-plus.sourceforge.net/uk/site.htm

Wednesday, February 25, 2009

ChkTex with LyX and Miktex 2.7 under Windows XP

ChkTeX is a LaTeX utility for... checking your Latex syntax. It is maintained by Baruch Even.
LyX can use ChkTex utility. But Miktex does not come with this utility.

I propose here a way to activate this functionality using the chktex binary that is distributed in the TeXLive LaTeX system. This is quite simple indeed.

I assume that you have installed Miktex in the "C:\MiKTeX2.7" folder.

First download the chkTexFiles.zip archive from my web server. It contains the necessary files for the installation of chktex under Miktex.
This archive contains the following files:
  • .chktexrc
  • ChkTeX.exe
  • tl90geturl.dll
  • tl90gnu.dll
  • tl90kpse.dll
The first file (.chktexrc) is the chktex configuration file. You must put it under in the following folder: "C:\MiKTeX2.7\tex\chktex"
The other four files are the executable for chktex and the necessary libraries. You must put them in the folder C:\MiKTeX2.7\miktex\bin.

You must now tell LyX how to find these files.

You activate "Tools/Preferences" menu item in LyX, and in the Output/Latex item in the left menu, you must give the following command for ChkTex:
ChkTeX.exe -l "C:\MiKTeX 2.7\tex\chktex\.chktexrc" -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38
I must admit that I have not dug all the options for ChkTeX, you can probably finetune them using the ChkTeX documentation but these default options work on my installation. If you execute chktex -h in a Dos box, you will get an output that will indicate the role of different options.

Once you save the configuration (do not forget to click on the Save button in the preferences box ;-) ), you can execute "Tools/Check Tex" menu item and it will indicate the potential problems with your LaTeX file. Don't be afraid by the results! :-)

ChkTeX source files are also available from CTAN.

Sunday, February 15, 2009

Lyx and Sweave under Windows XP

These instructions propose a solution for making Sweave work under Windows XP, using Lyx 1.6.1 and R-project 2.8.x.

Adapted from the instructions provided by Paul Johnson and Cheng-shan (Frank) Liu:
(see http://n2.nabble.com/Converter-failure-with-Sweave-td479669.html)

These instructions correct some small problems that were impeding the original instructions from working under the recent version of R that I use. I also take into account the fact that the default installation folders of R and Lyx are under Program Files, a path that contains a space, and can cause problems.

We will suppose that Lyx 1.6.1 is installed in C:\Program Files\LyX16 and R in C:\Program Files\R\R-2.8.1 (their default folders under Windows).
  1. Place noweb.sty and sweave.sty (part of the R installation - see the share\texmf subfolder of R, see the next instruction) in a folder that can be find by your Latex installation (under texmf-local for example).
  2. Copy the content of the C:\Program Files\R\R-2.8.1\share\texmf folder in the previous folder or in another folder under your texmf tree.
  3. Refresh the file catalogue of Latex (execute mktexlsr for TexLive in a Dos command box, for example). You can now check the placement of these files by executing kpsewhich noweb.sty in a Dos command box.
  4. Reconfigure Lyx (go to Edit-> Reconfigure). Check if you have document class "article(noweb)" or "article(Sweave noweb)" (in Document-> Settings->Document class). If not, you will need to reinstall Lyx.
  5. Create a batch script called Rweave.bat and put it in the folder C:\Program Files\Lyx16\bin\. You can create this file using notepad or any other text editor (PSPad is a very nice and free one). The file should contain a one line instruction:
    "C:\Program Files\R\R-2.8.1\bin\Rterm" --no-save --args "%1" < "C:/Program Files/LyX16/bin/MakeSweave.R" > "%1.log"
  6. Create a R file MakeSweave.R with the following lines and put it in C:\Program Files\Lyx16\bin\:


    library(tools)

    args <- commandArgs() filename <- args[length(args)] Sweave(filename) basename <- sub("\\.(Rnw|Rtex|nw)$", "",filename) texi2dvi(paste(basename, ".tex",sep=""), pdf=TRUE)


  7. You must now configure in Lyx the converter for noweb files. Go to Edit->Preferences->File Handlers->Converters. In the "From" pulldown, choose Noweb. In the "To" pulldown, choose PDF (pdflatex).In the box called "Converter" type "Rweave $$i" without the quotation marks. If necessary, click the “Modify” button and save the new command.
  8. You can now test your installation by opening an example file that contains R scraps. For example Paul Johnson's Gamma distribution lyx document.
    You can typeset this document using the pdf icon and the resulting file should open in the acrobat viewer you have configured in Lyx.
    You should be able to read the results of computations and see the plots.
Links:

Monday, September 08, 2008

A very nice file explorer for Windows: Q-dir

This time I am presenting a tool that is not directly related to the production of documents with LaTeX. Q-dir a very nice and free file manager that I have discovered recently. It manages to be very small and, nevertheless, very flexible and efficient. For me, the main two very nice properties are the possibility of
  • opening several folders side by side for intensive files copying;
  • saving typical folder configurations as favourites and open them all in the same time by calling the corresponding favourite;
I have for example a fovourite for all folders corresponding to LateX file editing and another for HTML editing. Switching from one to the other is very quick and easy. You can also create favourites to your important folder for opening them directly, by two clicks of the mouse (one for calling the function and another for chosing the favourite folder.

It has of course many other very nice features. You cab also install it on a USB stick.
I invite you to check the website and download it for learning more about the possibilities it offers.
To repeat the slogan of it's creator: "Once Q-Dir, always Q-Dir ;)!"

Monday, August 18, 2008

Migrating to a new laptop

I have recently received a new laptop and I had to proceed with the migration of my stupidly complex XP Pro installation to the new computer. Such a migration normally takes to me at least one whole week if I proceed through an install from the scratch. Given that I am terribly busy these days, I was desperately looking for a solution to make easier this migration. For years I have effectively been asking myself why someone (why not Microsoft? It's basic data transfer tool is jut ... too basic!) cannot invent a convenient tool for transferring the complete software setup from one computer to another.
This time I was motivated to better search and I have discovered that such a miraculous tool now exists and it is called Move Me by Spearit Software.

You install Move Me on the original computer and on the new computer, you plug both of them on the same network (it also handles transfer through USB or parallel connections) and start it on both of them. Then a wizard allows you to easily setup the system. It compares files on both systems and decides to transfer necessary new files to the new computer.
This part of the process could seem just stupid to you and you could think that any backup of copy software could do it. If you effectively try this by yourself, you will very quickly discover that it is not enough to transfer program files; many libraries and other configuration files will be missing in the Windows folder of the new computer and the programs will not in general work correctly. If you try to transfer also the files in the Windows folder, then you will very quickly see that this is not a good idea since it will mess up the Windows installation of the new computer. Another source of problem will be missing Registry entries and even if you are able to intelligently transfer just the necessary DLL files, your programs will not work or you will have to reconfigure them to your taste from scratch. This just normally takes a huge amount of time too.
This is where Move Me shines: it intelligently transfer system files installed by the programs, without messing with the Windows installation and it transfers the registry settings and imports them in the Registry of the new computer.
When the transfer finishes (that can take quite some time in a complex installation like mine), you boot the new compute and find your original configuration with the usual softwares and your customization. This is just magical and marvellous!

Caveats :

  • Move Me is not free. You pay a fix fee for each transfer (I have paid $47 including VAT). When you pay this amount, you do not buy the software but just the right to migrate from one single particular computer (but you can migrate to as many computers as you want from this computer - so the licence you but sticks to the original laptop). I have thought that spending 50 bucks for economizing one week's job was reasonable and I do not regret it: In one night my new laptop became fully functional!).
  • Move me does not transfer the active services and hardware configurations in order to preserve the system of the destination laptop. This means that you will have to reinstall some software in the new computer, mainly the softs that are intricately articulated with the operating system (eg. Anti-virus, firewall, virtual printers, Adobe Acrobat, Diskkeeper, etc.). It is even better to install first these softs on the new computer before beginning the migration.
  • Move Me does not duplicate user accounts existing in the original computer onto the new laptop, but each user can log in the original computer to migrate his/her personal data. I have found that the migration was really successful if you log under exactly the same administrative account (with the same name, and hence the same Documents and Settings folder name). This makes the migration much more robust and reliable.

I know now that I can migrate to a new laptop without spending 7-10 days for restoring my working environment on it. This is just marvelous and I thank Spearit for its inventiveness.
Note: The same software seems to also be commercialized by Laplink.

Update (August 18, 2008): MoveMe does not seem to handle the migration towards Windows Vista, while the Laplink version (PcMover) pretends to do. I have not yet tested this possibility.

Thursday, April 06, 2006

Editing LaTeX files under Windows: Scientific WorkPlace



This one is not a freeware or open source (it is even quite expensive - especially in France) :-( but I find that SWP is the most powerful, compatible and user-friendly LaTeX editor that we actually have. There are other open source competitors like the very beautiful TeXMacs or Lyx , but he first is not as compatible as SWP and the second is not yet as flexible as SWP, especially concerning the editing of mathematical expressions. Another nice open source but not at all WYSWYG editor is TeXnicCenter.

SWP can save your files in a compatible format that is called "portable latex" and you can easily compile your files using a standard LaTeX motor (I, for example, use Miktex instead of the specific compiler that comes with SWP: TrueTex).

Mackichan provides two versions of this editor: Scientific Word (the editor only) and Scientific Workplace. The workplace version is more expensive because it comes with a algebraic computation system: Mupad. If you have an official version of Maple, you can also use the kernel provided by the latter (I find it more powerful by the way). In fact I do not possess a complete copy of Maple but I have conserved the last kernel that I have had with an old version of SWP (SWP was used to come with Maple) and I configure SWP for this kernel and this sea tup perfectly works. As consequence, I can do computations or plot expressions directly from SWP.