AutoDoc() pull request

Since we are going to integrate these changes first here, before moving them to homalg-project, I am opening a new pull request, to help with code review.