# Remove part of decoration drawn with “celtic” package

I have this decoration created with celtic package.

\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{celtic}

\parindent=0pt

\begin{document}

\definecolor{amber}{rgb}{1.0,0.49,0.0}

\begin{center}
\begin{tikzpicture}[
scale=.52,
celtic path/.style={
draw,
double=amber,
blue,
double distance=5pt,
line width=2pt
},
celtic bar/.style={
ultra thick,
black,
draw,
rounded corners=5pt
},
]
\CelticDrawPath{
size={20,12},
crossings={
7:20,6,-;
6,7:12,|;
},
ignore  crossings={
7:19,9;
8:19,11;
8:19,7;
},
max steps=90
}
\end{tikzpicture}
\end{center}

\end{document}


I'm trying to remove upper right part with ignore crossings but this not succeed.

• We can always fill that region with white color like this: \draw[fill=white] (6,6) rectangle (20,12);. But I guess you want a ignore crossings solution. – nidhin Dec 15 '18 at 16:20
• The documentation for the celtic package would really do well to describe in any way how the knots are generated... Even setting max steps = 0 appears to perform several hidden iterations, obscuring how starting points are used. Frustrating. – Jesse Knight Dec 15 '18 at 16:36

I found a solution:

ignore crossings={
8:18,7:11;
7:19,8:12;
},


... but I can only guess at why it works. My theory is that the colon operator secretly increments by 2, since this is the frequency of crossings in the knot grid. Therefore, you need to specify both the "even" and "odd" grids as crossings to ignore (or [x-even, y-odd], [x-odd, y-even] here.).

As noted in the documentation footnote 1, this colon operator is apparently difficult to implement.

Result:

Debugging tips:

• Set max steps = 0 to get a sense of starting points, though a few magic iterations are still performed, so you can't see them exactly.
• To overlay grid coordinates on the knot, use:
\foreach \x in {1,...,20}{
\foreach \y in {1,...,12}{
\node at (\x,\y){\tiny \x,\y};
}
}


Though you may need to adjust the scale to avoid overlap of labels.

• Thanks, I'm confused for the syntax 8:18,7:11; 7:19,8:12; I can't find it in the manual. there is an example which use 4:10,5; 5:10,4 – Salim Bou Dec 15 '18 at 17:59
• Since the colon : denotes something like "all numbers in between" the two numbers, I assumed this works in both dimensions simultaneously, though this specific use isn't shown in the manual. So, 8:18,7:11 specifies the grid in the rectangle with corners: (8,7) (8,11) (18,11) (18,7). – Jesse Knight Dec 28 '18 at 14:33