Thursday, June 25, 2009

OriginLab Settings for High Quality Graphs

This is a well overdue post. I know that some readers have been waiting for this. I apologize for the delay. I hope you'll find this talk useful.





Cite as:
Saad, T. "OriginLab Settings for High Quality Graphs." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/06/originlab-settings-for-high-quality.html


Stumble Upon Toolbar

Wednesday, June 24, 2009

Flashget Script Error/Flashget Recommends bar

In Flashget, go to:

View/Recommendation

and uncheck it.

Obviously, the ads displayed by flashget are generating an internet explorer script error. I never liked that recommend bar anyway.


Cite as:
Saad, T. "Flashget Script Error/Flashget Recommends bar." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/06/flashget-script-errorflashget.html


Stumble Upon Toolbar

Thursday, June 4, 2009

hyperref and pdfdraftcopy

There seems to be a problem when these two packages are used together. Try adding the following to your preamble – it worked well on my end

\makeatletter
    \def\@DRAFTdimen{% copied from pdfdraftcopy.sty 
    \setlength\LLY{\paperheight} 
    \addtolength\LLY{-\textheight} 
    \addtolength\LLY{-\headheight} 
    \addtolength\LLY{-\headsep} 
    \addtolength\LLY{-1in} 
    \addtolength\LLY{-3pt} 
    \setlength\LLX{1in} 
    \ifodd\value{page}% was \thepage 
    \addtolength\LLX{\oddsidemargin}\else 
    \addtolength\LLX{\evensidemargin}\fi 
    \setlength\URX{\textwidth} 
    \setlength\URY{\textheight}
}
\makeatother

Voila!


Cite as:
Saad, T. "hyperref and pdfdraftcopy." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/06/hyperref-and-pdfdraftcopy.html


Stumble Upon Toolbar

Wednesday, June 3, 2009

Make Nomenclature in WinEdt

First, you need to download this file

http://www.winedt.org/Macros/LaTeX/MakeNomencl.php

Save it in the “Exec/MiKTeX” folder under your WinEdt path, e.g.

C:\Program Files\Winedt Team\WinEdt\Exec\MiKTeX

in WinEdt, do the following

    1. Right click on the Menu bar
    2. Select “Menu Steup”
    3. Double click on any of the menus where you would like your make nomenclature command to go (Accessories would be a good candidate)
    4. On your upper left, choose Insert->Macro
    5. Name the new command (Make Nomenclature)
    6. Under Macro, type the following: Exe('%b\Exec\MiKTeX\MakeNomencl.edt');

Voila!


Cite as:
Saad, T. "Make Nomenclature in WinEdt." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/06/make-nomenclature-in-winedt.html


Stumble Upon Toolbar

Friday, May 29, 2009

7zip Batch Zip

First, make sure that the 7zip directory is in your path. Usually, it is located at

C:\Program Files\7-Zip

Next, write the following in batch file

Zip all files in a directory

for /f %%A in ('dir /b') do 7z a -tbzip2 "%%A.bz2" "%%A"

Zip files with a specific extension in a directory (download batch file)

for /f %%A in ('dir /b *.txt *.dat') do 7z a -tbzip2 "%%A.bz2" "%%A"

Save and run in the directory where you want to zip the files.

Here, I am compressing using bzip2 (notice the switch: –tbzip2). You can change that to

-tzip for zip

-tgz for gz

-t7z for 7z

some more examples here.


Cite as:
Saad, T. "7zip Batch Zip." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/05/7zip-batch-zip.html


Stumble Upon Toolbar

Restart Windows in Remote Desktop

press:

Alt + F4

Voila!


Cite as:
Saad, T. "Restart Windows in Remote Desktop." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/05/restart-windows-in-remote-desktop.html


Stumble Upon Toolbar

Thursday, May 21, 2009

How to Add a Watermark in Latex

More often than not, I like to place a “DRAFT” watermark on my documents. This can be easily and automatically done by just including a specific package (one for PS and one for PDF).

Here’s how

\usepackage[draftcopy] % for PS and DVI

\usepackage[pdfdraftcopy] % for PDF

Voila!

For the documentation of draftcopy check here.

For the documentation of pdfdraftcopy check here.


Cite as:
Saad, T. "How to Add a Watermark in Latex." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/05/how-to-add-watermark-in-latex.html


Stumble Upon Toolbar

Tuesday, May 19, 2009

Wolfram Alpha

It has been finally released!

http://www.wolframalpha.com/

I’m too sleepy now to experiment with it.

In the meantime, you can check the walking randomly blog.


Cite as:
Saad, T. "Wolfram Alpha." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/05/wolfram-alpha_19.html


Stumble Upon Toolbar

Friday, May 15, 2009

How to Cite a Blog & Automatically Generate Citations for your Blog

The MLA format for citing a blog is:

Last Name, First. "Title of Entry." Weblog Entry. Title of Weblog. Date Posted. Date Accessed (URL).

You can find more information on studenthacks and on the Purdue website.

Now comes the fun part. If you’re familiar with the Wolfram mathworld website, there is a “CITE THIS AS” section at the bottom of every page (example). I wanted to reproduce something similar for my blog. As you may have already noticed, there is a “Cite as” box at the bottom of every post. Of course, I didn’t go over every post to add a cite-as box. I used the google blogger API to automatically add this to every post. Here’s how you can reproduce it for your own blog

  1. Go to the “Edit HTML” section for your template
  2. Enable the “Expand Widget Templates” check box
  3. Scroll down (or search: Ctrl + f) for
    <data:post.body/>
    This may require some tweaking as your template may be different. The idea is to locate the “post body” section – right after the body text of your post.
  4. Copy the following HTML code:
    <!-- BEGIN CITE AS CODE - BY T. SAAD -http://pleasemakeanote.blogspot.com --> 
    <br/>
    <p style='border-width:1px;border-style:solid;border-color:orange; padding:4px'>
    <font color='orange'>
    Cite as:
    <br/>
    LAST NAME, FIRST NAME &quot;<data:post.title/>.
    &quot; Weblog entry from <a href='http://LINK-TO-YOUR-BLOG> <data:blog.title/></a>.
    <a expr:href='data:post.url'><data:post.url/></a>
    </font>
    </p>
    <br/>
    <!-- END CITE AS CODE –>

  5. Save your template

Voila! Don’t forget to put your name and the link to your blog. You can easily modify the above script with little HTML and CSS knowledge.


Cite as:
Saad, T. "How to Cite a Blog & Automatically Generate Citations for your Blog." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2009/05/how-to-cite-blog-automatically-generate.html


Stumble Upon Toolbar

Modifying Mathematica Menus

UPDATE - FRIDAY MAY 15, 2009
The same procedure applies for Mathematica 7.x - just look in the 7.0 directory. For convenience, I posted the Mathematica 7.0.1 modified menu file. Of course, there is no guarantee that this will work on your end, so by all means do backup your copy of the MenuSteup.tr file before using this one. You can download it from here.

UPDATE - MONDAY JUNE 02, 2008
As was kindly pointed out by an anonymous comment, Mathematica version 6.0.2 includes the "Evaluate Notebook" menu item. Also, removing the backup files from the MenuSetup directory is a must. - Thanks

In Mathematica 6.x, a couple of nice features are missing, namely, the "Evaluate Notebook" menu command and the placement of the "Quit Kernel" command. First, the "Evaluate Notebook" is completely missing form the "Evaluation" menu - and I don't see the reason for removing such a useful command from the new version. Regarding the "Quit Kernel", which is probably the most used command during a Mathematica session, is now located under Evaluation/Quit Kernel/Local. Instead of keeping that command one level higher (i.e. Evaluation/Quit Kernel), for some reason it was placed under a sub-menu.

Yesterday, I found out that one can modify the whole Mathematica menu, and in the process, add the "Evaluate Notebook" command and modify the location of the "Quit Kernel" command. Thanks to the Walking Randomly blog for sharing this information - you can find the original post here.

So here's what I have done on my end to make my Mathematica workspace fit to my needs.

  1. Locate the file "MenuSetup.tr" - This is usually found somewhere within the "Wolfram Research" directory. A simple search would be enough to find that file. (try C:\Program Files\Wolfram Research\Mathematica\6.0\SystemFiles\FrontEnd\TextResources\Windows\)
  2. Open "MenuSetup.str" with a text editor. In windows, I use wordpad to do that because it keeps the formatting correct and wraps the text quite nicely.
  3. Scroll down to the end of the file and locate the last brace-then-bracket "}]" then add the following before that
    1. Type a comma then go to a new line
    2. Insert the following
      Delimiter,
      Item["Evaluate &Notebook", "EvaluateNotebook"],
      Item["&Quit Local Kernel", "MenuListQuitEvaluators", MenuAnchor->True]
Voila!

You should be able to see two new menu items on the menu bar. Make sure also to backup your original MenuSetup.tr. If nothing shows up on the Mathematica menu, you might have to move the backup copy from the MenuSetup directory.


Cite as:
Saad, T. "Modifying Mathematica Menus." Weblog entry from Please Make A Note. http://pleasemakeanote.blogspot.com/2008/05/changing-mathematica-menus.html


Stumble Upon Toolbar