Ask Your Question
1

Cannot reproduce Latex output as per video instructions

asked 2018-07-31 07:57:04 +0100

Mark Szlazak gravatar image

updated 2018-07-31 17:58:08 +0100

I am following this (dated) video on using Latex with SageMath.

https://youtu.be/Cjcn44CGfQI

This video makes it all so simple but my output is anything but expected with lots of warning and errors.

I am on Windows 10 Pro, using SageMath 8.2 and I installed the latest MikTex 2.9.

The Sage notebook is set to Latex in the drop-down. The input box has:

Hello World!

What I get as output is the following. So why am I not getting Hello World! displaying in notebook?

An error occurred.

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6730 64-bit) (preloaded format=pdflatex 2018.7.30) 31 JUL 2018 06:38 entering extended mode **\nonstopmode \input{sage80.tex} (sage80.tex ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\article.cls" Document Class: article 2014/09/29 v1.4h Standard LaTeX document class ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\size10.clo" File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) ) \c@part=\count80 \c@section=\count81 \c@subsection=\count82 \c@subsubsection=\count83 \c@paragraph=\count84 \c@subparagraph=\count85 \c@figure=\count86 \c@table=\count87 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty " Package: amsmath 2017/09/02 v2.17a AMS math features \@mathmargin=\skip43

For additional information on amsmath, use the `?' option. ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amstext.sty " Package: amstext 2000/06/29 v2.01 AMS text ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty " File: amsgen.sty 1999/11/30 v2.0 generic functions \@emptytoks=\toks14 \ex@=\dimen103 )) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty" Package: amsbsy 1999/11/29 v1.2d Bold Symbols \pmbraise@=\dimen104 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsmath\amsopn.st y" Package: amsopn 2016/03/08 v2.02 operator names ) \inf@bad=\count88 LaTeX Info: Redefining \frac on input line 213. \uproot@=\count89 \leftroot@=\count90 LaTeX Info: Redefining \overline on input line 375. \classnum@=\count91 \DOTSCASE@=\count92 LaTeX Info: Redefining \ldots on input line 472. LaTeX Info: Redefining \dots on input line 475. LaTeX Info: Redefining \cdots on input line 596. \Mathstrutbox@=\box26 \strutbox@=\box27 \big@size=\dimen105 LaTeX Font Info: Redeclaring font encoding OML on input line 712. LaTeX Font Info: Redeclaring font encoding OMS on input line 713. \macc@depth=\count93 \c@MaxMatrixCols=\count94 \dotsspace@=\muskip10 \c@parentequation=\count95 \dspbrk@lvl=\count96 \tag@help=\toks15 \row@=\count97 \column@=\count98 \maxfields@=\count99 \andhelp@=\toks16 \eqnshift@=\dimen106 \alignsep@=\dimen107 \tagshift@=\dimen108 \tagwidth@=\dimen109 \totwidth@=\dimen110 \lineht@=\dimen111 \@envbody=\toks17 \multlinegap=\skip44 \multlinetaggap=\skip45 \mathdisplay@stack=\toks18 LaTeX Info: Redefining [ on input line 2817. LaTeX Info: Redefining ] on input line 2818. ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsfonts\amssymb.st y" Package: amssymb 2013/01/14 v3.01 AMS font symbols

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.s ty" Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support \symAMSa=\mathgroup4 \symAMSb=\mathgroup5 LaTeX Font Info: Overwriting math alphabet \mathfrak' in versionbold' (Font) U/euf/m/n --> U/euf/b/n on input line 106. )) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\graphicx.s ty" Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\keyval.sty " Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks19 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\graphics.s ty" Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics\trig.sty" Package: trig 2016/01/03 v1.10 sin cos tan (DPC) ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-cfg\graphi cs.cfg" File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration ) Package graphics Info: Driver file: pdftex.def on input line 99.

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-def\pdftex .def" File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex )) \Gin@req@height=\dimen112 \Gin@req@width=\dimen113 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\jknappen\mathrsfs.s ty" Package: mathrsfs 1996/01/01 Math RSFS package v1.0 (jk) \symrsfs=\mathgroup6 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\inputenc.sty" Package: inputenc 2018/04/06 v1.3b Input encoding file \inpenc@prehook=\toks20 \inpenc@posthook=\toks21 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\fontenc.sty" Package: fontenc 2017/04/05 v2.0i Standard LaTeX package

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\base\t1enc.def" File: t1enc.def 2017/04/05 v2.0i Standard LaTeX file LaTeX Font Info: Redeclaring font encoding T1 on input line 48. )) No file sage80.aux. \openout1 = `sage80.aux'.

LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 35. LaTeX Font Info: ... okay on input line 35. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 35. LaTeX Font Info: ... okay on input line 35. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 35. LaTeX Font Info: ... okay on input line 35. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 35. LaTeX Font Info: ... okay on input line 35. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 35. LaTeX Font Info: ... okay on input line 35. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 35. LaTeX Font Info: ... okay on input line 35.

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\context\base\supp-pdf.mki i" [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count100 \scratchdimen=\dimen114 \scratchbox=\box28 \nofMPsegments=\count101 \nofMParguments=\count102 \everyMPshowfont=\toks22 \MPscratchCnt=\count103 \MPscratchDim=\dimen115 \MPnumerator=\count104 \makeMPintoPDFobject=\count105 \everyMPtoPDFconversion=\toks23 ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-b ase.sty" Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\infwarer r.sty" Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) ) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty " Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\kvdefine keys.sty" Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds. sty" Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO) ))) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\kvoptions. sty" Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\kvsetkey s.sty" Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\etexcmds .sty" Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifluatex .sty" Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO) Package ifluatex Info: LuaTeX not detected. ) Package etexcmds Info: Could not find \expanded. (etexcmds) That can mean that you are not using pdfTeX 1.50 or (etexcmds) that some package has redefined \expanded. (etexcmds) In the latter case, load this package earlier. ))) ("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\pdftexcm ds.sty" Package: pdftexcmds 2018/01/30 v0.27 Utility functions of pdfTeX for LuaTeX (HO )

("C:\Users\Mark\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.st y" Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch ) Package pdftexcmds Info: LuaTeX not detected. Package pdftexcmds Info: \pdf@primitive is available. Package pdftexcmds Info: \pdf@ifprimitive is available. Package pdftexcmds Info: \pdfdraftmode found. ) Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4 38. Package grfext Info: Graphics extension search list: (grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE G,.JBIG2,.JB2,.eps] (grfext) \AppendGraphicsExtensions on input line 456. ) [1

{C:/Users/Mark/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (sage80.aux) ) Here is how much of TeX's memory you used: 2528 strings out of 492973 33336 string characters out of 3127135 91925 words of memory out of 3000000 6388 multiletter control sequences out of 15000+200000 4403 words of font info for 15 fonts, out of 3000000 for 9000 1141 hyphenation exceptions out of 8191 42i,4n,27p,294b,110s stack positions out of 5000i,500n,10000p,200000b,50000s <c:\users\mark\appdata\local\miktex\2.9\fonts\pk\ljfour\jknappen \ec\dpi600\ecrm1000.pk=""> Output written on sage80.pdf (1 page, 3968 bytes). PDF statistics: 18 PDF objects out of 1000 (max. 8388607) 0 named destinations out of 1000 (max. 500000) 1 words of extra memory for PDF output out of 10000 (max. 10000000)

None

edit retag flag offensive close merge delete

Comments

Your log doesn't seem to report an error. Furthermore, it has :

Output written on sage80.pdf (1 page, 3968 bytes)

Do you indee have this file ? What does it contains ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2018-07-31 11:15:41 +0100 )edit

Yes I have it and it contains Hello World. Why doesn’t that output appear in the notebook? Just like in this tutorial:
https://youtu.be/Cjcn44CGfQI

Mark Szlazak gravatar imageMark Szlazak ( 2018-07-31 17:38:13 +0100 )edit

That is strange, though to my knowledge this has never been tested on Windows before so it might have a problem similar to https://ask.sagemath.org/question/430... That was with the Jupyter notebook but it might be something similar here (at least here it was able to output the PDF, just not display its contents in the notebook).

Iguananaut gravatar imageIguananaut ( 2018-08-01 12:04:31 +0100 )edit

If error comes in generating pdf, download aconda3 (it may be 32 bit or 64 bit, as per your's system requirement), then install and run it, then come to the SageMath, if you want to generate pdf via LaTeX platform, go to file - Download as - pdf(via LaTeX), then open aconda3 jupiter notebook (from start menu), a new tab will be opened in your browser, then again go to - file - Download as - pdf (via LaTeX), it will be automatically generated, in the mean time, you will be asked to install Miktex

Saptak Das gravatar imageSaptak Das ( 2020-05-29 09:45:28 +0100 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2018-08-01 12:34:55 +0100

Iguananaut gravatar image

updated 2018-08-01 12:44:40 +0100

I was able to reproduce the problem, and I realized after some debugging that the unhelpful "An error occurred." is coming from trying to run ImageMagick's convert, which needs to be installed for converting the PDFs to PNGs for display in the browser.

If you install the Windows version of ImageMagick and ensure that it's on your PATH environment variable it should work. In the meantime I've opened an issue for this, since convertshould really be included in the distribution: https://github.com/sagemath/sage-wind...

edit flag offensive delete link more

Comments

Thank you. Sorry for sounding so naive but how do I go about ensuring that ImageMagick is on my PATH environment variable. That is something I have never done before.

Mark Szlazak gravatar imageMark Szlazak ( 2018-08-01 14:27:40 +0100 )edit

I just realized there is an additional issue, which is that normally Sage would tell you if you don't have convert (and it should be able to use dvi2png too), but Windows has a built in command also called convert which is completely unrelated, so Sage mistakenly thinks you have ImageMagick convert even if it's the Windows built-in. That's something that should be fixed in Sage.

Iguananaut gravatar imageIguananaut ( 2018-08-01 14:51:17 +0100 )edit

I'm not 100% sure if installing ImageMagick alone will fix it, because I just built a new Sage for Windows with ImageMagick included, but it's still broken, so maybe there's still something else going on...

Iguananaut gravatar imageIguananaut ( 2018-08-01 14:52:06 +0100 )edit

Ah, I see, the ghostscript package needs to be installed too for conversion from PDF to PNG to work (this is a bit of a bug in the cygwin packaging IMO).

Iguananaut gravatar imageIguananaut ( 2018-08-01 15:01:07 +0100 )edit

If you're not sure how to set environment variables in Windows, I would suggest just waiting for the next installer version which will have this fixed. It should be out soon. That said, I believe the Windows installer for ImageMagick gives you the option to add a PATH entry automatically at the end of the installation: https://www.imagemagick.org/script/do...

Iguananaut gravatar imageIguananaut ( 2018-08-01 15:04:04 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-31 07:57:04 +0100

Seen: 818 times

Last updated: Aug 01 '18