New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse math/latex in table input. #994
Comments
Hello @iabraham right, the In your case we can just write a short function that does this for you, it'll be a bit different than using DelimitedFiles
function hfun_mytableinput(params)
fpath = joinpath("_assets", params[1])
content = readdlm(fpath, ',')
io = IOBuffer()
write(io, """
<table>
<thead>
<tr>
""")
header = content[1, :]
for col in header
write(io, """
<th>$col</th>
""")
end
write(io, "</thead><tbody>")
for rowidx in 2:size(content, 1)
row = content[rowidx, :]
write(io, "<tr>")
for col in row
write(io, "<td>$(fd2html(col; internal=true, nop=true))</td>")
end
write(io, "</tr>")
end
write(io, """
</tbody>
</table>
""")
return String(take!(io))
end What it will do is it will read a CSV file assumed to be in So as an example if you put the exact content you showed in a file +++
hasmath = true
+++
# Hello
{{mytableinput example.csv}} The result will be: Note: you have to explicitly specify that |
@tlienart Perfect, that does the job (note: the above would with Thanks for this. Could you point me to how to make Franklin look for the CSV file in the appropriate folder based on where the Is there someway for me to make |
In the hfun you can use Note that if you place .md files in the |
Oh right ... my bad. I had mean to say that if |
How do I make Franklin parse Latex or math equations when using the
\tableinput{}{}
command?Currently if I have a CSV file
it doesn't get parsed to math when input into a markdown file using
\tableinput{}{}
command.The text was updated successfully, but these errors were encountered: