Sunday, December 6, 2009

 

How to EXTRACT & SAVE PICTURE From an Microsoft Word (MS Word) Document

All the top googled webpages on this topic do it wrong or require special software, so this is important advice. The hard part is to save the undegraded, full-quality, image file that is entangled in the MS-Word document. I finally found that WebCoolTips does aone of its three methods right, so here it is.

MS Word, typically stupid, provides no obvious way to do this. One's first thought for a workaround is to Save As the file as an HTML file with embedded images. MS Word does that, and even saves every single one of the images in both a big and a small size. That's just a devious Microsoft trick. The big-sized image is still much worse than the original-- 4 to 10 times as small, by my two trials. You need to do something different. (The HTML approach, by the way is what you get from the official Microsoft support site---idiots! They'd make more profit if they spent a little more and hired talented staff.)

Here is what to do.

  1. Launch Microsoft Office Picture Manager (It was provided with my version of MS Office, in a subfolder named something like "Accessories")

  2. Open your MS Word Document.

  3. Right click and copy your image.

  4. Go to Picture Manager

  5. Browse to the folder of your choice, and do Edit-paste to save the clipboard content as an image.

  6. Go to that folder to get your image.

Labels: , ,

 

To view the post on a separate page, click: at (the permalink).

Tuesday, July 28, 2009

 

Four Free Computer Applications

Four programs:

  • Unlocker, at http://ccollomb.free.fr/unlocker/#download is a very good freeware program for deleting locked files (ones in use by some program) or stubbornly undeletable ones.

  • Detexify, at detexify.kirelabs.org, is an online program, Java maybe, that lets you use the mouse to write a math or other latex symbol and then tells you what latex code generates it.

  • Super, at http://www.erightsoft.com/, is freeware, eccentrically presented, that you can download to intelligently merge video files and to convert them from one format to another--- for example, from DVD format to the smaller *.mpg that works on a computer.

  • Foxit, at http://www.foxitsoftware.com/pdf/reader/, is freeware with fancier for-pay upgrade, that reads pdf files better than Adobe Acrobat does. It is smaller, and works better with Miktex, and had some other advantage I liked.

Labels: ,

 

To view the post on a separate page, click: at (the permalink).

Monday, March 30, 2009

 

The Amazing Waste from Turning Off Computers Each Night

I saw an article that illustrates why it's good for me to teach students about economic cost as opposed to raw accounting cost:

I leave my laptop running overnight because I know it'll take five minutes or more to get things going in the morning -- not just booting up, but launching the various apps I start the day with, downloading my overnight email, filtering out the spam, and otherwise "getting settled."

But all the power wasted while computers are sitting idle overnight adds up, and one study has finally tried to measure it. The tally: An estimated $2.8 billion wasted on excess energy costs each year in the U.S. alone....

The full report is available for download here (scroll down to "PC Energy Report US 2009")....

If you run a company with 1,000 PCs left on overnight, you can save about $28,000 a year if they are turned off after hours. That's not chump change.

One advantage of the economic way of thinking is that it makes one think of a question here. Why are companies so stupid as to not mandate that their employees turn off computers, if companies could save so much money? The economist naturally wonders if there is something that high-paid corporate executives know that the journalist is missing.

Let's do the full calculation. 1000 PCs * 5 minutes of employee time * 200 days per year * $60/hour or $1/minute = $1 million/year saving from leaving the computer on all night. That compares with $28,000 in energy savings costs.

You can adjust my numbers if you think they're wrong. Suppose its only 1 minute of employee time that it takes them to boot up, 100 days per year that they work, and $6/hour that your company pays them. Then the benefit in labor costs from leaving on the computers is only $100,000 per year, a mere four times the extra cost in electricity.

Labels: , , , , ,

 

To view the post on a separate page, click: at (the permalink).

Sunday, January 11, 2009

 

A New Kind of Laptop Mouse

What we need is a laptop mouse that can be attached to a laptop. This seems easily achievable. What we need is for it to be cordless and to lock into place in the laptop. The first thing needed is for the laptop to have a built-in infrared (is that what they use?) beamer to remove the need for a cord. That's easily done. The second thing needed is to have a shape of mouse that can be locked into a laptop easily. Probably the best shape is long and narrow and thin, like a pen but shorter. It should have a wheel in the middle and buttons on each side.

Labels: , ,

 

To view the post on a separate page, click: at (the permalink).

Saturday, January 10, 2009

 

The Asus Eee PC 901

I've bought an Asus EEE Linux netbook. So far, I'm very displeased with it. What I wanted was a stripped down extremely fast laptop with a real keyboard that would do wireless internet, ftp'ing, text editing, powerpoint, and spreadsheets. QUick startup was a key desire.

Some items:

  1. I've attached an external hard drive, but it doesn't show up on the file manager software. A flashdrive does, though. (?)
  2. There is no clear indication of how to install Windwos XP as well (there are instructions, but they are bad).
  3. The operating system sticks in 2 Asus applications that you can't get rid of in the most prominent position.
  4. There is no simple text editor, just Star Office. (WRONG-- there is one, which comes up automaticaly for *.txt and *.tex files. But how do I find it otherwise?)
  5. There is no indication of how to use the Unix features. (There is a unix terminal, but hidden in the menu of the File Manager application.)
  6. THere is no FTP program.
  7. THe online support site has no manual or topics help list. Its FAQ is a joke-- all about obscure issues instead of what people must be asking.
  8. The documentation has poor spelling, obviously done by someone unqualified in English.
  9. I hate using the TouchScreen, though that is just a personal dislike.
  10. There isn't a hardware button for turning off the sound. (Wrong: I found a function-key one, at least.)
  11. Using the internet requires both connecting to the wireless and then starting Firefox separately. (This seems to have fixed itself.)
  12. Startup is disappointingly slow.
  13. There is a general feel that they designed this as a machine for children or the feeble-minded--lots of icons, etc.
  14. It looks like from the online user's agreement for the help boards that they reserve the right to use your email, etc. for anything they like, including selling it to advertisers. Maybe not, but it looks like it and I don't trust them.
  15. The online help page wants you to start by going through 3 menus to list your product type, model, and variant, none of which do you know without looking up.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Monday, January 5, 2009

 

A Mistake in Blogger Documentation

I updated my template (the HTML code specification for things like font size) for Blogger. To apply the new template to the blog, the blog needs to be republished, I think. Even new posts don't use the new template, though the new template does save and preview successfully. All the documents on Republishing on the web refer to a nonexistent STATUS tab that I think must have existed on BLogger before 2006 but is gone from the new version. So I don't know how to republish.

Later that day: Now the changes do appear. I guess that Blogger republishes every so many hours automatically.

Labels: , ,

 

To view the post on a separate page, click: at (the permalink).

Sunday, January 4, 2009

 

Yahoo Cookies Tracking My Every Move

Uniperson GPN emailed me the info below. I guess I don't mind Yahoo finding out about me. If someone wants to embarass me by linking me to controversial material, they can do it anyway, and I've nothing to hide.

Yahoo is Tracking Group Members

If you belong to ANY Yahoo Groups - be aware that Yahoo is now using "Web Beacons" to track every Yahoo Group user. It's similar to cookies, but allows Yahoo to record every website and every group you visit, even when you're not connected to Yahoo. Look at their updated privacy statement at http://privacy. yahoo.com/ privacy

About half-way down the page, in the section on cookies, you will see a link that says WEB BEACONS. Click on the phrase "Web Beacons." On the page that opens, find a paragraph entitled "Outside the Yahoo Network." To the left of that section find a little "Click Here to Opt Out" link (given below) that will let you "opt-out" of their snooping.

http://info. yahoo.com/ privacy/us/ yahoo/opt_ out/targeting/ details.html

Note that Yahoo's invasion of your privacy - and your ability to opt- out of it is not user-specific. It is MACHINE specific. That means you will have to opt-out on every computer (and browser) you use. Please forward this to your other groups. You might complain, too, but I'm not sure if anyone is listening..

Related article http://msmvps. com/blogs/ harrywaldron/ archive/2005/ 03/09/38006. aspx

Yahoo Web Beacons Igniting Controversy Yahoo's current privacy policy is causing consternation among some users who object to their use of so-called 'web beacons'. Known in most circles as web bugs, these invisible images are embedded in websites and email and used to track your surfing - and even tell whether you've opened.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Friday, December 26, 2008

 

A Spell Checker Story

I forget where I saw this, but it's a good story.

I once worked at a company run by a Canadian guy who would go ballistic every time a document with misspellings or grammatical errors hit his desk. The offending author was subject to excoriating humiliation during international webcasts, conference calls and meetings.

The President's 2nd-in-command was a man (weasel, actually) best described as "a man Will Rogers never met". One afternoon The Weasel went on vacation, but left his unguarded laptop logged-in and unsecured on a conference table. I spent over an hour adding all sorts of common spelling mistakes to his computer's spell-checker dictionary. A cat could have tap danced its way across the keyboard and the spell checker would not have flagged any errors.

I really enjoyed watching The Weasel get berated over the next few months for his error-prone reports. Why he continued to trust the spell checker even after it consistently let him down is beyond me.

Labels: , ,

 

To view the post on a separate page, click: at (the permalink).

Tuesday, December 16, 2008

 

New Blog Address

I am going to try out the Blogger hosting service, since it allows much faster publshing. The new address of this blog will be:

http://rasmusen1.blogspot.com/

Labels:

 

To view the post on a separate page, click: at (the permalink).

 

Single-Click Double Click Stuck Problem

On my Dell computer, running XP, the mouse single-click was stuck acting like a double click and opening files. Redoing the setting in Control Panel didn't help. I checked Geeks to Go and it suggested trying a different mouse, which did work. I was using a Dell mouse.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Thursday, December 11, 2008

 

Web Rudeness


A post at Baylyblog inspired me to commment thusly:

'm glad Baylyblog is doing its bit to try to bring civility to the Web. Anonymity isn't the only reason the Web has so much rudeness. The other reason is that we tolerate rudeness. We don't have to. If someone sends me a web comment that would cause me to punch him, admonish him, or walk away from him if it were said to me in person, why should I tolerate it any more just because it is on a computer? The blogger at least has the ability to delete the comment. It is like painting over grafitti. And as with graffiti, it not only reduces the amount of ugliness in the world; it reduces the temptation for the sinner.

Labels: ,

 

To view the post on a separate page, click: at (the permalink).

Tuesday, December 9, 2008

 

Trackback in Blogger

Blogger does not support Trackbacks. To fix that, click on first Greasemonkey and then Stephen Weber. Andrew Beard pointed me to this, and the Singpolyma site.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Thursday, December 4, 2008

 

The Miktex Tex Processing Freeware Program

This is a post from 2005 that I'll copy here, with the old comments as part of the post.

The free Miktex (http://www.miktex.org/) looks to be an excellent latex and tex Windows processor program. I’ve been using SWP, and putting figures in looks to work better in Miktex. Miktex gets PDF’s right, which my version of SWP does not always do, and it processes straight from myfile.tex to myfile.pdf. On the other hand, it has some problems, noted below, which make it unhandier to use.

(1) I have a suggestion for the standard installation instructions: say more about the Windows command prompt. I haven’t used it for years, though I happened to remember it was in Accessories. Also, the user should know that he can change the default directory in teh command prompt to wherever he keeps his tex input files– say, d:/smith/latex-input, using the Properties (reachable by right clicking the command prompt).

(2) The command prompt requires you to type in all your commands, which is burdensome if they are long, e.g.,

pdflatex D:\_home\_HomeWD\INCOMING\FIGURECOPY/myfilewithalongname.tex

You can’t copy and paste in the usual way with CTRL-C and CTRL-V. What you can do, though is to copy to the clipboard with CTRL-C and then paste by rightclicking on the Command Prompt program and choosing PASTE.

I will put a comment line like this at the start of my tex files:

% pdflatex chap07_MoralHazard.tex

then I can copy all but the % part and paste it into the command prompt, and it will process chap07_MoralHazard.tex and write to chap07_MoralHazard.pdf

(3) Something better would be a graphic interface to replace the command prompt. I don’t know how to write such an interface, but here is what it would be: It would be simple: just a window in which the user could do two things:

1. Browse and choose a tex file to process, e.g., myfilewithalongname.tex, instead of having to type in the full name in the command prompt, and instead of having to have it in the command prompt’s directory.

2. Issue the processing command— most simply “latex myfilewithalongname.tex”, or “pdflatex”, or others that might be useful. There should be two to five choices, and the user would check the box of the command he wants to use.

The command would take the file from (1) and put the output in the same directory as the input.

The interface could be fancier, but that covers what the user needs every single time he uses Miktex, and it would save a lot of tricky typing.

(4) Miktex is fouled up by carriage returns, even ones that are not hard breaks. Thus, before I tex my files using it I need to strip off all the carriage returns, thus making all my equations, nicely separated into separate lines for visibility, into unreadable paragraphs. The solution, from Alan, the commentor below, is to make sure my input file is in UTF-8 Ascii, not ANSI. What I do in Textpad is (a) make sure it is set to UTF-8 as the standard encoding, (b) copy the entire file, and then close the file, (c) open a new file and paste what I copied, (d) save the new file with the old file’s name, on top of it. That converts from the ANSI coding I initially had to the UTF-8.

(5) The command which takes us straight from myfile.tex to the output myfile.pdf produces pdf files which are not crystal clear on the screen. The commands

latex -job-name=chap07_MoralHazard temp.tex dvips -Ppdf chap07_MoralHazard.dvi

do better, but then I can’t use JPG files in my input.

(7) Will I switch from SWP to Miktex? Money is not really a concern for me, but usability is. I’ll try it for a while and see.

13 Responses to “The Miktex Tex Processing Freeware Program”

  1. Alan Says:

    Eric,

    I am not a user of SWP myself, but I do believe there are a number of ways in which SWP deviates from “standard” LaTeX (I’ve had these cause problems when sharing files with SWP users). MiKTeX, along with TeXLive, teTeX, and most other TeX distributions will have the same issues you describe here with respect to SWP. That said, allow me to attempt to address a few of your points:

    (2) and (3): I have rarely invoked LaTeX from the command line, whether using MiKTeX or another LaTeX distribution. Many, if not most, LaTeX users use an editor that handles the direct interaction with the LaTeX executable and friends. SWP is really nothing more than a very fancy LaTeX front-end. While the editors that most folks use are not as fancy, they do handle all of the command line work and make invoking LaTeX transparent to the user. Some popular Windows-friendly text editors than can be configured in this way are WinEdt (shareware), TeXnicCenter (freeware), and Emacs with appropriate plug- ins (open source), though there are a number of others.

    (4): Not sure why you’re experiencing problems with hard carriage returns. My files are chock full of them and MiKTeX handles them without complaint, so I suspect SWP is to blame here. Perhaps it is using an odd end-of-line character? Open one of your SWP files in a plain text editor (Notepad — but not Wordpad — will do) and see if it is read correctly, or if garbage appears at the end of the line. Alternatively, write a dummy LaTeX file with hard carriage returns using Notepad and see how it goes. Finally, I understand there’s a way to export files from SWP in a way that is supposed to make them more compatible with “standard” LaTeX systems — if true, you might try exporting your files in this manner before running them through MiKTeX.

    (5): The problem here is that pdfLaTeX is using Type 3 Postscript fonts instead of the more desirable Type 1 fonts. Since I don’t use pdfLaTeX myself, I can’t tell you for sure how to change it (though installing the cm-super package via the MiKTeX package manager might do the trick). A search of the usenet newsgroup comp.text.tex (via groups.google.com) should get you an answer pretty quickly, though.

    (6): MiKTeX does not recognize \tag because it is not part of standard LaTeX. To use it, you must call \usepackage{amsmath} in your preamble. Apparently, SWP does this for you whether you like it or not. Fortunately, amsmath is distributed with MiKTeX and virtually every other LaTeX distribution, so it should already be installed.

    (7): SWP insulates you from some of the low-level LaTeX drudgery at the cost of making your .tex files a little less portable. Another side-effect of this insulation is that you don’t always know what’s going on “behind the scenes,” as you saw when you tried to use the \tag command without \usepackage{amsmath}.

    Alan

  2. Administrator Says:

    Thanks!

    Adding \usepackage{amsmath} makes the tag command work again for equation special labelling.

    I still have the problem with line returns. It isn’t SWP– I actually write my latex files in Textpad, a text editor, and then used SWP only as a front-end— hence its inferiority to Miktex for me, since I don’t use most of SWP’s special features anyway. Also, the line return problem occurs when there are line returns in equations.

  3. Administrator Says:

    I updated the original post in light of Alan’s comments, so his comments won’t apply well any more.

  4. Stefan Moebius Says:

    On (3): Maybe a tool modelled after OggDrop (http://www.vorbis.com/software.psp?pid=2) would be what you need? You just grab the .tex or .mp or .dvi file and drag it to a floating icon. Dropping it would invoke the correct program based on file type and configuration (e.g., pdflatex or latex).

  5. Administrator Says:

    Yes, Stefan. Oggdrop is just for sound files, it seems. What would be a nice utility is a program that lets you say that any file dropped into an icon gets sent to the command line and processed using a particular command, with the output returned to the directory of the original file. I tries looking in the freeware site http://www.nonags.com/nonags/cl.html but couldn’t find such a thing.

  6. Harald Oehlmann Says:

    I use Textpad too (but pdftex to generate postscript directly). You can invoke the pdftex processor from the editor by assigning for example Cntrl-1 to invoke latex. I use: Menue: Config->Settings:Extras -> Add Program and edit properties: Parameter: $File

  7. Stefan Grosse Says:

    I also must say that using command prompt is a very unusual way for working with miktex. The perfect editor for me is winedt where you just have to push a button for texifying and pdf-texifying.

    With the carriage return- I noticed that there is a problem by opening a book chapter from your page. Winedt corrected it but I did not try to compile since there was a lot of scientific word stuff inside.

    If you like to use scientific workplace with miktex as LaTeX distro see the notes of Prof. Söderlind: http://home.tiscalinet.ch/paulsoderlind/Software/Software.html

    By the way the game trees do not look that great there is a package of Martin Osborn using pstricks to improve that: http://www.chass.utoronto.ca/~osborne/latex/index.html

  8. Misha Says:

    Actually, I have another suggestion on how to improve MiKTeX. It takes relatively long to load all the definitions and packages every time TeX starts. Wouldn’t it be nice if there were a running instance of TeX, that would remember all those .sty files. In this case, LaTeX would just invoke that process rather than loading the definitions again.

  9. Administrator Says:

    Thanks, everyone, for these very useful comments. Harald Oehlmann’s suggestion seems to work perfectly, though I had to set it up a bit differently than he suggested, perhaps because of my version of Textpad. Here is what I’ve just added to my latex notes in http://rasmusen.org/x/myfiles/latex-rasmusen.txt

    RUNNING MIKTEX FROM THE TEXTPAD TEXT EDITOR

    Harald Oehlmann told me how to do this. Here are precise instructions for running miktex from Textpad 4.7.3. Maybe other text editors have similar features.

    1. Click on Configure, then Preferences, then Tools.

    2. In Tools, click ADD, then choose DOS Command. A box will appear, and write “pdflatex a file” as a title for the tool. Then click APPLY.

    3. Click on the + sign next to Tools. Several tool titles will appear, including your new “pdflatex a file”. Click on it, and a Properties box will appear with various things for you to type in.

    4. Under Parameters, type in “pdflatex $File”. Make sure that under Initial Folder,there is $FileDir. Make sure none of the options boxes are checked, including CAPTURE OUTPUT. Click OK when you’re done.

    5. Load a tex file into Textpad. To process it, click on Tools from the front set of headings (File, Edit, Search, View, Tools, … ) Then click on “pdflatex a file”, which you will have added.

    6. The Command Prompt window will appear, and the tex file in textpad will be processed. The PDF file will be generated as output.

    I hope I didn’t miss any steps.

  10. Bob Says:

    First, hello Eric, from the distant past. We knew each other at MIT.

    Here’s another simple way to compile a .tex file using the MikTeX texify command. (I have to admit I live at the command prompt. Just a matter of preference. I also live in Emacs!) I turn .tex into .pdf using this batch file:

    texify %1.tex dvips -tletter -Ppdf -G0 %1 call ps2pdf13 %1.ps %1.pdf

    You put these commands in a file called “makepdf.bat”, and place the file somewhere in your path. Then if you have a .tex file called “foo.tex”, at the command prompt you type

    makepdf foo

    and you will end up with a pdf version of your document.

  11. bob wolfe Says:

    Eric,

    I used to be an avid fan of SWP. I now use Miktex.

    1) I used to run into problems with carriage returns. They all arose when I shared files with colleagues who used UNIX. They have now all switched away from UNIX (despite them calling me all kinds of nasty names a decade ago for using Windows) so the problem is now fixed.

    2) SWP is not standard. I use a lot of math. \mbox does not work right in SWP. That prevented me from sharing with lots of colleagues who use standard latex. I think there are other things that are not standard in SWP. That makes it a pain to collaborate.

    3) SWP consultants used to have an attitude. Maybe the attitude is now fixed, so I apologize for any aspersions suggested by these comments. When I asked for work arounds on how to solve the problem of working with colleagues who use standard latex, the SWP consultants were extremely defensive in their responses. Not vulgar, but close to it. Almost as bad as the Apple community used to be towards Windows users.

    4) The real raison d’etre for SWP is its integration with Maple. Beautiful. Wonderful. I love the concept. Maple does simple math very well, up to algebra and closed form calculus. It does not do hard problems well at all, such as infinite sums. So, you have to do the math to see if it is right anyway, and then it is about as easy to type it in yourself in latex as to use the simplify verbs available in maple. If you are teaching calc 101 or high school algebra, then SWP is great. If you are teaching quantitative graduate courses, then be careful with SWP.

  12. Maciej Radziejewski Says:

    Your idea of having a simple IDE (point (3) of your original post) is already implemented in Windows! Well, almost.

    You can browse your files using Windows Explorer. Then you can compile (texify) by right-clicking a TeX file and selecting an appropriate command from the context menu. You just have to define a context menu action for .tex files. I usually define “Latex”, but you may prefer to use pdfLatex or to call some batch file for more complex processing.

    Defining actions takes some knwoledge and it may be a good idea to suggest it to Christian Schenk to do it in the installer as an option (if it is not already there). You can define actions using the “file types” tab (in WinXP accessible from the explorer window - Tools - Options) or using regedit (dangerous if you misuse it).

  13. Eric Wilson Says:

    Maybe I’m missing something here. Why not use WinEdt? It’s a great editor, designed particularly for LaTeX. TexShop is ok for macs.

Labels: ,

 

To view the post on a separate page, click: at (the permalink).

Saturday, November 15, 2008

 

Card Party Nameplates

Here is an MS-WORD document that makes card party nameplates that one can cut out and fold over.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Wednesday, August 20, 2008

 

Removing Duplicate Email Addresses in an Address Book

[cross posted from the IU Computers Blog]

After searching for a free easy program to do this for me, a Mozilla Thunderbird user, I decided the best way is to use Excel, like this: First, export the address book to *.csv comma-separated format. From: http://office.microsoft.com/en-us/excel/HA010346261033.aspx Open the file in Excel. Select all of it. Do DATA then FILTER, then ADVANCED FILTER, then check off UNIQUE RECORDS ONLY. That will show only the unique records. Then COPY what is showing to the clipboard. Go back to DATA then FILTER then ADVANCED FILTER then Do NOT check off UNIQUE RECORDS ONLY. Then the whole file will show. Press the DELETE key to delete all the rows. Then do CTRL-V to paste in the uniquely filtered rows. Then SAVE the file, and all the duplicates will be gone. Then import the *.cxv file back into the email address book. There isn't a way I know of to filter on just duplicates in one column and deleting all rows that have duplicates in that column even if they are different in other columns. This and other Mozilla tips are at: http://rasmusen.org/a/mozilla-rasmusen.txt

