I would like to be able to globally showing and hiding proofs on a document, and be able to use macros to open and close the proof environments. Here is my current MWE:  \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \newif\ifshowproof \newcommand{\bp}{\ifshowproof\begin{proof}} \newcommand{\ep}{\end{proof}} \showprooffalse  \begin{document} Goodbye. \bp Hello. \ep\fi Test. \end{document}   As explored here: , I cannot simply add \fi to the definition of \ep, however, I would like to have a "catch-all" macro so to say, that is, ideally something that would execute as \end{proof}\fi. Is there an easy way to do this?
In the recent post , Werner helped me to redefine a proof environment which can be hidden by an optional boolean argument (showProof). Without an argument, somehow the line/paragraph breaking is not correct. How can one fix this?  \documentclass{scrartcl}  \usepackage{ifthen} \usepackage{environ} \usepackage{amsthm}  \newboolean{showProof}% for showing proofs \setboolean{showProof}{true}% setting the switch \newif\ifstarttheorem  % proof environment (with hide feature) \makeatletter \providecommand{\env@proof@save@env}{} \providecommand{\env@proof@process}{} \RenewEnviron{proof}[2][showProof]{   \gdef\@tmp{#1}%   \ifthenelse{\boolean{#1}}{\par\pushQED{\qed}%     \normalfont\topsep2\p@\@plus2\p@\relax     \trivlist\item[\hskip\labelsep\sffamily\bfseries Proof~#2]\gdef\mycurrenvir{proof}\global\starttheoremtrue\mbox{}\hfill\\*\ignorespaces     \BODY}{\ignorespaces} }[\ifthenelse{\boolean{\@tmp}}{%   \gdef\mycurrenvir{\relax}   \popQED\endtrivlist\@endpefalse }{\ignorespacesafterend}] \makeatother  \begin{document} Just some text \begin{proof}   Just some text in a standard proof. As we can see, there is a problem. \end{proof} \begin{proof}[false]   Proof with optional argument set to \texttt{false}. This proof correctly does   not appear. \end{proof} \begin{proof}[showProof]{(Heading)}   Proof with optional argument (\texttt{true}) and second argument ``(Heading)'' \end{proof} \end{document}
In an  about The Force Awakens, the author suggests that:      Rey is Luke’s daughter.   I’ve missed any indicators of any such relationship while watching the movie.       For instance, I took neither Luke’s lightsaber calling out to Rey, nor her hug of consolation with General Organa as such. Is there any evidence that Luke is Rey’s father?    Is it known who Rey’s parents are? Calculating the longest distance within polygon in QGIS I want to calculate the "diameter" of polygons in QGIS.  The "diameter" defined as the distance between the two most distant points of the polygon.  I couldn't find a fitting solution in the field calculator. Maybe you have some ideas? How to send parameter from jsp page to jasper file For $x,y\in I:=[0,1]$ define the relation on $I$ as $x-y\in \Bbb Q$. How big (using cardinal number) is the cardinality of the equivalence class $[1/\sqrt2]$?  I have tried to solve it by finding the equivalence class but I'm not sure about the method that I can solve the question. Please, can you help me to solve it. Computing $ \int_0^{\infty} \frac{ \sqrt [3] {x+1}-\sqrt [3] {x}}{\sqrt{x}} \mathrm dx$ Consider the real-valued function  $f(x)=x^r$ where $r$ is a real number.  (1) For what values of $x$ and $r$, is this function differentiable?  (2) How do you prove the power rule, when $f(x)$ is differentiable?  It would be nice if the proof is accessible to a 12th grade student.  EDIT: Perhaps, I have not been very clear about my question.  I am not satisfied with the "textbook proofs" I have seen.  Please established the existence (of the derivative) first before proving the power rule.  That is, please consider first question first.  This is the reason why I call the question a mathematical engineering question.  (If we can we bring high level math down to Grade 12 level, without loosing precision, then I call it good mathematical engineering.) What are the requirements to use iMac screen as a second monitor - Target Display Mode? I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen? Finding the index of an item in a list Find a quadratic equation with root $x_1^2$ and $x_2^2$ I'm struggling to solve this problem:  "If the equation $ax^2 + bx +c$ $(a \neq 0)$ admits real and not null roots of $x_1$ and $x_2$, obtain the equation which evaluates to roots $(x_1)^2$ and $(x_2)^2$"  I know the answer is $a^2x^2 -(b^2 - 2ac)x + c^2$ but I am not able to get to this answer, I was trying to derive it from the sum and product equations $S=-b/a$ and $P=c/a$ but the answer I'm getting to is a monstruous different thing.  Could someone explain to me how to get to this answer?  Thanks Global hotkey in console application As much as I like having the hardcover core rule-books in front of me, usually I read or reference most information for RPGs on my computer.  Unfortunately, my google-fu has failed me at finding places to buy a Player's Handbook PDF, or even whether said PDF exists at all.  My question is this: Is there any place I can go to legally buy a D&amp;D 5e core rulebook PDF?  I'm not looking for the starter set or basic rules, since those are incomplete (and free), I'm just looking for the core books in PDF format. How to deal with spaces in a variable Can I extend a class using more than 1 class in PHP? If I have several classes with functions that I need but want to store separately for organisation, can I extend a class to have both?  i.e. class a extends b extends c  edit: I know how to extend classes one at a time, but I'm looking for a method to instantly extend a class using multiple base classes - AFAIK you can't do this in PHP but there should be ways around it without resorting to class c extends b, class b extends a How to copy files that have too long of a filepath in Windows? Influence of charged particle's own electric field on itself I read this in my textbook: A charged particle or object is not affected by its own electric field.  Since I find this completely unintuitive and my mind is yelling "wrong! wrong! how could a particle even distinguish between its own field and the external fields?" I would really like to hear an explanation about why this is true, if it is.  (A corollary question that comes to my mind after thinking about this is... What about gravity and mass considering the analogous situation? And the other two forces?) How to show that $f'(x)<2f(x)$ This is question B4 in 1999 Putnam Exam. I would appreciate if somebody could help me with this.      Let $f(x),f'(x),f''(x),f'''(x)&gt;0$ , $f'''(x)$ is a continuous function and $f'''(x)&lt;f(x)$ on $\mathbb{R}$. Then show that   $$f'(x)&lt;2f(x),~ \forall x\in \mathbb{R}.$$ Why does getopts only work the first time? What are the solutions to $z^4+1=0$? Turning water pump on/off using Arduino Uno R3 I'm trying to build a simple system to turn a water pump every 24 hours for 10-20 seconds. I have 5V pump. When I connect it to 5V, GND it works but when I connect it to pin 12 (or any other digital pin) and GND it does not work. Here's my sample sketch:  int led = 12;  void setup() {                   Serial.begin(9600);   pinMode(led, OUTPUT);      }  void loop() {   digitalWrite(led, HIGH); }   What am I doing wrong? I have a package (fcl) in my PPA  in my launchpad PPA and it depends on another package (libccd) which is in another PPA ppa:imnmfotmal/libccd. fcl has both build and run dependency in libccd. So i added libccd as a PPA dependency in launchpad and both are successfully build. but when i am trying to install fcl package after adding the fcl PPA, its throwing an error Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  fcl : Depends: libccd but it is not installable E: Unable to correct problems, you have held broken packages.  but its successfully getting installed after adding the libccd PPA also. I want fcl to install libccd automatically without adding its PPA. how can i achieve it ?? Output of apt-cache policy fcl fcl:   Installed: (none)   Candidate: 1.0-0ppa5   Version table:      1.0-0ppa5 0         500 http://ppa.launchpad.net/imnmfotmal/fcl/ubuntu/ trusty/main amd64 Packages