Here's a homey example to illustrate my question.
Say I have a cooking recipe in the form of a numbered list, where the steps of the recipe correspond to the items of the list, and that somewhere in the recipe I refer to "the mixture prepared in step 3". Now suppose that I decide to insert an additional step between steps 2 and 3. This means that the phrase "the dressing prepared in step 3" is now incorrect, since what used to be step 3 is now actually step 4.
Is there some way to format the reference "step 3" in such a way that the number will get automatically updated to reflect the items current position in the numbered list?
I don't think so. You should avoid using the numbers if you are reading it in org-mode. Org-ref (https://github.com/jkitchin/jmax/blob/master/org/org-ref.org) provides a label and ref link that you could use for this.
add stuff label:stuff
Stir
Use ingredients from step ref:stuff to fill container.
When you export this to LaTeX then the ref links will be replaced by numbers as you want.
For vanilla org-mode use targets like this:
add stuff
Stir <<stir-label>>
Use something from step [[stir-label]] to get there.
Related
A EPi find question coming up, We have WebProducts and WebVariants and when showing a simple product listing on the category page I'm showing the following result correctly
If a WebProduct doesn't have any variants - show the WebProduct on the result
If a WebProduct has variants - show the WebVariants and hide the WebProduct
But when I'm trying to use the same functionality for the site-search it gets complicated.
The WebProduct has a property named Brand while the WebVariants doesn't have that property. So when I search for "My brand" and I get a hit on a WebProduct that has WebVariants, it won't show the WebProduct because point 2 is true in that case.
I on the other hand don't want to show the product, but I want to get the variants for that product... It might sound confusing :grimacing:
I'll add a code snippet of the code that makes point 1 and 2 to work.
.SearchAndFilterFor(q)
.Filter(x =>
(x.MatchType(typeof(WebVariant))) |
(x.MatchType(typeof(WebProduct)) & ((WebProduct)x).HasVariants().Match(false)))```
I would say that you have a couple of options to choose from.
Either:
1: Change the way your variants are indexed so that they include some of the key info (in this case brand) that they currently lack and as such, appear in the search results.
OR
2: Just do the search for WebProduct and then loop through those results afterward to do the processing for ones that do/don't have variants.
In buildbot's waterfall page, the buttons show the status of each build step. If the step runs, it simply shows 'Ran'. I want to edit this to give better info to the user. Where can I add this change from?
From the documentation of buidlbot 8.12, the keyword parameters of all buildsteps
include:-
description
This will be used to describe the command (on the Waterfall display) while the command is still running. It should be a single imperfect-tense verb, like compiling or testing. The preferred form is a list of short strings, which allows the HTML displays to create narrower columns by emitting a tag between each word. You may also provide a single string.
descriptionDone
This will be used to describe the command once it has finished. A simple noun like compile or tests should be used. Like description, this may either be a list of short strings or a single string.
In the python definitions of your buildsteps, you should set the descriptionDone
keyword parameter to an appropriate description for the completion of each buildstep.
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 need to show in a page a list of, let's say, person's properties that should be rendered more or less as follow:
name: Name
date: 1/1/2000
other: Other
Reading the doc they say:
The LABEL element may be used to attach information to controls.
So, is it the right tag to encompass the names of the properties like name, date...
even if there's not an <input> to associate with?
Nope, as per Quentin’s answer.
However, in HTML5, <dl> can be used for generic associations where <label> isn’t appropriate.
No.
It says that it can associate information with controls.
It does not say that it can associate information with anything else.
See also the newer (but draft) specification:
Some elements, not all of them form-associated, are categorized as
labelable elements. These are elements that can be associated with a
label element.
button input (if the type attribute is not in the hidden state) keygen
meter output progress select textarea
No, it is not correct to use the label element like that.
The important thing here is the meaning of may.
The LABEL element may be used to attach information to controls.
RFC 2119 (which the HTML4 spec follows) defines may:
May: This word, or the adjective "OPTIONAL", mean that an item is truly optional
So here, may does not mean the label element can be used for other purposes; it just means that it is not required to use a label element with controls.
As far as alternatives go, it depends what you want to achieve. If you are just trying to follow the spec closely, then I suggest using p and a strong element for each pair. If you want the data to be more meaningful to computers, you could consider using one of the Microformat specifications.
I partially agree with the answers so far but want to add that if you want to use labels for some reason, then I would display the property values in read-only controls, and then your labels will be valid.
I've done this using appropriate styling to differentiate the read-only controls from the functioning controls to avoid confusing your users. This was on a sequence of pages which built up the information gathered from the user in a wizard.
I have this link to W3C - the "Editor's Draft" as opposed to the link above which is the "Working Draft", which states that you can associate it with any element - as long as it's 'labelable' - even though this is a subsection of the Form section. It states earlier that a labelable element does not have to be within a form.
http://dev.w3.org/html5/spec/single-page.html#the-label-element
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,