thx for that.
It's not quite what I was looking for but it led me to the solution
Thank You.
On 29 Paź, 15:42, Brian Bouterse wrote:
> We have done this before and used something like the code below. This
> sample is pretty basic.
>
> def fixchar(string,char):
>
> #fixes chars for latex
We have done this before and used something like the code below. This
sample is pretty basic.
def fixchar(string,char):
#fixes chars for latex
if char == '<':
newchar = '$<$'
elif char == '>':
newchar = '$>$'
elif char == '~':
newchar = '\\~{}'
Hi there!
I'm trying to write a filter that can be used inside of a template
that is used for generating latex files.
The filter should replace the '|' char with '\'. Simple:
@register.filter("verb_safe")
def verb_safe(val):
return str(val).replace('|', '\|')
is outputting me '\\|'
I'm lit
3 matches
Mail list logo