A while ago I stumbled upon the semantic package --- its 'math ligatures' feature in particular --- and the whole way in which I write math-code in LaTeX changed.
Instead of
\[
\sem{\sigma}_s^x \quad \defeq \quad
\setbuild
{ \sigma' \subseteq \Sigma }
{ \exists s' \in S: \config{s, \sigma} \longrightarrow \cdots \longrightarrow
\config{s', \sigma'} \land x \in \sigma' }
\]
(already cleaned up with specific-purpose macros) I can now write
\[
[[ \sigma ]]_s^x =def
\setbuild
{ \sigma' <=set \Sigma }
{ .E. s' .in. S: <( s, \sigma )> --> ... --> <( s', \sigma' )> .and. x .in. \sigma' }
\]
and get an identical result (MWE upon request).
Question: I was wondering if there are other packages like that: packages that make your (La)TeX code easier to read. (Perhaps even a replacement for semantic itself because, truth be told, that package is somewhat old and a bit buggy here and there.)
Edit: Please note, I'm interested in any package meant to enhance source code readability. It doesn't have to be anything like my example.
Several other questions exist concerning code readability, but none of them focus on packages.
tikz-qtreeand the recentforestuse such code parsing techniques. You can check them out for inspiration if you are inclined to write something along those lines. – percusse Jan 31 '13 at 21:24latexindent.plxcould help make source code more readable. – Werner Jan 31 '13 at 21:26<% fig('pendulum','A pendulum looks like this.',{'width'=>'fullpage','sidecaption'=>true,'sidepos'=>'b'}) %>, which might generate something like\fullpagewidthfig{pendulum}{A pendulum looks like this.}{}{}{1}{}{b}. The ruby version is more readable because ruby, unlike tex, was designed to be a general-purpose programming language. The options inside the{...}can have defaults, and I can easily add new options without breaking old code. – Jan 31 '13 at 22:06