LyXLong division

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
jjc_uk
Posts: 2
Joined: Fri Feb 12, 2010 7:42 pm

Long division

Post by jjc_uk »

Hi Folks
Can anyone give me some guidance on how to enter long division on Lyx 1.6 (for win XP)

I have found reference to the latex command \longdiv
I think I may have to add a package ?
I downloaded longdiv from http://ctan.org/pkg/ which gives me a tex package but I am unsure if Lyx can use it and if so where to put it.

best regards
Jim

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Long division

Post by php1ic »

I don't use Lyx, and don't know why the 'package' has a .tex extension rather than .sty (I assume the fact that it is over 15 years old and has never been modified may be a reason), but this MWE works for me.

Code: Select all

\documentclass[11pt,a4paper]{article}
\begin{document}

\include{longdiv}

\longdiv{45}{3}

\end{document}
EDIT: It works after downloading the longdiv.tex file to the same directory as the above code.
jjc_uk
Posts: 2
Joined: Fri Feb 12, 2010 7:42 pm

Re: Long division

Post by jjc_uk »

mmm

thanks for feedback
now you mention it I did also come across a longdiv.sty but cant remember from where.
though it is now located in the LYX/resources/tex directory
but will not show up in the document class menu, although other styles in that directory seem to ?

MWE ? is that minimal working example ?

I tried entering your code in lyx
selecting tex and pasting it but an error saying Latex error :can only be used in preamle
\maketitle your command was ignored

best regards
Jim
php1ic
Posts: 192
Joined: Wed Jan 28, 2009 8:17 pm

Long division

Post by php1ic »

If you added the .sty file manually, did you tell latex that there are new packages? If you use linux then you need to run

Code: Select all

$ sudo texhash
Don't know how to do it in windows

I don't understand that error message, but yes MWE is minimal working example. If you post your code others may be able to help.
Post Reply