Doxygen: How to hide certain page in treeview - treeview

I have an issue I could not resolve by myself. Help please.
I have (conditionally):
/** #mainpage A
#subpage B
*/
/** #page B
#subpage C
*/
/** #page C */
Doxygen makes the tree where all the pages are shown on the root level.
+A/
|---B/
|------C
|---B <- WANT TO HIDE
|---C <- WANT TO HIDE
but I need only top (A here and nested B & C) to be visible i.e. should be organized accordingly #subpage tags.
I also tried to set visible to 'no'
in DoxygenLayout.xml. But it hides all the pages, only 'files' and 'classes'
are left.
Thanx in advance.

Your code generates the required tree view (only nested pages without separate entries at the root level) when the page/subpage files belong to most of the supported formats like *.c, *.cpp, *.dox etc. The only exception that I could find (in Doxygen 1.8.6) is the markdown format (*.md or *.markdown), for which separate root level entries are generated as well.
Until markdown files are treated like the other file formats, a workaround would be to use one of the other file formats (like *.dox) instead of *.md for the pages/subpages. Currently, the markdown format can be used, without generating root level entries, only for the mainpage.

Related

Is there any way for a section to link back to the table of contents in pandoc?

So I'm able to create a nice table of contents with pandoc --toc option, but I was wondering if there is any way of linking the header or a symbol near the heading back to the table of contents. For example, when you create a footnote in pandoc, it links the subscript number to the bottom of the page. At the end of the note, there is this little sign (↩︎) with a link for going back to the line where the footnote was. I'd like to do this with my table of contents for each header. I don't mind not use --toc, and instead manually writing out the table of contents, but I not sure whether this particular feature was available. Any tips would be very helpful!
A Lua filter can be used to add a link back to the TOC.
local link_to_toc = pandoc.Link({pandoc.Str '↑'}, '#TOC')
function Header (h)
h.content = h.content .. {pandoc.Space(), link_to_toc}
return h
end
Save the above into a file and pass it to pandoc via the --lua-filter (or -L) command line option.
Linking to a specific line in the TOC is not possible though.

Sphinx and reStructuredText: multiple code highlighting in a single block

I am new to Sphinx. I am writing some documentation for embedded UDFs that requires a code block to contain 2 languages (e.g. SQL and python). At present I can only see how to have a single highlight language in a block.
Is it possible to "switch" languages within a block? Below is an example of reStructuredText that results in 3 code block that I want to merge into one.
Simply removing the second and third "::" doesn't work.
.. highlight:: sql
::
SELECT * FROM
EXTERNAL SCRIPT(
.. highlight:: R
::
#Some R markup
MEANS = matrix(runif(nclust*ndim)*sqrt(nclust)*sep, nrow = nclust)
VARS = matrix(runif(nclust)*ndim, nrow = nclust)
ps = 1:nclust
ps = ps/sum(ps)
.. highlight:: sql
::
)
FROM myshema.mySQLtable
I am 99% sure that this cannot be done by default, and your solution of using separate 'highlight' blocks is the standard procedure to show multiple languages.
I believe that this is for the best anyway as mixing code in one block is usually a bad idea as it can confuse readers.
Also, when converting reStructuredText into HTML for example, a style sheet is used to make everything look pretty, and a default style sheet is included. If you do some research, I'm sure you could edit that style sheet or make your own, perhaps making the 'border' invisible and the 'margin-bottom' zero pixels for 'highlight' blocks.
You can try this extension to have different languages in tabs:
https://bitbucket.org/birkenfeld/sphinx-contrib/src/c30b46a0a1b5c21ec9977e6abc598d0654316ac2/examplecode/?at=default

How can I document a constant (module level variable) with sphinx (docstring without data)?

