I have a question.
I have a mainpage in Doxygen documentation, inside which, the end comment delimiter "*/" is in a comment, and that is where Doxygen stops generating the page, because it thinks that is the end of it. How can I make Doxygen copy it without processing it?
It looks something like this:
/**
#mainpage
The end comment delimiter in Doxygen is */
... bla bla bla...
**/
Here I should mention that I have already tried #code and #verbatim, but those are making code blocks, which I do not desire.
Thanks in advance!
It is also a bit of a hack, but for HTML and LaTeX output you could use
/**
#mainpage
The end comment delimiter in Doxygen is \endcomment
... bla bla bla...
**/
Along with the following alias definition in the config file:
ALIASES = endcomment="\htmlonly*/\endhtmlonly\latexonly$\ast$/\endlatexonly"
The following seems to work (for C# at least):
/**
#mainpage
The end comment delimiter in Doxygen is
**/
/// */ \n
/**
... bla bla bla...
**/
The /// continues on the previous comment, but as it's not started with a /**, the */ is not taken to be the end of that comment. The \n is to put the ... bla bla bla... on a new line.
EDIT
This works for a doxygen comment for a construct within the program (like a class or enum), but not in the #mainpage section.
SECOND EDIT
Using only single-line comments, and setting the MULTILINE_CPP_IS_BRIEF flag now seems to work with the mainpage section
/// #mainpage
/// The end comment delimiter in Doxygen is */
/// ... bla bla bla...
This obviously means that you'll need to use the /// comment style, at least for the main page section, but that seems like the only option (unless * / is a viable option :P)
Related
I'm interested in only searching comments in VSCode. Is this possible? Specifically, I would like to search for instances of () in comments only.
Supposed it's not a block comment, you could try matching it with a regex.
# line comment
or
// line comment
/*
block comment
*/
Searching using regex can be easily achieved by clicking the icon with two stars on the right of the search bar.
If # is your comment character, you could use # *yourInstanceHere.
I have an org document with tags. However, when exporting it, the tag name is also exported. Is there a way to hide the tag name in the exported document?
#+TITLE: tag issue
#+AUTHOR: someone
* First section
** sub
bla bla bla
** second :incomplete:
bla
Exported document:
You can define how you want to export tags thanks to the org-export-with-tags variable:
org-export-with-tags is a variable defined in ‘ox.el’. Its value is t
This variable is safe as a file local variable if its value
satisfies the predicate which is a byte-compiled expression.
Documentation: If nil, do not export tags, just remove them from
headlines.
If this is the symbol ‘not-in-toc’, tags will be removed from table of
contents entries, but still be shown in the headlines of the document.
This option can also be set with the OPTIONS keyword, e.g. "tags:nil".
In your case if you do not want to export tags, simply use the option:
#+OPTIONS: tags:nil
Your complete example is thus:
#+OPTIONS: tags:nil
#+TITLE: tag issue
#+AUTHOR: someone
* First section
** sub
bla bla bla
** second :incomplete:
bla
(before exporting with C-e C-c p o, do not forget to type C-c C-c over the line #+OPTIONS: ... to tell to emacs to refresh the setting)
You will get:
note: you can find other useful options here
I hope there is a simple solution: I need a latex macro that ignores specific text from a tex-script. E.g.:
\begin{ignoretext}
bla bla
hello
\end{ignoretext}
Should compile to
hello
Thanks in advance :)
Pythontex package
I achieved the result through the pythontex package. I'm assuming that you will search and install the compiler/package required for your system, in such a way you can run the following example.
This is a minimal example of what you are searching for:
\documentclass{article}
\usepackage{pythontex}
\newcommand{\ignoretext}[2]{\pyc{%
ret = r"#2".replace(r"#1", r'');%
print(ret);%
}}
\begin{document}
\ignoretext{bla bla}{
bla bla
Hello
}
\end{document}
This document (test.tex) must be compiled with:
pdflatex test.tex
pythontex test.tex
pdflatex test.tex
The result contains only
Hello
The macro works as follow:
First argument contains the text to remove
Second argument is your actual text
Comment package (bad answer)
It works with the comment package if you write your code in this way:
\begin{comment}
bla bla
\end{comment}
hello
it must be included in the preamble (\usepackage{comment}).
Emacs tries to be clever with its comment functions so that lines which are blank don't get a comment prefix. Is there an easy built in way to make sure that all lines (blank or not) get commented when I call something like comment-region? So, if I have this code:
Comment comment comment
More comments more comments
Suppose the comment prefix is //, I want to be able to select that region, and have the comments look like:
// Comment comment comment
//
// More comments more comments
Yes, I could write a custom function to do this, but it seems like basic enough behavior that it might somehow be built in.
comment-empty-lines is a variable defined in newcomment.el.
Its value is nil
Documentation:
If nil, comment-region does not comment out empty lines.
If t, it always comments out empty lines.
If eol it only comments out empty lines if comments are
terminated by the end of line (i.e. comment-end is empty).
You can customize this variable.
I would like to create an Emacs-mode that behaves the following way:
When starting a new paragraph, Emacs asks in a buffer window, which
template to use:
buffer window:
1 - standard (default)
2 - person
3 - insertion
4 - location
5 - header
Just <ENTER> selects 1 - standard (default).
Whenever two captital letters are put in, everything till the next space
or line ending should be in capitals:
PErson -> PERSON
PErson NAmed CHuck -> PERSON NAMED CHUCK
The standard-template works something like this:
A standard paragraph starts with a person. After the person, there may or
may not follow some ():
If (), then follows a line break:
input (note the missing <SPACE>):
PErson(doing something).bla bla bla.
output:
PERSON <i>(doing something)</i>.
bla bla bla.
If no ():
input:
PErson.bla bla bla.
output:
PERSON. bla bla bla.
For demonstrating what should happen depending on the chosen template,
here are some sample inputs:
Choose "1 - standard" + input:
PErson(doing something. Something else. Something else).bla bla
bla<ENTER>bla bla bla<ENTER>bla bla bla.<ENTER><ENTER>
should become:
output:
<standard>PERSON <i>(doing something. Something else. Something else)</i>.
bla bla bla
bla bla bla
bla bla bla.</standard>
Choose "2 - person" + input:
Description of a place. PErson NAmed CHuck walks around the corner.<ENTER>
output:
<person><i>Description of a place.</i> PERSON NAMED CHUCK <i>walks around
the corner.</i></person>
Choose "3 - insertion" + input:
Something happens. Something can be heard. Something can be seen.<ENTER>
output:
<insertion><i>(Something happens. Something can be heard. Something can be
seen.)</i></insertion>
Note:
Depending on the selected template, a paragraph ends with <ENTER> or
<ENTER><ENTER>.
The final markup file (html, xml, whatever) should be used in LibreOffice
for further processing.
I already wrote an Emacs mode some time ago. Very simple thing. But with
this here, I would be grateful for every hint you can offer.
It looks like you're trying to write a mode for screenwriting.
Instead of writing your own, maybe give Fountain Mode a shot:
Fountain Mode aims to be a full-featured screenwriting environment for GNU Emacs using the Fountain markup format. For more information on the Fountain markup format, visit http://fountain.io.
Fountain Mode can be installed via MELPA or MELPA stable. Here's a screenshot from its GitHub page:
(source: paulwrankin.com)