I'm trying to use xrefitem to create a "Related Page", but it doesn't seem to be working, nor inline. Here is an example:
/// \xrefitem makeup "Makeup" "This is made up" ok so it is
/// \xrefitem makeup2 "Makeup2" "This is made up2" Ok it #ismade"up"
I'm using Doxygen 1.5.9. Neither of these show up in the related pages.
I'm also including the comment in a CPP file.
Two quick thoughts:
First, does this work for you? (Splitting it up so the text is on a second line...)
/// \xrefitem makeup "Makeup" "This is made up"
/// ok so it is
Also, your second example has a number in the tag - is that arbirtrary? I actually had problems with \addtogroup when someone created a tag named "3D" and it wasn't until hours of hair-pulling that I found that numbers in a tag cause it to be ignored. Just a thought...
May be my answer to the question Custom tags with Doxygen will help you.
There, I propose an example of combined usage of \xrefitem and ALIASES.
Related
Does anyone know how to create a link to the header of a different wiki page?
I know if I have a header ##Header name that I can link to it on that page by using (#header-name) as my link, but I want to link to that header from a different page. Is this possible?
ie. I want to have a table of contents that can link to the sub-sections of each wiki page as well as to the page itself.
Edit: I mean a way besides just using the url link
http://github.com/project/wiki/Wiki-Page#header-name
EDIT 1: So totally wrong about before, I just read up a bit more. So we have this new support as well inside of GitHub Wikis! (Relatively new.)
You can also do something like this:
[[ Link text | page_title#header_title ]]
This might work a lot better for you! TIL because of this answer here. You can see me do this with the Prerequisite link and you can see my other links work the other way. Time for me to do some updates!
EDIT 1: Still useful but definitely NOT THE ONLY WAY.
So I answered a question about this before, you should avoid absolute links on GitHub (i.e. https://github.com/user/repo_name/...)
However, a good way (and kind of the only way inside of Wikis EDIT 1: TOTALLY NOT TRUE TO BEING THE ONLY WAY) of doing what you need can be seen like this:
[Header link](/user/repository_name/wiki/page_name#title).
This is kind of the linking unfortunately that the Wiki would support. This will change your directory page based off of GitHub. You can see that it would be
https://github.com/(the linkage you want to hit)
I have actually began doing something like this in a Wiki I work on here. Inside of my Sidebar, you can see I have a Getting Started Page, and then a subsection into it is a Prerequisite heading and it will properly lead people to where they need to go. You would be able to perform this same thing on any page. It is a tad verbose, but worth it as you can easily change things around if need be. This is also case-sensitive since it will change their location so be sure that in your linkage, the page is the proper case and your heading is all lowercase.
Hope this helps!
You can link to the header by simply assigning an id to header. e.g you've "Extension" header in a page called Abc.
# <a id="extension"></a> Extensions
You have another page "Call center" and you want to go to extension in abc , you can use reference linking of markdown i.e "The [extensions][1] are handled by agents"
[1]: url-of-abc/#extension
I tested Maxwell's "good way" to link to the header of another page in Github in Edit 1 on and it works perfectly.
#[crux-ports Installation](/user/crux-ports/blob/master/README.md#installation)
markdown generate slug for the heading and convert it to id, example
# [ topic ][ color ]
will be converted to
<h1 id="topic--color" data-line="643" class="code-line">[ topic ][ color ]</h1>
Thus, to link it you can write it as [color](#topic--color).
If the destination anchor is on another page (assume filename css.md) with path relative to current markdown page, then you can write it as [color](css.md#topic--color)
Attach the slugify function from vscode
// excerpt from https://github.com/yzhang-gh/vscode-markdown/blob/908d7ba5465a203e4299f346c179211d992ef468/src/util/slugify.ts
const str = '# [ topic ][ color ]';
const slug = encodeURI(
str.trim()
.replace(/\s+/g, "-") // Replace whitespace with -
.replace(/[\]\[\!\'\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\#\\\^\_\{\|\}\~\`。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}]/g, "") // Remove known punctuators
.replace(/^\-+/, "") // Remove leading -
.replace(/\-+$/, "") // Remove trailing -
);
console.log(slug) // "topic--color"
I use doxygen and wonder if my understanding for
\xrefitem and "heading" is correct?
In my code I have:
//! \xrefitem Cars "heading" "ListName"
//! Text
Here I define a key "Cars". All occurences of this key will be put to the "Related Pages" menu. There will be a link with "ListName" under which all occurences of the related artefacts with that key will appear.
Now my hope was that "heading" is changeable and items of the same key will be put under "ListName" but under different "headings".
//! \xrefitem Cars "Audi" "ListName"
//! Text
//! \xrefitem Cars "Mercedes" "ListName"
//! Text
But whatever I enter for "headings" it is not shown, likewise "Audi" or "Mercedes".
Can anybody explain the purpose of "heading" and what I can do with it and if my understanding is correct?
I read the manual now dozens of times but just do not get it.
It's a good idea to follow the advice in the manual and use an ALIAS. This helps to make it clear that changing the parameters (e.g. "Audi" to "Mercedes") is meaningless.
To takes the manual's example
ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""
and using
/reminder Make Coffee
will result in something like
Reminder
Make Coffee
i.e. Heading, Text
on a page labelled
Reminders
i.e. ListName
Hope that helps - I'm a bit rusty and working from memory here.
I am curious if it is possible to generate a list of keywords, a index if you will, for easy reference by doxygen ? I am not talking of list of classes etc. but specific words that are used as indexes.
This is possible but AFAIK only with the Latex/pdf output, with the command \addindex
See the manual.
If anybody knows a way to produce an index with the HTML, I would be very interested too.
xrefitem
With this you can create a page for each of your keywords. One example they already make an alias for:
\xrefitem todo "Todo" "Todo List"
You can add other aliases in your Doxygen file:
ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""
Then in the code you can do something like:
\reminder Add the cool feature here.
And you'll get a Reminder page with the list of reminders on it.
I have some GWT code here. I am trying to change the background color of a widget:
this.getElement().setAttribute("backgroundColor", backgroundColor);
this.getElement().setPropertyString("backgroundColor", backgroundColor);
this.getElement().getStyle().setProperty("backgroundColor", backgroundColor);
Usually in code I can tell by the name of the function what the code does... but in this case all three lines of code looks the same and "read the same"! (Reading the javadoc did not help either.I went to the javadoc because that usually helps me understand what code does. The javadoc did not help.)
My question to you is: Please explain what is the differences between these three lines of code (for instance why do you need to call getStyle())? Why does the last line work?
this.getElement().getStyle().setProperty("backgroundColor", backgroundColor);
is the only line that access the actual style information, properties and attributes manipulate the element directly and don't have anything to do with the Style that is associated with an element.
And just as an addition, you should really be using a style sheet and changing the style instead of setting inline this way.
It is the difference between
<tag backgroundColor="#f0f0f0">
and
<tag style="background-color:#f0f0f0">
This is somewhat of an educated guess...
Line 1 you are accessing the element's attributes not the styling attributes.
Line 2 would access properties on the element not the styling.
Line 3 actually gets the styling properties and then changes them accordingly.
This is either very annoying or very embarrassing. I've set up most of my blog, but I can't figure out where or how the heck I set up single entry templates as opposed to the section/weblog containing them. I just can't find information on how to do it for the life of me.
This is especially important, because I want to define the canonical link for all entries, since ExpressionEngine links to entries in all kinds of ways.
So, the case is that I have a Blog section/weblog with an index working as the front page for mydomain.com. This lists all my entries as you would imagine a regular blog to do. The problem arises when I need to customize the code for the single entries' links.
If you have a template set up already which is showing a multitude of entries and you want a single entry page for each entry then what you need to do is this :
{exp:channel:entries
channel="default_site"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
Then in the template shown above by template_group/template_name (please change those to whatever your template group and template names actually are ;-) ) you will place this code :
{exp:channel:entries
channel="default_site"
limit="1"
dynamic="yes"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
This will then show you just the one entry as you will have used the {url_title_path="template_group/template_name"} in the first channel entries tag above which would basically create a URI something like this :
http://www.example.com/template_group/template_name/url_title_of_my_posted_entry
On the second (template_group/template_name) single entry template page it will see the URL title and use this to filter down the channel entries tag to just that one entry.
Hope that helps a bit.
Best wishes,