Skip to content

Commit cfc9479

Browse files
committed
Add color in sample.md and expected.* files
1 parent 9918551 commit cfc9479

File tree

3 files changed

+220
-2
lines changed

3 files changed

+220
-2
lines changed

column-div/expected.html

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,148 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
77
<title>Test</title>
88
<style>
9+
html {
10+
line-height: 1.5;
11+
font-family: Georgia, serif;
12+
font-size: 20px;
13+
color: #1a1a1a;
14+
background-color: #fdfdfd;
15+
}
16+
body {
17+
margin: 0 auto;
18+
max-width: 36em;
19+
padding-left: 50px;
20+
padding-right: 50px;
21+
padding-top: 50px;
22+
padding-bottom: 50px;
23+
hyphens: auto;
24+
overflow-wrap: break-word;
25+
text-rendering: optimizeLegibility;
26+
font-kerning: normal;
27+
}
28+
@media (max-width: 600px) {
29+
body {
30+
font-size: 0.9em;
31+
padding: 1em;
32+
}
33+
}
34+
@media print {
35+
body {
36+
background-color: transparent;
37+
color: black;
38+
font-size: 12pt;
39+
}
40+
p, h2, h3 {
41+
orphans: 3;
42+
widows: 3;
43+
}
44+
h2, h3, h4 {
45+
page-break-after: avoid;
46+
}
47+
}
48+
p {
49+
margin: 1em 0;
50+
}
51+
a {
52+
color: #1a1a1a;
53+
}
54+
a:visited {
55+
color: #1a1a1a;
56+
}
57+
img {
58+
max-width: 100%;
59+
}
60+
h1, h2, h3, h4, h5, h6 {
61+
margin-top: 1.4em;
62+
}
63+
h5, h6 {
64+
font-size: 1em;
65+
font-style: italic;
66+
}
67+
h6 {
68+
font-weight: normal;
69+
}
70+
ol, ul {
71+
padding-left: 1.7em;
72+
margin-top: 1em;
73+
}
74+
li > ol, li > ul {
75+
margin-top: 0;
76+
}
77+
blockquote {
78+
margin: 1em 0 1em 1.7em;
79+
padding-left: 1em;
80+
border-left: 2px solid #e6e6e6;
81+
color: #606060;
82+
}
83+
code {
84+
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace;
85+
font-size: 85%;
86+
margin: 0;
87+
}
88+
pre {
89+
margin: 1em 0;
90+
overflow: auto;
91+
}
92+
pre code {
93+
padding: 0;
94+
overflow: visible;
95+
overflow-wrap: normal;
96+
}
97+
.sourceCode {
98+
background-color: transparent;
99+
overflow: visible;
100+
}
101+
hr {
102+
background-color: #1a1a1a;
103+
border: none;
104+
height: 1px;
105+
margin: 1em 0;
106+
}
107+
table {
108+
margin: 1em 0;
109+
border-collapse: collapse;
110+
width: 100%;
111+
overflow-x: auto;
112+
display: block;
113+
font-variant-numeric: lining-nums tabular-nums;
114+
}
115+
table caption {
116+
margin-bottom: 0.75em;
117+
}
118+
tbody {
119+
margin-top: 0.5em;
120+
border-top: 1px solid #1a1a1a;
121+
border-bottom: 1px solid #1a1a1a;
122+
}
123+
th {
124+
border-top: 1px solid #1a1a1a;
125+
padding: 0.25em 0.5em 0.25em 0.5em;
126+
}
127+
td {
128+
padding: 0.125em 0.5em 0.25em 0.5em;
129+
}
130+
header {
131+
margin-bottom: 4em;
132+
text-align: center;
133+
}
134+
#TOC li {
135+
list-style: none;
136+
}
137+
#TOC a:not(:hover) {
138+
text-decoration: none;
139+
}
9140
code{white-space: pre-wrap;}
10141
span.smallcaps{font-variant: small-caps;}
11142
span.underline{text-decoration: underline;}
12143
div.column{display: inline-block; vertical-align: top; width: 50%;}
13144
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
14145
ul.task-list{list-style: none;}
146+
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
15147
</style>
148+
<!--[if lt IE 9]>
149+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
150+
<![endif]-->
16151

17152
</head>
18153
<body>
@@ -62,5 +197,20 @@ <h2 id="columns-in-columns">Columns in columns</h2>
62197
</div>
63198
</div>
64199
</div>
200+
<h2 id="columns-and-colors">Columns and Colors</h2>
201+
<div class="columns">
202+
<div class="column" style="color: blue;">
203+
<p>blue content…</p>
204+
</div><div class="column" style="background-color: red;">
205+
<p>content on red background…</p>
206+
</div>
207+
</div>
208+
<div class="columns">
209+
<div class="column" style="background-color: red;color: blue;">
210+
<p>blue content on red background…</p>
211+
</div><div class="column" style="width:40%;">
212+
<p>contents…</p>
213+
</div>
214+
</div>
65215
</body>
66216
</html>

column-div/expected.tex

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ \section{column-div test}\label{column-div-test}}
33

44
content\ldots{}
55

6-
\leavevmode\hypertarget{thisdivdoesnothing}{}%
6+
\leavevmode\vadjust pre{\hypertarget{thisdivdoesnothing}{}}%
77
content\ldots{}
88

99
\hypertarget{three-columns}{%
@@ -92,3 +92,50 @@ \subsection{Columns in columns}\label{columns-in-columns}}
9292
}
9393

9494
\end{multicols}
95+
96+
\hypertarget{columns-and-colors}{%
97+
\subsection{Columns and Colors}\label{columns-and-colors}}
98+
99+
\mbox{
100+
101+
\begin{minipage}{0.4\columnwidth}
102+
103+
\color{blue}
104+
105+
blue content\ldots{}
106+
107+
\end{minipage}
108+
109+
\colorbox{red}{
110+
111+
\begin{minipage}{\dimexpr0.6\columnwidth-4\fboxsep\relax}
112+
113+
content on red background\ldots{}
114+
115+
\end{minipage}
116+
117+
}
118+
119+
}
120+
121+
\mbox{
122+
123+
\colorbox{red}{
124+
125+
\begin{minipage}{\dimexpr0.6\columnwidth-4\fboxsep\relax}
126+
127+
\color{blue}
128+
129+
blue content on red background\ldots{}
130+
131+
\end{minipage}
132+
133+
}
134+
135+
\begin{minipage}{0.4\columnwidth}
136+
137+
contents\ldots{}
138+
139+
\end{minipage}
140+
141+
}

column-div/sample.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,25 @@ contents...
6161
contents...
6262
:::
6363
::::::
64-
:::::::::
64+
:::::::::
65+
66+
67+
## Columns and Colors
68+
69+
:::::: {.columns}
70+
::: {.column width="40%" color="blue"}
71+
blue content...
72+
:::
73+
::: {.column width="60%" background-color="red"}
74+
content on red background...
75+
:::
76+
::::::
77+
78+
:::::: {.columns}
79+
::: {.column width="60%" color="blue" background-color="red"}
80+
blue content on red background...
81+
:::
82+
::: {.column width="40%" }
83+
contents...
84+
:::
85+
::::::

0 commit comments

Comments
 (0)