Adding documentation
Create the structure:
sudo mkdir /usr/share/doc/l4akb
sudo mkdir /usr/share/doc/l4akb/latex
Copy a document
Let's say we take a good latex copyleft book like Peter Flynn's "A beginner’s introduction to typesetting with LATEX"
sudo cp ~/beginlatex-3.6.pdf /usr/share/doc/l4akb/latex/beginlatex.pdf
Set permissions
Don't forget to set the right file permissions to assure that other people can read the document
sudo chmod 644 /usr/share/doc/l4akb/latex/beginlatex.pdf
Create the control file
Change to the doc-base directory and copy an existent control file and adapt it for your needs.
Note: To avoid errors do not make any manual line breaks!
cd /usr/share/doc-base
sudo cp dc l4a-latex-beginnerdoc
sudo nano l4a-latex-beginnerdoc
Content of the control file
Document: l4a-latex-beginnerdoc
Title: A beginner’s introduction to typesetting with LATEX
Author: Peter Flynn
Abstract: This book originally accompanied a 2-day course on using the LATEX typesetting system. It has been extensively revised and updated and can now be used for self-study or in the classroom. It is aimed at users of Linux, Macintosh, or Microsoft Windows but it can be used with LATEX systems on any platform.
Section: Apps/Tex
Format: PDF
Files: /usr/share/doc/l4akb/latex/beginlatex.pdf
Make the document visible
For this reason you have to "install" ( to register) the document.
sudo install-docs -i l4a-latex-beginnerdoc