Skip to content
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

Conditional statement Issue #8244

Closed
MoreDhaval opened this issue Aug 24, 2022 · 4 comments
Closed

Conditional statement Issue #8244

MoreDhaval opened this issue Aug 24, 2022 · 4 comments

Comments

@MoreDhaval
Copy link

Explain the problem.
Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.

Pandoc version?
What version of pandoc are you using, on what OS?

@MoreDhaval MoreDhaval added the bug label Aug 24, 2022
@MoreDhaval
Copy link
Author

Conditional statement not working
\usepackage{ifthen}
\begin{document}

Solution 1
$if("value"==0)$
Inside diameter conservator Dhaval
$endif$

Solution 1
$if("value"=0)$
Inside diameter conservator Dhaval
$endif$

\end{document}

@tarleb tarleb added enhancement and removed bug labels Aug 24, 2022
@tarleb
Copy link
Collaborator

tarleb commented Aug 24, 2022

This is a duplicate of #3697; closing in favor of that issue.

@tarleb tarleb closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2022
@MoreDhaval
Copy link
Author

\documentclass[a4paper,fleqn,8pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{geometry}
\geometry{a4paper}
\geometry{right=1cm}
\geometry{bottom=1cm}
\geometry{top=0.5cm}
\geometry{headsep=0.1cm}
\setlength{\headheight}{90pt}
\setlength{\textheight}{22.8cm}
%%% PACKAGES
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{zref-totpages}
\usepackage{amsmath}
\usepackage{ifthen}
\usepackage{exscale}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{calc}
\usepackage{fp}
\usepackage[%per=slash,
decimalsymbol=comma,
exponent-product = \cdot,
loctolang=DE:ngerman,
per-mode=fraction,
open-bracket=(-]{siunitx}
\usepackage{array}
\renewcommand{\sfdefault}{lmr}
\renewcommand{\familydefault}{\sfdefault}
\setcounter{secnumdepth}{4}
\setcounter{section}{1}
\parindent0pt
\usepackage{tabularx}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}
%%% HEADERS & FOOTERS
\usepackage{fancyhdr}
\fancyhead{}
\fancyfoot{}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
%Seitenkopf
\lhead{\begin{tabular}{C{3cm}!{\vrule width 2pt}C{9,3cm}!{\vrule width 2pt}C{3.5cm}}
\includegraphics[height=1\baselineskip]{../images/logo}& W.D.No: \varEWERKNUMMER \ Project: \varEPROJNUMMER & \large \textbf{Test} \
\large IBN & \large \textbf{\nouppercase{\leftmark}} & \large \thepage \slash \ztotpages \
& \large\centering \nouppercase{\rightmark} & \
\noalign{\hrule height 2pt}
\end{tabular}
}
\chead{}
\rhead{}

%Seitenfuss
\lfoot{
\begin{footnotesize}
\begin{tabular}{L{8.1cm}R{8.2cm}}
\noalign{\hrule height 2pt}
Origin: & \varPROGVERSION \
\hline
\end{tabular}\
\begin{tabular}{p{16.3cm}}
{Information.
.} \
\end{tabular}\
\begin{tabular*}{17.1cm}{ l|l|l|l|l|@{\extracolsep{\fill}}l|l|l|l }
\hline
Prepared by: &Designer: &First release: &Last edit: &Authorization: IND& & & & \
\varGRUPPE & \varBEARBEITER& \today & \date{\today} & \multicolumn{5}{l}{} \
\end{tabular*}
\end{footnotesize}
}
\cfoot{}
\rfoot{}
\author{}
\title{}
\begin{document}\newcommand{\varPROGVERSION}{1.3.7.0}
\section*{Print Data}\newcommand{\power}[2]{\left(#1\right)^{#2}}
\let\Power=\power

\let\csqrt=\sqrt
\renewcommand{\sqrt}[2]{
\ifthenelse{\equal{#2}{2}}%\isodd{#2}}
{
\csqrt{#1}%\fi b
}{\csqrt[#2]{#1}}}

\newcommand{\siToVar}[2]{
\let\oSI=\SI
\renewcommand{\SI}[2]{##1}
\FPset#2{#1}
\let\SI=\oSI
}

\newcommand{\siVar}[1]{
\let\oSI=\SI
\renewcommand{\SI}[2]{##1}
#1
\let\SI=\oSI
}
\setcounter{section}{0}

\begin{footnotesize}

\begin{tabular}
{ | l | l | l | } \hline
\textbf{Input values} & & \

\setcounter{\varCALC}{1}

$if(\varCALC==0)$
Inside diameter conservator Dhaval
Predefined length of conservator
Predefined volume of conservator
$endif$

$if(\varCALC=1)$
Inside diameter conservator
$endif$

$if(\varCALC=2)$
Predefined length of conservator

$if(\varCALC=3)$
Inside diameter conservator
Predefined volume of conservator
$endif$

$if(\varCALC=5)$
Inside diameter conservator
Length of main compartment
$endif$

\begin{cases}
$if(\varCALC=0)$
Sandeep
else
Sandeep negi
$endif$
\end{cases}

\begin{cases}
\If{\varCALC=0}{
something if ;
}
\Else{
something else ;
}
\end{cases}

\usepackage{ifthen}
\begin{document}

If \varCALC=0 then the next sentence will be "Num is large." else "Num is small."

Num is \ifnum \value{num}>100 {large} \else {small}.

\end{document}

\end{tabular}
\end{footnotesize}

\subsection{}

\end{document}

@MoreDhaval
Copy link
Author

Pandoc version 2.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants