From: Prof T. R. <Pro...@pr...> - 2024-01-26 19:46:28
|
Hi, the second issue is to include Reduce output into the LaTeX document. (I do this in my web services.) I recommend you put it all into the LaTeX document, not have two separate files as you include. For example, see the attached. You can use the highly useful LaTeX package "versions" to control how much of the reduce code is typeset. So you can create a development pdf of the document, and also a more focused readable pdf version all from the same combined latex/reduce source. Also consider whether you want line-breaks in the algebra. Tony On 26/1/2024 10:13 pm, martin gregory via Reduce-algebra-developers wrote: > while trying to use IN_TEX I came across the following questions > > 1. using OFF ECHO causes IN_TEX to ignore everything in the input file > following the first \end{reduce}. If I use a $ terminator for the > IN_TEX command, only the reduce output and nothing else is > displayed. Since I would like to be able to display only the output > and not the commands, how can I do this? > > 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX > file which causes a fatal error when compiling the LaTex (TeX Live > 2023). If I write > > \newenvironment{reduce}{}{}% > > before the \documentclass command the compilation works. I would > expect that there is a definition of a reduce environment but > > find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; > > returns only a definition > > \newenvironment{describe}[1]{\par{\bf > #1}\begin{indented}}{\end{indented}} > > for the three files: > > doc/misc/reduce.sty > doc/primers/reduce.sty > doc/util/reduce.sty > > Searching in *.tex finds many more but no 'reduce'. Does it exist? > > 3. Using IN_TEX always produces a 99 error, e.g. > > +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( > "End-of-file read in file" "rlfi-01-src.tex") > > even though I have ;end; at the end of the file. Is this expected? > > I have compiled revision reduce 6658 (csl) from source on Slackware > (kernel 5.15.145). > > Martin Gregory > > Test program and LaTeX file: > > --------------------rlfi-01.red------------------------- > load_package rlfi ; > out t ; % to drop rlfi preamble > q:=(y^2+2*y)^2/(2*a); > on latex, lasimp ; > out "rlfi-01.tex" ; > in_tex "rlfi-01-src.tex" ; > shut "rlfi-01.tex" ; > off latex ; % after shut to avoid writing \end{document} > ;end; > --------------------rlfi-01-src.tex--------------------- > \documentclass[11pt,a4paper]{article} > \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} > \title{RLFI in file read by IN\_TEX} > \author{Martin Gregory} > \begin{document} > \maketitle > We define q as follows: > > \begin{reduce} > write q ; > \end{reduce} > \end{document} > ;end; > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |