TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:

Saturday, November 1, 2014

My complaints against LaTeX

There are a lot of real advantages to the LaTeX / TeX document preparation software suites developed for real publishing applications.  Those that know these tools can recite all of them to you at length. 

I am not going to describe them to you because they are well documented by people cheering for them.  I can't argue that LaTeX / TeX and so on can't be used to do many things.  I hope to be able to do these great things, presuming

The great things done are all based on one simple fact: you need to know the system, to understand them fully, and to spend a lot of time reading and researching to get all the arcane answers.

It's ultimate power is also it's greatest weakness.  The problem is that the knowledge is held by a cabal, a group of technocrats that look down their noses at you if you don't want to spend a lot of time getting acquainted with all the ways to use LaTeX. 

I used to be an apologist for a lot of problems in Linux or open source software, the fact that free and open are big assets to many projects.  But not everyone can accept the weaknesses that come with no support, little documentation, and a small community that could help you if they were still around to answer emails.  A lot of open source software dies on the vine because people aren't paid to develop it at school, they get bored or have a kid and so on. Without the monetary incentive it gets lost.  It's actually a great tragedy - code that wastes away without use.

Now, LaTex is the same kind of development, lots of power, lots of thoughtful users, but it still needs a lot of quaint specific knowledge.  And the possessors are mostly snobby and unhelpful. 

Most people use simple word processors because they don't want the hassle of learning to code their word processing.  LaTex and ilk requires an investment that most people don't want to make.  They aren't paid to learn processing - that can be solved by simpler software.

So it's a new fresh hell when you try to learn - because most people weren't educated with LaTeX  - most weren't in diapers when it was written.  It's hard to get help and the people that know this stuff don't waste their time improving documentation - especially new examples - to help those that need it. 

To sort this out, the LaTeX community must get past their egos and truly help people learn their system or it will end up in the open source graveyard. 

Saturday, October 11, 2014

Replace Audi Ax key fob battery



The new Audi keys have the same battery as Apple TV remotes : the CR 2032.
Front side has buttons. Back side is black plastic.

You take the chrome key out of the bottom with a button. Push button and pull out.  Inside the key on the front side there is another button on the other side inside of that recess. Push button and pull slide out to reveal the battery case.

Battery pops into holder.

Reverse operation to complete. 

Thursday, October 2, 2014

How to make a butter knife when you are travelling abroad so you can make a peanut butter sandwich.

How do you get a knife from basic materials when you are at a hotel and just want a peanut and jelly sandwich?  Say you are in a foreign hotel. You couldn't carry a knife since you went through security. And hotels want you to buy a restaurant meal so there's nothing close not even tea spoons in most hotels.

You could go to corner stores but you can't buy a single plastic knife.

So here's a simple way.

Go to a local market and buy a set of plastic cups.

Plastic cups come in two varieties. Soft ones and hard ones.

For Hard ones, shatter the plastic cup bottom and then peel away one side for the knife.  You can bend it back and forth to make a sharp edge where you want it.


For Soft plastic cups, you bend the top rim so it has a crease, then take a pen and jab the side of the cup.  That will open the plastic and it will tear along the fibres.   Remove the bottom of the cup from the sides. For softer cups I would tear a larger sheet of plastic and fold it in half for more strength.

Now you can make that peanut butter sandwich on the cheap!


Friday, September 19, 2014

How to make clear path lines inside Google Earth paths

If you don't want to see the lines you make in Google Earth, there is little documentation on this aspect. 

I found one simple way to do it.

Select the Path from the Places subtab or inside the right-click menu from the path select the Properties

Then select Style, Color submenu

Then change the line width to zero and it will disappear.




Monday, September 15, 2014

Finding the overall minimum, maximum of an arbitrary matrix in MATLAB and/or Octave.

It's one logical step from what's presented in the GNU Octave Manual, but for a given arbitrary n-dimensional matrix, to find the overall minimum or maximum value within the matrix, you simply recurse the min() or max() function as many times as there are dimensions. So for a 3-dimensional matrix, recurse function calls to min or man three times like this min(min(min(X))))


Example:
 
size(out)
ans = 3 32 32
     min(min(min(out)))
ans = -0.99914
    max(max(max(out)))

    ans = 1











Removing Dimensions from Matrices in Octave or MATLAB - squeeze()

For many math applications you want to run through many variables all at once and gather data. Of course, having several variables that will lead to n-dimensional matrices.

For example I was converting from a spherical coordinate system to a Cartesian and experimenting with what the x,y,z coordinates would be for two changing angles.  This lead to a rank (3 by n by m)  3-dimensional matrix where first dimension is the xyz, the second is angle one and the last is angle two.  To get the matrix for any single variable, do the following: extract a submatrix and then use squeeze to get a single 3 by n or 3 by m matrix.

Example:

Let A = [3*n*m]  say=
size(A) = 3 32 32

a = A(:,1,m)   # takes single dimension matrix from 3*m*n using column one of second dimension

size(a) = 3 1 32

a = squeeze(a) 

size(a) = 3 32

squeeze() looks for the singleton dimension and then does the tedious  matrix copy and paste operations for you.


Of course this gives you one of many, then duplicate for the remainder.

Tuesday, September 9, 2014

Including SVG graphics into LaTeX documents.

The epub book format relies on XHTML / HTML / and MathML for converting from a page-based book like .pdf format or .dvi format into a scaled free-flowing page that can make for reading on a phone, tablet, or any size screen.

I am working on converting my book into XHTML with nice looking graphics.  The first attempts to make a .epub from .pdf caused a mess of a book.  The symbols go all over the page when they aren't locked into position.

The way I solved this was to convert all math equations into graphics - inline and display formulas - and then reinclude graphics into the .tex file rather than equations.

I found the svg package that acts like the graphicsx allowing you to

  \includesvg[<options>]{<svg filename>}
 
include svg image directly.
 
You can find the svg package on CTAN here  
 
 
For Ubuntu and Fedora,  this BASH shellscript should install and reconfigure texmf 

#!/bin/sh
# svg standard install script
# must be run inside the top  svg directory
# must be run as root or sudo root

mkdir /usr/share/texmf/tex/latex/svg
cp -rf * /usr/share/texmf/tex/latex/svg


texhash