Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to draw this scheme, but I do not know how to start. Please help me.

enter image description here

share|improve this question
7  
On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are "too localized". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. –  Andrew Stacey Oct 26 '12 at 14:58
5  
Do you need to set it up exactly like that, or could you use the polynom package? See the manual and the demofile, polydemo.pdf. –  Torbjørn T. Oct 26 '12 at 15:41
    
Following up Andrew's comment: Why don't you just change the title to something related to "polynom division", provide some context, and mention what you have already tried? –  krlmlr Oct 26 '12 at 17:04
    
Why do you want to use TikZ to typeset a polynomial division problem? –  Andrew Uzzell Oct 26 '12 at 19:46
    
It would be helpful if you showed what you have tried so far in the way of a MWE. While solving problems is fun, setting them up is not. Then those trying to help can simply cut and paste your MWE and get started on solving problem. –  Peter Grill Oct 26 '12 at 20:50
add comment

2 Answers

up vote 11 down vote accepted

Is (local) layout important?

Typesetting polynom division can easy be done with the polynom package:

\documentclass{article}
\usepackage{polynom}

\begin{document}
\textbf{Style A:}\par % this is the default
\polylongdiv[style=A]{6x^3-2x^2+x+3}{x^2-x+1}

\textbf{Style B:}\par
\polylongdiv[style=B]{6x^3-2x^2+x+3}{x^2-x+1}

\textbf{Style C:}\par
\polylongdiv[style=C]{6x^3-2x^2+x+3}{x^2-x+1}
\end{document}

enter image description here

I'm afraid I didn't try to change layout (yet), but that will be another question...

share|improve this answer
    
I'm sorry, I missed @torbjorn-t 's comment... makes my answer a duplicate. I'll let it be for sake of the MWE? –  long tom Oct 26 '12 at 21:26
    
If you can, please write a code which out put like my picture. –  minthao_2011 Oct 27 '12 at 1:34
1  
@minthao_2011 polynom can't create output exactly like your picture. It has three ways of representing polynomial division, examples of which you can see in polydemo.pdf, that I linked to in my comment to your question. –  Torbjørn T. Oct 27 '12 at 8:15
    
Thank you very much. –  minthao_2011 Oct 27 '12 at 8:20
2  
@TomDierckx I took the liberty of expanding your example a little, and adding an image, hope that's OK. –  Torbjørn T. Oct 27 '12 at 8:22
show 1 more comment

Since the structure lends itself to an array, here is such an elementary implementation:

enter image description here

\documentclass{article}
\newcommand{\dropsign}[1]{\smash{\llap{\raisebox{-.5\normalbaselineskip}{$#1$\hspace{2\arraycolsep}}}}}%
\begin{document}
\[
  \begin{array}{r|r}
    \dropsign{-} 6x^3 - 2x^2 + \phantom{6}x + 3 & x^2 - \phantom{6}x + 1 \\ \cline{2-2}
    6x^3 - 6x^2 + 6x \phantom{{}+3} & 6x + 4 \\ \cline{1-1} \\[\dimexpr-\normalbaselineskip+\jot]
    \dropsign{-} 4x^2 - 5x + 3 \\
                 4x^2 - 4x + 4 \\ \cline{1-1} \\[\dimexpr-\normalbaselineskip+\jot]
                      -  x - 1
  \end{array}
\]
\end{document}
share|improve this answer
    
Thank you Werner very much. –  minthao_2011 Oct 27 '12 at 14:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.