Doxygen: Disable autolink for symbol - doxygen

I'd like to know if it's possible to exclude a symbol from the autolink functionality.
I have a namespace with a common name (e.g. Ball) and in the documentation I use that name in phrases that are completely unrelated with the namespace (e.g. In soccer you score when the ball enters the goal) and I wouldn't want it linked.
Is there a way to achieve this?
Thanks in advance!

Precede the word with % and doxygen will strip the % and leave the word alone.
%Ball
Item 11 in the FAQ, but I must admit it took me a while to find it and I knew it was there somewhere!

Related

How do I add a footnote in doxygen?

I'd like to insert a numbered (or other, I'm not picky) footnote in my doxygen output. The list of special commands doesn't include anything that I could identify as enabling this. I was hoping for something like:
This is my text.\footnote{This is my footnote}
which would produce
This is my text.1
and then
1: This is my footnote
at the bottom of the page. Is there a way to accomplish this or something functionally equivalent?
Good question! What follows is a bit of a hack but might serve your needs.
Start from the footnote text at the bottom of your page and use an \anchor to mark it.
\anchor wibble 1. Wibble is an unusual shade of pink.
You can then link to the footnote using a \ref
Amongst the odder plants of the upper Amazon basin is the wibble rose (\ref wibble "1"). Water buffalo are particularly fond of wibble roses.
should produce
Amongst the odder plants of the upper Amazon basin is the wibble rose
(1). Water buffalo are particularly fond of wibble roses.
Wibble is an unusual shade of pink.
Yes, you are having to do rather too much manually, but at least this gives some form of hyperlinked footnote.
You can define your own \footnote command via the ALIASES option in doxygen's configuration file like this:
ALIASES = footnote{1}="\latexonly\footnote\{\1\}\endlatexonly\htmlonly<sup title=\"\1\">*</sup>\endhtmlonly"
This will produce a real footnote in the LaTeX output and a * with a tooltip in the HTML output.
To produce footnotes in HTML I currently use a mixture of ALIASES commands and some custom JS.
The command looks like this:
ALIASES += "myFootnote{1}=<span class=\"footnote\">\1</span>"
You might want to improve this alias to also cover footnotes in LaTeX through a \latexonly and \htmlonly.
In the header.html for my project I add the script found here. http://www.planetholt.com/articles/jQuery-Footnotes
To initialize the footnotes I also add the following code inside a script tag to header.html:
$(document).ready(function() {
$("#doc-content").append('<ol id="autoFootnotes0" class="footnotesList"></ol>');
$("body").footnotes();
});

Change "and" between Authors in Citation Style Files (csl)

I tried a lot to change the word "and" between two Authors using a citation programm (Papers2, Mac) and a specific citation style file (.csl), but my efforts doesnt work.
What I want to do is changing the "and" in the German "und", in both the citation inline and the reference list:
[Shaw and Riha, 2012]
Shaw, S. B., and S. J. Riha (2012), Title, J.
Hydrol., 434-435(C), 46–54, doi:10.1016/j.jhydrol.2012.02.034.
Does anybody know how I can configure this delimiter-word in the style file?
Thanks in advance!
Micha
Probably the best and easiest way to do this is to set the "default-locale" of this style to "de-DE" (for German), which should automatically result in the use of "und" instead of "and". See http://citationstyles.org/downloads/specification.html#the-root-element-cs-style .
Which style are you using?
It is likely that the CSL file was not properly loaded into Papers. As #RintzeZelle suggested, please make sure to change both the ID and the title in your new style. To override a built-in style in Papers (as coming from the official repo), you need to keep both the title and the ID, or else change both to create a separate style. In your case, it makes sense to have a separate style for the German version. I suggest to use the id http://www.zotero.org/styles/american-geophysical-union-german and the title American Geophysical Union (German).

Combine org mode capture and drill modules to learn vocabulary

