Skip to content

[BUG] tex output format #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
awellis opened this issue Sep 15, 2020 · 0 comments
Open

[BUG] tex output format #395

awellis opened this issue Sep 15, 2020 · 0 comments
Labels

Comments

@awellis
Copy link

awellis commented Sep 15, 2020

Duplicate of #391

description

I few months ago, I was using the following head to produce a plain tex file, i.e. without a preamble (I want to use the tex file in a LaTeX document).

---
weave_options:
    fig_ext: .pdf
    fig_pos: "!h"
    fig_env: "figure"
    doctype: "tex"
    out_path: :pwd
---

and then I used weave like so:

weave("figure-01.jmd", informat = "noweb")

Is it still possible to produce a plain tex file?

versions

using InteractiveUtils; versioninfo():

Julia Version 1.5.1
Commit 697e782ab8 (2020-08-25 20:08 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"
  JULIA_NUM_THREADS = 4

using Pkg; Pkg.status():

Status `~/.julia/environments/v1.5/Project.toml`
  [0c46a032] DifferentialEquations v6.15.0
  [31c24e10] Distributions v0.23.8
  [5fb14364] OhMyREPL v0.5.8
  [91a5bcdd] Plots v1.6.4
  [612083be] Queryverse v0.6.2
  [295af30f] Revise v2.7.5
  [f3b207a7] StatsPlots v0.14.13
  [fce5fe82] Turing v0.14.2
  [112f6efa] VegaLite v2.3.0
  [44d3d7a6] Weave v0.10.3
  [b77e0a4c] InteractiveUtils

minimum reproducible steps

Create a jmd file containing the following:

---
weave_options:
    fig_ext: .pdf
    fig_pos: "!h"
    fig_env: "figure"
    doctype: "tex"
    out_path: :pwd
---

```julia; echo = false; label = "fig:myfig"; fig_cap = "This is a caption"
using Plots
gr()
plot(sin, -π, π)

and use weave():



```julia
weave("figure-01.jmd", informat = "noweb")

This should produce a .tex. file containing

\begin{figure}[!h]
\center
\includegraphics[width=\linewidth]{figures/julia-test_myfig_1.pdf}
\caption{This is a caption}
\label{fig:myfig}
\end{figure}

@awellis awellis added the bug label Sep 15, 2020
@awellis awellis changed the title [BUG] [BUG] tex output format Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant