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.