[Tex/LaTex] Strikethrough command in LaTeX


I am trying to have as strikethrough text using base LaTeX command and up till now there is no solution available except the use of some packages, i.e, ulem and cancel. Is there any other way to get a strikethrough without using any package? As this is for a learning management system and I don't know how to add packages there, also if I use a command which is not of base LaTeX it gives an error message of undefined sequence. Your help will be greatly appreciated

Best Answer

Here is a strikethrough macro using no packages. Basically you measure the length of the argument and \rlap a \rule of the same length.

enter image description here

You can adjust the height of the \rule by changing the [.5ex] and adjust its thickness by changing the {.4pt}. Here is the code:





Hello \strike{their} there.

Related Question