Template talk:lc

Autolinker definitions are out of sync for other languages
Currently the latest update for the English versions of MediaWiki:autolinker-definition-c and MediaWiki:autolinker-definition-cpp were in 2021, while other languages are using older versions (such as zh:MediaWiki:autolinker-definition-cpp, the latest update is in 2018). Xmcgcg (talk) 18:31, 13 April 2023 (PDT)


 * Maybe, the general plan should be:


 * 1) Complete most (if not all) C++23/C23 pages, so all necessary identifiers are available together with target pages.
 * 2) Gather these new names to their appropriate lists.
 * 3) Propagate the change to non-English sub-sites.
 * How about that? :-) --Space Mission (talk) 14:46, 16 April 2023 (PDT)


 * I agree, but I suggest the current versions of MediaWiki:autolinker-definition-c and MediaWiki:autolinker-definition-cpp can be applied to non-English sub-sites first. The reason I created the ltt std template family is to resemble the behavior of lc in some non-English pages. We can make lc behave consistently across the sub-sites before the next versions are ready.


 * And there is another question: how is the link to created? I cannot find it in MediaWiki:autolinker-definition-cpp, but the link to it can be created in the declarations in the page . Xmcgcg (talk) 19:40, 16 April 2023 (PDT)


 * Ah. There are two subsystems of MediaWiki engine that are responsible for auto-linking. The first one is for links in text, used by the templates like lc and borrowing the links from MediaWiki:autolinker-definition-cpp family.


 * The second subsystem generates auto-links for source code (in source/example) and uses MediaWiki:Geshi-keyword-list-cpp etc as its database (MediaWiki:Geshi-keyword-list-c for C). The and the like are of this "Geshi-keyword-list" kind. Such "special-treatment-identifiers" (that appear in code blocks in bold-italic) are collected at the head of this list.


 * BTW, there might be much more exposition-only italicized identifiers in that list (alongside with ), but such identifiers (with inside}} do not play well with MediaWiki's internal C++-parser, as can be noticed examining the synopsis of  page, where no-throw-sentinel-for is broken since the parser threats this sequence as a list of identifiers/keywords (e.g.,  in this case) separated by a minus sign. Maybe, the  sequence should be used (in the list) instead? Or "normal" C++ ids in some form:  / .)


 * You may find more info in discussion page and linked archived pages, and in an "unofficial doc".
 * --Space Mission (talk) 05:15, 17 April 2023 (PDT)


 * I see. The non-English versions of MediaWiki:Geshi-keyword-list-cpp and MediaWiki:Geshi-keyword-list-c are also falling behind, probably need to be updated together with the autoliner definition files. I will create a page of exposition-only name list later (with a link to it in std symbol page) as the to-do list.


 * The no-throw-sentinel-for problem has a workaround: use the Script Small O, it is italic, so mixing it with other ASCII letters in italic teletype font looks good ( (ordinary 'o') VS (small script 'o'). Xmcgcg (talk) 19:38, 17 April 2023 (PDT)


 * Hmm, why then not with the "Non-Breaking Hyphen"? E.g.
 * (with ordinary hyphen ) vs
 * (with non-breaking hyphen ).
 * --Space Mission (talk) 00:49, 18 April 2023 (PDT)


 * Unfortunately (?), U+2011 does not have the Unicode property either (see ), so using NB hyphen is highly unlikely to work.


 * I think the problem is caused by the trailing keyword 'for' (if we cannot replace hyphens), since also contains 'throw', yet its link can be generated. Using U+2134 is likly to work in this case. Xmcgcg (talk) 01:45, 18 April 2023 (PDT)


 * BTW, the problem is certainly with trailing 'for' that is parsed as keyword, e.g.:


 * So, if 'throw' was the trailing word, the whole identifier would be "broken" for GeSHi.
 * As to the small-o, did you mean ? This looks inaccessible in some fonts :/
 * What about siblings of in other alphabets, e.g., о (U+043E, has XID_Continue prop.) (inside  &rArr; ) and as round as Latin U+006F o?. --Space Mission (talk) 16:34, 15 June 2023 (PDT)

Template bug?
As can be seen on Fixed width integer types, under some sections such as "Signed integers : maximum value" and "Unsigned integers : maximum value", the uses of renders the names in bold. The rest of the page uses instead, likely to avoid it, which "isn't intended to be directly used". Is this a styling bug? --Studyingegret (talk)


 * ✅ This is apparently an oversight. It's fixed now, I hope.


 * Besides, that property of lc to be rendered in bold if the link's target is on the same page seems like an obsolete "feature", that probably should eventually be changed: from ttb to plain tt. (?) --Space Mission (talk) 14:38, 16 April 2023 (PDT)