# Tag Info

1

I did something with a very naive approach, reading what is suggested here I definitively have to change my code. Anyway, if someone is interested here it is: https://github.com/rvelseg/MuDoVLaGM it uses mainly make, and sed to comment and uncomment fragments of a main document.

3

The problem seems to be very interesting especially when arbitrary number of levels of brackets is expected. I tried to solve this. Arbitrary number of levels can be used and the types of brackets for each level can be declared. The formula enclosed by brackets are typed by \brk{formula} (\brk is abbreviation for "brackets"). The formula can include another ...

3

You can try this: \def\smart#1{\let\smartA=\empty \setbox0=\hbox{\def\smart{\global\let\smartA=\relax}$#1$}% \begingroup\def\smart##1{(##1)}\ifx\smartA\relax [#1]\else (#1)\fi\endgroup } \smart{abc\smart{d\smart{ef}g}h} % -> [abc(d(ef)g)h] \smart{pq{\smart{ru}v}w} % -> [pq(ru)vw] \smart{xyz} % -> (xyz) \end ...

5

Automating the over-use of \left, \right is so wrong, but... \documentclass{article} \newcount\smcount \delimitershortfall-1sp \def\smart#1{\left\ifodd\smcount[\else(\fi \advance\smcount by1 #1\right\ifodd\smcount)\else]\fi} \begin{document} $\smart{aaa\smart{Ala \smart{ma \smart {kota}}}}$ \end{document} or after clarification in comments, perhaps ...

8

Although using multiple \foreach loops does make the "semantic" layout of the network a little unclear, it certainly makes its creation easier. I have taken some liberties with the required connections otherwise the network starts to look a bit cluttered. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{arrows.meta,calc} \begin{document} ...

1


12

Our TikZers getting lazy I guess. This can't get away without a TikZ answer :P Same idea but using decorations (over and over again). \documentclass[tikz]{standalone} \usetikzlibrary{decorations.pathmorphing,decorations.markings,calc} \begin{document} \begin{tikzpicture} \shadedraw[thick,top color=gray!10,bottom color=gray, postaction=decorate, ...

18

Here's an attempt in Metapost. Using the direction x of y macro to find the required angle of reflection. Here's what you get with r=0: And with r=0.33: prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); path base, ray[]; u = 5mm; r=0.33; base = (-6u,0) for x=-5.8u step 0.2u until 5.8u: -- (x,r*normaldeviate) endfor -- (6u,0); draw ...

4

After a small fight with it (first time using prop) I think this works, although it's a bit of a mix of things, and may it would be better to think of a better “user interface”. First, you have an environment cryptolist which is like an enumerate except that \item{…} does have an argument. cryptolist has an optional argument which is the name of the list ...

Top 50 recent answers are included