Template talk:Annotated image 4

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

problem[edit]

Example


Gleision Caerdydd
Caerdydd
Sgarlets Llanelli
Llanelli
Y Gweilch
Abertawe
Castell-
Nedd
Dreigiau Casnewydd Gwent
Casnewydd
The image above contains clickable links
The 4 Welsh Rugby Union Regions of Wales

Hi. Can someone tell me what's wrong with this feeble attempt please! The doc file mentions 'SVG images are allowed.' but is that the only option? I take it it needs to be a vector? Llywelyn2000 (talk) 14:58, 6 December 2014 (UTC)[reply]

@Llywelyn2000: Hey there! The template takes raster images too. The only thing preventing the current revision from displaying is that the width and height need to be specified in addition to the image-width. If an image doesn't need to be cropped, image-width and width should be the same, with the height value determined by the image file's aspect ratio. So, if you wanted that image, which measures 788x941 pixels, to have a width of 500, the corresponding height would need to be about 597 pixels (500x597).
The only reason the template was coded this way is that width and height can be used with image-left and image-top to crop or expand the area around an image, both of which I've found useful at times.Seppi333 (Insert  | Maintained) 00:22, 7 December 2014 (UTC)[reply]
Hey! Many thanks! Brilliant stuff! This is really useful, and should be suggested as the default for ALL diagrams etc on enwiki, so that other languages can use and amend the text, rather than slow, hard work on image pixels! Many thanks! Llywelyn2000 (talk) 03:43, 7 December 2014 (UTC)[reply]
Looks good. Glad you like it. Seppi333 (Insert  | Maintained) 04:02, 8 December 2014 (UTC)[reply]

Using the formatting[edit]

Hi, I love the annotated image template. Before I start to use it, I wanted to ask a couple of questions:

  • When the image is clicked on to expand it, the annotations disappear. Is there a way to include them in the image?
  • Why do you tend to make a template for the image then embed the template in an article?
  • Are there any common mis-formatting mistakes that I should be aware of?

Thanks! T.Shafee(Evo﹠Evo)talk 03:42, 26 March 2015 (UTC)[reply]

@Evolution and evolvability: Hey! Thanks for the positive feedback. In response to your questions:
  1. At the moment, there's no way of doing this, although I could add an optional parameter to bypass the standard media viewer and go straight to the commons page when clicking the image. As long as there's annotations on the commons media file (commons uses {{Template:ImageNote}} for this), the page will display the annotations in that template's format. That template's annotations show up in the yellow text boxes that appear when mousing over the image; see COMMONS:File:ΔFosB.svg for an example.
    i.e., this button could replace the background link →

    I could also remove the image background hyperlink to prevent the media viewer from opening on a mis-click; although, for attribution purposes, I'd need to add an image thumbnail icon which hyperlinks to the commons page instead. See example to the right - it has no background link.

    If you'd like to have either of those options (or anything else) in this template, let me know and I'll see about adding that functionality.

  2. If the annotated image is going to be used in multiple articles, or simply might be in the future, it's usually best to make an image insertion template instead of add it directly to an article. Doing this reduces the amount of work for editors when updating the source code, since changes only need to be made on 1 centralized page instead of every page that includes the annotated image. It's probably also worth doing this if the image includes a lot of annotations because, in those cases, the {{annotated image 4}} template will take up a lot of space in the article's source code. As an example, in the collapse tabs below, I've included the source code and resulting image of the most heavily annotated/elaborate annotated image template that I've made thus far. It's probably best to just transclude that instead of place it directly into the article text.

  3. The template is pretty new, so I haven't gotten enough feedback to identify problem areas yet - I plan to revise the template to make it more user friendly based upon the feedback I get. Personally, the only thing I've found to be a little finicky is the {{annotation}} template's formatting, since it literally requires no spaces between vertical bars and the first two unnamed parameters for the x and y coordinates (I habitually add spaces which creates problems for me). I covered this issue in the documentation here: Template:Annotated image 4/doc#Template:Annotation parameters.
The {{Psychostimulant addiction}} template's transcluded source code

