How can I cross out a word in a sentence in Latex without using a package?
MWE:
\documentclass{article}
\usepackage{cancel}
\begin{document}
%BeginDocument
The first \xcancel{three commands} work in text mode also i.e.,\xcancel{science}
%End Document
\end{document}
Best Answer
Your professor should know better. This teaches nothing about LaTeX, in my opinion; using packages is the way.
But here it is; it includes a (perhaps too clumsy) implementation of Euclid's algorithm for the greatest common divisor, in order to pass a correct pair of values to
\line
.Of course, presenting this solution would be cheating. And, no, it won't work in all cases, due to strict limitations on the pairs accepted by
\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.A different solution (pdftex or luatex only)