I want to typesetting the words as below:  My code: \documentclass[b5paper,UTF8]{article} \usepackage{graphicx}                 \usepackage{geometry}                \usepackage{fancyhdr} \usepackage{times}  \geometry{left=2cm,right=2cm,top=2.8cm,bottom=2.5cm}  \begin{document} \noindent \textsf{\textbf{4. Avoid inefficient patterns, construct efficient patterns}}  4.1. Rule-based programming can be both very fast and very slow, depending on how you build your structures and rules, but in practice it is easier to inadvertently make  it slow. It will be slow for rules which force the pattern-matcher to make many a  priory doomed matching attempts, for example by under-utilizing each run of the pattern- matcher through a long list (expression). Sorting elements is a good example:  list \/ \/ . \{ left\_\_\_ , x \_ , y \_ , right \_\_\_ \}\/ \; x $&gt;$ y \:  $&gt;$ \{ left, y, x, right \} - has a cubic complexity in the size of the list.  \end{document}  However, the main problem is  list \/ \/ . \{ left\_\_\_ , x \_ , y \_ , right \_\_\_ \}\/ \; x $&gt;$ y \:  $&gt;$ \{ left, y, x, right \} - has a cubic complexity in the size of the list.
I am very new to LaTeX and I am writing my thesis. In a chapter, I want to show my codes, which are in Mathematica.   I use the listings package as follows:  \documentclass{article}   \usepackage{listings}   \begin{document}   \lstset{language=Mathematica}    \begin{lstlisting}   Do[i^j,{i,1,10},{j,1,10}]   \end{lstlisting}    \end{document}   However, the output is much different to what the code looks like in the Mathematica IDE (even if I use other languages in \lstset{language=&lt;name&gt;}):    I read some questions on the site but, in some of them, the font or color of the codes were not the same. Could you please help me to display something like the picture below in LaTeX?  If it is important, I am using the BiDi package.
Groups of prime squared order According to this question:  entire ruSO site shouldn't become hot. But I just saw the following while searching MSE:        Direct link to the question on ruSO:   Perhaps the HNQ filter works on question title (in the current case there are no non-Latin symbols) instead of site origin. Hence, according to the post mentioned before this behaviour should be interpreted as a bug.   However, I suggest to fix such "bug" by taking another feature request in mind: How to start Skype 4 with Ubuntu 12.10? I've installed Skype and it's running all OK but I want it to start automatically when I log with my user.  How can I do that? Slower download speed compared to Windows on Ubuntu 20.04 Is it possible to find power armor in the wasteland? If you send somebody out in the wasteland for long enough with good enough luck, is it possible to find power armor or any other legendary gear? How to remove Gmail from iPad mail? Given (p ∧ q), use the Fitch system to prove (q ∨ r) I'm having trouble solving a Fitch Style Proof and I was hoping someone would be able to help me.  Premises: p ∧ q  Goal: q ∨ r  Would be an assumption (p ∧ q => q ∨ r) in first step a correct one?   Then, q ∨ r Implication Elimination: 2, 1  Why is it not correct?  Thank you very much for any help! The book "A First Course in Abstract Algebra" by Fraleigh says      If $G$ is a finite subgroup of the multiplicative group $\langle F^*,\cdot\rangle$ of a field $F$, then $G$ is cyclic. In particular, the multiplicative group of all nonzero elements of a finite field is cyclic.    I wonder why that is. Take $a,b\in F$ such that $a^2=b^2=1$. Then $\{1,a,b,ab\}$ is a non-cyclic subgroup of $F$. Where am I going wrong?  Thanks in advance! How to distinguish Nexus 7 (2012) and Nexus 7 (2013) I am having trouble with Bluetooth Low Energy (BT 4.0) on a Nexus 7.  I think I may have a 2012 model.  How to tell if I have a 2012 or 2013 version of the Nexus 7? Conveying "under the radar" in a less colloquial way I am searching for a word to contrast with iconic  I want to characterize views of the city as both iconic and under the radar, maybe "non-iconic."  I was thinking about saying that a view of the city was undiscovered, but I think that maybe that overstates what I'm think-- I more mean under-appreciated. Are there any other words that come to mind? How do I install "non-free firmware" (wifi driver) from USB? (Debian) Try to solve this puzzle:     The first expedition to Mars found only the ruins of a civilization.   From the artifacts and pictures, the explorers deduced that the   creatures who produced this civilization were four-legged beings with   a tentatcle that branched out at the end with a number of grasping   "fingers". After much study, the explorers were able to translate   Martian mathematics. They found the following equation:   $$5x^2 - 50x + 125 = 0$$   with the indicated solutions $x=5$ and $x=8$. The value $x=5$ seemed   legitimate enough, but $x=8$ required some explanation. Then the explorers    reflected on the way in which Earth's number system developed, and found   evidence that the Martian system had a similar history. How many fingers would    you say the Martians had?      $(a)\;10$      $(b)\;13$      $(c)\;40$      $(d)\;25$   P.S. This is not a home work. It's a question asked in an interview. Clarification for non-answers One of my flags for "non-answer" was declined and I was wondering if I misunderstood what "non-answer" means. I saw someone post an answer that was just a block of code, with nothing in it that was even the slightest related to the question, it was just a random block of code with no explanation. Should I have not used the "not an answer" tag even though the description explicitly says that it should be used when answers "do not attempt to answer the question"? In superluminal phase velocities, what is it that is traveling faster than light? I understand that information cannot be transmitted at a velocity greater than speed of light. I think of this in terms of the radio broadcast: the station sends out carrier frequencies $\omega_c$ but the actual content is carried in the modulated wave, the sidebands $\omega_c\pm\omega_m$. The modulation envelop has its group velocity and this is the speed at which information is being transmitted. We also know, for example, that x-rays in glass have a phase velocity which is greater than the speed of light in vacuum.   My question is, what exactly is it that is travelling faster than the speed of light?    EDIT: I know it couldn't be anything physical as its superluminal. My problem is, what is it that has absolutely no information content yet we associate a velocity with it. Show that $a^n \mid b^n$ implies $a \mid b$ Why do German umlauts and sharp s (ß) work without a package in LaTeX? I am used to the fact that LaTeX will only know letters like ä, ö, ü, or ß if I use packages like  \usepackage{ucs} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}   Today, I tried LaTeX on a Mac for the first time, using the MacTeX distribution and texmaker. Without writing down any packages, all umlauts and ß were accepted correctly from scratch. Why is that and will the usage of special letters without using the packages cause any problems? Bound on the difference of two determinants Let $A$ and $B$ be two real, $n\times n$ matrices. Using Hadamard's inequality, it is not hard to show that $$ \left|\det A - \det B \right| \leq \|A-B\|_{2} \frac{\|A\|_{2}^n -\|B\|_{2}^n}{\|A\|_2 -\|B\|_2}. $$ Where $\|A\|_2=\sqrt{\sum_{i,j}a_{ij}^2}$.  From this, I can derive a sup bound, for example  $$ \left|\det A - \det B \right| \leq n^{n+1} \|A-B\|_{\infty} \max (\|A\|_{\infty}^{n-1},\|B\|_{\infty}^{n-1}). $$ Where $\|A\|_\infty=\sup_{i,j}|a_{ij}|$.   The constant $n^{n+1}$ is not the best bound possible : any reference (or proof) for a better (or the best) one? I show below that one can obtain $n^2(n-1)^{n-1}$, but that isn't much better. I just tried  $10^5$ random matrices on Maple and obtained a maximal constant (much) smaller  than one : this is not a proof, but it looks like there is room for improvement nevertheless.    Just for completeness (and in case someone sees a factor I missed), to get the first bound, writing $A=[A_1,\ldots,A_n]$ in terms of its column vectors, an expansion shows \begin{eqnarray*} \det A &amp;=&amp; \det (A_1 -B_1,A_2,\ldots,A_n) + \det (B_1,A_2,\ldots,A_n) \\   &amp;=&amp; \sum_{j=1}^n \det (B_1,\ldots, B_{j-1}, A_j -B_j,A_{j+1},\ldots,A_n) \\ &amp;&amp; + \det B,  \end{eqnarray*} Thus by Hadamard's inequality, \begin{eqnarray*} \det A -\det B &amp;\leq&amp;  \sum_{j=1}^n \prod_{i=1}^{j-1} \|B_i\|_{2}\prod_{i=j+1}^{n} \|A_i\|_{2} \|A_j-B_j\|_{2} \\ &amp;\leq&amp;  \|A-B\|_{2} \sum_{j=1}^n \|B\|^{j-1}_{2}\|A\|^{n-j}_{2} \\  &amp;=&amp; \|A-B\|_{2} \frac{\|A\|_{2}^n -\|B\|_{2}^n}{\|A\|_2 -\|B\|_2}. \end{eqnarray*}  The second bound is just that $x^n -y^n\leq n \max(|x|^{n-1},|y|^{n-1}) |x-y|$ and $\|A\|_2 \leq n\|A\|_\infty$.    Another approach is calculus, namely, to write that $\det B - \det A = f(1)-f(0)$, with $f(t)=\det(A + t(B-A))$.   By the mean value theorem $f(1)-f(0)\leq \max |f^\prime (t)|$.   We can compute that $$f^\prime(t) =  {\rm trace}\left({\rm Cofm}(A +t(B-A))(B-A)\right)$$  (if I did not mess up, using the formula for the differential of a determinant, where Cofm means the matrix of Cofactors).   Then, it should deliver something better, if there is a nice way to bound it. The simplest thing is to use Cauchy-Schwarz, namely $$ \left|{\rm trace}\left({\rm Cofm}(A +t(B-A))(B-A)\right)\right|\leq \|B-A\|_{2} \|{\rm Cofm}(A +t(B-A))\|_{2} $$ and then, by lack of a better idea,  $$ \|{\rm Cofm}(A +t(B-A))\|_{2}\leq n \max_{ij} |{\rm Cof}_{i,j}(A +t(B-A))|, $$ and brutally, $|{\rm Cof}_{i,j}(A +t(B-A))|\leq ((n-1) \max(\|A\|_\infty,\|B\|_\infty))^{n-1}$ gives a slightly better constant, namely $$ n^2(n-1)^{n-1} &lt;n^{n+1} $$ but that still seems a very rough way to bound a determinant, as it is never sharp, since to attain this bound all coefficients should be equal, and therefore the cofactor would be zero. They are of the same order in $n$, and I suspect this order is wrong. Beam size and material for 15 feet long swing I need to create a 15 feet span beam for kid swing (300 lbs load / 150 lbs and 2 swings assumption). One end will bolt to the tree (just for convenience).  What "treated lumber" lumber size and material I should use? Or is it better / cheaper to use metal pipe (from the plumbing department)?  I guess 4x8x16 or two (2) 2x8x16 would do it according to this website . But I do like a clean look of metal. My wife would concern about big piece of lumber running on top of the kid (that looks heavy visually). Wrong Sentence:     Never before in the history of the world such a thing has happened, I don't think that will ever happen again.   Right sentence:     Never Before in the history of the world has such a thing happened, I don't think that will ever happen again.   Why “has such a thing happened” is the right form, and why can't I use such a thing has happened? I'm playing around with fdisk and I tried to create a partition on an empty USB drive. Here's how that went: Command (m for help): n Partition number (1-128, default 1): 1 First sector (34-61187102, default 2048): 2048 Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-61187102, default 61187102): +30000000           Created a new partition 1 of type 'Linux filesystem' and of size 14,3 GiB.  so just one partition with 30 million sectors. However, when I check how many sectors it contains I get:  I'm checking with a different program and I see again that additional sector:  Sorry for the pettiness :) I'm learning.