How To Draw Diagram In Latex With Box
Update 2021-02-07: I've now uploaded an extension to my spath3 packet which provides yet another way to describe knots and links using TikZ. (This isn't a replacement for the original knots package, that is nonetheless being maintained.)
Hither's some case code and rendering, for more run into the package documentation.
\documentclass{article} %\url{https://tex.stackexchange.com/q/17181/86} \usepackage{tikz} \usetikzlibrary{spath3, intersections, hobby} \brainstorm{document} \begin{tikzpicture}[ use Hobby shortcut, every trefoil component/.way={ultra thick, draw, cherry-red}, trefoil component 1/.style={blue}, ] \path[spath/save=trefoil] ([closed]90:2) foreach \one thousand in {1,...,3} { .. (-30+\k*240:.five) .. (xc+\chiliad*240:ii) } (90:two); \tikzset{spath/knot={trefoil}{8pt}{one,iii,5}} \end{tikzpicture} \cease{document}
Update 2013-04-22: I've now uploaded a TikZ library to CTAN expressly for the purpose of drawing knots. Information technology is already in MikTeX (according to CTAN), TeXLive might have to wait until TL2013 has been released. It is released as part of the spath3 library. Here'southward the link to CTAN. The hobby bundle also contains some useful lawmaking for drawing knots. For cartoon braids, there's the braids package. And here'southward a brusk web log post I wrote explaining the diversity of methods, and a slightly more detailed tutorial. The package was inspired past a question on TeX-SX and now has its own tag tikz-knots.
This is a follow-up to Niels' answer, namely to utilize TikZ. I've recently had occasion to describe a few knots and links using TikZ and accept quite a workable system. I'll non post code here (inquire by email or on http://tex.stackexchange.com if you desire). Using it, I can produce SVGs (equally evidenced by some nLab pages: http://ncatlab.org/nlab/show/Borromean+link, http://ncatlab.org/nlab/show/Whitehead+link, and some others) likewise as PDFs, PNGs, and so forth. As an case, here'south the trefoil knot:
(source: Wayback Machine)
Source: https://mathoverflow.net/questions/21424/how-to-draw-knots-with-latex
Posted by: helsleybeenter.blogspot.com

0 Response to "How To Draw Diagram In Latex With Box"
Post a Comment