I recently switched compilation of my tex document from pdflatex to xetex for reasons of typesetting occasional arabic text (the rest of document though is almost entirely in English).  However now I have the problem of ``misaligned'' equation parenthesis both next to the equation and in \eqrefs as visible here:   I switched to using fontspec, unicode-math and polyglossia packages to be able to compile with xetex.  I even tried redefining the format of the equation brackets, but nothing changed. Any Ideas what is happening here?  My document preamble looks like this:   PACKAGES \usepackage{hyperref} \usepackage[round]{natbib} \usepackage{setspace} \usepackage{latexsym} \usepackage{url} \usepackage{mathtools} \usepackage{unicode-math} \usepackage{booktabs} \usepackage{tikz} \usepackage{xcolor} \usepackage{graphicx} \usepackage[headheight=13.6pt]{geometry} \usepackage{multirow} \usepackage{verbatim}% \usepackage{subcaption} \usepackage{epigraph} \setlength\epigraphwidth{0.5\textwidth} \setlength\epigraphrule{0.5pt} \renewcommand{\epigraphsize}{\small\itshape} \renewcommand{\textflush}{flushepinormal} % flushright \usepackage{nomencl} \usepackage{color} \usepackage{algpseudocode} \usepackage{algorithm} \usepackage{algorithmicx} \usepackage{eso-pic} \usepackage{fancyhdr} \usepackage[norule]{footmisc} % no footnote rule [better if we use footrulewidth] \usepackage{gnuplot-lua-tikz}  \usepackage{polyglossia} \setdefaultlanguage[variant=american]{english} \setotherlanguage{german} \setotherlanguage{arabic} % FONT with xetex: \usepackage{fontspec} \fontspec{Helvetica Neue} \newfontfamily{\arabicfont}{Scheherazade}  \renewcommand{\headrulewidth}{0.2pt} \renewcommand{\footrulewidth}{0.2pt} \fancyhead{} \fancyhead[RO,LE]{\leftmark} \fancyfoot{} \fancyfoot[LE,RO]{\thepage} \pagestyle{fancy} \onehalfspacing  % SOME MATH (RE)NEWCOMMANDS [...]
I am compiling the following MWE using XeLatex within TeXnicCenter and get a garbled equation number:  \documentclass{article} \usepackage{amsmath} \usepackage{polyglossia} \setmainlanguage{hebrew} \newfontfamily{\hebrewfont}{Arial}  \begin{document} \begin{equation}\label{eq:1} 2+2=4. \end{equation} \end{document}      What is going on here?
List of Ubuntu Versions with Corresponding Linux Kernel Version Is there a list of Ubuntu versions with default corresponding Linux kernel versions somewhere?  I would specifically like to know the most recent version of Ubuntu that still used Linux Kernel 2.x. In the ,  can monitor some things like the total traffic on the site. However, it seems to be broken at the moment, all figures are almost zero. This is how it looks for Meta Stack Exchange (other sites show similar pictures): Is it appropriate to buy a "thank you" gift for a PhD supervisor? I am nearing the end of my PhD and I would quite like to buy a "thank you" gift for my supervisor (although, she's the socially awkward type who I'm sure will be greatly embarrassed to receive one).  I'm just wondering whether a gift is the done thing? And if so, what sort of gift seems appropriate? I suppose a bottle of wine would be a safe choice? PostgreSQL execute a default query when no row are returned I need to calculate the average score of a list of userId.  I have a table user_place_score:  (user_id, place_id, score)   Sometimes I do not have the score (no row for (user_id,place_id) in the table) so I need to fetch a "default" score from the table default_place_score:  (place_id, score)   Is is possible in PostgreSQL to do this in one query? For a given list of users and one place_id, select all their scores in the user_place_score and if no row is found then take the score found if the default_place_score table?  Basically I want to avoid doing this kind of stuff:  for (Integer userId : userIds) {   score = (query to fetch the score for this userId)   if (score == null)     defaultScore = (query to fetch the default score for this PlaceId)    total = total + defaultScore }  //return the average return total/numberOfUser arccot limit: $\sum_{r=1}^{\infty}\cot ^{-1}(r^2+\frac{3}{4})$ java.lang.IllegalArgumentException: The servlets named [X] and [Y] are both mapped to the url-pattern [/url] which is not permitted How to prove $\,x^a-1 \mid x^b-1 \iff a\mid b$ What is the relation between electromagnetic wave and photon? At the end of this nice video (), she says that  is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.  I wonder where the  is in this explanation. What is the relation between electromagnetic wave and photon? What happens if I do not honor a futures contract? I have little knowledge about futures contracts. The recent negative price of crude oil spurred my curiosity about this stuff.   I read this post about .  According to this post, when I buy a futures contract, I enter into a contractual agreement to buy some commodity on some future date, and I only need to pay a 2% initial margin.   Suppose the price of the commodity does not fluctuate but I change my mind and decide not to buy the commodity at maturity. What punishment could be exerted on me?   I do not want the 2% initial margin back because that is a little money compared to the real value of the commodity. If there is no extra penalty, it would be unfair for the seller — imagine the seller transports 1000 barrels of crude oil to your front door and you say "I do not need it any more, please take it away, thank you!"  Update: I did more research about this and have more questions.  If I buy a futures contract at $10 and the price of the contract drops to -$37 at the last trading day, at which price should I buy the commodity at the delivery day, $10 or -$37?   There seems not just one contract I enter into when I buy a futures contract: the original futures contract between me and the seller of the commodity(or the exchange?), the contract between me and my brokerage, the contract between the brokerage and the exchange. I'm not clear about the exact entities of each contract and the obligations involved in each contract. The contracts seem contradictory with each other, e.g., my brokerage may forcefully sell my futures contract if my account balance is not enough, which will prevent me from fulfilling the obligations in the futures contract, i.e., receiving the commodity on future date.  If I(or an institutional trader) trade directly (not via a brokerage) with an exchange(does CME accept individual traders?), does the exchange have the rights to forcefully sell my contracts at the last trading day at any price or close my position at the settlement price(say -$37)? If the exchange does so thus letting me own $5,000M to it, is it more justice for me to sue the exchange rather than let the exchange sue me? If I could hold the position, the loss caused by my not executing the delivery/receipt of the commodity may be less than $5,000M. Of course, the loss will be determined by the court, not by the exchange according to the settlement price formed by itself or a few possible conspirators. What is the concept of erasure in generics in Java? Best way to make a shutdown hook? Since Ubuntu relies on upstart for some time now, I would like to use an upstart job to gracefully shutdown certain applications on system shutdown or reboot. It is essential that the system's shutdown or reboot is stalled until these applications are shut down.  The applications will be started manually on occasion, and on system shutdown should automatically be ended by a script (which I already have). Since the applications can't be ended reliably without (nearly all) other services running, ending the applications has to be done before the rest of the shutdown begins.  I think I can solve this by an upstart job which will be triggered on shutdown, but I am unsure which events I should use in which manner. So far, I have read the following (partly contradicting) statements:   There is no general shutdown event in upstart Use a stanza like start on starting shutdown in the job definition Use a stanza like start on runlevel [06S] in the job definition Use a stanza like start on starting runlevel [06S] in the job definition Use a stanza like start on stopping runlevel [!06S] in the job definition   From these recommendations, the following questions arise:   Is there or is there not a general shutdown event in Ubuntu's upstart? What is the recommended way to implement a "shutdown hook"? When are the events runlevel [x] triggered; is this when having entered the runlevel or when entering the runlevel? Can we use something like start on starting runlevel [x] or start on stopping runlevel [x]? What would be the best solution for my problem?   Thank you very much What type of differential equation is $f'(x) = f(x/2)$ and how do you solve it? I have the following different equation $$f'(x) = f(x/2)$$ with $f(0)=10$. What type of DE is this, and how would you solve it? It seems $f(x)$ is likely to be some relative of $e^x$, since $f'(x) = f(x)$, which is close, but I don't even know what that type of DE is called with that $f(x/2)$ feature, so I'm not having any luck searching for a tutorial. The best candidate I've found was a &quot;delay differential equation&quot;, but that seems more suited to $f(x-3)$ than $f(x/2)$. What regulations should a European driver know when driving in the US? There are the obvious ones. The US has the keep-your-lane system, where as in Europe you are expected to keep to the right (left for UK) as long as possible.  On my latest travel to the US, I was confronted with the possibility to go through a red light if you turn right, unless it is explicitly not allowed.  What should a european driver know when driving in the US? What are the do's and don'ts compared to driving in Europe. In Fantastic Beasts: The Crimes of Grindelwald Dumbledore teaches DADA. But from the books we always heard about him as of a Transfiguration teacher (say, in Tom Riddle's days). It is stated in the movie that Dumbledore was prohibited to teach DADA by the Ministry, though the limitations seemed to be canceled at the end of the movie together with the removal of his handcuffs (not completely clear about the teaching though). The strange thing is, however, that Dumbledore was a Transfiguration teacher and even the Head of Transfiguration Department in Hogwarts before Newt's days, as we learn from Pottermore:  Under the guidance of her [McGonagall] inspirational Transfiguration teacher, Albus Dumbledore, she had managed to become an Animagus She [McGonagall] sent an owl to Hogwarts, asking whether she might be considered for a teaching post. The owl returned within hours, offering her a job in the Transfiguration department, under Head of Department, Albus Dumbledore.  That is of course if we accept that Minerva McGonagall in the movie is the same Minerva we know. So it seems that he taught Transfiguration, then for some reason switched to DADA and then to Transfiguration again. While it is possible in general, is there any explanation for the reasons? How can I send an email using PHP? Programmatically determining amount of parameters a function requires - Python This is a good news.    This is good news.    Which one is correct? Clarify the difference Can a wizard use his familiar's senses to enlarge his "you can see" area? How to create a Gant-Chart in LaTeX-Beamer I am trying to create a Gant-Chart in Beamer. I found the following example:   \documentclass{beamer}  \usepackage[utf8]{inputenc} \usepackage{pgfgantt}  \title{Sample title} \author{Anonymous} \institute{Overleaf} \date{2019}   \begin{document}  \frame{\titlepage} \begin{frame}{Gant-Chart}     \begin{ganttchart}[vgrid, hgrid,                         bar/.append style={fill=blue!80},                        milestone/.append style={fill=green}]{1}{15}         \gantttitle{2019}{15} \\         \gantttitlelist{1,...,15}{1} \\         \ganttbar{Task 1}{1}{2} \\         \ganttmilestone{Milestone}{7} \ganttnewline         \ganttbar{Final Task}{8}{12}     \end{ganttchart} \end{frame}    \end{document}   Now, I want to change it slightly. The first row shows the year. I want the second row to show months. And then the third row shows the number of weeks that I have planned for the task. Also, I don't want to see any arrows, but just have the rectangles. Is there a way to add a grid? Basically I want everything to just look as in an Excel-Table: Grids and then color the rectangles during which I am working.   Here is an example of what I would like to have:   Can somebody show me how to do this?   Here is another example that seems to get pretty close to what I want. Only in the week-row now it is always written "week 1", "week 2" and so on. I just want the number.   \begin{frame} \begin{figure}[h!bt]     \begin{center}         \begin{ganttchart}[             vgrid={*{6}{draw=none}, dotted},             x unit=.08cm,             y unit title=.6cm,             y unit chart=.6cm,             time slot format=isodate,             time slot format/start date=2019-02-01]{2019-02-01}{2019-07-31}             \ganttset{bar height=.6}             \gantttitlecalendar{year, month=name, week} \\             \ganttbar[bar/.append style={fill=blue}]{Task 1}{2019-02-11}{2019-02-17}\\         \end{ganttchart}     \end{center}     \caption{Time Plan} \end{figure} \end{frame} Product of Consecutive Integers is Not a Power