Omitting headings without properties from orgmode TaskJuggler export - org-mode

Using org-mode 8.0.3 and TaskJuggler 3. I would like to be able to mix notes with TaskJuggler information in an org-mode file (in true literate programming style). Like this (pseudocode):
* Project :taskjuggler_project:
* Task 1
:PROPERTIES:...
* SubTask
:PROPERTIES:...
* Meeting Notes
* Journal
* Task 2
:PROPERTIES:...
The sections without TaskJuggler-specific properties (Meeting Notes and Journal) still get exported to the tjp file and appear in my reports.
I would like:
Ideally, to exclude the Meeting Notes and Journal from my tjp file
If that's not possible, an easy way to hide them from my reports in the TaskJuggler report definitions. I have the report definitions in a tji file.

Have you tried setting a :noexport: tag on the headlines you don't want exported?
This will prevent them from exporting regardless of the exporter type, although you can remove the tag when exporting to another format that you do want that content included (if you ever do so).
See Export Settings, specifically the section on Exclude Tags for more details.

Related

Doxygen: how to include a markdown page to document a group

I have a rather complex project and I want to document it using doxygen.
I have no problem documenting the code and I also managed to have a nice front-page using a custom README.md file coupled with "USE_MDFILE_AS_MAINPAGE = README.md" directive in Doxyfile.
I defined several groups (#defgroup) which show up as "Modules" in my documentation.
I would like to add a "main page" to each of the group giving general information, beside the customary function/variable/type documentation.
I tried adding custom MODULENAME.md files coupled with matching #includedoc MODULENAME.md entries in group definition, it seem to work (I see several lines like: "Generating docs for page md_mcu_noitr_coro_README..."), but I cannot find if and where the page is linked (I expected to see it in the "Detailed Description" for the module, as it happens if I put some documentation inline where I put the "#includedoc" directive.
a snippet of one of my modules is:
/**
* #file coro.h
* #brief definition of coroutine implementing functions.
*
* #date: Feb 8, 2018
* #author: myself
*
* #defgroup coro "Coroutine implementation in plain 'C'."
*
* #includedoc mcu_noitr/coro/README.md
* #{
*
*/
What am I doing wrong?
Note: it is also a bit surprising I need to put the whole path from where my Doxyfile is, otherwise doxygen won't find it even if it's right beside the file containing the #includedoc command.
I also came across the problem that included files with Markdown formatted text via \includedoc or \include{doc} does not result in correctly interpreted Markdown. Note that I included Markdown files from other Markdown files. My work-around was to use the C pre-processor (cpp) - which is widely available - on Markdown files and use it's #include directive. You could of course use a true general text processor such as M4 as suggested in the cpp man page. Set FILTER_PATTERNS in Doxyfile as:
FILTER_PATTERNS = *.md="cpp -P -traditional-cpp"
You'll need the -P option to avoid it outputting line markers, which confuses Doxygen. -traditional-cpp was needed to avoid cpp eating white space that is important for the correct interpretation of Markdown. Don't use single quotes as this results in an error when Doxygen calls cpp via sh.
Then in my Markdown main page:
Main Page {#mainpage}
==========
Blah blah blah.
#include "other.md"
Using FILTER_PATTERNS instead of INPUT_FILTER avoids the problem about not being allowed to add or remove lines.
I have my markdown files in the same directory, I would guess that if they are located in different places you could tell cpp about it via -I, which would address your expectations about include paths on the issue you filed.
At the moment doxygen does not consider the fact that commands like \includedoc can contain markdown code. At the moment the only possibility would be to write a filter, see configuration parateter INPUT_FILTER in the doxygen configuration file, (not tested!) to replace the \includedoc` with the code of that file.

Doxygen: Exclude undocumented files

I have a framework which I am extending. There are some source folders which contain quite a lot of files and I want to document my work (especially those files which come from me) using doxygen.
Any file I am documenting contians a header:
/**
* #file my_file.c
* #author Stefan F.
* #date 28.05.2014
*
* #brief This file is awesome!
*/
Can I somehow tell doxygen to NOT include files without such a header?
I have already set
EXTRACT_ALL = NO
Files which don't have a doxygen header are not generated but they are still listed in the file list.
Does anyone know how to configure doxygen to get that behavior?
I'm not aware of any part of Doxygen that will do exactly what you are looking for, however, the simplest way to achieve your aim is simply to only list the files you want doxygenning in the doxyfile INPUT line.
INPUT = my_file_1.cpp myfile2.cpp moreofmyfiles/etc.cpp
(Beware it's a space separated list.)
Depending on your folder structure you may need to set RECURSIVE = NO
If it's your own personal project and you can name your file myname_file.cpp you could use FILE_PATTERNS to select only those files beginning "myname_* - but I'm expecting that's not a viable set of circumstances.

org-mode: Adding bibliography

Every time I want to convert an org-file to pdf using org-mode, I need t write the following lines at the end of my file:
* References:
\bibliographystyle{plain}
\bibliography{/path/to/my/bibfile}{}
In org-mode there is the command <s TAB to insert a
#begin src
#end src.
Is there something similar for the bibliography? I would like to have these line automatically added to my files, each time
I fire some <s-command.
Two answers for the price of one:
Look at the easy templates (section 15.2 of the manual) or
Use YASnippet therefore (more generic, and usable in all Emacs parts!).

Repeating elements/links in org pages to be published as html?

Is there a simple way to add something like the {Back to Worg's index} to every .org page in a directory which I plan to publish with org-publish-project-alist? Is this accomplished with a #+ tag, or some definition in the .css file?
I looked at how they did it on Worg, and it doesn't look like CSS.
There are a few ways you might be able to do so.
Create a generic file that only includes the details you want in each file. For example:
[[./index.org][Back to index]]
Then use #+include: <filename> at the location in your file where you want the line. (See Include Files)
Alternately you could define a macro in a setupfile (See In-Buffer Settings) that is the definition of the link (or multiple link choices)
#+macro: toIndex [[./index.org][Back to index]]
In both cases it is worth noting that the relative paths are based on the exported file. So a [[../index.org]] will always point to the index.org file in the parent directory, no matter where the setupfile is.

Microsoft Word to Org-mode

I am trying to put the Microsoft Word document in emacs using org-mode. I have copied the Word Document and pasted in emacs. I like to achieve the headings like 7.1.2.4 in org-mode format.
and then link the TOC to appropriate headings. How I can do that? Any suggestions? Any programming language like Perl has done it?
Thanks.
There is ODT2ORG (https://bitbucket.org/josemaria.alkala/odt2org/wiki/Home) which lets you import odt files in org-mode.
Use Openoffice/Libreoffice to produce an .odt from your .doc.
Use odt2org to get an .org.
About the headings: I am not entirely sure I understand you.
there is org-toc.el included in org-mode that provides a seperate buffer with a TOC of your current document (like in Reftex). All the entries there are already links to the individual headings. Also, an exported document will have a TOC included by default without your intervention.
Orgmode does not support automatically numbered headings (yet). However, if you want to export your document to html, docbook, latex, or pdf, your headings will appear numbered and nested (you can tweak the settings quite a lot).
I doubt that you will get your intended result purely automatically but it should work 70% automatically, especially if you have latex installed and simply want to have a good-looking pdf in the end. Convert doc to odt, convert odt to org, open and type "C-c C-e d".
Another option: Save as an HTML file, then use Pandoc to convert the HTML to an .org file.
I've converted loads of Word documents into Org files. It takes minutes to do it by hand.
If you want cross-references, use internal links (4.2 in the current manual).
The * and ** style headings are always likely to be there in Org. Think of the use case where exports are compiled from #+INCLUDEd files, or you have done a selective export using tags. Any kind of single sourcing technology isn't going to display the numbering.
There is a ruby gem which converts doc to md. With pandoc you can convert to org.
https://github.com/benbalter/word-to-markdown