Thursday, September 28, 2006

rectangular emacs

Just now had the occasion to use the rectangular select/cut /paste

C-x r * where * is k for kill , y for yank(paste)

to select the rectangle you have to mark(C-space) one corner of the rectangle and then take the cursor to the opposite corner).

Monday, June 26, 2006

cross-compiler hell

cross-compiler are a pain in the ass .

kegel.com/crosstool is helpful in such cases

anyway if you ever build powerpc-eabi cross compiler and you get the error

powerpc-eabi-gcc hello.c -static
hello.c:(.text+0x24): undefined reference to `printf'
/opt/ppcsim/lib/gcc-lib/powerpc-eabi/3.2.1/libgcc.a(eabi.o): In function `__eabi':

use the -msim switch when compiling

dont ask me the logic behind it ..but I got it from
http://sources.redhat.com/ml/crossgcc/2002-09/msg00096.html
and it worked for me.

Monday, May 29, 2006

wrapped text in tables

use package tabulary for wrapped text in tables

\begin{table}
\caption{capshon}
\begin{tabulary}{\textwidth}{lL}...
\hline
\hline
A & B \\hline
A & bbbbbbbbbbbbbbbbbbb\ X & ccccccccccccccccccccc\
\hline
\end{tabulary}...
\label{label}
\end{table}


--
for some odd reason, the label has to be where it is, when i triedto move it up below the caption i ended up with more than 100 errors

install new latex package

1.Download
2. move .sty file to ..textmf/tex/latex/package-name/
3. if no .sty file .run latex on the .ins file
4. type texhash

longtable

For tables of size more than one page , use package longtable

Sunday, May 28, 2006

rar

To extract with rar with full path use the 'x' switch
else extract using 'e'

Tuesday, March 14, 2006

hyperref warnings : LaTeX

Package hyperref Warning: Token not allowed in a PDFDocEncoded string,
(hyperref) removing `\-command' on input line 46.


\texorpdfstring{LATEX text}{PDF text}



can be used to vary the text, depending on whether it is to be processed by LATEX or whether it will appear in the PDF bookmark. The above section heading could then be changed to

\subsubsection{An Example Heading\texorpdfstring{: $a^2+b^2=c^2$}{}}

In this case, the equation will be printed in the section heading within the document, but will not appear in the bookmark.

Tuesday, March 07, 2006

Reset $. at EOF

When using perl $. variables, you may need to reset $. for each new file.

for example to add #!/usr/bin/perl to each .pl in the current dir do

perl -i -lpe 'print "#!/usr/bin/perl\n" if $. ==1 ; close ARGV if eof' *.pl

Monday, March 06, 2006

mget/mput with ftp

While uploading/downloading multiple files using mput and mget in ftp, you prolly have to type 'y' for each file transfer. If you find it annoying you can toggle it off/on by the 'prompt' command.