Ask Your Question

Moondoggy's profile - activity

2024-02-12 08:09:31 +0200 received badge  Notable Question (source)
2024-02-12 08:09:31 +0200 received badge  Popular Question (source)
2023-02-15 15:08:30 +0200 received badge  Notable Question (source)
2022-07-07 16:27:33 +0200 received badge  Popular Question (source)
2022-06-17 18:56:37 +0200 received badge  Famous Question (source)
2021-04-04 09:17:34 +0200 received badge  Notable Question (source)
2021-01-11 23:48:30 +0200 received badge  Popular Question (source)
2020-06-18 18:08:48 +0200 commented answer Problems with sagetex

Thanks a lot!

2020-06-15 10:12:50 +0200 commented answer Problems with sagetex

Thank you very much for your patience. Do I have to use the command \includegraphics in order to see the plots in the PDF file because if I use this command there is still a question mark. under the graph.

2020-06-14 23:31:58 +0200 commented answer Problems with sagetex

Do I have to use the graphicx package for including these files into Latex?

2020-06-14 20:16:36 +0200 commented answer Problems with sagetex

Do I also have to put the .eps file into the same folder for getting the plots?

2020-06-14 19:40:26 +0200 received badge  Commentator
2020-06-14 19:40:26 +0200 commented answer Problems with sagetex

Thank you very much! I did not put .sout into the same folder. Now it is working.

2020-06-14 18:24:26 +0200 commented answer Problems with sagetex

I edited my log file in my post.

2020-06-14 16:44:41 +0200 commented answer Problems with sagetex

the log file says: Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)

2020-06-13 17:29:25 +0200 received badge  Editor (source)
2020-06-13 17:27:22 +0200 asked a question Problems with sagetex

Texmaker does not give me the required PDF file although in Sage it is written:

Sage processing complete. Run LaTeX on st_example.tex again.
  1. I took the example at https://doc.sagemath.org/html/en/tuto..., pasted this code into Texmaker and saved it under the file name st_example.tex. At this link http://www.cecm.sfu.ca/sage/spkg/upst... I chose sagetex-3.3.tar.gz. I put st_example.tex into the file sagetex3.3. There I compiled it using pdflatex. After this a new file appeared, st_example.sagetex.

  2. I uploaded st_example.sagetex on CoCalc. Then another code appeared, I clicked on Terminal wherein I wrote sage st_example.sagetex.sage. After this there was written:

    Sage processing complete. Run LaTeX on st_example.tex again.
    

    Especially new files appeared e.g st_example.sagetex.sout.

  3. After again compiling st_example.tex in LaTeX with pdflatex there were still these question marks and nothing changed.

This is the source file:

\documentclass{article}
\usepackage{sagetex}
\begin{document}

Using Sage\TeX, one can use Sage to compute things and put them into
your \LaTeX{} document. For example, there are
$\sage{number_of_partitions(1269)}$ integer partitions of $1269$.
You don't need to compute the number yourself, or even cut and paste
it from somewhere.

Here's some Sage code:

\begin{sageblock}
  f(x) = exp(x) * sin(2*x)
\end{sageblock}

The second derivative of $f$ is

\[
  \frac{\mathrm{d}^{2}}{\mathrm{d}x^{2}} \sage{f(x)} =
     \sage{diff(f, x, 2)(x)}.
\]

Here's a plot of $f$ from $-1$ to $1$:

\sageplot{plot(f, -1, 1)}

\end{document}

This is the log file:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250 64-bit) (preloaded format=pdflatex 2020.1.11)  14 JUN 2020 17:36
entering extended mode
**./st_example.tex
(st_example.tex
LaTeX2e <2019-10-01> patch level 3
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size10.clo"
File: size10.clo 2019/10/25 v1.4k 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
) (sagetex.sty
Package: sagetex 2019/01/09 v3.3 embedding Sage into LaTeX documents

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/tools\verbatim.sty
"
Package: verbatim 2019/11/10 v1.5r LaTeX2e package for verbatim enhancements
\every@verbatim=\toks14
\verbatim@line=\toks15
\verbatim@in@stream=\read1
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/fancyvrb\fancyvrb.
sty"
Package: fancyvrb 2020/01/13 v3.5 verbatim text (tvz,hv)

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\keyval.st
y"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
\FV@CodeLineNo=\count88
\FV@InFile=\read2
\FV@TabBox=\box27
\c@FancyVerbLine=\count89
\FV@StepNumber=\count90
\FV@OutFile=\write3
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/listings\listings.
sty"
\lst@mode=\count91
\lst@gtempboxa=\box28
\lst@token=\toks17
\lst@length=\count92
\lst@currlwidth=\dimen103
\lst@column=\count93
\lst@pos=\count94
\lst@lostspace=\dimen104
\lst@width=\dimen105
\lst@newlines=\count95
\lst@lineno=\count96
\lst@maxwidth=\dimen106

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/listings\lstmisc.s
ty"
File: lstmisc.sty 2020/03/24 1.8d (Carsten Heinz)
\c@lstnumber=\count97
\lst@skipnumbers=\count98
\lst@framebox=\box29
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/listings\listings.
cfg"
File: listings.cfg 2020/03/24 1.8d listings configuration
))
Package: listings 2020/03/24 1.8d (Carsten Heinz)

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\color.sty
"
Package: color 2016/07/10 v1.1e Standard LaTeX Color (DPC)

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-cfg\color
.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: pdftex.def on input line 147.

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-def\pdfte
x.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\graphicx.
sty"
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\graphics.
sty"
Package: graphics 2019/11/01 v1.3d Standard LaTeX Graphics (DPC,SPQR)

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-cfg\graph
ics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.
)
\Gin@req@height=\dimen107
\Gin@req@width=\dimen108
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/makecmds\makecmds.
sty"
Package: makecmds 2009/09/03 v1.0a extra command making commands
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\ifpdf.sty"
Package: ifpdf 2019/10/25 v3.4 ifpdf legacy package. Use iftex instead.
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\iftex.sty"
Package: iftex 2019/11/07 v1.0c TeX engine tests
)) ("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\ifthen.sty
"
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\ifxetex.st
y"
Package: ifxetex 2019/10/25 v0.7 ifxetex legacy package. Use iftex instead.
)
\c@ST@inline=\count99
\c@ST@plot=\count100
\c@ST@cmdline=\count101
\sagetexindent=\skip43

No file st_example.sagetex.sout.
\sagecommandlineskip=\skip44
) (st_example.aux)
\openout1 = `st_example.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
\c@lstlisting=\count102

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/context/base/mkii\supp-p
df.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count103
\scratchdimen=\dimen109
\scratchbox=\box30
\nofMPsegments=\count104
\nofMParguments=\count105
\everyMPshowfont=\toks18
\MPscratchCnt=\count106
\MPscratchDim=\dimen110
\MPnumerator=\count107
\makeMPintoPDFobject=\count108
\everyMPtoPDFconversion=\toks19
)
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/epstopdf-pkg\epsto
pdf-base.sty"
Package: epstopdf-base 2019/11/24 v2.7 Base part for package epstopdf

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

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

("C:\Users\tdami\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\tdami\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\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/generic/oberdiek\kvsetke
ys.sty"
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)

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

("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\ifluatex.s
ty"
Package: ifluatex 2019/10/25 v1.5 ifluatex legacy package. Use iftex instead.
))))
("C:\Users\tdami\AppData\Local\Programs\MiKTeX 2.9\tex/latex/pdftexcmds\pdftexc
mds.sty"
Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO
)
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
42.
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 460.
)
\ST@sf=\write4
\openout4 = `st_example.sagetex.sage'.

LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 7.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <5> on input line 7.

LaTeX Warning: Reference `@sageinline0' on page 1 undefined on input line 8.

LaTeX Warning: Reference `@sageinline1' on page 1 undefined on input line 21.

LaTeX Warning: Reference `@sageinline2' on page 1 undefined on input line 22.

Package sagetex Warning: Graphics file sage-plots-for-st_example.tex/plot-0.pdf
 on page 1 does not exist. Plot command is on input line 27.

*********************************************************************

Package sagetex Warning: there were undefined Sage formulas and/or plots.
Run Sage on st_example.sagetex.sage, and then run LaTeX on st_example.tex again
.

*********************************************************************

[1

{C:/Users/tdami/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
(st_example.aux)

LaTeX Warning: There were undefined references.

 ) 
Here is how much of TeX's memory you used:
 3452 strings out of 492484
 51317 string characters out of 3121601
 119239 words of memory out of 3000000
 7772 multiletter control sequences out of 15000+200000
 4116 words of font info for 16 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 51i,5n,40p,302b,217s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Users/tdami/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts
/cm/cmbx10.pfb><C:/Users/tdami/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/pu
blic/amsfonts/cm/cmmi10.pfb><C:/Users/tdami/AppData/Local/Programs/MiKTeX 2.9/f
onts/type1/public/amsfonts/cm/cmr10.pfb><C:/Users/tdami/AppData/Local/Programs/
MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr7.pfb><C:/Users/tdami/AppData/Loca
l/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmsy10.pfb><C:/Users/tdami
/AppData/Local/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on st_example.pdf (1 page, 63456 bytes).
PDF statistics:
 30 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)
2020-06-13 00:19:53 +0200 commented answer How do I get the output of this text in latex with sagetex?

Thank you for your patience. I do not really know how to do step 3. If I recompile the latex file nothing changes.

2020-06-12 23:32:27 +0200 marked best answer How do I get the output of this text in latex with sagetex?

Using Sage\TeX, one can use Sage to compute things and put them into your \LaTeX{} document. For example, there are $\sage{number_of_partitions(1269)}$ integer partitions of $1269$. You don't need to compute the number yourself, or even cut and paste it from somewhere.

Here's some Sage code:

\begin{sageblock} f(x) = exp(x) * sin(2*x) \end{sageblock}

The second derivative of $f$ is

[ \frac{\mathrm{d}^{2}}{\mathrm{d}x^{2}} \sage{f(x)} = \sage{diff(f, x, 2)(x)}. ]

Here's a plot of $f$ from $-1$ to $1$:

\sageplot{plot(f, -1, 1)}

\end{document}

2020-06-12 23:32:07 +0200 commented answer How do I get the output of this text in latex with sagetex?

Now I have the file .sagetex.sout: % This file was autogenerated from 2020-06-12-230428.sagetex.sage with % sagetex.py version 2019/01/09 v3.3 %b138f8a4fc7b23f763cd933974ea7272% md5sum of corresponding .sage file (minus "goboom", "current_tex_line", and pause/unpause lines)