New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Styling of types #2954
Comments
I see merit in your argument. The problem is to actually enforce it. Either we get expert proofreaders, or we have somehow to develop an xt test to check that. If that's the case, I'd happily adopt that policy (if everyone else is happy with it) |
Adding onto the new [xt/rakudoc-c.rakutest] in origin/type-links. Lots of e.g. |
Given how secondary doc pages are generated, we should use the same formatting on each element on the page, not just the first - we can't guarantee ordering is the same on primary sources vs. generated pages. |
Moved test to its own file on that branch: Should get all cases where a string that is also in /Type/$string.rakudoc is not formatted correctly - doesn't touch those strings that appear in plain text. Currently 4598 failures for the new test file on the type-links branch. |
The problem
While proofreading some documentation pages (e.g., types), I've noticed that when a particular type is mentioned, the type is either linked to (e.g.,
L<Hash/type/Hash>
), formatted as code (e.g.,C<Hash>
) or just plain text (e.g.,Hash
). In some instances, the same type is linked to multiple times over the length of the page. Other times, it's never linked to but just formatted as code. In other, it's just plain text w/o any formatting that blends with the surrounding text.Suggestions
Most type pages have two top-level sections: the introduction to the type (e.g.,
class Hash
) which follows the class's title and subtitle and the Methods (and Type Graph) sections. In the following paragraphs, I'll focus only on the introduction section which itself might have sections. The case for routines documentation under the Methods section seems to be already covered here. Thus depending on how these pages are meant to be read, we could've some sort of convention when styling the types in the introduction:Top-to-bottom. If each type page is meant to be read from top-to-bottom, then:
L<>
). Subsequent mentions (regardless if it's in the same section, same section's subsection, new section, etc.) should be formatted asC<>
accordingly.C<>
. However, some exceptions may apply.Granular. If each type page is meant to be read granular-ly, then:
L<>
) and subsequent mentions of it within the same section (and its subsections) should be formatted asC<>
. New mentions of the same type in other h1-level sections follow the same procedure.C<>
. However, some exceptions may apply.The text was updated successfully, but these errors were encountered: