Skip to content

[BUG] texw example broken #412

@nmheim

Description

@nmheim

First, thanks a lot for Weave.jl! I really like it and use it on a regular basis! :)

description

Running the examples/julia_latex.texw to produce a tex file produces incorrect output.
With Weave v0.10.2 everything is fine, but with the latest version the generated .tex file looks like this:

\documentclass[12pt,a4paper]{article}

\usepackage[a4paper,text={16.5cm,25.2cm},centering]{geometry}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage{hyperref}
\usepackage{minted}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.2ex}

\hypersetup
       {   pdfauthor = {  },
           pdftitle={  },
           colorlinks=TRUE,
           linkcolor=black,
           citecolor=blue,
           urlcolor=blue
       }






\begin{document}



{\textbackslash}documentclass[12pt]\{article\} {\textbackslash}usepackage[utf8]\{inputenc\} {\textbackslash}usepackage\{textgreek\} {\textbackslash}usepackage\{graphicx\} {\textbackslash}usepackage\{fancyvrb\} {\textbackslash}usepackage\{hyperref\}

{\textbackslash}DefineVerbatimEnvironment\{juliaout\}\{Verbatim\}\{\} {\textbackslash}DefineVerbatimEnvironment\{juliacode\}\{Verbatim\}\{fontshape=sl\} {\textbackslash}DefineVerbatimEnvironment\{juliaterm\}\{Verbatim\}\{\}

{\textbackslash}title\{Introduction to Julia Weave\}

{\textbackslash}begin\{document\} {\textbackslash}maketitle

This a sample {\textbackslash}href\{http://julialang.org/\}\{Julia\} latex document that can be executed using Weave. Output from code chunks and Gadfly plots will be included in the weaved document.

This documented can be turned into Latex document with captured result from Julia prompt.

{\textbackslash}section*\{Terminal chunk\}
....

\end{document}

I am also getting a compilation warning from Weave which might be related:

julia> using Weave                                                                                                                            
[ Info: Precompiling Weave [44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9]                                                                             
WARNING: Method definition latex(IO, Markdown.LaTeX) in module Markdown at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1
.5/Markdown/src/IPython/IPython.jl:28 overwritten in module WeaveMarkdown at /home/niklas/.julia/packages/Weave/BarbQ/src/WeaveMarkdown/markdo
wn.jl:10.                                                                                                                                     
  ** incremental compilation may be fatally broken for this module **  

I can try to look into this if I get a pointer where to start looking :)

versions

using InteractiveUtils; versioninfo():

Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: AMD Ryzen 7 PRO 4750U with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, znver2)

using Pkg; Pkg.status():

Status `~/Documents/Project.toml`
  [44d3d7a6] Weave v0.10.6

minimum reproducible steps

weave("julia_latex.texw", doctype="texminted")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions