Page MenuHomePhabricator

Backlinks generated by <references/> shouldn't be visible in printed version of pages
Closed, ResolvedPublic

Description

article text.[1] article text.[2] article text.[2]

References

  1. ^ ref 1
  2. ^ 2.1 2.1 ref 2
  • should be printed as ----

article text.[1] article text.[2] article text.[2]

References

  1. ref 1
  2. ref 2

Version: unspecified
Severity: normal

Details

Reference
bz32626
TitleReferenceAuthorSource BranchDest Branch
Replace all remaining log writes to trace/req with real valuesrepos/abstract-wiki/wikifunctions/function-evaluator!61jforresterT346264main
Replace all remaining log writes to trace/req with real valuesrepos/abstract-wiki/wikifunctions/function-orchestrator!71jforresterT346264main
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/function-orchestrator!64jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/function-evaluator!56jforrestersync-function-schematamain
Update function-schemata sub-module to HEAD (958de5c)repos/abstract-wiki/wikifunctions/wikilambda-cli!15jforrestersync-function-schematamain
Logging: Actually use the logger in the correct way, passing data objectsrepos/abstract-wiki/wikifunctions/function-orchestrator!60jforresterT346264main
LoggerWrapper: Pass data object to logger service toorepos/abstract-wiki/wikifunctions/function-schemata!39jforresterT346264main
Add tuesday Collaboration Services windowrepos/releng/release!46brennenwork/brennen/add-phorge-deploymentmain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:58 PM
bzimport added a project: Cite.
bzimport set Reference to bz32626.
bzimport added a subscriber: Unknown Object (MLST).

This can be done by changing MediaWiki:Print.css. On https://nl.wikipedia.org/wiki/MediaWiki:Print.css we have:

ol.references li a[href|="#cite_ref"] {display:none;}

It would be nice though if Cite would give the backlinks a special class to make this somewhat easier (or make them invisible by default?).

The above solution doesn't work correctly for refs with multiple backlinks. But the backlinks can actually be given a class by changing the 'Cite references link one' and 'Cite references link many' system messages. See https://nl.wikipedia.org/wiki/MediaWiki:Cite_references_link_one and https://nl.wikipedia.org/wiki/MediaWiki:Cite_references_link_many. Now we can put in Print.css:

.cite-backlink {display:none;}

Why isn't it done in the extension?

The output, including the layout etc, is totally configurable by changing the system messages (cite_*). Making the extension use a specific layout means making it less customizable. Some people read the printable version in their browser, in which case it makes sense to be able to use the backlinks. So, some sites might want to choose to have the backlinks visible.

(In reply to comment #5)

The output, including the layout etc, is totally configurable by changing the
system messages (cite_*). Making the extension use a specific layout means
making it less customizable. Some people read the printable version in their
browser, in which case it makes sense to be able to use the backlinks. So, some
sites might want to choose to have the backlinks visible.

Then what about pre-inserting some classes but not attaching styles to them?

Created attachment 9793
Adding classes to default messages

Yes, that would make it easier when someone wants to hide the backlinks.

Attached: