When using C++, I already became somewhat dependent on clang-format which uses Dijkstra's algorithm (like LaTeX) to tune the whitespace in C++ code. It is amazing, I am not looking back to doing this manually.  LaTeX uses the Dijkstra algorithm every since and the results are gorgeous. The thing that I still have to do is breaking my equations per hand. I do this with align and \\ &amp; \quad usually. Now I was wondering: Could the equations be broken/wrapped automatically with some similar approach?  The obvious problem is that mathematical formulas do not have a rigorous grammar like C++. For instance, there is no clear distinction whether $H(t - t_0)$ is a function $H$ evaluated at the time difference or whether this is just a multiplication. Perhaps one can just break equations at a top-level plus sign or break parentheses over multiple lines.  Is there something out there already that could break equations dynamically depending on \linewidth?
I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.
Show that the conditional statement is a tautology without using a truth table I have been attempting to use identities to get to the answer but I am unable to get anywhere. Here is the equation I am trying to prove tautological without using truth tables:  $[(p\rightarrow q) \land (q \rightarrow r)] \rightarrow (p \rightarrow r )$  And here is my attempt at using identities to work my way up. (a link to a page with a table of logical equivalence identities: )  $\lnot [(p \rightarrow q) \land (q \rightarrow r)] \lor (p \rightarrow r)$  $\lnot [(\lnot p \lor q) \land (q \rightarrow r)] \lor (p \rightarrow r)$  $[\lnot (\lnot p \lor q) \land \lnot (q \rightarrow r)] \lor (p \rightarrow r)$  $[(p\land \lnot q) \land (q \land \lnot r)] \lor (p \rightarrow r)$  I don't know where to go from there. Multiple "order by" in LINQ I have two tables, movies and categories, and I get an ordered list by categoryID first and then by Name.  The movie table has three columns ID, Name and CategoryID. The category table has two columns ID and Name.  I tried something like the following, but it didn't work.  var movies = _db.Movies.OrderBy( m =&gt; { m.CategoryID, m.Name }) My problem is that I want to have different .tex files for the preamble, the presentation aroundings (my target is a beamer PDF file) and the content of the presentation.  Mostly I'll be working on the content file. I even think about partitioning this content .tex file into several chapter files for a better overview. My problem with this solution is that I have to open the presentation.tex file to typeset the whole beamer PDF for looking at the results of my previous changes on the content files. (My presentation.tex file includes the preamble and the content.)  Is there any way to get TeXShop to always typeset one particular file (my presentation.tex) although I'm currently working on a different one (e.g. the content.tex)?  A shortcut? A command in the .tex file? An option in TeXShop? Anything? I am programming a tile based game and I have some basic tiles (grass, dirt, etc..), but I can't figure out how to make good random map generation, because when I do some really random selection, if the tile should be grass/dirt, I get this:    I understand why this is happening, but what I want is to create some random continuous areas of grass or dirt. Something that would make more sense, like this: How can I convert from hex to base64? Can anyone recommend a straightforward way/tool to convert hex to base64?  I'm using Linux and OS X. How do I set a user environment variable? (permanently, not session) This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.  How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"? Meaning of symbols $\vdash$ and $ \models$ I'm confused about the use of symbols $\vdash$ and  $ \models$. Reading the answers to  and  I see that:  the turnstile symbol $ \vdash $ denotes syntactic implication. Then $ S \vdash \psi$ means that $\psi$ can be derived from the formulae in $S$  the double turnstile $ \models $, denotes semantic implication. Then the notation $A \models B$ means simply that B is true in every model in which A is true.  So I understand that, e.g., $(ZFC+ A) \vdash B$ means that $A \Rightarrow B$ is a theorem in ZFC and, in this sense $\vdash$ is a mathematical symbol for a theorem. While $(ZFC+ A) \models B$ means that $ B$ is true in every model of ZFC in which $A$ is true, and, in this sense $\models$ is not a mathematical but a metamathematical symbol.  I understand correctly? And those are the only uses of the two symbols? If $\gcd(a,b)=1$, then there exists integers $x$ and $y$ such that $xa + yb = 1$ Did not find this from this website...  If $$ \gcd(a,b)=1,$$ then there exists integers $x$ and $y$ such that $$xa+yb=1.$$  Now, the tip is to use particular corollary, that states:  The class $[m]_{n}$ generates $\mathbb{Z}/n\mathbb{Z}\Leftrightarrow \gcd(m,n)=1.$  I am totally lost with the corollary.  Let's assume that $\gcd(m,n)=1$. Then, $[m]_{n}$ generates $\mathbb{Z}/n\mathbb{Z}$.  OK! Then what?  There is also follow up, where I have to prove the converse. I am familiar with Bezout's lemma. The Ubuntu installer does not allow me to install on NTFS partitions, but certain circumstances requires me to do so. Is it possible? I know that Windows XP 32-bit can be configured, through , to support more than 3.5&nbsp;GB of RAM.  Is there a good tutorial to do this with Windows 7 32-bit?  As to why I don't simply use 64-bit Windows 7: The software for my Internet connection (cell phone-as-modem) will only work in 32-bit environments. Deleted posts should not influence reputation Do extension fields always belong to a bigger field? Let $F$ be a field, $E_1$ and $E_2$ are two distinct extension fields of $F$. Is it the case that we can always somehow find a field $G$ that contains both $E_1$ and $E_2$? In other words, could extensions of fields have different 'direction's such that they are incompatible?  Edit: I began to think about this problem while reading a proof. $F$ is a field. $a$ and $b$ are algebraic over $F$. $p(x)$ and $q(x)$ are two polynomials in $F[x]$ of minimum degree that respectively make $a$ and $b$ a zero. The proof claims that there is an extension $K$ of $F$ such that all distinct zeros of $p(x)$ and $q(x)$ lie in $K$. For a single polynomial, I know this kind of field exists because of the existence of splitting field, why it is true for two polynomials? Is it possible to have f.lux (software that adjusts display's color temperature) on Ubuntu 14.04? f.lux is software which adjusts temperature of your display according to time of the day. Is it possible to make f.lux work in Ubuntu 14.04? If so, maybe you can share your knowledge or point me to a guide. Open terminal window and execute Python script on startup I have a Python script which I would like to execute at every startup. I can run it by adding this to the startup applications:  python3 /path/to/script.py   That works, but it doesn't open a terminal window, so I can't see the program's output. How could I make it open a terminal window and execute the script in there?  Note: I get the window to stay open with input(' ') at the end of the Python script. Thanks! Calculating $\lim_{n\to\infty}\sqrt[n]{2^n-n^2}$ Do Category Theory and/or Quantum Logic add value in physics? I know they have their adherents, but do more or less esoteric branches of mathematics such as Category Theory and/or Quantum Logic provide powerful tools for new theory development or are they just occasionally-useful presentational frameworks?  More particularly, is it worth investing the time to study these formalisms? Any evidence that subdomain can help with domain authority and vice-versa? Shutdown and User button missing in panel I faced with a problem after update,   I missed 2 buttons from above panel, System menu (including shutdown, suspend &amp; …) and User (including log out &amp; …)  how can I restore them !?... How should I implement hook_menu()? I have seen many ways to make a USB an installer for about any Windows OS. But how can I (using grub or something like that) make it bootable to all editions on Windows XP and 7?   I have tried Googling it and researching, I've even tried to do it, But I dont understand much about GRUB or linux at all.  Please keep in mind that I am not very good with linux, so please use as many details as possible.