근처 단어와 겹치는 단어 지우기

근처 단어와 겹치는 단어 지우기

나는 크로스오버 단어를 추가하는 방법을 알아냈습니다.tcolorbox

\documentclass{article}\usepackage{xcolor} \usepackage[most]{tcolorbox}

\begin{document}

Of course, presenting this solution would be cheating. And, no, it won't work in all cases, due to strict limitations on the pairs 
\tcbox[tcbox raise base,
breakable,nobeforeafter, enhanced jigsaw, opacityback=0, sharp corners, parbox=false, boxrule=0pt, top=0pt,bottom=0pt,left=0pt,right=0pt, boxsep=0pt, frame hidden, parbox=false, 
  finish={\draw[thick,red] (frame.south west)--(frame.north east);\draw[thick,red] (frame.south east)--(frame.north west);}]{
  accepted
  }
  by \textbackslash{}line. Your professor surely knows that TeX doesn't draw oblique lines. With the standard package pict2e it's easier and it will work in any case.

\end{document}

여기에 이미지 설명을 입력하세요

여기서는 '수락'이라는 단어를 지웁니다. 그러나 나는 십자가가 약간, 예를 들어 1cm 정도 늘어나기를 원합니다. 내 그림을 참조하십시오.

여기에 이미지 설명을 입력하세요

어떻게 이를 달성할 수 있나요?

답변1

당신은 shorten당신의 라인을 할 수 있습니다.

단축된

\documentclass{article}\usepackage{xcolor} \usepackage[most]{tcolorbox}

\tikzset{crossout/.style={thick,red,shorten >=-.5cm,shorten <=-.5cm}}

\begin{document}

Of course, presenting this solution would be cheating. And, no, it won't work in all cases, due to strict limitations on the pairs 
\tcbox[tcbox raise base,
breakable,nobeforeafter, enhanced jigsaw, opacityback=0, sharp corners, parbox=false, boxrule=0pt, top=0pt,bottom=0pt,left=0pt,right=0pt, boxsep=0pt, frame hidden, parbox=false, 
  finish={\draw[crossout] (frame.south west)--(frame.north east);\draw[crossout] (frame.south east)--(frame.north west);}]{
  accepted
  }
  by \textbackslash{}line. Your professor surely knows that TeX doesn't draw oblique lines. With the standard package pict2e it's easier and it will work in any case.

\end{document}

답변2

대체 TikZ 솔루션(TeXnician의 솔루션보다 덜 우아함).

overlay공간을 차지하지 않고 무엇인가 위에 쓸 수 있습니다 .

shift나는 선을 확대하는 데 사용했습니다 ( shorten여기에서도 사용할 수 있지만 TeXnician이 이미 사용했기 때문에 사용하지 않았으므로 대안을 보여주고 싶습니다).

TikZ 노드를 일반 텍스트에 정렬하려면 여기를 참조하세요.일반 텍스트의 TikZ 노드.

\documentclass{article}\usepackage{xcolor} \usepackage{tikz}
\newcommand{\mycrossed}[1]{%
    \tikz[remember picture, baseline=(A.base)]{
        \node[inner sep=0pt](A){#1};
        }%
    \tikz[overlay, remember picture]{
        \draw[red, very thick] ([shift={(-.5,.2)}]A.north west) -- ([shift={(.5,-.2)}]A.south east);
        \draw[red, very thick] ([shift={(-.5,-.2)}]A.south west) -- ([shift={(.5,.2)}]A.north east);
        }%
    }
\begin{document}

Of course, presenting this solution would be cheating. And, no, it won't work in all cases, due to strict limitations on the pairs 
\mycrossed{accepted}
  by \textbackslash{}line. Your professor surely knows that TeX doesn't draw oblique lines. With the standard package pict2e it's easier and it will work in any case.
\end{document}

여기에 이미지 설명을 입력하세요

답변3

2019년 5월(pgf 버전 3.1.3) tikz는 이미 라이브러리에 X 표시 모양을 가지고 있습니다 shapes.misc.

다음 코드와 그림은 매뉴얼의 섹션 71.8에서 가져온 것입니다.

\begin{tikzpicture}
\draw [help lines] (0,0) grid (3,2);
\node [cross out,draw=red] at (1.5,1) {cross out};
\end{tikzpicture}

여기에 이미지 설명을 입력하세요

관련 정보