I'm new with LaTeX and now I have a problem with a reference of the C++ code.  I have this code:  \begin{lstlisting}[label={code:enumtx}, caption={Porzione di codice che riporta il tipo enumerazione nel file standard.h di bitcoin core.}] enum txnouttype {     TX_NONSTANDARD,     TX_PUBKEY,     TX_PUBKEYHASH,     TX_SCRIPTHASH,     TX_MULTISIG,     TX_NULL_DATA, //!&lt; unspendable OP_RETURN script that carries data     TX_WITNESS_V0_SCRIPTHASH,     TX_WITNESS_V0_KEYHASH,     TX_WITNESS_UNKNOWN, //!&lt; Only for Witness versions not already defined above }; \end{lstlisting}   and this result     My question is:  How can I change the caption title from Listing 2.1 to Code 2.1? Is this possible?  This is a minimal example:  \documentclass[12pt]{toptesi}  \usepackage[utf8]{inputenc} %utf8 \usepackage[italian]{babel} \usepackage{listings}   \lstset{%     captionpos=b,     language=C++,     basicstyle =\small\ttfamily,     keywordstyle=\color{red}\bfseries,     breaklines=true,     breakatwhitespace=true,     frame=lines,     numbers=left,     numberstyle=\footnotesize, }  \begin{document}  \begin{lstlisting}[label={code:enumtx}, caption={Porzione di codice che riporta il tipo enumerazione nel file standard.h di bitcoin core.}]  enum txnouttype {     TX_NONSTANDARD,     TX_PUBKEY,     TX_PUBKEYHASH,     TX_SCRIPTHASH,     TX_MULTISIG,     TX_NULL_DATA, //!&lt; unspendable OP_RETURN script that carries data     TX_WITNESS_V0_SCRIPTHASH,     TX_WITNESS_V0_KEYHASH,     TX_WITNESS_UNKNOWN, //!&lt; Only for Witness versions not already defined above }; \end{lstlisting}  \end{document}
I'd like to modify the names used to typeset some of my document elements. For example, the caption of figure floats should change from "Figure" to "Fig.", and my \tableofcontents sectioning heading shouldn't read "Contents", but "Table of Contents". How can I do that?  \documentclass{article} % \usepackage[english]{babel} \begin{document} \tableofcontents \section{foo} \begin{figure}[h] \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document}
Old movie about a group of friends with magical weapons fighting monsters Is there any way to do a correct word count of a LaTeX document? Often assignments (or even papers) have a word count limit. That is not a big deal when using Word, but I don't know how to do that using LaTeX. My solution has been so far to compile the document and then do a rough word count of my pdf file, sometimes even copying the contents of the pdf file and pasting in Word to get a mostly correct Word count.  Is there any tool (maybe even an online tool), package, script or software to do that directly from my .tex document and still get the right word count (i.e., ignore commands, equations, etc)? Is $\mathbf{Q}(\sqrt{2}, \sqrt{3}) = \mathbf{Q}(\sqrt{2}+\sqrt{3})$? Is $\mathbf{Q}(\sqrt{2}, \sqrt{3}) = \mathbf{Q}(\sqrt{2}+\sqrt{3})$ ?    $$\mathbf{Q}(\sqrt{2},\sqrt{3})=\{a+b\sqrt{2}+c\sqrt{3}+d\sqrt{6} \mid a,b,c,d\in\mathbf{Q}\}$$   $$\mathbf{Q}(\sqrt{2}+\sqrt{3}) = \lbrace a+b(\sqrt{2}+\sqrt{3}) \mid a,b \in \mathbf{Q} \rbrace  $$  So if an element is in $\mathbf Q(\sqrt{2},\sqrt{3})$, then it is in $\mathbf{Q}(\sqrt{2}+\sqrt{3})$, because $\sqrt{6} = \sqrt{2}\sqrt{3}$.  How to conclude from there? How to import Ordnance Survery raster layer to ArcGIS Desktop? I have downloaded raster map data from ONS, the data has come in the form of two files... one is full of  .tlw files and the other is full of .tab files...   How do I import it into a raster layer to ArcCatalog? error: parsing file '/var/lib/dpkg/status' near line 55497 package 'indicator-displex' After running an upgrade from Ubuntu 11.10 (Oneiric Ocelot) to 12.04LTS (Precise Pangolin), a window popped up saying that the upgrade failed and that I should run sudo dpkg --configure -a.  Running that command gave me:  sudo dpkg --configure -a dpkg: error: parsing file '/var/lib/dpkg/status' near line 55497 package 'indicator-displex':  blank line in value of field 'Description   Trying to run apt-get install -f gives me many dependency errors along with that same dpkg error. How to print all printable ASCII chars in CLI? mean value theorem question I was trying to solve the following:  Given: $0 &lt; a &lt; b$ and $n&gt;1$, prove: $$na^{n-1}(b-a) &lt; b^n-a^n &lt; nb^{n-1}(b-a)$$  I managed to get this far using the mean value theorem: $$a^n(b-a)&lt;b^n -a^n&lt;b^n (b-a)$$ Any idea how to continue? Sophomore's dream: $\int_0^{1} x^{-x} \; dx = \sum_{n=1}^\infty n^{-n}$ Cannot install a version of GDAL via Anaconda that permits reading BigTIFFs Another phrase for "a chicken and egg situation" Is there any other phrase that conveys the same meaning as  the phrase "a chicken and egg situation" especially if one has to use this phrase in an official/corporate set up? Anything I should keep in mind before I start mixing and matching between D&D 3.5e and Pathfinder? Anything I should keep in mind before I start mixing and matching between D&amp;D 3.5e and Pathfinder?  Off the top of my head, the biggest difference is feats every 2/3 levels. Would it affect balance if I picked every 3 levels instead of 2? I think PF options are still pretty solid regardless... Background Video is shown in Rendered mode but not when szene is rendered There are $25$ horses. You can take $5$ horses at a time and race them. Each horse always finishes the race in the same amount of time, and there are no ties. The only information you get from each race is the order that the $5$ horses finished in. What is the smallest number of races you need to find the $3$ fastest horses, in order?   I found this problem on  and cannot figure out the best answer. Please help. Underscore doesn't work in Coffeescript's console I created the following script:  #!bin/bash cat &gt; Top10 &lt;&lt;EOF Linux Mint 17.2 Ubuntu 15.10 Debian GNU/Linux 8.2 Mageria 5 Fedora 23 openSUSE Leap 42.1 Arch Linux CentOS 7.2-1511 PCLinuxOS 2014.12 Slackware Linux 14.1 FreeBSD EOF sed -ri "s/^[^0-9]*$//" Top10 sed -r "s/(.*)([[:space:]][[:digit:]]*.*)$/\2\1/" Top10 | sed -r "s/([[:space:]])([[:digit:]])/\2/" | sed -r "s/([[:digit:]])([[:alpha:]])/\1 \2/" &gt; Top10 sed -r -i "s/(.*)/\L\1/" Top10 sed -r -i "y/[aeiou]/[AEIOU]/" Top10 sort Top10 -g -o Top10 cat Top10   When I run it a few times the following happens:     As you can see sometimes the Top10 file turns out empty and sometimes it turn out the way I needed it to be. I know that the command which replaces the extensions from the end to the front of a line is done poorly. I ran this script on a VMware virtual machine. Could that be the reason? When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential.   Also when they are run in the background they sometimes continue to produce output to the terminal which I am currently working on, which is irritating.  I would like them just launch and keep the background stuff in the background. My reasoning is that if you launch these programs through the GUI (eg double clicking on an icon) these messages are never shown to me, so I don't need them in the command line. I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a &lt;div&gt;, a &lt;form&gt; field, a &lt;fieldset&gt;, etc. How can I achieve this? Should reputation from SO carry over to Meta? We login to applications almost every day. The password is stored in our fingers, as an automated process (if they have used it long enough). When users realize they have entered a wrong character (before hitting login-button) they erase the whole password, and retype the entire password – instead of just the last wrong character. Question is why?         &ndash; Wireframes created with When I type "[singular noun] and [singular noun]" in Word 2010, I find some interesting things.        Bread and butter is essential. (the auto-correction warns me of subject-verb disagreement.)   Bread and butter are essential. (OK)   A knife and fork is on the table. (OK)   A knife and fork are on the table. (OK)   The needle and thread is new. (OK)   The needle and thread are new. (OK)   Cost and revenue is directly linked. (OK)   Cost and revenue are directly linked. (OK)      I wonder how a native speaker would consider this phenomenon.