From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23316 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: LaTeX algorithm to HTML using SVG images Date: Tue, 27 Aug 2019 12:29:28 -0700 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="96006"; mail-complaints-to="usenet@blaine.gmane.org" To: Paul Laffitte , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBJUJS3VQKGQESCLCHFY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Aug 27 21:29:44 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qt1-f189.google.com ([209.85.160.189]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i2hA0-000OqE-8D for gtp-pandoc-discuss@m.gmane.org; Tue, 27 Aug 2019 21:29:44 +0200 Original-Received: by mail-qt1-f189.google.com with SMTP id i19sf8376646qtq.17 for ; Tue, 27 Aug 2019 12:29:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1566934182; cv=pass; d=google.com; s=arc-20160816; b=ydk0Q0uf7QHEZ0n4KhLaHSmISllIcG19gp3BG4Pa5JM5vBPwuj8cQPytZ4tarzh6ah mBZv8tp60O0TgY3UtckvfL4vQmG+etfG1wsVOczBjtdRlIf8yNtr1Kid4NOd8hoL0k7c TDF8nCIkbQEuQMdpW3iPFvwdKX/hSWv7+C/vpbpimrQw946wS1uZ724hFYR6GAUHhBYx /Efas8i4PPavtBQQtGd8WvWWjYh60RS8CTflTiFl/4n+A182CBmSw2vPZE7FR2UDirhQ YEXVEcaP6vWGsU3yffTNi3frPuxozrvDgWSyENBYt8dYxpPhNS2HHoI8dUsl5lJ4d3bF jlAQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=eUATOwRJ+6YBdV0969yadn4B2vKWrN6mQFLPlgAWBwU=; b=yP9zEyiq1xJ4SU9OsuKa0ZaUKRfdHWfCBnd23RjsLzhcLkWC38oRIkfEQ9Z78G634C 0vaDeTuujKfeSXf9QcCprkl8eSm3lxtMM76s6SkmZGlhTSduOMM5kzRU0O30RrwluvDT fh4m724IgAeSh58SD1IM4IQQxSPSNvJ5RkZTXdKLB5VBJXCzNhwnLzB2rTD0vri8q7Ol rn5hBFGSumqBitw01Jk0DiBkVQx69usfFICnf/8AXbVy4NpSQYFRBR2WGp/IY6Zd45RF CCS31yUnGGL/jPZVw1f1kQPdRD/CVgnK4etMaTuMhWOZwd3y/jA7C1NdzN3BkNShsIdS NQxw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=wphszck0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::429 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=eUATOwRJ+6YBdV0969yadn4B2vKWrN6mQFLPlgAWBwU=; b=UTtiCp62YShT5CoBUkDYRRinbvvJNu1Hx3qirkyTxOH4YQIe2iX7+zEyAqBskMg/uq OV5S9RPyNRJdPVqRLi7z3hhdzYgtrxT/F6maJ65Owkr1dUlg2ikME60Z6Cu+fZuzyJSQ yLwXR5ZE/ge3++i7hb0ajayzGyc1N3cFPypyYaMN63z97NFzf0ZToPFLvdO6XYg16LvY 5NrQV+akd/9fWH0hy1TIT0baD5LzwGlO076S+dYkUXNUKjNdUuI4JUQwfzdYBkOKteka FGq3D3RKrLxqXI+A+IvpfoxrQPsvXSutpwNr6BtPWIsRfKYaQgdlIGdow0w1occGrjIy LGBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=eUATOwRJ+6YBdV0969yadn4B2vKWrN6mQFLPlgAWBwU=; b=O0lTcrTZeepvXuWHD05pGUK5PmQuWnaEu1rzRp5k07kVgG/o5dOM672rrGY5tkL1mp 6TNaHADFRxOV5t4+PK3RCDlAIi7uJdbthbjImtAuqkEglQCa4woiuybBOJiB3OxIMiLH sYU4chHG5K4N/2SZ1IwvVwJhN6JksycmgYx5M5I1ip+AOukl7JPlGJLuN1SvUQUum4uz mGEb4ZVn72jNQJwrbxgCzdG8Rsa57R3uWczMsf1eUNHD/Waleq+52CjVreAmpTrEgQb8 DkfJZZFtTmt4AAyQ52mD4SkInjziWLVteT7x3K3MTCIrODxQq2RsH7Wf6kbxNgg1IZ4h P1Hg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWbYnL+lEM/F8TTpmupWSRFq0U4JnjPxXQM/DFcNWxlX05EabhO hfNuCDuKGgk9Tq7jqwORxq4= X-Google-Smtp-Source: APXvYqyay0cEFgvxAssQsE5R88E9E+9Ou2O3ZV3IJ6HlYasKmDPWBK1zfBkma1WcWWPw0epsho3p1g== X-Received: by 2002:ac8:368a:: with SMTP id a10mr471683qtc.143.1566934182812; Tue, 27 Aug 2019 12:29:42 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:620a:129b:: with SMTP id w27ls153969qki.1.gmail; Tue, 27 Aug 2019 12:29:41 -0700 (PDT) X-Received: by 2002:a37:96c7:: with SMTP id y190mr129930qkd.111.1566934181918; Tue, 27 Aug 2019 12:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566934181; cv=none; d=google.com; s=arc-20160816; b=iublHXB8hre01YP7+EycYmkkCl1mKrRc+VUnfqBtvjRH4RfrdC0SHqUrT+JKTFIhFm GJoOKkiNKIBAvFuxH31D+8XdKPoviGPWK7bu0H59sanhPLCdZ0reDAHP1/p9SzD4yzcu 4BkKCLFcrJg7+KgR8n/YnoT0z9qMVqDZ2kLcCpJ3dokXwYe4sw5/DmvSXV++G6SJoFdE r7t2OSlvHM3amHYDVXKm9EUf+rKdvvyE2wfqzvGeazYhgxqI+/FgewJWq0NLiZMnFkkH ituHEBkKyqDCdOVhdkFGERzRm7Bt0k+elxV+VrwLNFEUbEHl0e5K1n7PLmSaDQxoJJb1 c8ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=ddhUoxBPXBPQBsBx1G8s1gMokgfL29CXkjxsk+6vOwM=; b=Vqujo1Tn0iQcdHjk+G/clrdZGFXahmEQ77E3y3zIj/YOzgKJTO0QOuQRCU9/wgt2Qh bdYAU0620tZb3DteAd6/OaOezNcTsfBA2yPFo5QSHmQMQ5Yjenatf6PGKcLVU9bUU4Es FsxIFWR7sL4Iw2/fvFQfgMsgALxKQm7cVJXbCAFOlPVjR1VUdRUryGIQ6XpZMprOLS4u bEILiLKvNygR1GBaVrYFdKxHgL2tm4gQANuY3wsO0pdoY8to03PrIe47j/1r5ahWG7el RblvMJpcq/HaJmOcmnsQS1RIpgF/J6DLWzRQ/C0Gr2CSNJ+WGs16V/P3p7P6PUhXToeH SR0w== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=wphszck0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::429 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com. [2607:f8b0:4864:20::429]) by gmr-mx.google.com with ESMTPS id k8si12311qkg.7.2019.08.27.12.29.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Aug 2019 12:29:41 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::429 as permitted sender) client-ip=2607:f8b0:4864:20::429; Original-Received: by mail-pf1-x429.google.com with SMTP id y200so50812pfb.6 for ; Tue, 27 Aug 2019 12:29:41 -0700 (PDT) X-Received: by 2002:aa7:9713:: with SMTP id a19mr69267pfg.64.1566934180677; Tue, 27 Aug 2019 12:29:40 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id o35sm159691pgm.29.2019.08.27.12.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Aug 2019 12:29:39 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id D2463A18E; Tue, 27 Aug 2019 15:29:28 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=wphszck0; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::429 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:23316 Archived-At: I'm not sure what you mean by latex extensions. But have you tried using MathJaX? It can be configured to generate SVG. Paul Laffitte writes: > Hello, > > I'm trying to figure out a way to render HTML with quality-lossless (I mean > not in a .png format for instance) algorithms from LaTeX using extensions. > In a more wider perspective, I would render markdown containing LaTeX using > extensions into HTML and eventually render this HTML into PDF. > > My goal is to be able to take notes and do my homework in my Scientific > Computing class. Here are my needs points by points: > - Markdown: Because it's easy and fast to write. > - LaTeX: Because I need to write matrices, algorithms and other > mathematical stuff. > - HTML: Because I would like to be able to use CSS to stylize my notes, and > eventually having it in a web format. (This is kind of optional but I > really would like to have it) > - SVG: Because text is quality-lossless, it's weird if when I zoom the text > is fine but the maths aren't (maths are the main point of the document) > - PDF: Because having all of this and not being able to get a PDF from it > is just non-sense. > > Currently, I'm able to do all of this but using extensions in LaTeX, > because yes, algorithms comes from extensions. I use webtex to render the > LaTeX parts into SVG using this command: > *pandoc 22_08.2.md --from markdown+tex_math_dollars --to=pdf -o **22_08.2**.pdf > -t html5 --webtex='https://latex.codecogs.com/svg.latex?'* > > I tried other engine than webtex but they whether doesn't support > extensions or SVG rendering. > > I'm so close to have this working perfectly well, and it would be so nice. > Does any one has any idea about how I could do? *Is there any LaTeX > rendering engine supported by pandoc that is able to both render without > quality loss and use LaTeX extensions?* > > PS: You can find join with this thread an example of a markdown file and > his html and pdf outputs that I generate. You can also see that on the page > 2 I had to write my pseudo-code with markdown raw code (```). > > -- > You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ad859f30-bf09-4f90-a9d9-33ed5b14cbc4%40googlegroups.com. > $$ > \begin{aligned} > x_{1} + 2x_{2} + x_{3} &= -1 \\ > -3x_{1} + x_{2} + x_{3} &= 0 \\ > x_{1} + 2x_{3} &= 1 \\ > \end{aligned} > \implies > \overset{A}{ > \begin{bmatrix} > 1 & 2 & 1 \\ > -3 & 1 & 1 \\ > 1 & 0 & 3 \\ > \end{bmatrix} > } > \overset{x}{ > \begin{bmatrix} > x_{1} \\ > x_{2} \\ > x_{3} \\ > \end{bmatrix} > } = > \overset{b}{ > \begin{bmatrix} > -1 \\ > 0 \\ > 1 \\ > \end{bmatrix} > } > $$ > > Using the formula $Row_{i} := Row_{i} - (\frac{A_{ik}}{A_{kk}}) \cdot Row_{k}$: > > --- > > $A_{ik} = A_{21}$ hence $i = 2$ and $k = 1$ > > $Row_{2} := Row_{2} - (\frac{A_{21}}{A_{11}}) \cdot Row_{1}$ > > $= \begin{bmatrix}-3 & 1 & 1\end{bmatrix} - (\frac{-3}{1}) \cdot \begin{bmatrix}1 & 2 & 1\end{bmatrix}$ > > $= \begin{bmatrix}0 & 7 & 4\end{bmatrix}$ > > $$ > \begin{bmatrix} > 1 & 2 & 1 \\ > 0 & 7 & 4 \\ > 1 & 0 & 3 \\ > \end{bmatrix} > $$ > > --- > > $A_{ik} = A_{31}$ hence $i = 3$ and $k = 1$ > > $Row_{3} := Row_{3} - (\frac{A_{31}}{A_{11}}) \cdot Row_{1}$ > > $= \begin{bmatrix}1 & 0 & 3\end{bmatrix} - (\frac{1}{1}) \cdot \begin{bmatrix}1 & 2 & 1\end{bmatrix}$ > > $= \begin{bmatrix}0 & -2 & 2\end{bmatrix}$ > > $$ > \begin{bmatrix} > 1 & 2 & 1 \\ > 0 & 7 & 4 \\ > 0 & -2 & 2 \\ > \end{bmatrix} > $$ > > --- > > $A_{ik} = A_{32}$ hence $i = 3$ and $k = 2$ > > $Row_{3} := Row_{3} - (\frac{A_{32}}{A_{22}}) \cdot Row_{2}$ > > $= \begin{bmatrix}0 & -2 & 2\end{bmatrix} - (\frac{-2}{7}) \cdot \begin{bmatrix}0 & 7 & 4\end{bmatrix}$ > > $= \begin{bmatrix}0 & 0 & \frac{22}{7}\end{bmatrix}$ > > $$ > \begin{bmatrix} > 1 & 2 & 1 \\ > 0 & 7 & 4 \\ > 0 & 0 & \frac{22}{7} \\ > \end{bmatrix} > $$ > > --- > > $$ > \overset{A}{ > \begin{bmatrix} > 1 & 2 & 1 \\ > -3 & 1 & 1 \\ > 1 & 0 & 3 \\ > \end{bmatrix} > } = > \overset{L}{ > \begin{bmatrix} > 1 & 0 & 0 \\ > -3 & 1 & 0 \\ > 1 & \frac{-2}{7} & 1 \\ > \end{bmatrix} > } > \overset{U}{ > \begin{bmatrix} > 1 & 2 & 1 \\ > 0 & 7 & 4\\ > 0 & 0 & \frac{22}{7} \\ > \end{bmatrix} > } > $$ > > $$ > Lw = b > \implies > \overset{L}{ > \begin{bmatrix} > 1 & 0 & 0 \\ > -3 & 1 & 0 \\ > 1 & \frac{-2}{7} & 1 \\ > \end{bmatrix} > } > \overset{w}{ > \begin{bmatrix} > w_{1} \\ > w_{2} \\ > w_{3} \\ > \end{bmatrix} > } = > \overset{b}{ > \begin{bmatrix} > -1 \\ > 0 \\ > 1 \\ > \end{bmatrix} > } > $$ > > ``` > for j = 1 to n: > j = 1 > w1 = b1 / L11 = -1 / 1 = -1 > for i = j + 1 to n: > i = 2 > b2 = b2 - L21 * w1 = 0 - (-3) * (-1) = -3 > i = 3 > b3 = b3 - L31 * w1 = 1 - 1 * (-1) = 2 > j = 2 > w2 = b2 / L22 = -3 / 1 = -3 > for i = j + 1 to n: > i = 3 > b3 = b3 - L32 * w2 = 2 - (-2 / 7) * (-3) = 8 / 7 > j = 3 > w3 = b3 / L33 = (8 / 7) / 1 = 8 / 7 > for i = j + 1 to n: > i = 4 -> skip > ``` > > $$ > Ux = w > \implies > \overset{U}{ > \begin{bmatrix} > 1 & 2 & 1 \\ > 0 & 7 & 4 \\ > 0 & 0 & \frac{22}{7} \\ > \end{bmatrix} > } > \overset{x}{ > \begin{bmatrix} > x_{1} \\ > x_{2} \\ > x_{3} \\ > \end{bmatrix} > } = > \overset{w}{ > \begin{bmatrix} > w_{1} \\ > w_{2} \\ > w_{3} \\ > \end{bmatrix} > } = > \overset{w}{ > \begin{bmatrix} > -1 \\ > -3 \\ > \frac{8}{7} \\ > \end{bmatrix} > } > $$ > > ***Paul Laffitte*** *6222808130* > > \begin{aligned} x_{1} + 2x_{2} + x_{3} &= -1 \\ -3x_{1} + x_{2} + x_{3} &= 0 \\ x_{1} + 2x_{3} &= 1 \\ \end > {aligned} \implies \overset{A}{ \begin{bmatrix} 1 & 2 & 1 \\ -3 & 1 & 1 \\ 1 & 0 & 3 \\ \end{bmatrix} } \overset{x} > { \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} } = \overset{b}{ \begin{bmatrix} -1 \\ 0 \\ 1 \\ \end > {bmatrix} } > > Using the formula > Row_{i} := Row_{i} - (\frac{A_{ik}}{A_{kk}}) \cdot Row_{k} > : > > ------------------------------------------------------------------------------- > > A_{ik} = A_{21} > hence > i = 2 > and > k = 1 > > Row_{2} := Row_{2} - (\frac{A_{21}}{A_{11}}) \cdot Row_{1} > > = \begin{bmatrix}-3 & 1 & 1\end{bmatrix} - (\frac{-3}{1}) \cdot \begin{bmatrix}1 & 2 & 1\end{bmatrix} > > = \begin{bmatrix}0 & 7 & 4\end{bmatrix} > > \begin{bmatrix} 1 & 2 & 1 \\ 0 & 7 & 4 \\ 1 & 0 & 3 \\ \end{bmatrix} > > ------------------------------------------------------------------------------- > > A_{ik} = A_{31} > hence > i = 3 > and > k = 1 > > Row_{3} := Row_{3} - (\frac{A_{31}}{A_{11}}) \cdot Row_{1} > > = \begin{bmatrix}1 & 0 & 3\end{bmatrix} - (\frac{1}{1}) \cdot \begin{bmatrix}1 & 2 & 1\end{bmatrix} > > = \begin{bmatrix}0 & -2 & 2\end{bmatrix} > > \begin{bmatrix} 1 & 2 & 1 \\ 0 & 7 & 4 \\ 0 & -2 & 2 \\ \end{bmatrix} > > ------------------------------------------------------------------------------- > > A_{ik} = A_{32} > hence > i = 3 > and > k = 2 > > Row_{3} := Row_{3} - (\frac{A_{32}}{A_{22}}) \cdot Row_{2} > > = \begin{bmatrix}0 & -2 & 2\end{bmatrix} - (\frac{-2}{7}) \cdot \begin{bmatrix}0 & 7 & 4\end{bmatrix} > > = \begin{bmatrix}0 & 0 & \frac{22}{7}\end{bmatrix} > > \begin{bmatrix} 1 & 2 & 1 \\ 0 & 7 & 4 \\ 0 & 0 & \frac{22}{7} \\ \end{bmatrix} > > ------------------------------------------------------------------------------- > > \overset{A}{ \begin{bmatrix} 1 & 2 & 1 \\ -3 & 1 & 1 \\ 1 & 0 & 3 \\ \end{bmatrix} } = \overset{L}{ \begin{bmatrix} > 1 & 0 & 0 \\ -3 & 1 & 0 \\ 1 & \frac{-2}{7} & 1 \\ \end{bmatrix} } \overset{U}{ \begin{bmatrix} 1 & 2 & 1 \\ 0 & 7 & > 4\\ 0 & 0 & \frac{22}{7} \\ \end{bmatrix} } > > Lw = b \implies \overset{L}{ \begin{bmatrix} 1 & 0 & 0 \\ -3 & 1 & 0 \\ 1 & \frac{-2}{7} & 1 \\ \end{bmatrix} } > \overset{w}{ \begin{bmatrix} w_{1} \\ w_{2} \\ w_{3} \\ \end{bmatrix} } = \overset{b}{ \begin{bmatrix} -1 \\ 0 \\ 1 > \\ \end{bmatrix} } > > for j = 1 to n: > j = 1 > w1 = b1 / L11 = -1 / 1 = -1 > for i = j + 1 to n: > i = 2 > b2 = b2 - L21 * w1 = 0 - (-3) * (-1) = -3 > i = 3 > b3 = b3 - L31 * w1 = 1 - 1 * (-1) = 2 > j = 2 > w2 = b2 / L22 = -3 / 1 = -3 > for i = j + 1 to n: > i = 3 > b3 = b3 - L32 * w2 = 2 - (-2 / 7) * (-3) = 8 / 7 > j = 3 > w3 = b3 / L33 = (8 / 7) / 1 = 8 / 7 > for i = j + 1 to n: > i = 4 -> skip > > Ux = w \implies \overset{U}{ \begin{bmatrix} 1 & 2 & 1 \\ 0 & 7 & 4 \\ 0 & 0 & \frac{22}{7} \\ \end{bmatrix} } > \overset{x}{ \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} } = \overset{w}{ \begin{bmatrix} w_{1} \\ w_ > {2} \\ w_{3} \\ \end{bmatrix} } = \overset{w}{ \begin{bmatrix} -1 \\ -3 \\ \frac{8}{7} \\ \end{bmatrix} } > > Paul Laffitte 6222808130