Doxygen RTF disable hyperlinks - hyperlink

Env:
Doxygen version 1.7.6.1
OS: Ubuntu 12.04
I have doxygen set up to parse some c/c++ files and to generate RTF:
GENERATE_RTF = YES
# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
# RTF documents. This may be useful for small projects and may help to
# save some trees in general.
COMPACT_RTF = YES
# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
# will contain hyperlink fields. The RTF file will
# contain links (just like the HTML output) instead of page references.
# This makes the output suitable for online browsing using WORD or other
# programs which support those fields.
# Note: wordpad (write) and others do not support links.
RTF_HYPERLINKS = NO
I set RTF_HYPERLINKS to "NO" to disable hyperlinks but I still get them:
Class Index
{tc "Hierarchical Index"} Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
What is the correct setting to cause Doxygen to not generate the hyperlinks or references?

SOLVED: Update to v1.8.4 and RTF_HYPERLINKS=NO

Related

Importing a font to graphviz and displaying emoji

I'm displaying a diagram with graphviz and need emoji to display but I constantly get display errors as shown here:
in this case should be (1 😂🥰)
My understanding from graphviz font path attribute and dot guide pdf quoted below, I should be able to change the fontpath to load an emoji capable font like NotoColorEmoji.
For bitmap output, such as GIF or JPG, dot relies on having these
fonts available during layout. Most precompiled installations of
Graphviz use the fontconfig library for matching font names to
available fontfiles. fontconfig comes with a set of utilities for
showing matches and installing fonts. Please refer to the fontconfig
documentation, or the external Graphviz FontFAQ or for further
details. If Graphviz is built without fontconfig (which usually means
you compiled it from source code on your own), the fontpath attribute
can specify a list of directories3 which should be searched for the
font files. If this is not set, dot will use the DOTFONTPATH
environment variable or, if this is not set, the GDFONTPATH
environment variable. If none of these is set, dot uses a built-in
list.
The only information I can find on changing the fontpath is from a 10 year old question and dead links on graphviz.org.
At the moment I'm testing in repl.it so it's possible the path isn't jiving somehow.
End goal is to update my current docker image somehow with the font file.
So far it seems I haven't been successful in loading the font at all and I still have no guarantee it will display emoji. I'm open to other suggestions to display emoji (hopefully with graphviz).
digraph tree {
fontpath="/"
"foo" [label="bar", shape=triangle, color=black fillcolor=peru, style=filled, fontname="NotoColorEmojis"]

Customize doxygen output for PDF LATEX

Problem:
Cannot customize the Doxygen output for LATEX to hide the page content. DoxgentLayout.xml gives you the ability to show or hide pages for HTML. looking for something equivalent
Why:
I need to remove/hide the pages type. The reason is because I use the modules type to create a tree hierarchy of the detailed design document which is a md file with the classes associated with the design. I use grouping to group the md file and classes together. The reason I have to hide the pages type in doxygen is because as soon as you put \ingroup at the top the .md file the content after that line will not show up this results in a series of blank pages so I just hide them because the content is within the module. So DoxgenLayout.xml will allow me to hide the pages for HTML but I don't have an equivalent for LATEX.
What I have tried:
I tried modifying the refman.tex file after it was generated. When I run make for the LATEX output it always fails. So I don't know if LATEX realizes that the file changed and fails its build or I am doing something wrong.
I tried using the LATEX_HEADER file but same result. I think this was intended to change the style of your PDF more so then what content is shown
at the top of my md files I do this:
\defgroup g_SystemService SystemService Library
\defgroup g_ICP-SCP ICP-SCP
\ingroup g_SystemService g_ICP-SCP
# ICP-SCP System
This system provides...
The PDF output results in this:
HTML output I can hide this by just modifying the DoxygenLayout.xml file to say:
<navindex>
<tab type="pages" visible="no" title="" intro=""/>
refman.tex generation (what I want to is remove these chapters from generation):
...
%--- Begin generated contents ---
% want to remove these pages
\chapter{Base\+Data\+Model}
\label{md_architecture_Common_datamodels_BaseDataModel}
\Hypertarget{md_architecture_Common_datamodels_BaseDataModel}
\input{md_architecture_Common_datamodels_BaseDataModel}
\chapter{Commands}
\label{md_architecture_SystemService_ICP_Commands}
\Hypertarget{md_architecture_SystemService_ICP_Commands}
\input{md_architecture_SystemService_ICP_Commands}
\chapter{I\+C\+P-\/\+S\+CP}
\label{md_architecture_SystemService_ICP_ICP-SCP}
\Hypertarget{md_architecture_SystemService_ICP_ICP-SCP}
\input{md_architecture_SystemService_ICP_ICP-SCP}
\chapter{I\+C\+P-\/\+S\+C\+P\+Manager}
\label{md_architecture_SystemService_ICP_ICP-SCPManager}
\Hypertarget{md_architecture_SystemService_ICP_ICP-SCPManager}
\input{md_architecture_SystemService_ICP_ICP-SCPManager}
\chapter{I\+C\+P\+Comm}
\label{md_architecture_SystemService_ICP_ICPComm}
\Hypertarget{md_architecture_SystemService_ICP_ICPComm}
\input{md_architecture_SystemService_ICP_ICPComm}
\chapter{Unit\+Tests}
\label{md_architecture_SystemService_ICP_UnitTests}
\Hypertarget{md_architecture_SystemService_ICP_UnitTests}
\input{md_architecture_SystemService_ICP_UnitTests}
% end of removing pages
\chapter{Todo List}
\label{todo}
...
Doxygen Version: 1.8.17

Is there a way to check if a Ruby variable contains binary data?

I'm using Ruby 2.4 and Rails 5. I have file content in a variabe named "content". The content could contain data from things like a PDF file, a Word file, or an HTML file. Is there any way to tell if the variable contains binary data? Ultimately, I would like to know if this is a PDf, Microsoft Office, or some other type of OpenOffice file. This answer -- Rails: possible to check if a string is binary? -- suggests that I can check the encoding of the variable
content.encoding
and it would produce
ASCII-8BIT
in the case of binary data, however, I've noticed there are cases where HTML content stored in the variable could also return "ASCII-8BIT" as the content.encoding, so using "content.encoding" is not a foolproof way to tell me if I have binary data. Does such a way exist and if so, what is it?
If your real question is not about binary data per se but about determining the file type of the data, I'd recommend to have a look at the ruby-filemagic gem which will give you this information much more reliably. The gem is a simple wrapper around the libmagic library which is standard on unix-like systems. The library works by scanning the content of a file and matching it against a set of known "magic" patterns in various file types.
Sample usage for a string buffer (e.g. data read form the database):
require "ruby-filemagic"
content = File.read("/.../sample.pdf") # just an example to get some data
fm = FileMagic.new
fm.buffer(content)
#=> "PDF document, version 1.4"
For the gem to work (and compile) you need the file utility as well as the magic library with headers installed on your system. Quoting from the readme:
The file(1) library and headers are required:
Debian/Ubuntu:: +libmagic-dev+
Fedora/SuSE:: +file-devel+
Gentoo:: +sys-libs/libmagic+
OS X:: brew install libmagic
Tested to work well under Rails 5.
If you're on an unix machine, you can use the file command:
file titi.pdf
You could then do something like:
require 'open2'
cmd = 'file -'
Open3.popen3(cmd) do |stdin, stdout, wait_thr|
stdin.write(content)
stdin.close
puts "file type is:" + stoud.read
end

How to display plain text from markdown [duplicate]

I'm currently using BlueCloth to process Markdown in Ruby and show it as HTML, but in one location I need it as plain text (without some of the Markdown). Is there a way to achieve that?
Is there a markdown-to-plain-text method? Is there an html-to-plain-text method that I could feel the result of BlueCloth?
RedCarpet gem has a Redcarpet::Render::StripDown renderer which "turns Markdown into plaintext".
Copy and modify it to suit your needs.
Or use it like this:
Redcarpet::Markdown.new(Redcarpet::Render::StripDown).render(markdown)
Converting HTML to plain text with Ruby is not a problem, but of course you'll lose all markup. If you only want to get rid of some of the Markdown syntax, it probably won't yield the result you're looking for.
The bottom line is that unrendered Markdown is intended to be used as plain text, therefore converting it to plain text doesn't really make sense. All Ruby implementations that I have seen follow the same interface, which does not offer a way to strip syntax (only including to_html, and text, which returns the original Markdown text).
It's not ruby, but one of the formats Pandoc now writes is 'plain'. Here's some arbitrary markdown:
# My Great Work
## First Section
Here we discuss my difficulties with [Markdown](http://wikipedia.org/Markdown)
## Second Section
We begin with a quote:
> We hold these truths to be self-evident ...
then some code:
#! /usr/bin/bash
That's *all*.
(Not sure how to turn off the syntax highlighting!) Here's the associated 'plain':
My Great Work
=============
First Section
-------------
Here we discuss my difficulties with Markdown
Second Section
--------------
We begin with a quote:
We hold these truths to be self-evident ...
then some code:
#! /usr/bin/bash
That's all.
You can get an idea what it does with the different elements it parses out of documents from the definition of plainify in pandoc/blob/master/src/Text/Pandoc/Writers/Markdown.hs in the Github repository; there is also a tutorial that shows how easy it is to modify the behavior.

How to include LaTeX snippets directly in Doxygen comments?

I would like to be able to edit LaTeX parts of some Doxygen comments externally with some suitable editor. I would use that only for complex environments. To do that, I figured I can have LaTeX-only files and include them from Doxygen. I did create Doxygen aliases for \begin and \end to make the syntax compatible.
(For example, I know how to set-up Emacs/AUCTex for working with LaTeX snippets that have no preamble and document structure.)
Is there a way to include the contents of a .tex file inside a Doxygen comment? I look for something analogous to \htmlinclude, but for TeX files. Is there some way to emulate the functionality, given my requirements for having a TeX-only external source?
You may use something like
\latexonly
\input <file>
\endlatexonly
where <file> is the path to the file to include, either absolute or relative to the directory in which the latex documentation is generated.
Have you tried the \verbinclude command? This command includes any file verbatim in the documentation (in contrast to \include, which is used to include source files).
From the doxygen manual:
\verbinclude <file-name>
This command includes the file <file-name> verbatim in the documentation. The command is equivalent to pasting the file in the documentation and placing \verbatim and \endverbatim commands around it.
Files or directories that doxygen should look for can be specified using the EXAMPLE_PATH tag of doxygen's configuration file.
Edit: I just had a thought that you may wish to strip the preamble from your .tex file before including the rest of the file in the documentation. you could do this using the \dontinclude command which, together with the \line, \skip, \skipline, and \until commands allows you to include specific lines/blocks of a particular file. See the example in the \dontinclude documentation.

Resources