-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new test for color containment in \href
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
\documentclass{article} | ||
\usepackage{hyperref} | ||
\usepackage{xcolor} | ||
\def\simple#1#2{#1 and #2} | ||
\begin{document} | ||
A link: \href{https://example.com}{\color{blue}here}. | ||
|
||
\section{Color should not leak into this heading} | ||
This text should be black. | ||
|
||
A simple macro: \simple{\color{blue}first}{second}. | ||
|
||
\section{Color should leak into this heading} | ||
This text should be blue. | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?latexml class="article"?> | ||
<?latexml package="hyperref"?> | ||
<?latexml package="xcolor"?> | ||
<?latexml RelaxNGSchema="LaTeXML"?> | ||
<document xmlns="http://dlmf.nist.gov/LaTeXML"> | ||
<resource src="LaTeXML.css" type="text/css"/> | ||
<resource src="ltx-article.css" type="text/css"/> | ||
<para xml:id="p1"> | ||
<p>A link: <ref class="ltx_href" color="#0000FF" href="https://example.com">here</ref>.</p> | ||
</para> | ||
<section inlist="toc" xml:id="S1"> | ||
<tags> | ||
<tag>1</tag> | ||
<tag role="autoref">section 1</tag> | ||
<tag role="refnum">1</tag> | ||
<tag role="typerefnum">§1</tag> | ||
</tags> | ||
<title><tag close=" ">1</tag>Color should not leak into this heading</title> | ||
<para xml:id="S1.p1"> | ||
<p>This text should be black.</p> | ||
</para> | ||
<para xml:id="S1.p2"> | ||
<p>A simple macro: <text color="#0000FF">first and second.</text></p> | ||
</para> | ||
</section> | ||
<section inlist="toc" xml:id="S2"> | ||
<tags> | ||
<tag>2</tag> | ||
<tag role="autoref">section 2</tag> | ||
<tag role="refnum">2</tag> | ||
<tag role="typerefnum">§2</tag> | ||
</tags> | ||
<title color="#0000FF"><tag close=" ">2</tag>Color should leak into this heading</title> | ||
<para xml:id="S2.p1"> | ||
<p><text color="#0000FF">This text should be blue.</text></p> | ||
</para> | ||
</section> | ||
</document> |