I want to use the capture module of org-mode to create a data base of new words that I want to learn, and then use the drill module to learn them (flash cards style).
In my org-capture-templates I added the following:
("v" "Vocabulary" entry
(file+headline (concat org-directory "/vocab.org")
"Vocabulary")
"* Word :drill:\n%^ \n** Answer \n%^")
This is a rather naive template which I borrowed from here. It works fine but it is too limited. Unfortunately I'm rather new to elisp and I don't know how to improve it.
I think the above template has to be improved in the following there aspects:
Headline Currently the first input string is the (new) word and the headline is fixed. How can the headline be the same (input) word? I think that the following result is desirable:
* Vocabulary
** Foo :drill:
Foo
*** Answer
What is foo
Actually an even better way would be to have 3 input strings.
The new word (for example foo) which will be the headline.
If the second is empty, then it gets the same string as (1). Otherwise, concatenates the string to the one from (1). E.g. having as second input bar would yield foo bar. This will be the content of the entry.
The word's definition which should come in the answer sub-headline.
Duplications (see again this) If at some later point I try to capture foo again, I would like to know it, and be directed to edit the already existing entry - skipping all the inputs.
Sorting After capturing I think it would be nice to sort the list of words. This should not be too hard given that the headline of each entry is the word itself. In this case one can probably use the org-sort-entries function.
I know this is a rather big questions but I also think that if it can be solved here it will be of great use to many users.
Edits:
Using #juan_g suggestions, I improved my template and now it is:
("v" "Vocabulary" entry
(file+headline (concat org-directory "/vocab.org")
"Vocabulary")
"* %^{The word} :drill:\n %t\n %^{Extended word (may be empty)} \n** Answer \n%^{The definition}")
I didn't manage to set the default value of the second input to be the 1st one. I tried something like %^{Extended word (may be empty)|%\1} but it returns ^A which is not helpful.
In any case, this improved version seems to be already usable.
About the input question, in Org Mode Manual: 9.1.3.2 Template expansion, there is the %\1 special escape code:
%\n Insert the text entered at the nth %^{prompt}, where n a number, starting from 1.
The duplications question probably would need some Emacs Lisp coding.
For sorting, see C-c ^ (org-sort).
BTW, org-drill seems indeed a really interesting package, based on SuperMemo's spaced repetition algorithms.
You need an extra "\", therefore %\\1 works as expected.

Is there a way to embed an editable buffer within a buffer in Emacs?

Let's say I have a file, who.txt, and in that file is just the word "joe".
And in another file, won.txt with the text "won the lottery".
Now, I want to insert-file who.txt into the beginning of won.txt and the result should be:
"joe won the lottery."
Is there a way to replace joe in that sentence with sam and have it auto update who.txt?
The short answer: no.
The long answer: yes. When inserting the text from who.txt (using insert-file-contents), you could add a modification-hooks text property on it with a function that updates who.txt on modifications of the propertized region.
But that doesn't feel like a good idea. What's the problem you are trying to solve. There's probably a better way.
From your question, it is not clear why you need this functionality. If you want to embed an editable file, the freex minor mode may be useful. https://code.google.com/p/emacs-freex/ You can watch the screencast and see if it fits your needs.

In Emacs how to operate (i.e. search) only in code regions?

I'd like to isearch/search-replace/occur only in code (that is not in comments or strings).
This must be a common problem, so what packages do this already?
If no existing packages do this, I'm thinking a minor-mode where strings and comments are hidden based on fontification would do the trick. Is there one?
Icicles search gives you several ways to do this. Here are two:
Search "things" (e.g. defuns, sexps, xml elements, etc.), ignoring comments (option icicle-ignore-comments-flag). That is, use selected code segments as search contexts, but ignore any comments within code or code inside comments.
Search the complement of the comments. E.g., define the search contexts as the complement of the zones of text that are font-locked with either face font-lock-comment-face or face font-lock-comment-delimiter-face (which means search all code outside of comments).
After defining the search contexts, just type text to incrementally filter the contexts. And you can replace any matches on demand.
Check out narrowing.
Yes, you are right. The HideShow minor mode allows you to hide/show block of text, in particular multiline comments.
The hide/show comments is not part of the standard package but on the wiki page you will find the code which does the trick.
Then isearch command does not take into account the hidden comments.
HOWEVER: replace operates on the whole buffer, including hidden blocks.
Isearch+ does what you ask (as does Icicles --- see other answer, above).
You can define the contexts that Isearch searches, using any of the following:
A regexp to be matched.
A given text or overlay property --- The search contexts are the text zones that have the property (e.g. a particular `face' value or combination of values)
A given Emacs THING (sexp, defun, list, string, comment, etc.) --- The search contexts are the text zones of the given THING type.
Having defined the search contexts, you can also search the complement: the non-contexts. You can toggle between searching contexts and non-contexts anytime in Isearch, using C-M-~.
When searching, by default the zones not being searched are dimmed slightly, to make the searchable areas stand out.
For context-searching with Isearch you need these two libraries:
isearch+.el
isearch-prop.el