I have a TikZ figure whose code I don't want to modify. I want some parts of this figure not to be displayed. So, I add a clipping code at the beginning. However, the texts in the clipped sections are still visible in the produced PDF if selected by mouse.
Consider the following minimal code:
Code: Select all
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\clip (0,0) rectangle (2,2);
% Untouchable code begins
\node at (1,1) {A};
\node at (3,1) {B};
% Untouchable code ends
\end{tikzpicture}
\end{document}
The intention of the code is to clip off B. However, in the produced PDF, one can still select B with mouse.

- AandB.jpg (1.42 KiB) Viewed 1973 times
How can I make sure that B is completely removed?
Thanks.