<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>figure captions &#8211; Matthew Petroff</title>
	<atom:link href="https://mpetroff.net/tag/figure-captions/feed/" rel="self" type="application/rss+xml" />
	<link>https://mpetroff.net</link>
	<description>mpetroff.net</description>
	<lastBuildDate>Sat, 31 Oct 2020 21:18:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Update on Figure Caption Color Indicators</title>
		<link>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/</link>
					<comments>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Sat, 31 Oct 2020 21:15:08 +0000</pubDate>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[figure captions]]></category>
		<category><![CDATA[scientific literature]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3285</guid>

					<description><![CDATA[Last year, I published a blog post on figure caption color indicators. The positive feedback I received on it from a number of individuals prompted me to revisit the subject. At the time, I did not have a good way &#8230; <a href="https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">L</span>ast year, I published a blog post on <a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/">figure caption color indicators</a>. The positive feedback I received on it from a number of individuals prompted me to revisit the subject. At the time, I did not have a good way of locating published examples of such caption indicators and was only able to locate a few published examples with shape indicators but none with color indicators. When thinking about revisiting the subject, I had the epiphany that although searching for such indicators in the published literature is next to impossible, searching in the <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source markup for papers is not. As arXiv provides <a href="https://arxiv.org/help/bulk_data">bulk access</a> to the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source markup for its pre-prints, this provided a large corpus of manuscripts to search through. After finding examples in pre-prints, I was then able to see if the indicators survived the publication process and was thereby able to locate well over one hundred examples of color line or shape indicators in the figure captions of published academic papers.<span id="more-3285"></span></p>
<p>I broke the process into four steps: acquiring the data, extracting <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> commands from caption environments, finding potential figure caption candidates, and verifying these candidates. As the arXiv source archive is well over 1&thinsp;TB in size, it is provided in an AWS S3 bucket configured such that the requester pays for bandwidth, which would result in a bandwidth bill of >$100 if downloaded directly. As I was only interested in the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source and not the figures, which account for most of the total file size, and since AWS does not charge to transfer between S3 buckets and EC2 instances in the same region, I first ran a script on an EC2 instance to download from arXiv&#8217;s S3 bucket and extract and repackage just the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source files. This allowed me to greatly reduce the amount of data transfer required and allowed me to download the full T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source file corpus for <$5. Next, I used the <a href="https://github.com/alvinwan/TexSoup">TexSoup</a> Python package to process the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> files and produce a list of <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> commands used in the <code>caption</code> environment. I then used a final script to search for papers that used command names that referenced colors or shapes to compile a list of likely paper candidates and produced HTML files for each year containing a link to the PDF for each candidate paper as well as the full T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source for the identified caption, with the matching commands highlighted. Finally, I manually verified the papers using the HTML files that were produced. Except for trivial false positivies, which could be identified by looking at the included caption source, I manually looked at the PDF for each candidate paper, verified that it included a visual caption indicator, and classified the caption indicator if it had one. For papers that included indicators, I then attempted to locate the published version of record of the paper and did the same for it.</p>
<p>Through this process, my scripts located around ~5100 paper candidates from the beginning of arXiv in 1992 through the end of June 2020. I manually verified these candidates for papers submitted prior to the end of 2016; these accounted for ~2000 candidates, of which I verified ~1100 papers to have some sort of visual caption indicator. For ~700 of these, I was able to verify the presence of some form of visual caption indicator in the published version of record. Of these, ~60% included a black shape or line indicator, ~25% included a color shape or line indicator, and the remainder included colored text. The fraction of papers with color shape or line indicators was higher in the pre-prints, since it was not uncommon for the published version to include a black indicator when the pre-print included a colored indicator. I stopped at the end of 2016 since the verification process was quite time consuming, and I could only look at so many papers before giving up.</p>
<p>These findings show that the idea of using figure color caption indicators is by no means a new idea. However, it&#8217;s still quite rare in relative terms, since at most a couple thousand out of arXiv&#8217;s ~1.7 million pre-prints include such indicators. Most of the examples I found used a colored shape (<span style="color: #1f77b4;">&#9632;</span>) or line (<span style="color: #1f77b4;"><b>&mdash;</b></span>) in parentheses, or both in cases where both a line and marker were used. My proposal to use a colored underline does still appear to have been a novel concept, but it proved quite complicated to implement, so using shapes or lines in parentheses is much more practical, since it is simpler and is evidentially compatible with many publishers&#8217; workflows. Furthermore, the existing examples can be used as evidence when complaining about paper proofs, after the typesetter predictably removes the indicators, to show that the indicators are possible and that they can and should be included in the final published version of the paper.</p>
<p>One color indicator that I recommend against using is colored text, since it can be difficult to read and often violates <a href="https://www.w3.org/TR/WCAG21/#contrast-minimum">WCAG contrast guidelines</a>. Its use seems particularly common in the computer vision literature and, to a lesser degree, the machine learning literature. It is often used to highlight table entries, a purpose much better served by using italic, bold, or bold&ndash;italic text.</p>
<p>I have made the scripts used for this analysis, the paper candidates, and the final verified results <a href="https://cdn0.mpetroff.net/wp-content/uploads/2020/10/arxiv-figure-caption-color-indicators.zip">available</a>. The final verified results are also <a href="https://cdn0.mpetroff.net/wp-content/uploads/2020/10/papers.html">available separately</a> for easy viewing. Note that the verified results are incomplete and may contain errors.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Figure Caption Color Indicators</title>
		<link>https://mpetroff.net/2019/11/figure-caption-color-indicators/</link>
					<comments>https://mpetroff.net/2019/11/figure-caption-color-indicators/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Sat, 23 Nov 2019 18:36:42 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[figure captions]]></category>
		<category><![CDATA[scientific literature]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3032</guid>

					<description><![CDATA[Earlier this year, I became aware of a feature in GitHub-flavored Markdown that displays a colored square inline when HTML color codes are surrounded by backticks, e.g., #1f77b4. Although I only recently became aware of this feature, it dates back &#8230; <a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<style>
.fccip-color-underline {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 0.2em;
  text-decoration-skip-ink: auto;
}
.fccip-red {
  text-decoration-color: #d62728;
}
.fccip-red-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #d62728;
}
.fccip-blue {
  text-decoration-color: #1f77b4;
}
.fccip-blue-gray {
  text-decoration-color: #6a6a6a;
}
.fccip-blue-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #1f77b4;
}
.fccip-blue-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #6a6a6a;
}
.fccip-blue-square-mono::after {
  content: "\25a0";
  position: relative;
  display: inline-block;
  color: #1f77b4;
  margin-left: 0.2rem;
  top: -0.08rem;
}
.fccip-blue-diamond::after {
  content: "\25c6";
  font-size: 0.85rem;
  position: relative;
  top: -0.05rem;
  display: inline-block;
  color: #1f77b4;
}
.fccip-orange {
  text-decoration-color: #ff7f0e;
}
.fccip-orange-gray {
  text-decoration-color: #878787;
}
.fccip-orange-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #ff7f0e;
}
.fccip-orange-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #878787;
}
.fccip-orange-circle::after {
  content: "\25cf";
  font-size: 1.2rem;
  position: relative;
  display: inline-block;
  color: #ff7f0e;
}
.fccip-gray {
  text-decoration-color: #ccc;
}
.fccip-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #ccc;
}
.fccip-dotted {
  text-decoration-style: dotted;
}
.fccip-caption {
  margin-left: 3em;
  margin-right: 3em;
  padding: 0.5em 0;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
}
</style>
<p><span class="dropcap">E</span>arlier this year, I became aware of a feature in GitHub-flavored Markdown that displays a colored square inline when HTML color codes are surrounded by backticks, e.g., <code><span class="fccip-blue fccip-blue-square-mono">#1f77b4</span></code>. Although I only recently became aware of this feature, it dates back to <a href="https://twitter.com/tomschenkjr/status/855237672692051969">at least 2017</a> and is similar to a feature that Slack has had since <a href="https://twitter.com/rominadesigner/status/494868609718419457">at least 2014</a>. When I saw this inline color presentation, I immediately thought of its applicability to figure captions, particularly in academic papers; as a colorblind individual, matching colors referenced in figure captions to features in the figures themselves can be challenging at times due to difficulties with naming colors. Thus, I added similar annotations to figure captions in my recently submitted paper, <em><a href="https://ui.adsabs.harvard.edu/abs/2019arXiv191101016P">Two-year Cosmology Large Angular Scale Surveyor (CLASS) Observations: A First Detection of Atmospheric Circular Polarization at Q Band</a></em>:</p>
<p class="fccip-caption">
<b>Fig. 2.</b> Frequency dependence of polarized atmospheric signal at zenith for the CLASS observing site, both for circular polarization (<img src='https://s0.wp.com/latex.php?latex=%7CV%7C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='|V|' title='|V|' class='latex' />, shown in <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span>) and linear polarization (<img src='https://s0.wp.com/latex.php?latex=%5Csqrt%7BQ%5E2%2BU%5E2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{Q^2+U^2}' title='\sqrt{Q^2+U^2}' class='latex' />, shown in <span class="fccip-color-underline fccip-orange fccip-orange-square">orange</span>). The <span class="fccip-color-underline fccip-gray fccip-gray-square">light gray</span> bands indicate CLASS observing frequencies, with the lowest frequency band corresponding to the Q-band telescope.
</p>
<p class="fccip-caption">
<b>Fig. 5.</b> Example binned azimuth profiles are shown&#8230;angle cut. The profile in <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span> is from a zenith angle of 43.9&deg; and a boresight rotation angle of &minus;45&deg;, the profile in <span class="fccip-color-underline fccip-orange fccip-orange-square">orange</span> is from a zenith angle of 46.7&deg; and a boresight rotation angle of 0&deg;, and the profile in <span class="fccip-color-underline fccip-red fccip-red-square">red</span> is from a zenith angle of 52.8&deg; and a boresight rotation angle of +45&deg;.
</p>
<p>The first caption refers to a line plot, while the second caption refers to a scatter plot with best fit lines. These examples, as well as underlining examples elsewhere in this post, display best in a browser that supports changing the underline thickness via the <code>text-decoration-thickness</code> CSS property. At the time of writing, this includes Firefox 70+ and Safari 12.2+ but does not include any version of Chrome; however, browser underlining support is still subpar to the underline rendered by <img src='https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\LaTeX' title='\LaTeX' class='latex' />, so the reader is encouraged to view the figures <a href="https://arxiv.org/pdf/1911.01016.pdf">in the paper</a>.<span id="more-3032"></span></p>
<p>While the primary purpose of these annotations is to improve accessibility for individuals with color vision deficiencies, they are also helpful when a paper is printed or displayed in grayscale. For example, it is much easier to distinguish <span class="fccip-color-underline fccip-blue-gray fccip-blue-gray-square">blue</span> and <span class="fccip-color-underline fccip-orange-gray fccip-orange-gray-square">orange</span> in grayscale with the annotations than without.</p>
<p>As this was an experiment, I included two different methods for visualizing the color, a thick colored underline under and a colored square following the color name. Since the colors are referring to solid lines in the plot, the underlines make sense because they match the plot features, e.g., a <span class="fccip-color-underline fccip-blue">solid blue line</span>. Likewise, a dotted underline might make sense for a <span class="fccip-color-underline fccip-blue fccip-dotted">dotted blue line</span>, although it is more difficult to discern the color of the dotted line than the solid line. I am undecided as to whether or not including the colored square is a good idea. While it adds an additional visual cue, the main reason I included it was to increase the chances of at least one of the indicators making it past the editors and into the final published paper; as the paper is currently under review, it remains to be seen if either indicator survives the publication process.</p>
<p>For scatter plots, however, colored shapes make perfect sense. A scatter plot with red squares (<span class="fccip-red-square"></span>), blue diamonds (<span class="fccip-blue-diamond"></span>), and orange circles (<span class="fccip-orange-circle"></span>) should include such shapes in the figure caption when the caption refers to the corresponding points. I am undecided as to whether or not the color names in such cases should be underlined, just as I am undecided as to whether or not line plots should included a colored square. Although I have not seen any color indicators, for either lines or scatter points, in the scientific literature, the use of shapes in figure captions is not a new practice. I have found examples dating from the mid-1950s through the early 2000s. The closest example I have found is in a 1997 paper<sup id="rf1-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn1-3032" title=" Cadot, O., Y. Couder, A. Daerr, S. Douady, and A. Tsinober. &#8220;Energy injection in closed turbulent flows: Stirring through boundary layers versus inertial stirring.&#8221; &lt;em&gt;Physical Review E&lt;/em&gt; 56, no. 1 (1997): 427. doi:&lt;a href=&quot;https://doi.org/10.1103/PhysRevE.56.427&quot;&gt;10.1103/PhysRevE.56.427&lt;/a&gt; " rel="footnote">1</a></sup> that refers to a symbol with both its name and a graphical representation:</p>
<p class="fccip-caption">
<b>Fig. 5.</b> Couette-Taylor experiments. Logarithmic&#8230;number. The black triangles (&#x25b2;) are the results obtained with smooth cylinders, and the open ones (&#x25b3;) correspond to those obtained with the ribbed ones. The crosses (&times;) show for comparison&#8230;and Swinney [8].
</p>
<p>Other examples include a 1967 paper<sup id="rf2-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn2-3032" title=" Haque, Khorshed Banu, and J. G. Valatin. &#8220;An investigation of the separation energies of lighter nuclei.&#8221; &lt;em&gt;Nuclear Physics A&lt;/em&gt; 95, no. 1 (1967): 97-114. doi:&lt;a href=&quot;https://doi.org/10.1016/0375-9474(67)90154-6&quot;&gt;10.1016/0375-9474(67)90154-6&lt;/a&gt; " rel="footnote">2</a></sup> (and a 1968 paper<sup id="rf3-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn3-3032" title=" Aydin, C. &#8220;The spectral variations of CU Virginis (HD 124224).&#8221; &lt;em&gt;Memorie della Societa Astronomica Italiana&lt;/em&gt; 39 (1968): 721. bibcode:&lt;a href=&quot;https://ui.adsabs.harvard.edu/abs/1968MmSAI..39..721A&quot;&gt;1968MmSAI..39..721A&lt;/a&gt; " rel="footnote">3</a></sup>) that uses graphical representations inline instead of symbol names:</p>
<p class="fccip-caption">
<b>Fig. 13.</b> Additional&#8230;symmetries. Points marked with &#x25a0; are the excess&#8230;nuclei, points marked with &#x25a1; the excess&#8230;<i>N = Z</i>. The points &#x25bc; show the differences&#8230;larger <i>Z</i>-values. The points &#x25b3; are the differences&#8230;for even-<i>Z</i>&ndash;odd-<i>N</i> nuclei.
</p>
<p>and a 1955 paper<sup id="rf4-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn4-3032" title=" Blosser, H. G., and T. H. Handley. &#8220;Survey of (&lt;em&gt;p&lt;/em&gt;, &lt;em&gt;n&lt;/em&gt;) reactions at 12 MeV.&#8221; &lt;em&gt;Physical Review&lt;/em&gt; 100, no. 5 (1955): 1340. doi:&lt;a href=&quot;https://doi.org/10.1103/PhysRev.100.1340&quot;&gt;10.1103/PhysRev.100.1340&lt;/a&gt; " rel="footnote">4</a></sup> that puts the figure legend inline in the figure caption:</p>
<p class="fccip-caption">
<b>Fig. 1.</b> (<i>p</i>,<i>n</i>) cross sections in millibarns. &#x25cb;&mdash;measured total&#8230;isotope; &#x25a1;&mdash;partial&#8230;isotope; &times;&mdash;observed&#8230;estimate. Curves&#8230;of <i>r</i><sub>0</sub>. The dotted bands indicate&#8230;energy.
</p>
<p>There are other examples, e.g., this 1960 paper,<sup id="rf5-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn5-3032" title=" Evans, D. S., G. V. Raynor, and R. T. Weiner. &#8220;The lattice spacings of thorium-lanthanum alloys.&#8221; &lt;em&gt;Journal of Nuclear Materials&lt;/em&gt; 2, no. 2 (1960): 121-128. doi:&lt;a href=&quot;https://doi.org/10.1016/0022-3115(60)90039-8&quot;&gt;10.1016/0022-3115(60)90039-8&lt;/a&gt; " rel="footnote">5</a></sup> that put the legend on separate lines at the end of the caption, but doing so isn&#8217;t really the same idea. There are also papers that treated line styles in the same manner as scatter plot symbols, such as this 1962 paper:<sup id="rf6-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn6-3032" title=" Vernov, S. N., E. V. Gorchakov, Yu I. Logachev, V. E. Nesterov, N. F. Pisarenko, I. A. Savenko, A. E. Chudakov, and P. I. Shavrin. &#8220;Investigations of radiation during flights of satellites, space vehicles and rockets.&#8221; &lt;em&gt;Journal of the Physical Society of Japan Supplement&lt;/em&gt; 17 (1962): 162. bibcode:&lt;a href=&quot;https://ui.adsabs.harvard.edu/abs/1962JPSJS..17B.162V&quot;&gt;1962JPSJS..17B.162V&lt;/a&gt; " rel="footnote">6</a></sup></p>
<p class="fccip-caption">
<b>Fig. 1.</b> Counting rate&#8230;in pulses per cm<sup>2</sup> sec. Maximum&#8230;is indicated by broken lines (&ndash; &ndash; &ndash;). The zone&#8230;has been shaded.
</p>
<p>These examples should not be considered by any means exhaustive, since searching for this sort of thing is extremely difficult.<sup id="rf7-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn7-3032" title=" I found most of the above examples by performing full-text searches in &lt;a href=&quot;https://ui.adsabs.harvard.edu/&quot;&gt;NASA ADS&lt;/a&gt; for terms such as &#8220;black diamond&#8221; or &#8220;filled square&#8221; and looking through hundreds of results to find the few instances that included both the search terms and the symbols. " rel="footnote">7</a></sup> In particular, while I don&#8217;t know of any prior publications that include color indicators, this does not mean that they do not exist. If anyone reading this is aware of any such examples, or of other interesting figure caption indicators, please let me know.</p>
<p>Adoption of visual color indicators such as the ones presented here would be a significant accessibility improvement, but it would require buy-in from both publishers and authors. The chances of success are unclear but would certainly be improved with advocacy.</p>
<hr>
<h3>Implementation</h3>
<p>The <img src='https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\LaTeX' title='\LaTeX' class='latex' /> color annotation command was defined as</p>
<div class="highlighted-source default tex">
<pre><span></span><span class="c">% Black square</span>
<span class="k">\usepackage</span><span class="nb">{</span>amsmath<span class="nb">}</span>

<span class="c">% Define color</span>
<span class="k">\usepackage</span><span class="nb">{</span>xcolor<span class="nb">}</span>
<span class="k">\definecolor</span><span class="nb">{</span>tab:blue<span class="nb">}{</span>RGB<span class="nb">}{</span>31, 119, 180<span class="nb">}</span>

<span class="c">% Color underlines with breaks for descenders, based on:</span>
<span class="c">% https://tex.stackexchange.com/a/75406</span>
<span class="c">% https://tex.stackexchange.com/a/24771</span>
<span class="c">% https://tex.stackexchange.com/a/321235</span>
<span class="k">\usepackage</span><span class="nb">{</span>soul<span class="nb">}</span>
<span class="k">\usepackage</span><span class="na">[outline]</span><span class="nb">{</span>contour<span class="nb">}</span>
<span class="k">\newcommand</span> <span class="k">\colorindicator</span><span class="na">[2]</span><span class="nb">{</span><span class="c">%</span>
  <span class="k">\begingroup</span><span class="c">%</span>
  <span class="k">\setul</span><span class="nb">{</span>0.25ex<span class="nb">}{</span>0.4ex<span class="nb">}</span><span class="c">%</span>
  <span class="k">\contourlength</span><span class="nb">{</span>0.2ex<span class="nb">}</span><span class="c">%</span>
  <span class="k">\setulcolor</span><span class="nb">{</span>#1<span class="nb">}</span><span class="c">%</span>
  <span class="k">\ul</span><span class="nb">{{</span><span class="k">\phantom</span><span class="nb">{</span>#2<span class="nb">}}}</span><span class="k">\llap</span><span class="nb">{</span><span class="k">\contour</span><span class="nb">{</span>white<span class="nb">}{</span>#2<span class="nb">}}</span> <span class="k">\textcolor</span><span class="nb">{</span>#1<span class="nb">}{</span><span class="k">\tiny</span><span class="nb">{</span><span class="s">$</span><span class="nv">\blacksquare</span><span class="s">$</span><span class="nb">}}</span><span class="c">%</span>
  <span class="k">\endgroup</span><span class="c">%</span>
<span class="nb">}</span>
</pre>
</div>
<p>and used with <code>\colorindicator{tab:blue}{blue}</code>. For HTML, this CSS</p>
<div class="highlighted-source default css">
<pre><span></span><span class="p">.</span><span class="nc">color-underline</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-line</span><span class="p">:</span><span class="w"> </span><span class="kc">underline</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-style</span><span class="p">:</span><span class="w"> </span><span class="kc">solid</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="n">text-decoration-thickness</span><span class="p">:</span><span class="w"> </span><span class="mf">0.2</span><span class="kt">em</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="n">text-decoration-skip-ink</span><span class="p">:</span><span class="w"> </span><span class="kc">auto</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">.</span><span class="nc">blue</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-color</span><span class="p">:</span><span class="w"> </span><span class="mh">#1f77b4</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">.</span><span class="nc">blue-square</span><span class="p">::</span><span class="nd">after</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;\202f\25a0&quot;</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">inline-block</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#1f77b4</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre>
</div>
<p>was used with <code>&lt;span class="color-underline blue blue-square"&gt;blue&lt;/span&gt;</code> to produce <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span>. A production implementation would probably involve a symbol web font to improve and normalize the symbol appearance and possibly a better way to draw underlines.</p>
<p>Update (2020-10-31): <a href="https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/">see update on search for existing examples</a></p>
<hr class="footnotes"><ol class="footnotes" style="list-style-type:decimal"><li id="fn1-3032"><p > Cadot, O., Y. Couder, A. Daerr, S. Douady, and A. Tsinober. &#8220;Energy injection in closed turbulent flows: Stirring through boundary layers versus inertial stirring.&#8221; <em>Physical Review E</em> 56, no. 1 (1997): 427. doi:<a href="https://doi.org/10.1103/PhysRevE.56.427">10.1103/PhysRevE.56.427</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf1-3032" class="backlink" title="Return to footnote 1.">&#8617;</a></p></li><li id="fn2-3032"><p > Haque, Khorshed Banu, and J. G. Valatin. &#8220;An investigation of the separation energies of lighter nuclei.&#8221; <em>Nuclear Physics A</em> 95, no. 1 (1967): 97-114. doi:<a href="https://doi.org/10.1016/0375-9474(67)90154-6">10.1016/0375-9474(67)90154-6</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf2-3032" class="backlink" title="Return to footnote 2.">&#8617;</a></p></li><li id="fn3-3032"><p > Aydin, C. &#8220;The spectral variations of CU Virginis (HD 124224).&#8221; <em>Memorie della Societa Astronomica Italiana</em> 39 (1968): 721. bibcode:<a href="https://ui.adsabs.harvard.edu/abs/1968MmSAI..39..721A">1968MmSAI..39..721A</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf3-3032" class="backlink" title="Return to footnote 3.">&#8617;</a></p></li><li id="fn4-3032"><p > Blosser, H. G., and T. H. Handley. &#8220;Survey of (<em>p</em>, <em>n</em>) reactions at 12 MeV.&#8221; <em>Physical Review</em> 100, no. 5 (1955): 1340. doi:<a href="https://doi.org/10.1103/PhysRev.100.1340">10.1103/PhysRev.100.1340</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf4-3032" class="backlink" title="Return to footnote 4.">&#8617;</a></p></li><li id="fn5-3032"><p > Evans, D. S., G. V. Raynor, and R. T. Weiner. &#8220;The lattice spacings of thorium-lanthanum alloys.&#8221; <em>Journal of Nuclear Materials</em> 2, no. 2 (1960): 121-128. doi:<a href="https://doi.org/10.1016/0022-3115(60)90039-8">10.1016/0022-3115(60)90039-8</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf5-3032" class="backlink" title="Return to footnote 5.">&#8617;</a></p></li><li id="fn6-3032"><p > Vernov, S. N., E. V. Gorchakov, Yu I. Logachev, V. E. Nesterov, N. F. Pisarenko, I. A. Savenko, A. E. Chudakov, and P. I. Shavrin. &#8220;Investigations of radiation during flights of satellites, space vehicles and rockets.&#8221; <em>Journal of the Physical Society of Japan Supplement</em> 17 (1962): 162. bibcode:<a href="https://ui.adsabs.harvard.edu/abs/1962JPSJS..17B.162V">1962JPSJS..17B.162V</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf6-3032" class="backlink" title="Return to footnote 6.">&#8617;</a></p></li><li id="fn7-3032"><p > I found most of the above examples by performing full-text searches in <a href="https://ui.adsabs.harvard.edu/">NASA ADS</a> for terms such as &#8220;black diamond&#8221; or &#8220;filled square&#8221; and looking through hundreds of results to find the few instances that included both the search terms and the symbols. &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf7-3032" class="backlink" title="Return to footnote 7.">&#8617;</a></p></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2019/11/figure-caption-color-indicators/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn0.mpetroff.net
Minified using Disk

Served from: mpetroff.net @ 2026-03-30 07:59:23 by W3 Total Cache
-->