Correction:

Then in another tiddler I explain how code works and I need to include few 
*lines* of code and explain them. So for example in Tiddler B, I need to 
transclude *lines 3-5* and in another part transclude *lines 8-19 * 

On Thursday, November 26, 2020 at 1:05:46 AM UTC+3:30 Atronoush wrote:

> I use a Tiddlywiki for my Python codes. So I have a tiddler like below
>
> Title: Slab Catalyst
> Body:
>  # Problem data and parameters
>     L= 1e-3        # pellet thickness, m
>     Cao=0.2        # concen at the surface, kg-mol/m3
>     k=1e-3         # reaction rate constant, 1/s
>     Dab=1.2e-9     # diffusion coeff, m2/s
>    
>     # Calculate Thiele modulus
>     phi=L * np.sqrt(k/Dab)
>     
>     def slab_exact(z):
>         """ dcalculates the exact solution """
>         x = 1 - z/L
>         Ca=Cao*np.cosh(phi*x)/np.cosh(phi)
>         return Ca
>
>     def odefun(z,u):
>         """ defines the set of odes """        
>         u1, u2 = u
>         dudz=[ u2,
>                k/Dab*u1 ]
>         return dudz
>     
>     def bcfun(ul, ur):
>         """ defines the boundary conditions """
>         residue=[ ul[0]-Cao,
>                   ur[1] ]
>         return residue
>
> Then in another tiddler I explain how code works and I need to include few 
> line of code and explain them. So for example in Tiddler B, I need to 
> transclude like 3-5 and in another part transclude like 8-19
>
> Using the Tiddlywiki filter operators it possible to process a tiddler 
> contents and break into lines, I wish to have a macro able
> transclude certain lines of code in another tiddler.
>
> -Atro
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f1899d08-956b-4025-be6f-edc09e5123f4n%40googlegroups.com.

Reply via email to