Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[12pt]{article}
- \usepackage[debug]{jsonparse}
- \usepackage{xifthen}
- \JSONParseFromFile{\test}{"test.json"}
- \def\bool{\JSONParseValue{\test}{bool}}
- \def\int{\JSONParseValue{\test}{int}}
- \def\str{\JSONParseValue{\test}{str}}
- \def\boolA{true}
- \def\intA{1}
- \def\strA{string}
- \begin{document}
- \section{String equality tests}
- \subsection{The reflexive condition holds}
- \bool\ == \bool? \ifthenelse{\equal{\bool}{\bool}}{true}{false}
- \int\ == \int? \ifthenelse{\equal{\int}{\int}}{true}{false}
- \str\ == \str? \ifthenelse{\equal{\str}{\str}}{true}{false}
- \subsection{But equality to fixed strings does not}
- \bool\ == true? \ifthenelse{\equal{\bool}{true}}{true}{false}
- \int\ == 1? \ifthenelse{\equal{\int}{1}}{true}{false}
- \str\ == string? \ifthenelse{\equal{\str}{string}}{true}{false}
- \subsection{Nor does equality to def strings}
- \bool\ == \boolA? \ifthenelse{\equal{\bool}{\boolA}}{true}{false}
- \int\ == \intA? \ifthenelse{\equal{\int}{\intA}}{true}{false}
- \str\ == \strA? \ifthenelse{\equal{\str}{\strA}}{true}{false}
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment