## Friday, April 20, 2007

### How to add commnets to PDF

4.3 Document Features. The Software may contain features and functionality that appear disabled or "grayed out" (the "Document Features"). The Document Features will only activate when opening certain PDF documents that have been created using corresponding enabling technology available only from Adobe ("Keys"). You agree not to access, or attempt to access, disabled Document Features or otherwise circumvent the permissions that control activation of such Document Features. You may only use the Document Features with PDF documents that have been enabled using Keys obtained under a valid license from Adobe. No other use is permitted.

So, some of the following are illegal:

If the PDF is given:

Windows:
AREnable
http://sourceforge.net/projects/arenable/
However it violates the LEGAL user agreement of Adobe

Windows/Linux
http://www.foxitsoftware.com/
Adds a small note that it was done with this program

Windows
PDF-Xchange viewer (free)
http://www.docu-track.com/home/prod_user/pdfx_viewer/

Linux
flpsed - a Postscript and PDF annotator
flpsed is a WYSIWYG PostScript2 annotator. You can't remove or modify existing elements of a document. But flpsed lets you add arbitrary text lines to existing PostScript 2 documents. Added lines can later be reedited with flpsed. Using pdftops, which is part of xpdf one can convert PDF documents to PostScript and also add text to them. flpsed is useful for filling in forms, adding notes etc.

If I can create the PDF I can use the following techniques to allow to write PDFs using Acrobat Reader:

\documentclass[dvipdfm]{article}
\begin{document}
Test PDF document with annotations.
\special{pdf: ann width 3.0in height 36pt
<< /Type /Annot /Subtype /Text /Contents (This is a /Text Annotation that looks like a sticky note.) >>}
\end{document}

Put the \special{} in a \marginpar{} if you want it to appear in
the margin of your document, etc.

You can also write
\usepackage[pdftitle={Title},pdfsubject={Subject}]{hyperref}

Have a look at the hyperref manual.

http://multivalent.sourceforge.net/

Windows/Linux
pdftk - A handy tool for manipulating PDF
http://www.accesspdf.com/pdftk/
use it to:
Merge PDF Documents
Split PDF Pages into a New Document
Rotate PDF Pages or Documents
Decrypt Input as Necessary (Password Required)
Encrypt Output as Desired
Fill PDF Forms with FDF Data or XFDF Data and/or Flatten Forms
Apply a Background Watermark or a Foreground Stamp
Report on PDF Metrics such as Metadata, Bookmarks, and Page Labels
Attach Files to PDF Pages or the PDF Document
Unpack PDF Attachments
Burst a PDF Document into Single Pages
Uncompress and Re-Compress Page Streams
Repair Corrupted PDF (Where Possible)

## Friday, February 2, 2007

### \\ and \vspace{\baselineskip}

If you use \\ in the middle of a paragraph, that means that the paragraph ends with an empty line. However, this empty line will make part of the paragraph, and is not broken at the start of a new page.

To break and get the space of an empty line, type
\vspace{\baselineskip}
\vspace does not add lines, but space, and you don't want a line but space.

Remember that if you tell LaTeX to place an empty line, an empty line it will place. Even if that is at the beginning or at the end of a page.

And adding vertical space between paragraphs by using \\ is also not accepted by LaTeX ("Latex error. There's no line here to end.").

## Saturday, January 27, 2007

### Configuring LaTeX in Kile

LATEX
texi2dvi --batch '%S.tex' #latex -interaction=nonstopmode '%S.tex'

PDFLATEX
texi2dvi --batch --pdf '%S.tex' #pdflatex -interaction=nonstopmode '%S.tex'

DVI to PS
dvips -Ppdf -G0 '%S.dvi' -o '%S.ps'

PS to PDF
ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCampatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true '%S.ps' '%S.pdf'

Install the package: wmctrl
sudo apt-get install wmctrl
This is useful to transfer the control of the windows when doing forward/inverse search
In kile create the command
BringtoFrontDVI ->>> wmctrl -a "%S.dvi"
And add to the command QuickBuild that command.

In DVI change the option of inverse search from KILE to the customized:
kile %f --line %l && wmctrl -a "Kile"