{{Annotated image 4
| nolink = {{{nolink|}}}
| caption = {{{caption|This diagram depicts the signaling events in the [[Mesolimbic pathway|brain's reward center]] that are induced by chronic high-dose exposure to psychostimulants that increase the concentration of synaptic dopamine, like {{if pagename | Amphetamine = amphetamine| other = [[amphetamine]]}}, {{if pagename| Methylphenidate = methylphenidate| other = [[methylphenidate]]}}, and {{if pagename | Phenethylamine = phenethylamine| other = [[phenethylamine]]}}. Following presynaptic {{if pagename| Dopamine = dopamine| other = [[dopamine]]}} and [[glutamate]] [[cotransmission|co-release]] by such psychostimulants,<ref name="Glutamate-dopamine cotransmission review">{{vcite2 journal | vauthors = Broussard JI | title = Co-transmission of dopamine and glutamate | journal = J. Gen. Physiol. | volume = 139 | issue = 1 | pages = 93–96 | date = January 2012 | pmid = 22200950 | pmc = 3250102 | doi = 10.1085/jgp.201110659 | quote = <!-- Coincident and convergent input often induces plasticity on a postsynaptic neuron. The {{abbr|NAc|nucleus accumbens}} integrates processed information about the environment from basolateral amygdala, hippocampus, and prefrontal cortex (PFC), as well as projections from midbrain dopamine neurons. Previous studies have demonstrated how dopamine modulates this integrative process. For example, high frequency stimulation potentiates hippocampal inputs to the NAc while simultaneously depressing PFC synapses (Goto and Grace, 2005). The converse was also shown to be true; stimulation at PFC potentiates PFC–NAc synapses but depresses hippocampal–NAc synapses. In light of the new functional evidence of midbrain dopamine/glutamate co-transmission (references above), new experiments of NAc function will have to test whether midbrain glutamatergic inputs bias or filter either limbic or cortical inputs to guide goal-directed behavior. -->}}</ref><ref name="Glutamate-dopamine cotransmission review 2">{{vcite2 journal | vauthors = Descarries L, Berube-Carriere N, Riad M, Bo GD, Mendez JA, Trudeau LE | title = Glutamate in dopamine neurons: synaptic versus diffuse transmission | journal = Brain Res. Rev. | volume = 58 | issue = 2 | pages = 290–302 | date = August 2008 | pmid = 18042492 | doi = 10.1016/j.brainresrev.2007.10.005 | quote = <!-- Moreover, all {{abbr|TH|tyrosine hydroxylase}} varicosities which co-localize VGluT2 are synaptic, as if there was a link between the potential of {{abbr|DA|dopamine}} axon terminals to release glutamate and their establishment of synaptic junctions. Together with the RT-PCR and in situ hybridization data demonstrating the co-localization of TH and VGluT2 mRNA in mesencephalic neurons of the {{abbr|VTA|ventral tegmental area}}, these observations raise a number of fundamental questions regarding the functioning of the meso-telencephalic DA system in healthy or diseased brain. --> }}</ref> [[Neurotransmitter receptor|postsynaptic receptors]] for these [[neurotransmitter]]s trigger internal signaling events through a {{abbr|cAMP|cyclic adenosine monophosphate}} pathway and calcium-dependent pathway that ultimately result in increased {{abbr|CREB|cAMP response element-binding protein}} phosphorylation.<ref name="Amphetamine KEGG ΔFosB">{{cite web | title=Amphetamine – Homo sapiens (human) | url=http://www.genome.jp/kegg-bin/show_pathway?hsa05031 | work=KEGG Pathway | accessdate=31 October 2014 | author=Kanehisa Laboratories | date=10 October 2014}}</ref><ref name="Nestler-Renthal Figure 2" /> Phosphorylated CREB increases levels of ΔFosB, which in turn represses the c-fos gene with the help of [[corepressor]]s;<ref name="Nestler-Renthal Figure 2">{{cite journal | author = Renthal W, Nestler EJ | title = Chromatin regulation in drug addiction and depression | journal = Dialogues Clin. Neurosci. | volume = 11 | issue = 3 | pages = 257–268 | date = September 2009 | pmid = 19877494 | pmc = 2834246 | doi = | url = http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2834246/figure/DialoguesClinNeurosci-11-257-g002/ | accessdate = 21 July 2014 | quote=}}</ref> c-fos [[gene repression|repression]] acts as a molecular switch that enables the accumulation of ΔFosB in the neuron.<ref name="c-Fos repression">{{cite journal |author=Nestler EJ | title=Review. Transcriptional mechanisms of addiction: role of DeltaFosB | journal = Philos. Trans. R. Soc. Lond., B, Biol. Sci. | volume=363 | issue=1507 | pages=3245–3255 | date=October 2008 | pmid=18640924 | doi=10.1098/rstb.2008.0067 | pmc=2607320 | quote = <!-- Recent evidence has shown that ΔFosB also represses the c-fos gene that helps create the molecular switch—from the induction of several short-lived Fos family proteins after acute drug exposure to the predominant accumulation of ΔFosB after chronic drug exposure—cited earlier (Renthal et al. in press). -->}}</ref> A highly stable (phosphorylated) form of ΔFosB, one that persists in neurons for one or two months, slowly accumulates following repeated exposure to stimulants through this process.<ref name="Nestler1" /><ref name="Nestler2">{{cite journal | author = Nestler EJ | title = Transcriptional mechanisms of drug addiction | journal = Clin. Psychopharmacol. Neurosci. | volume = 10 | issue = 3 | pages = 136–143 | date = December 2012 | pmid = 23430970 | pmc = 3569166 | doi = 10.9758/cpn.2012.10.3.136 | quote = The 35-37 kD ΔFosB isoforms accumulate with chronic drug exposure due to their extraordinarily long half-lives. ... As a result of its stability, the ΔFosB protein persists in neurons for at least several weeks after cessation of drug exposure. ... ΔFosB overexpression in nucleus accumbens induces NFκB}}</ref> ΔFosB functions as "one of the master control proteins" that produces addiction-related [[neuroplasticity|structural changes in the brain]], and upon sufficient accumulation, with the help of its downstream targets (e.g., [[nuclear factor kappa B]]), it induces an addictive state.<ref name="Nestler1">{{cite journal | author = Robison AJ, Nestler EJ | title = Transcriptional and epigenetic mechanisms of addiction | journal = Nat. Rev. Neurosci. | volume = 12 | issue = 11 | pages = 623–637 | date = November 2011 | pmid = 21989194 | pmc = 3272277 | doi = 10.1038/nrn3111 | quote = ΔFosB serves as one of the master control proteins governing this structural plasticity.}}</ref><ref name="Nestler2" />}}}

|header = {{{header|[[Signaling cascade]] in the [[nucleus accumbens]] that results in psychostimulant addiction}}}<br />{{v|t|e|template=Psychostimulant addiction}}
|header_align = center
|header_background = {{{headerbg|#EDC9AF}}}
|alt = The signaling cascade involved in psychostimulant addiction
|image = ΔFosB.svg
|align = {{{align|center}}}
|image-width = 600
|image-left = 0
|image-top = 0
|width = 600
|height = 620
|annot-font-size = 14
|annot-text-align = center
|annotations =
<!--Note located at the top right-->
{{Annotation|475|5|'''Note: colored text contains article links.'''|font-size=12}}

<!--Membranes/Pore-->
{{Annotation|320|325|[[Nuclear pore]]}}
{{Annotation|350|362|[[Nuclear membrane]]}}
{{Annotation|475|425|[[Plasma membrane]]}}

<!--Left: channels and receptors-->
{{Annotation|65|48|[[Calcium channel, voltage-dependent, L type, alpha 1C subunit|Ca<sub>v</sub>1.2]]}}
{{Annotation|43|98|[[NMDA receptor|NMDAR]]}}
{{Annotation|33|185|[[AMPA receptor|AMPAR]]}}
{{Annotation|41|238|[[Dopamine receptor D1|DRD1]]}}
{{Annotation|42|285|[[Dopamine receptor D5|DRD5]]}}
{{Annotation|47|331|[[Dopamine receptor D2|DRD2]]}}
{{Annotation|56|366|[[Dopamine receptor D3|DRD3]]}}
{{Annotation|84|385|[[Dopamine receptor D4|DRD4]]}}

<!--Bottom: G proteins and cAMP-->
{{Annotation|172|256|[[Gs alpha subunit|G<sub>s</sub>]]}}
{{Annotation|173|325|[[Gi alpha subunit|G<sub>i/o</sub>]]}}
{{Annotation|18|595|[[cyclic adenosine monophosphate|'''cAMP''']]|font-size=10}}
{{Annotation|225|290|[[cyclic adenosine monophosphate|'''cAMP''']]|font-size=10}}
{{Annotation|313|288|[[Protein kinase A|PKA]]}}

<!--Middle: Inside neuron, outside nucleus-->
{{Annotation|228|110|[[Calmodulin|CaM]]}}
{{Annotation|329|98|[[Ca2+/calmodulin-dependent protein kinase II|CaMKII]]}}
{{Annotation|301|215|[[Dopamine- and cAMP-regulated neuronal phosphoprotein|DARPP-32]]}}
{{Annotation|328|161|[[Protein phosphatase 1|PP1]]}}
{{Annotation|248|158|[[Protein phosphatase 2B|PP2B]]}}

<!--Right: Inside nucleus-->
{{Annotation|458|163|[[Cyclic AMP response element-binding protein|<span style="color:firebrick">CREB</span>]]}}
{{Annotation|440|221|'''[[ΔFosB|<span style="color:firebrick">ΔFosB</span>]]'''}}
{{Annotation|448|240|'''[[JunD|<span style="color:firebrick">JunD</span>]]'''}}
{{Annotation|542|233|[[c-Fos|<span style="color:firebrick">c-Fos</span>]]}}
{{Annotation|442|274|[[Sirtuin 1|SIRT1]]}}
{{Annotation|469|299|[[Histone deacetylase 1|HDAC1]]}}

<!--Color code parameter for a transcluded reference containing a legend. This code contains 4 nested template sets, which are in order: if template, annotation template, reference template, legend templates-->
{{#ifeq:{{{Colorcode}}}|no||{{Annotation|495|35|{{#tag:ref|<!--
-->{{multicol}}<!--
-->{{legend|#00ffff|[[Ion channel]]}}<!--
-->{{legend|#b2df8a|[[G proteins]] & [[G protein-coupled receptor|linked receptors]]}}<!--
-->{{legend|firebrick|(Text color) [[Transcription factor]]s}}<!--
-->{{multicol-end}}<!--
-->|group="Color legend"}}<!-- -->}}<!-- -->}}

}}

How this template appears in articles

Note that the annotated reference group and caption references show up in the references section at the end of the article as opposed to below the image in this example.

Signaling cascade in the nucleus accumbens that results in psychostimulant addiction
The image above contains clickable links
This diagram depicts the signaling events in the brain's reward center that are induced by chronic high-dose exposure to psychostimulants that increase the concentration of synaptic dopamine, like amphetamine, methamphetamine, and phenethylamine. Following presynaptic dopamine and glutamate co-release by such psychostimulants,[1][2] postsynaptic receptors for these neurotransmitters trigger internal signaling events through a cAMP-dependent pathway and a calcium-dependent pathway that ultimately result in increased CREB phosphorylation.[1][3][4] Phosphorylated CREB increases levels of ΔFosB, which in turn represses the c-Fos gene with the help of corepressors;[1][5][6] c-Fos repression acts as a molecular switch that enables the accumulation of ΔFosB in the neuron.[7] A highly stable (phosphorylated) form of ΔFosB, one that persists in neurons for 1–2 months, slowly accumulates following repeated high-dose exposure to stimulants through this process.[5][6] ΔFosB functions as "one of the master control proteins" that produces addiction-related structural changes in the brain, and upon sufficient accumulation, with the help of its downstream targets (e.g., nuclear factor kappa B), it induces an addictive state.[5][6]
References

References

  1. ^ a b c Renthal W, Nestler EJ (September 2009). "Chromatin regulation in drug addiction and depression". Dialogues in Clinical Neuroscience. 11 (3): 257–268. doi:10.31887/DCNS.2009.11.3/wrenthal. PMC 2834246. PMID 19877494. [Psychostimulants] increase cAMP levels in striatum, which activates protein kinase A (PKA) and leads to phosphorylation of its targets. This includes the cAMP response element binding protein (CREB), the phosphorylation of which induces its association with the histone acetyltransferase, CREB binding protein (CBP) to acetylate histones and facilitate gene activation. This is known to occur on many genes including fosB and c-fos in response to psychostimulant exposure. ΔFosB is also upregulated by chronic psychostimulant treatments, and is known to activate certain genes (eg, cdk5) and repress others (eg, c-fos) where it recruits HDAC1 as a corepressor. ... Chronic exposure to psychostimulants increases glutamatergic [signaling] from the prefrontal cortex to the NAc. Glutamatergic signaling elevates Ca2+ levels in NAc postsynaptic elements where it activates CaMK (calcium/calmodulin protein kinases) signaling, which, in addition to phosphorylating CREB, also phosphorylates HDAC5.
    Figure 2: Psychostimulant-induced signaling events
  2. ^ Broussard JI (January 2012). "Co-transmission of dopamine and glutamate". The Journal of General Physiology. 139 (1): 93–96. doi:10.1085/jgp.201110659. PMC 3250102. PMID 22200950. Coincident and convergent input often induces plasticity on a postsynaptic neuron. The NAc integrates processed information about the environment from basolateral amygdala, hippocampus, and prefrontal cortex (PFC), as well as projections from midbrain dopamine neurons. Previous studies have demonstrated how dopamine modulates this integrative process. For example, high frequency stimulation potentiates hippocampal inputs to the NAc while simultaneously depressing PFC synapses (Goto and Grace, 2005). The converse was also shown to be true; stimulation at PFC potentiates PFC–NAc synapses but depresses hippocampal–NAc synapses. In light of the new functional evidence of midbrain dopamine/glutamate co-transmission (references above), new experiments of NAc function will have to test whether midbrain glutamatergic inputs bias or filter either limbic or cortical inputs to guide goal-directed behavior.
  3. ^ Kanehisa Laboratories (10 October 2014). "Amphetamine – Homo sapiens (human)". KEGG Pathway. Retrieved 31 October 2014. Most addictive drugs increase extracellular concentrations of dopamine (DA) in nucleus accumbens (NAc) and medial prefrontal cortex (mPFC), projection areas of mesocorticolimbic DA neurons and key components of the "brain reward circuit". Amphetamine achieves this elevation in extracellular levels of DA by promoting efflux from synaptic terminals. ... Chronic exposure to amphetamine induces a unique transcription factor delta FosB, which plays an essential role in long-term adaptive changes in the brain.
  4. ^ Cadet JL, Brannock C, Jayanthi S, Krasnova IN (2015). "Transcriptional and epigenetic substrates of methamphetamine addiction and withdrawal: evidence from a long-access self-administration model in the rat". Molecular Neurobiology. 51 (2): 696–717 (Figure 1). doi:10.1007/s12035-014-8776-8. PMC 4359351. PMID 24939695.
  5. ^ a b c Robison AJ, Nestler EJ (November 2011). "Transcriptional and epigenetic mechanisms of addiction". Nature Reviews Neuroscience. 12 (11): 623–637. doi:10.1038/nrn3111. PMC 3272277. PMID 21989194. ΔFosB serves as one of the master control proteins governing this structural plasticity. ... ΔFosB also represses G9a expression, leading to reduced repressive histone methylation at the cdk5 gene. The net result is gene activation and increased CDK5 expression. ... In contrast, ΔFosB binds to the c-fos gene and recruits several co-repressors, including HDAC1 (histone deacetylase 1) and SIRT 1 (sirtuin 1). ... The net result is c-fos gene repression.
    Figure 4: Epigenetic basis of drug regulation of gene expression
  6. ^ a b c Nestler EJ (December 2012). "Transcriptional mechanisms of drug addiction". Clinical Psychopharmacology and Neuroscience. 10 (3): 136–143. doi:10.9758/cpn.2012.10.3.136. PMC 3569166. PMID 23430970. The 35-37 kD ΔFosB isoforms accumulate with chronic drug exposure due to their extraordinarily long half-lives. ... As a result of its stability, the ΔFosB protein persists in neurons for at least several weeks after cessation of drug exposure. ... ΔFosB overexpression in nucleus accumbens induces NFκB ... In contrast, the ability of ΔFosB to repress the c-Fos gene occurs in concert with the recruitment of a histone deacetylase and presumably several other repressive proteins such as a repressive histone methyltransferase
  7. ^ Nestler EJ (October 2008). "Transcriptional mechanisms of addiction: Role of ΔFosB". Philosophical Transactions of the Royal Society B: Biological Sciences. 363 (1507): 3245–3255. doi:10.1098/rstb.2008.0067. PMC 2607320. PMID 18640924. Recent evidence has shown that ΔFosB also represses the c-fos gene that helps create the molecular switch—from the induction of several short-lived Fos family proteins after acute drug exposure to the predominant accumulation of ΔFosB after chronic drug exposure
Image color legend
  1. ^
      (Text color) Transcription factors
Please let me know if there's anything you find less than intuitive or if you need any help with annotating a particular image though!
I'm happy to assist others with using this template and I'd also appreciate the feedback for improving its user friendliness. Seppi333 (Insert  | Maintained) 19:44, 26 March 2015 (UTC)[reply]


Thank you for the really helpful responses! I've used them to develop Template:Glycolysis_summary. One thing that has bugged me is that images in the mobile phone viewer, the right hand side of the image is lost if the images is wider than the screen. Is there a way to allow scrolling of the image as happens in the three images in Wikipedia:Picture_tutorial#Overlaying_annotations_on_an_image?

Also. The idea of adding a |link= parameter would be amazing! That way, it would be possible to redirect to a version of the image with annotations included in the picture (i.e. |link=annotated_version_of_same_image.svg). T.Shafee(Evo﹠Evo)talk 12:22, 28 March 2015 (UTC)[reply]

  • @Evolution and evolvability: Unfortunately, there's no way that I know about to fix the issue with the annotation template when viewed on mobile phones. I'm aware of it, but I also figure the template isn't really useful for mobile viewers anyway, since it's very difficult (at least for me, when using my iphone) to click an annotation instead of the image background.
  • I've made the template bypass the mediaviewer when clicking the background link by default. It now goes straight to the commons file page. Using the |link= parameter will allow the background link to be manually targeted in the template call. Using the parameter |nolink=yes will remove the background link altogether, but, when removing the on-click link, it's imperative for copyright purposes that something on the image or in the caption be added which links to the commons page. I'm thinking about making it append to the end of the caption when this parameter is used, where this icon would link to the commons file page of the associated image when it is clicked. I've added an example of what I'm suggesting in the collapse tab below:
Example of the caption link when the nolink parameter is used
Signaling cascade in the nucleus accumbens that results in psychostimulant addiction
The image above contains clickable links
This diagram depicts the signaling events in the brain's reward center that are induced by chronic high-dose exposure to psychostimulants that increase the concentration of synaptic dopamine, like amphetamine, methamphetamine, and phenethylamine. Following presynaptic dopamine and glutamate co-release by such psychostimulants,[1][2] postsynaptic receptors for these neurotransmitters trigger internal signaling events through a cAMP-dependent pathway and a calcium-dependent pathway that ultimately result in increased CREB phosphorylation.[1][3][4] Phosphorylated CREB increases levels of ΔFosB, which in turn represses the c-Fos gene with the help of corepressors;[1][5][6] c-Fos repression acts as a molecular switch that enables the accumulation of ΔFosB in the neuron.[7] A highly stable (phosphorylated) form of ΔFosB, one that persists in neurons for 1–2 months, slowly accumulates following repeated high-dose exposure to stimulants through this process.[5][6] ΔFosB functions as "one of the master control proteins" that produces addiction-related structural changes in the brain, and upon sufficient accumulation, with the help of its downstream targets (e.g., nuclear factor kappa B), it induces an addictive state.[5][6] 
References

References

  1. ^ a b c Renthal W, Nestler EJ (September 2009). "Chromatin regulation in drug addiction and depression". Dialogues in Clinical Neuroscience. 11 (3): 257–268. doi:10.31887/DCNS.2009.11.3/wrenthal. PMC 2834246. PMID 19877494. [Psychostimulants] increase cAMP levels in striatum, which activates protein kinase A (PKA) and leads to phosphorylation of its targets. This includes the cAMP response element binding protein (CREB), the phosphorylation of which induces its association with the histone acetyltransferase, CREB binding protein (CBP) to acetylate histones and facilitate gene activation. This is known to occur on many genes including fosB and c-fos in response to psychostimulant exposure. ΔFosB is also upregulated by chronic psychostimulant treatments, and is known to activate certain genes (eg, cdk5) and repress others (eg, c-fos) where it recruits HDAC1 as a corepressor. ... Chronic exposure to psychostimulants increases glutamatergic [signaling] from the prefrontal cortex to the NAc. Glutamatergic signaling elevates Ca2+ levels in NAc postsynaptic elements where it activates CaMK (calcium/calmodulin protein kinases) signaling, which, in addition to phosphorylating CREB, also phosphorylates HDAC5.
    Figure 2: Psychostimulant-induced signaling events
  2. ^ Broussard JI (January 2012). "Co-transmission of dopamine and glutamate". The Journal of General Physiology. 139 (1): 93–96. doi:10.1085/jgp.201110659. PMC 3250102. PMID 22200950. Coincident and convergent input often induces plasticity on a postsynaptic neuron. The NAc integrates processed information about the environment from basolateral amygdala, hippocampus, and prefrontal cortex (PFC), as well as projections from midbrain dopamine neurons. Previous studies have demonstrated how dopamine modulates this integrative process. For example, high frequency stimulation potentiates hippocampal inputs to the NAc while simultaneously depressing PFC synapses (Goto and Grace, 2005). The converse was also shown to be true; stimulation at PFC potentiates PFC–NAc synapses but depresses hippocampal–NAc synapses. In light of the new functional evidence of midbrain dopamine/glutamate co-transmission (references above), new experiments of NAc function will have to test whether midbrain glutamatergic inputs bias or filter either limbic or cortical inputs to guide goal-directed behavior.
  3. ^ Kanehisa Laboratories (10 October 2014). "Amphetamine – Homo sapiens (human)". KEGG Pathway. Retrieved 31 October 2014. Most addictive drugs increase extracellular concentrations of dopamine (DA) in nucleus accumbens (NAc) and medial prefrontal cortex (mPFC), projection areas of mesocorticolimbic DA neurons and key components of the "brain reward circuit". Amphetamine achieves this elevation in extracellular levels of DA by promoting efflux from synaptic terminals. ... Chronic exposure to amphetamine induces a unique transcription factor delta FosB, which plays an essential role in long-term adaptive changes in the brain.
  4. ^ Cadet JL, Brannock C, Jayanthi S, Krasnova IN (2015). "Transcriptional and epigenetic substrates of methamphetamine addiction and withdrawal: evidence from a long-access self-administration model in the rat". Molecular Neurobiology. 51 (2): 696–717 (Figure 1). doi:10.1007/s12035-014-8776-8. PMC 4359351. PMID 24939695.
  5. ^ a b c Robison AJ, Nestler EJ (November 2011). "Transcriptional and epigenetic mechanisms of addiction". Nature Reviews Neuroscience. 12 (11): 623–637. doi:10.1038/nrn3111. PMC 3272277. PMID 21989194. ΔFosB serves as one of the master control proteins governing this structural plasticity. ... ΔFosB also represses G9a expression, leading to reduced repressive histone methylation at the cdk5 gene. The net result is gene activation and increased CDK5 expression. ... In contrast, ΔFosB binds to the c-fos gene and recruits several co-repressors, including HDAC1 (histone deacetylase 1) and SIRT 1 (sirtuin 1). ... The net result is c-fos gene repression.
    Figure 4: Epigenetic basis of drug regulation of gene expression
  6. ^ a b c Nestler EJ (December 2012). "Transcriptional mechanisms of drug addiction". Clinical Psychopharmacology and Neuroscience. 10 (3): 136–143. doi:10.9758/cpn.2012.10.3.136. PMC 3569166. PMID 23430970. The 35-37 kD ΔFosB isoforms accumulate with chronic drug exposure due to their extraordinarily long half-lives. ... As a result of its stability, the ΔFosB protein persists in neurons for at least several weeks after cessation of drug exposure. ... ΔFosB overexpression in nucleus accumbens induces NFκB ... In contrast, the ability of ΔFosB to repress the c-Fos gene occurs in concert with the recruitment of a histone deacetylase and presumably several other repressive proteins such as a repressive histone methyltransferase
  7. ^ Nestler EJ (October 2008). "Transcriptional mechanisms of addiction: Role of ΔFosB". Philosophical Transactions of the Royal Society B: Biological Sciences. 363 (1507): 3245–3255. doi:10.1098/rstb.2008.0067. PMC 2607320. PMID 18640924. Recent evidence has shown that ΔFosB also represses the c-fos gene that helps create the molecular switch—from the induction of several short-lived Fos family proteins after acute drug exposure to the predominant accumulation of ΔFosB after chronic drug exposure
Image color legend
Is this solution agreeable with you, or do you prefer a different option?
Also, if the image is retargeted to a different commons page than the one associated with the template image, there would need to be a link somewhere on the retargeted file description page to the commons page of the template's image. I'm not sure if it's clear what I mean by this, so I'll provide an example of what I mean by this if necessary. In any event, I need to update the template documentation within the next few days. Seppi333 (Insert  | Maintained) 02:52, 1 April 2015 (UTC)[reply]
Forgot to add: I couldn't add the standard thumbnail's expand icon to the top right because of the way I coded the template (i.e., I can't add the "thumb" option to the source code without breaking the template). Seppi333 (Insert  | Maintained) 02:57, 1 April 2015 (UTC)[reply]
@Seppi333: Excellent, thank you. I've implemented it in Template:Glycolysis_summary and it seems to be working well. Agree with the idea of adding a link too when you have the chance. T.Shafee(Evo﹠Evo)talk 10:23, 1 April 2015 (UTC)[reply]
template within a table

{|style="float: right;" |- | {{Annotated image 4}} |}

@Seppi333: I've found a work-around for improving the rendering on mobile devices - embedding the template in a table allows it to be scrolled though if it doesn't fit on a screen (rather than be clipped). See Glycolysis on a mobile or tablet for an example. Doesn't seem to cause any other problems as far as I can see. T.Shafee(Evo﹠Evo)talk 10:04, 11 April 2015 (UTC)[reply]

Neat, I'll have to test this out a bit - I'll mention it in the documentation if I don't find any weird bugs. I'm a bit behind on my wiki-editing, so I'm probably not going to get around to tweaking the template's code for |nolink= or adjusting the documentation for a week or two. Seppi333 (Insert ) 06:48, 17 April 2015 (UTC)[reply]

Edit: Nevermind, I updated the |nolink= code to include the icon functionality. I used it in {{psychostimulant addiction}} since it has a ton of wikilinks. Seppi333 (Insert ) 07:09, 17 April 2015 (UTC)[reply]

Mobile version image scrolling[edit]

I think the problem may have actually been resolved by an update in the wikimedia software since you mentioned this, because these images now display in scrollable windows on my iphone's browser; is this resolved for your mobile devices as well, or is it still an issue? Seppi333 (Insert ) 12:52, 11 August 2015 (UTC)[reply]

Interesting. Sadly it still remains un-scrollable on my android phone using chrome - checked using {{eukaryote gene structure}}. Placing the template in a 1x1 table still seems to be the only bodge that works for me. T.Shafee(Evo﹠Evo)talk 23:59, 11 August 2015 (UTC)[reply]
@Evolution and evolvability: Have you encountered any rendering issues from putting AI4-templated images into a nested table since you first started doing this? Also, does your mobile chrome browser have issues with left–right scrolling with very wide wikitables that don't contain images, like {{FOSB addiction table}}, or is it just an issue with left–right scrolling the AI4-templated images that are nested in a wikitable?
I'm considering updating the functionality of {{AI4}} to automatically nest the annotated image in an invisible wikitable that uses a switch statement to set the table alignment and the image alignment together with the |align= parameter's input (it seems unnecessary and a bit redundant to create a second alignment parameter just for the table IMO). I need to thoroughly test this switch statement functionality on different mobile/desktop browsers with the 4 templates that I listed at Talk:Amphetamine#To do first though since their combined transclusion count spans around 20–30 different pages (they have different alignment settings on each page). Seppi333 (Insert ) 01:17, 21 August 2016 (UTC)[reply]
@Seppi333: I've not found any problems with the scrolling of wikitables, or AI4 templates nested in wikitables. I've stress-tested it in a few platforms: firefox, chrome (desktop and android phone), safari (desktop and iphone), edge. An alternative is that it may be possible to do a similar thing using a <div> with some CSS overflow property. T.Shafee(Evo&Evo)talk 08:09, 21 August 2016 (UTC)[reply]
Hmm... that's a good point; it'd be a lot simpler if this could be accomplished with HTML/CSS than by nesting every image in a wikitable. I'll look into that. Seppi333 (Insert ) 10:51, 21 August 2016 (UTC)[reply]


Switch statement options for wikitable style parameter
  • Left: style="float: left;"
  • Center: style="margin-left: auto; margin-right: auto; border: none;"
  • Right: style="float: right;"
 

@Evolution and evolvability: This doesn't seem to be an issue on my phone anymore due to intervening WP software updates. I haven't checked on the Wikipedia iphone app since it just seems broken in a number of other ways at the moment. Are you still seeing an issue that would require some form of reformatting in the browser(s) on your mobile device(s)? Seppi333 (Insert ) 23:06, 13 July 2017 (UTC)[reply]

@Evolution and evolvability: Nevermind. I just started seeing this again. Since the issue also appears in the mobile browser preview gadget (from Special:Preferences#mw-prefsection-gadgets), I modified the template to include a 2nd switch object for a table wrapper (Special:diff/772063089/794666466). Sorry that it took me so long to get around to this. I feel like our readers got screwed the most. Anyway, it may be worth removing the nested table syntax from the template where it was used in templates or articles prior to this update. Having the 2nd table wrapper adds about 10 px in width which isn't a big deal, but it's still probably worth removing it since it's no longer necessary. Seppi333 (Insert ) 10:44, 9 August 2017 (UTC)[reply]
@Seppi333: Fantastic work! Sorry for not replying to the earlier message. I've updated the templates that I mage that use {{AI4}}. The pages seem to now be working perfectly on desktop and mobile so far as I can see (e.g. lead images in Gene and Glycolysis)! Thanks again, T.Shafee(Evo&Evo)talk 11:08, 9 August 2017 (UTC)[reply]
Actually, following that update, I noticed the following rendering issue in the amphetamine article:
Example of borked rendering
Addiction and dependence glossary[1][2][3]
  • addiction – a biopsychosocial disorder characterized by persistent use of drugs (including alcohol) despite substantial harm and adverse consequences
  • addictive drug – psychoactive substances that with repeated use are associated with significantly higher rates of substance use disorders, due in large part to the drug's effect on brain reward systems
  • dependence – an adaptive state associated with a withdrawal syndrome upon cessation of repeated exposure to a stimulus (e.g., drug intake)
  • drug sensitization or reverse tolerance – the escalating effect of a drug resulting from repeated administration at a given dose
  • drug withdrawal – symptoms that occur upon cessation of repeated drug use
  • physical dependence – dependence that involves persistent physical–somatic withdrawal symptoms (e.g., fatigue and delirium tremens)
  • psychological dependence – dependence socially seen as being extremely mild compared to physical dependence (e.g., with enough willpower it could be overcome)
  • reinforcing stimuli – stimuli that increase the probability of repeating behaviors paired with them
  • rewarding stimuli – stimuli that the brain interprets as intrinsically positive and desirable or as something to approach
  • sensitization – an amplified response to a stimulus resulting from repeated exposure to it
  • substance use disorder – a condition in which the use of substances leads to clinically and functionally significant impairment or distress
  • tolerance – the diminishing effect of a drug resulting from repeated administration at a given dose
Signaling cascade in the nucleus accumbens that results in psychostimulant addiction
The image above contains clickable links
This diagram depicts the signaling events in the brain's reward center that are induced by chronic high-dose exposure to psychostimulants that increase the concentration of synaptic dopamine, like amphetamine, methamphetamine, and phenethylamine. Following presynaptic dopamine and glutamate co-release by such psychostimulants,[4][5] postsynaptic receptors for these neurotransmitters trigger internal signaling events through a cAMP-dependent pathway and a calcium-dependent pathway that ultimately result in increased CREB phosphorylation.[4][6][7] Phosphorylated CREB increases levels of ΔFosB, which in turn represses the c-Fos gene with the help of corepressors;[4][8][9] c-Fos repression acts as a molecular switch that enables the accumulation of ΔFosB in the neuron.[10] A highly stable (phosphorylated) form of ΔFosB, one that persists in neurons for 1–2 months, slowly accumulates following repeated high-dose exposure to stimulants through this process.[8][9] ΔFosB functions as "one of the master control proteins" that produces addiction-related structural changes in the brain, and upon sufficient accumulation, with the help of its downstream targets (e.g., nuclear factor kappa B), it induces an addictive state.[8][9]
Template with the fix for this issue (I've added clear:right and clear:left to the style options in the switch parameter for the table)
Addiction and dependence glossary[1][2][3]
  • addiction – a biopsychosocial disorder characterized by persistent use of drugs (including alcohol) despite substantial harm and adverse consequences
  • addictive drug – psychoactive substances that with repeated use are associated with significantly higher rates of substance use disorders, due in large part to the drug's effect on brain reward systems
  • dependence – an adaptive state associated with a withdrawal syndrome upon cessation of repeated exposure to a stimulus (e.g., drug intake)
  • drug sensitization or reverse tolerance – the escalating effect of a drug resulting from repeated administration at a given dose
  • drug withdrawal – symptoms that occur upon cessation of repeated drug use
  • physical dependence – dependence that involves persistent physical–somatic withdrawal symptoms (e.g., fatigue and delirium tremens)
  • psychological dependence – dependence socially seen as being extremely mild compared to physical dependence (e.g., with enough willpower it could be overcome)
  • reinforcing stimuli – stimuli that increase the probability of repeating behaviors paired with them
  • rewarding stimuli – stimuli that the brain interprets as intrinsically positive and desirable or as something to approach
  • sensitization – an amplified response to a stimulus resulting from repeated exposure to it
  • substance use disorder – a condition in which the use of substances leads to clinically and functionally significant impairment or distress
  • tolerance – the diminishing effect of a drug resulting from repeated administration at a given dose
Signaling cascade in the nucleus accumbens that results in psychostimulant addiction
The image above contains clickable links
This diagram depicts the signaling events in the brain's reward center that are induced by chronic high-dose exposure to psychostimulants that increase the concentration of synaptic dopamine, like amphetamine, methamphetamine, and phenethylamine. Following presynaptic dopamine and glutamate co-release by such psychostimulants,[4][5] postsynaptic receptors for these neurotransmitters trigger internal signaling events through a cAMP-dependent pathway and a calcium-dependent pathway that ultimately result in increased CREB phosphorylation.[4][6][7] Phosphorylated CREB increases levels of ΔFosB, which in turn represses the c-Fos gene with the help of corepressors;[4][8][9] c-Fos repression acts as a molecular switch that enables the accumulation of ΔFosB in the neuron.[10] A highly stable (phosphorylated) form of ΔFosB, one that persists in neurons for 1–2 months, slowly accumulates following repeated high-dose exposure to stimulants through this process.[8][9] ΔFosB functions as "one of the master control proteins" that produces addiction-related structural changes in the brain, and upon sufficient accumulation, with the help of its downstream targets (e.g., nuclear factor kappa B), it induces an addictive state.[8][9]
Reflist for all three examples

References

  1. ^ a b Malenka RC, Nestler EJ, Hyman SE (2009). "Chapter 15: Reinforcement and Addictive Disorders". In Sydor A, Brown RY (eds.). Molecular Neuropharmacology: A Foundation for Clinical Neuroscience (2nd ed.). New York: McGraw-Hill Medical. pp. 364–375. ISBN 9780071481274.
  2. ^ a b Nestler EJ (December 2013). "Cellular basis of memory for addiction". Dialogues in Clinical Neuroscience. 15 (4): 431–443. PMC 3898681. PMID 24459410. Despite the importance of numerous psychosocial factors, at its core, drug addiction involves a biological process: the ability of repeated exposure to a drug of abuse to induce changes in a vulnerable brain that drive the compulsive seeking and taking of drugs, and loss of control over drug use, that define a state of addiction. ... A large body of literature has demonstrated that such ΔFosB induction in D1-type [nucleus accumbens] neurons increases an animal's sensitivity to drug as well as natural rewards and promotes drug self-administration, presumably through a process of positive reinforcement ... Another ΔFosB target is cFos: as ΔFosB accumulates with repeated drug exposure it represses c-Fos and contributes to the molecular switch whereby ΔFosB is selectively induced in the chronic drug-treated state.41. ... Moreover, there is increasing evidence that, despite a range of genetic risks for addiction across the population, exposure to sufficiently high doses of a drug for long periods of time can transform someone who has relatively lower genetic loading into an addict.
  3. ^ a b Volkow ND, Koob GF, McLellan AT (January 2016). "Neurobiologic Advances from the Brain Disease Model of Addiction". New England Journal of Medicine. 374 (4): 363–371. doi:10.1056/NEJMra1511480. PMC 6135257. PMID 26816013. Substance-use disorder: A diagnostic term in the fifth edition of the Diagnostic and Statistical Manual of Mental Disorders (DSM-5) referring to recurrent use of alcohol or other drugs that causes clinically and functionally significant impairment, such as health problems, disability, and failure to meet major responsibilities at work, school, or home. Depending on the level of severity, this disorder is classified as mild, moderate, or severe.
    Addiction: A term used to indicate the most severe, chronic stage of substance-use disorder, in which there is a substantial loss of self-control, as indicated by compulsive drug taking despite the desire to stop taking the drug. In the DSM-5, the term addiction is synonymous with the classification of severe substance-use disorder.
  4. ^ a b c d e f Renthal W, Nestler EJ (September 2009). "Chromatin regulation in drug addiction and depression". Dialogues in Clinical Neuroscience. 11 (3): 257–268. doi:10.31887/DCNS.2009.11.3/wrenthal. PMC 2834246. PMID 19877494. [Psychostimulants] increase cAMP levels in striatum, which activates protein kinase A (PKA) and leads to phosphorylation of its targets. This includes the cAMP response element binding protein (CREB), the phosphorylation of which induces its association with the histone acetyltransferase, CREB binding protein (CBP) to acetylate histones and facilitate gene activation. This is known to occur on many genes including fosB and c-fos in response to psychostimulant exposure. ΔFosB is also upregulated by chronic psychostimulant treatments, and is known to activate certain genes (eg, cdk5) and repress others (eg, c-fos) where it recruits HDAC1 as a corepressor. ... Chronic exposure to psychostimulants increases glutamatergic [signaling] from the prefrontal cortex to the NAc. Glutamatergic signaling elevates Ca2+ levels in NAc postsynaptic elements where it activates CaMK (calcium/calmodulin protein kinases) signaling, which, in addition to phosphorylating CREB, also phosphorylates HDAC5.
    Figure 2: Psychostimulant-induced signaling events
  5. ^ a b Broussard JI (January 2012). "Co-transmission of dopamine and glutamate". The Journal of General Physiology. 139 (1): 93–96. doi:10.1085/jgp.201110659. PMC 3250102. PMID 22200950. Coincident and convergent input often induces plasticity on a postsynaptic neuron. The NAc integrates processed information about the environment from basolateral amygdala, hippocampus, and prefrontal cortex (PFC), as well as projections from midbrain dopamine neurons. Previous studies have demonstrated how dopamine modulates this integrative process. For example, high frequency stimulation potentiates hippocampal inputs to the NAc while simultaneously depressing PFC synapses (Goto and Grace, 2005). The converse was also shown to be true; stimulation at PFC potentiates PFC–NAc synapses but depresses hippocampal–NAc synapses. In light of the new functional evidence of midbrain dopamine/glutamate co-transmission (references above), new experiments of NAc function will have to test whether midbrain glutamatergic inputs bias or filter either limbic or cortical inputs to guide goal-directed behavior.
  6. ^ a b Kanehisa Laboratories (10 October 2014). "Amphetamine – Homo sapiens (human)". KEGG Pathway. Retrieved 31 October 2014. Most addictive drugs increase extracellular concentrations of dopamine (DA) in nucleus accumbens (NAc) and medial prefrontal cortex (mPFC), projection areas of mesocorticolimbic DA neurons and key components of the "brain reward circuit". Amphetamine achieves this elevation in extracellular levels of DA by promoting efflux from synaptic terminals. ... Chronic exposure to amphetamine induces a unique transcription factor delta FosB, which plays an essential role in long-term adaptive changes in the brain.
  7. ^ a b Cadet JL, Brannock C, Jayanthi S, Krasnova IN (2015). "Transcriptional and epigenetic substrates of methamphetamine addiction and withdrawal: evidence from a long-access self-administration model in the rat". Molecular Neurobiology. 51 (2): 696–717 (Figure 1). doi:10.1007/s12035-014-8776-8. PMC 4359351. PMID 24939695.
  8. ^ a b c d e f Robison AJ, Nestler EJ (November 2011). "Transcriptional and epigenetic mechanisms of addiction". Nature Reviews Neuroscience. 12 (11): 623–637. doi:10.1038/nrn3111. PMC 3272277. PMID 21989194. ΔFosB serves as one of the master control proteins governing this structural plasticity. ... ΔFosB also represses G9a expression, leading to reduced repressive histone methylation at the cdk5 gene. The net result is gene activation and increased CDK5 expression. ... In contrast, ΔFosB binds to the c-fos gene and recruits several co-repressors, including HDAC1 (histone deacetylase 1) and SIRT 1 (sirtuin 1). ... The net result is c-fos gene repression.
    Figure 4: Epigenetic basis of drug regulation of gene expression
  9. ^ a b c d e f Nestler EJ (December 2012). "Transcriptional mechanisms of drug addiction". Clinical Psychopharmacology and Neuroscience. 10 (3): 136–143. doi:10.9758/cpn.2012.10.3.136. PMC 3569166. PMID 23430970. The 35-37 kD ΔFosB isoforms accumulate with chronic drug exposure due to their extraordinarily long half-lives. ... As a result of its stability, the ΔFosB protein persists in neurons for at least several weeks after cessation of drug exposure. ... ΔFosB overexpression in nucleus accumbens induces NFκB ... In contrast, the ability of ΔFosB to repress the c-Fos gene occurs in concert with the recruitment of a histone deacetylase and presumably several other repressive proteins such as a repressive histone methyltransferase
  10. ^ a b Nestler EJ (October 2008). "Transcriptional mechanisms of addiction: Role of ΔFosB". Philosophical Transactions of the Royal Society B: Biological Sciences. 363 (1507): 3245–3255. doi:10.1098/rstb.2008.0067. PMC 2607320. PMID 18640924. Recent evidence has shown that ΔFosB also represses the c-fos gene that helps create the molecular switch—from the induction of several short-lived Fos family proteins after acute drug exposure to the predominant accumulation of ΔFosB after chronic drug exposure
I've updated the template again so that there shouldn't be any issues when there are juxtaposed tables now. Seppi333 (Insert ) 11:11, 9 August 2017 (UTC)[reply]

Annotated image policy[edit]

I've made a post on WP:IUP to discuss when wikilinked image annotation is appropriate. T.Shafee(Evo﹠Evo)talk 02:40, 19 April 2015 (UTC)[reply]

Icon[edit]

The image above contains clickable links
The image above contains clickable links

I've added a The image above contains clickable links icon to the captions of images that use this template. I've found that users seem to rarely realise that the images are interactive, so an icon that prompts them to test should be useful to readers.

I think having it on as default is probably the better option, but I've added an option to use |icon=none to remove it. T.Shafee(Evo﹠Evo)talk 10:36, 2 January 2016 (UTC)[reply]

Good idea, thanks for adding it. Seppi333 (Insert ) 14:31, 2 January 2016 (UTC)[reply]

"Upright"-like functionality, sizing images relative to user preferences[edit]

I'd really like to use this template for its cropping functionality (so I can display a thumbnail which is the crop of some existing image, without uploading a separate cropped version of the image) but there's a problem: as far as I can tell all the sizing functions here work in absolutes i.e. px, and don't offer anything like the upright functionality found in the normal image syntax. I realize that the crop coordinates and sizes must (?) be absolute (relative to the base image), but it ought to be possible, after the crop step, to size the image according to upright, thus respecting the users image-size preferences. Can this be added? Or is it already there and I'm just not seeing it?

Or, if there's some other way to get this functionality (again, all I want is the cropping function) please tell me where to find it. Thanks! EEng (talk) 15:08, 10 January 2016 (UTC)[reply]

I'm not sure how to encode a reference that user preference in a template. Assuming I were able to, implementing that would require scaling the font size as well as all the coordinates for annotations and the image itself; I'm not sure if fractional font sizes will create problems or not, but I wouldn't mind adding upright functionality to the template if I knew how. Seppi333 (Insert ) 17:38, 10 January 2016 (UTC)[reply]
Thanks for taking an interest! Take a look at the weird image= syntax here [1], which in a way is a use of upright by a template, though maybe these params are just getting blindly passed into something deeper down that knows how to use upright.
Assuming you can get past that problem, that leaves the problem of the font scaling. Well like I said, I only want the cropping functionality, and though I hate to suggest another awful confusing hackish limitation, I wouldn't mind if the upright functionality was only available if there's no text to worry about scaling. Or you could just invent a separate template (which I also hate to suggest).
There really are a lot of potential uses for a crop function. Remember out discussion at Wikipedia_talk:Image_use_policy#Cropped_vs._full_images? With cropping functionality, we wouldn't have to have two different images uploaded -- one the full image, and one cropped for the thumb.
EEng (talk) 18:02, 10 January 2016 (UTC)[reply]
Conceivably, you might be able to use m:Help:Calculation functions to scale fonts, but only to nearest integer font size I think. It'd be a lot of work I suspect. T.Shafee(Evo﹠Evo)talk 03:31, 11 January 2016 (UTC)[reply]

Can there be frameless option?[edit]

Can there be any way to get rid of the frame or border around the image? I tried myself but couldn't figure it out. Thanks.--MCEllis (talk) 22:49, 15 February 2016 (UTC)[reply]

The frame unfortunately can't be removed at the moment- sorry. Seppi333 (Insert ) 23:55, 15 February 2016 (UTC)[reply]
I know that you've already been made aware of this since you tested it at Template:Annotated image 4/testcases; however, I figured I'd just leave a note here for others: a frameless option was added to this template, thanks to Evolution and evolvability (talk · contribs).
To remove the default thumbnail frame, use |frameless=true. Seppi333 (Insert ) 03:08, 25 March 2017 (UTC)[reply]

Right margin[edit]

Example showing margins
Standard thumb image
A 200 by 300 pixel image
Infobox

In a discussion with Seppi333, I noticed that this template does not produce the same right margin as the standard thumb image. so, if you put it next to an infobox or a standard right floating thumb image, you get a ragged right margin. can we update this template to use the same right margin? it looks like it's just a few pixels off. I added an example above with a black line to help visualize the difference. Frietjes (talk) 13:52, 20 January 2018 (UTC)[reply]

@Frietjes: I looked at the margins on this template yesterday, so I know for certain that there's 0 margin/padding of the image with respect to the right side of the page; however, it just occurred to me that the reason there's a small indent/margin to the right of the image is that this template is nested inside a borderless table.
The only reason this template was coded that way is to allow relatively wide images to be scrollable on mobile. Without that table, wide images end up being cut off on the right on mobile browsers and don't render with a left/right scroll. That severely limits the functionality of this template on mobile browsers. IIRC As illustrated below, {{Annotated image}} suffers from the same issue, but it's not corrected with a table in that template.
Below is {{Annotated image}} with & without table nesting compared with {{Annotated image 4}}
{{Annotated image}} without nesting within a table (view this in a mobile browser with a screen width less than 600px)
{{Annotated image}} nested inside a borderless table (view this in a mobile browser with a screen width less than 600px)
Example annotation
lorem ipsum... etc.
The image above contains clickable links
{{Annotated image 4/sandbox}}, which is nested inside a borderless table by default (view this in a mobile browser with a screen width less than 600px)
Seppi333 (Insert ) 23:30, 20 January 2018 (UTC)[reply]
Seppi333, so are you saying there is no way to have the margin aligned without breaking the mobile version? Frietjes (talk) 17:19, 21 January 2018 (UTC)[reply]
@Frietjes: Unless there's an alternate method that can be used to enable left/right scrolling of the annotated images, then unfortunately no. If you happen to know of a method or discover one in the future, please let me know. Seppi333 (Insert ) 05:30, 22 January 2018 (UTC)[reply]
@Great Brightstar, TheDJ, and Jdlrobson: who might know. Frietjes (talk) 15:58, 22 January 2018 (UTC)[reply]
I'm out of idea for this, but I think this could be rewrite without table markup. --Great Brightstar (talk) 16:38, 22 January 2018 (UTC)[reply]
@Great Brightstar, TheDJ, and Frietjes: [[The mobile site should automatically resize/scroll tables and images by default. There are specific rules that should make that happen - you just need to use a <table> or an image thumbnail. If you want the image to not resize but to be scrollable a "noresize" class should take care of that. Is there a sandbox with an example using a version of this template witout the margin unaligned so I can debug a little more? In general though, any table based layout will struggle on mobile so porting to non-table markup would definitely be better if possible! Jdlrobson (talk) 19:11, 22 January 2018 (UTC)[reply]

@Jdlrobson: I've pasted the template code for {{Annotated image 4}}, excluding the table, in Template:Annotated image 4/sandbox. You can work from that if you'd like. The last image in this section is now transcluded from the sandbox version ({{Annotated image 4/sandbox}}). Seppi333 (Insert ) 21:36, 22 January 2018 (UTC)[reply]

It's not an image. It's a table that wraps an image. The table adds extra spacing, because all tables have cell-spacing by default. I've fixed this for desktop now, but for mobile it's a lot more difficult, because tables are simply troublesome on narrow screens and come with their own set of styling rules (for a reason). So the solution will be to get rid of the table. I haven't checked yet if that is possible, but it probably is (considering this thing is apparently presentational). —TheDJ (talkcontribs) 23:07, 22 January 2018 (UTC)[reply]
Hmm, I thought this might be fixable with jon's code, but the problem here is that this template also tries to do image cropping. That technique is fundamentally broken with "try to show everything even if you don't have enough space". We will have to think about this a bit longer... VERY hard problem. —TheDJ (talkcontribs) 23:25, 22 January 2018 (UTC)[reply]
Prior to adding the table wrapper last year, I actually spent a number of hours tinkering with this template in an attempt to find an HTML-based solution to this problem. I eventually gave up since nothing seemed to work. For what it's worth, I agree that the way Template:annotated image and Template:annotated image 4 crop images is rather borked (i.e., render the entire image and then hide the cropped-out area); I didn't code that. Seppi333 (Insert ) 01:42, 23 January 2018 (UTC)[reply]
I've just added max-width:100%; and overflow-x:auto; properties into sandbox page, then mobile site could automatically scrolling the image in {{Annotated image 4/testcases}}. Please test for actual effects in different devices and web browsers. --Great Brightstar (talk) 15:30, 24 January 2018 (UTC)[reply]
thats exactly the same thing that noresize already does as well, so superfluous. —TheDJ (talkcontribs) 19:37, 26 January 2018 (UTC)[reply]

Looks fine on desktop chrome & IE as well as mobile safari (vector skin). The image scrollbar appears for the sandbox version on both desktop browsers when you zoom in. It doesn't for the current AI4 template; the horizontal scrollbar for the page has to be used instead. I think that functionality of the sandbox version is an improvement over the current version of AI4. Seppi333 (Insert ) 17:06, 24 January 2018 (UTC)[reply]

yes it fixes the problem, UNLESS the image is also cropped, and too wide to fit in the viewport on mobile. 19:37, 26 January 2018 (UTC)
That's unfortunate. I suppose we should add cropped images to the testcases page. Seppi333 (Insert ) 06:48, 27 January 2018 (UTC)[reply]
@Great Brightstar, TheDJ, Jdlrobson, and Frietjes: After creating Template:Annotated image 4/testcases2 with 3 different tests of this template's more complex functionality (i.e., cropping+enlarging images, shifting images outside the thumbnail frame, enlarging the thumbnail frame relative to the image), I noticed 1 issue in each of the 3 AI4/sandbox tests; although, in the last test (i.e., enlarging the thumbnail frame relative to the image), the problem I noticed wasn't with how the image rendered. Rather, I noticed that one of the image annotations was superimposed on top of the caption. I explained the problem that I noticed in each test in the caption of the corresponding AI4/sandbox image. Seppi333 (Insert ) 06:57, 27 January 2018 (UTC)[reply]
I managed to fix the problem in the 2nd and 3rd testcases on that page using overflow:hidden. Now it's just the 1st testcase which is problematic: Template:Annotated_image_4/testcases2#Cropped_and_enlarged_image. Nevermind, I see what TheDJ meant now in his edit summary. Doing that just swapped one problem for another since it doesn't appear with a scroll bar now. Seppi333 (Insert ) 13:29, 27 January 2018 (UTC)[reply]

down scaling with image-width?[edit]

If I've understood it correctly, in the Mona Lisa example the source image is 450px wide and the template image-width = 900 which upscales the cropped portion. Is the reverse possible to downscale, e.g. in this case set image-width = 225? I've been experimenting but don't get consistent results. --Cornellier (talk) 14:50, 27 March 2019 (UTC)[reply]

Cornellier, if your only objective is to scale an image from the default thumb size, use |upright=0.8 or whatever with the standard image syntax. if you are trying to do something else, you should provide more details. Frietjes (talk) 00:09, 30 March 2019 (UTC)[reply]
Frietjes the goal is to scale and crop. --Cornellier (talk) 02:33, 30 March 2019 (UTC)[reply]
Cornellier, apparently my response was tldr: if you are trying to do something else, you should provide more details. you may find Template:CSS image crop useful. Frietjes (talk) 12:30, 30 March 2019 (UTC)[reply]
  • I am having the same problem - the example (Mona Lisa, upscaling) is not teaching me how to do the same but downscaling. My attempts are:
  • {{annotated image|image=BritishTunicataPlate53.jpg|image-left=-329|image-top=-1653|image-width=0|width=677|height=491|float=right|annotations=|caption=}}
  • {{annotated image 4|image=BritishTunicataPlate53.jpg|image-left=-329|image-top=-1653|image-width=1938|width=220|height=160|float=right|annotations=|caption=|frameless=1}}
  • {{annotated image 4|image=BritishTunicataPlate53.jpg|image-left=-329|image-top=-1653|image-width=629|width=677|height=491|float=right|annotations=|caption=|frameless=1}}
  • {{annotated image 4|image=BritishTunicataPlate53.jpg|image-left=-329|image-top=-1653|image-width=3876|width=677|height=491|float=right|annotations=|caption=|frameless=1}}
Invasive Spices (talk) 9 December 2021 (UTC)

Image alignment issues on mobile site (m.wikipedia.org)[edit]

Hello, quick question. when viewing an "annotated image 4" the image defaults to the left, and doesn't stay aliged to the centre like a normal thumbnail, for example: https://en.m.wikipedia.org/wiki/Cycling_kit. Am I missing something or is this a technical limitation? Thanks. Adenosine Triphosphate (talk) 17:05, 11 December 2023 (UTC)[reply]