Guest User

Untitled

a guest
Oct 26th, 2024
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 1.08 KB | None | 0 0
  1. \documentclass[12pt]{article}
  2.  
  3. \usepackage[debug]{jsonparse}
  4. \usepackage{xifthen}
  5.  
  6. \JSONParseFromFile{\test}{"test.json"}
  7. \def\bool{\JSONParseValue{\test}{bool}}
  8. \def\int{\JSONParseValue{\test}{int}}
  9. \def\str{\JSONParseValue{\test}{str}}
  10.  
  11. \def\boolA{true}
  12. \def\intA{1}
  13. \def\strA{string}
  14.  
  15. \begin{document}
  16.  
  17. \section{String equality tests}
  18.  
  19. \subsection{The reflexive condition holds}
  20.  
  21. \bool\ == \bool? \ifthenelse{\equal{\bool}{\bool}}{true}{false}
  22.  
  23. \int\ == \int? \ifthenelse{\equal{\int}{\int}}{true}{false}
  24.  
  25. \str\ == \str? \ifthenelse{\equal{\str}{\str}}{true}{false}
  26.  
  27. \subsection{But equality to fixed strings does not}
  28.  
  29. \bool\ == true? \ifthenelse{\equal{\bool}{true}}{true}{false}
  30.  
  31. \int\ == 1? \ifthenelse{\equal{\int}{1}}{true}{false}
  32.  
  33. \str\ == string? \ifthenelse{\equal{\str}{string}}{true}{false}
  34.  
  35. \subsection{Nor does equality to def strings}
  36.  
  37. \bool\ == \boolA? \ifthenelse{\equal{\bool}{\boolA}}{true}{false}
  38.  
  39. \int\ == \intA? \ifthenelse{\equal{\int}{\intA}}{true}{false}
  40.  
  41. \str\ == \strA? \ifthenelse{\equal{\str}{\strA}}{true}{false}
  42.  
  43. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment