# Tag Info

3

I've just seen that there is still missing a PSTricks solution ;) Using the newest version 5.0 (uploaded right now) of the pst-optexp package allows to use arbitrary paths as refractive or reflective surfaces. Here is how you can simulate a rough surface. Basically you must use \pssavepath (from pst-intersect) to save some path to be used later as ...

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} ...

Top 50 recent answers are included