I want to document a constant by its docstring. I don't want to let the value to show up. If I have a long list, Sphinx will include it completely which I don't want. It would be okay for me if only an excerpt would be shown (with ellipsis or whatever). But not thousands of list elements.
module_level_variable2 = 98765
"""int: Module level variable documented inline.
The docstring may span multiple lines. The type may optionally be specified
on the first line, separated by a colon.
"""
I've tried the following:
.. autoclass:: module_level_variable2
does not show the docstring at all.
.. autodata:: module_level_variable2
does show docstring and the data.
.. automethod:: module_level_variable2
and
.. autoattribute:: module_level_variable2
do not show anything in the documentation (not even the name of the variable).
.. autofunction:: module_level_variable2
does show the docstring only. This is almost what I want. However, it considers a constant as a function() by adding parentheses to it - which is wrong (why a warning is raised on make html!
I went through http://www.sphinx-doc.org/en/1.4.8/ext/autodoc.html but could not find a switch to tell .. autodata:: not to show the data itself (but the docstring only).
SOLUTION
.. autodata:: module_level_variable2
:annotation:

How to restrain my ClearCase view to only a subset of the dir of one of the vobs?

My Clearcase dynamic view has to access several vobs. But one of the vob has very large number of directory, so I wandered if I could tune my dynamic view to access only a list of directories of that specific vob - believing this could improve performances of my searches.
How do I do?
Say here are my vobs below, and in the last, the list of dir I want:
vob1
vob2
large_vob
/dir17
/dir31
/dir53
Here is my basic view:
element * CHECKEDOUT
element * /main/LATEST
element -directory * /main/LATEST
Shall I go in some direction like the below?
element /vob1/* CHECKEDOUT
element /vob1/* /main/LATEST
element -directory /vob1/* /main/LATEST
...
element /large_vob/dir17/* CHECKEDOUT
element /large_vob/dir17/* /main/LATEST
element -directory /large_vob/dir17/* /main/LATEST
...
But I got error
Encountered an improper argument
... plus this above looks to me like hard to maintain. Is there any other way, like a context inside of view declaration? --- Ideally I would like to only work with one view.
I am not admin, I would also like avoiding per-user read restriction or anything.
Any help appreciated!
edit
Restraining the number of directories in my view's vob did improved full-vob label search performance.
Another option that you can try is to apply some "none" version section to your folder in your config spec.
If the folder is not selected (version "none"), then it won't try to select (or, hopefully, to search) its content.
element /large_vob/dir17/... -none
(no need for '/*' here: I want to not select the folder itself: see "How to hide folders except mentioned in config spec?")
The OP J. Chomel reports in the comments making it work with adding the expected directories like:
element /large_vob/dir17/... /main/LATEST
element /large_vob/dir18/* -none
element * /main/LATEST
The order of a config spec is important.

Is altChunk valid within PresentationML?

Is it valid to use an altChunk element within a any of the slide xml files within a pptx ooxml package?
I have read through the ECMA-376 spec, and while altChunk is defined within the WordprocessingML section of the spec (e.g.: "Any document part that permits a p element can also contain an altChunk element, whose id attribute refers to a relationship"), it is not mentioned anywhere else.
PresentationML apparently doesn't have a p element, and the other valid parent elements for AltChunk (body (§17.2.2); comment (§17.13.4.2); docPartBody (§17.12.6); endnote (§17.11.2); footnote (§17.11.10); ftr (§17.10.3); hdr (§17.10.4); tc (§17.4.66)) don't appear to be valid within PresentationML.
My attempts to use altChunk within a slide xml file (with proper validated entries in the relevant rels file) have resulted in invalid xml: PPT2010 offers to repair the file, and this great tool http://www.probatron.org:8080/officeotron/officeotron.html offers a number of different errors (e.g.: "Invalid content was found starting with element 'p:altChunk'." or "One of '{"http://schemas.openxmlformats.org/drawingml/2006/main":p}' is expected") depending on where I place the altChunk element.
(FWIW, the actual problem I am trying to solve is to include some basic HTML within a ppt slide.)
What do you want to accomplish by including the HTML within a slide?
If you simply need to store it (or any other text) you can use Tags. I don't know how they're implemented in XML but you can add one via a bit of VBA and see what appears in the XML:
Sub AddTagToSlide()
With ActivePresentation.Slides(1)
.Tags.Add "ThisIsTheTagName", "ThisIsTheTagValue"
End With
' Did it work? How do we retrieve a tag?
With ActivePresentation.Slides(1)
MsgBox .Tags("ThisIsTheTagName")
End With
End Sub
You can add as many tags as you like to the Presentation object, Slide objects, and Shape objects, among other things. There's no UI for tags, so they're not visible to users.

Resources