Labels:

 

To view the post on a separate page, click: at (the permalink).

Monday, August 11, 2008

 

New Latex Commands

I've gotten a couple of new Latex books (the typesetting language) and found a bunch of commands I didn't know about. I've written them up at http://rasmusen.org/a/latex-rasmusen.txt and http://rasmusen.org/a/latex-rasmusen.pdf and http://rasmusen.org/a/latex-rasmusen.tex. An example is doing footnotes inside tables and math:

Use the \footnotemark command to insert the footnote number. To insert the footnote itself, use

\addtocounter{footnote}{-1}\footnotetext{Here is my footnote} \stepcounter{footnote}

outside the table or math but trying to be on the same page.

$$
x = y\footnotemark
$$

\addtocounter{footnote}{-1}\footnotetext{Except when $ x= 8$. } \stepcounter{footnote}

\begin{tabular}{|l|l|r|l|}
\hline
lattice & $d$ & $q$ & last column\footnotemark \\
\hline
square & 2 & 4 & 1.763 \\
\hline
\end{tabular}
\addtocounter{footnote}{-1}\footnotetext{ That's two words in that entry. } \stepcounter{footnote}

Labels:

 

To view the post on a separate page, click: at (the permalink).

Thursday, June 19, 2008

 

DEFINING YOUR OWN COUNTERS AND LABELS in Latex

From my latex notes at http://rasmusen.org/a/latex-rasmusen.txt

This is tricky in Latex, because while you can define new counters, I can't see how you would attach their values to labels. The \label command can only be used in environments that have their own counters (such as \begin{equation}), and you can't fool those environments into adding to a counter without having them print the value on the printed page somewhere. So I used Tex programming, like this. I create a new counter named \fignum and then attach it to a label called \1f, \2f, and so forth, advancing the counter in between. I used \edef rather than \def because \edef inserts the value at the particular time, while \def would repeat the command \number\fignum each time \1f was written.

\newcount\fignum\fignum=1

\edef\1f{\number\fignum}

\advance\fignum by 1

\edef\2f{\number\fignum}

Example: Figure \1f says this. The second part of it, Figure \1fa, says something different. Figures \2f and \2f-a say something still different.

This is plain Tex, not Latex.

You need to write backslash-1-f rather than backslash-f-1. I'm not sure why-- it must be that the number gets interpreted as doing something special to the definition rather than being part of the name.

You have to remember to put your definitions earlier in the document than when you use the term defined. You could put them all the start, actually, but then you might forget to re-order them when you change the order of the diagrams.

I think you can advance the fignum variable by a negative number if you want to.

Labels: ,

 

To view the post on a separate page, click: at (the permalink).

Tuesday, June 10, 2008

 

Bibtex and Miktex: A bibliography program

I'm not sure if this is worth using or not. Here's how it works with Miktex.


1. For your file myfile.tex, construct a bibliography database file
myfile.bib with a bunch of entries like this, which do not not have to
be in alphabetical order:

 @article{hotelling:1929:ej,
  author = {Hotelling, Harold},
  journal = {Economic Journal},
  month = {mar},
  number = {153},
  pages = {41--57},
  publisher = {Royal Economic Society},
  title = {Stability in Competition},
  volume = {39},
  year = {1929}
}

You can do this from Google Scholar by going to Scholar Preferences and
checking off towards the bottom that you want a Bibtex-format link.
After you set your prferences,  Import into BibTeX will be a link  fror
each item a   Google Scholar search turns up.

2. Pick a style file such as econometrica.bst.  Put that file and the
myfile.bib file into the same directory as myfile.tex.

3. Wherever you want the references in myfile.tex, insert the commands

\bibliographystyle{econometrica} %needs  econometrica.bst file in folder
 \bibliography{myfile} %needs myfile.bib file in folder

 \nocite{*}

 The nocite command makes sure that all the entries in the myfile.bib
file get put into the references. Otherwise, only the ones cited using
bibtex commands get put in. The bibtex citing commands are just extra
commands to remember and make reading latex input files harder, so I
don't think I'll use them.


4. Change the name of myfile.tex to plain myfile.

5. Run myfile  through pdflatex.  That will create myfile.aux.

6. Run myfile through bibtex. That will use myfile.aux and
econometrica.bst and myfile.bib to create myfile.blg, a log file, and
also myfile.bbl, the bibliography formatted nicely.

7. Run myfile through pdflatex again.
My files of latex tips, including this one, is at http://rasmusen.org/a/latex-rasmusen.txt.

Labels:

 

To view the post on a separate page, click: at (the permalink).

Monday, May 12, 2008

 

Shrinkwrap Contracts

Mark Lemley has a 2006 Minnesota Law Review paper, http://papers.ssrn.com/sol3/papers.cfm?abstract_id=917926 on shrinkwrap contracts that gives updates on what courts have been doing since Easterbrook's opinion.

Labels: ,

 

To view the post on a separate page, click: at (the permalink).

Monday, April 21, 2008

 

Word Counts in PDF

Translator's Abacus is a free program, downloadable from http://www.globalrendering.com/download.html, that does word counts for pdf and html documents. It is 640K, one file, easy to use, andwell designed.

Labels:

 

To view the post on a separate page, click: at (the permalink).