samcarter / tikzducks

A latex package to draw cute rubber ducks with TikZ
https://ctan.org/pkg/tikzducks
LaTeX Project Public License v1.3c
169 stars 13 forks source link

Support for ConTeXt Mark IV (LuaTeX / LuaMetaTeX) #25

Closed ghost closed 4 years ago

ghost commented 4 years ago

I've written a (sort of) wrapper so tikzducks it's usable as third-party module from ConTeXt MkIV. I've also made minor modifications so only TikZ generic macros are used both for LaTeX and ConTeXt (tikzducks-generic.tex). Not tested with Plain TeX.

I'm not sure about Overleaf color (ConTeXt uses another color scheme) nor \scalebox (ConTeXt uses \scale with different syntax, instead), so further additions are a must.

samcarter commented 4 years ago

@JairoAdelRio Thanks a lot for your PR, that's really a great idea! I'm not at all familiar with context myself, would you maybe be able to show me a short test document for testing, which I could also show in the documentation? Something like

\documentclass{standalone}
\usepackage{tikzducks}

\begin{document}

\begin{tikzpicture}
    \duck
\end{tikzpicture}   

\end{document}

just for context? That would be very helpful!

ghost commented 4 years ago

Yep, of course!

\usemodule[tikzducks]
\usecolors[xwi] % Predefine most colors used by tikzducks
\starttext
\startcolumns[n=3]
\starttikzpicture
\duck[davidlikespineapplepizza]
\stoptikzpicture

\dorecurse{19}{

\starttikzpicture
\randuck
\stoptikzpicture

}
\stopcolumns
\stoptext

I forgot to comment that colors are to be defined first in ConTeXt, via \usecolors[colorscheme] or manually by the user. Otherwise \randuck won't work. :)

samcarter commented 4 years ago

@JairoAdelRio Thanks again for this great PR, I just merged it into the package, added it to the documentation etc.

ghost commented 4 years ago

Thanks to you, @samcarter Although the TikZ user base in ConTeXt is relatively smaller, it's nice to have this kind of goodies available. Ducks rock! :D

samcarter commented 4 years ago

Ducks rock! :D

Ducks swim! :)