Giter Club home page Giter Club logo

Comments (2)

NoelAraujo avatar NoelAraujo commented on June 11, 2024

I would love to see 'Tufte style' listed in list_out_formats, but I imagine that Julia Mardown needs to support it first (?)

Maybe someone knows how to create Tufte with Weaver.jl could post a minimal working example here.

from weave.jl.

EvoArt avatar EvoArt commented on June 11, 2024

I have a custom template like this

\documentclass{tufte-handout}

\usepackage{geometry}
\usepackage{lmodern}
\usepackage{sourcecodepro}
\usepackage{amssymb,amsmath}
\usepackage{bm}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{color}
\definecolor{lbcolor}{rgb}{1,1,0.95} 
\lstset{frameround=fttt,
	frame=trBL,
    basicstyle=\sourcecodepro\footnotesize,
    upquote=true,
    breaklines=true,
    breakindent=0pt,
    keepspaces=true,
    showspaces=false,
    columns=fullflexible,
    showtabs=false,
    showstringspaces=false,
    escapeinside={(*@}{@*)},
    extendedchars=true,
    backgroundcolor=\color{lbcolor}
}
{{#:tex_deps}}
{{{ :tex_deps }}}
{{/:tex_deps}}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.2ex}

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

{{#:title}}
\title{ {{{ :title }}} }
{{/:title}}

{{#:author}}
\author{ {{{ :author }}} }
{{/:author}}

{{#:date}}
\date{ {{{ :date }}} }
{{/:date}}

{{ :highlight }}

\begin{document}

{{#:title}}\maketitle{{/:title}}

{{{ :body }}}

\end{document}

and call weave like so

weave("my_doc.jmd", template = "custom.tpl", doctype = "md2pdf")

margin figures can be included:

```julia, fig_env = "marginfigure", fig_pos = "-1cm",fig_cap = "Plot of x and y."
plot(x,y)

Only works if you include fig_pos

Obviously, you need to install tufte.sty for this to work.

Not sure how to do sidenotes, but Julia Markdown would not need to support it. Just needs some way to tell Weave to pass on the raw LaTeX command to pdflatex, I think.

from weave.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.