Please note that while there is an existing question titled "How do I get the exact dimension of a picture in LaTeX?", that question is actually asking something different.  I have a document that contains several high-resolution png images, included as usual with commands like  \includegraphics[width=0.85\columnwidth]{landscape2.png}   within figure environments. However, my publisher is asking me for a version where each image is at "no more than 300 dpi, scaled at 100%".  This means, I think, that I have to manually resize all my images. I would like the document to look the same afterwards, so to do that I need to know exactly how much LaTeX is scaling them, or equivalently, the exact dimensions of the image as it appears in my document. That is, I need to know the numerical value of 0.85\columnwidth in inches, and if possible the height of the image in inches as well.  How can I find this out? I tried \showthe\columnwidth, but this gives the following extremely informative error message:  ?   Is it possible to print the exact dimensions of an image, or the scaling ratio used, to the console?
This question is pretty simple: I'd like to have the possibility to get the exact size of a picture in LaTeX with, for example, the macro \the.  In fact, I've founded the way \settoheight{} and so on, but it didn't work at all. What I've got doesn't match with what I can see in the image properties (I suppose that's the name in English). The result: 8pt versus 1300 pixels. It's may be a mis-use...  Edit: In the end, my aim was to find a way to fit the picture in LaTeX. If width and height were both less than the dimensions of the body, then it should just be centred. It look like this :     Require:   \usepackage{graphicx} \usepackage{xifthen} \usepackage{calc}   Code (pretty ugly, I agree):   % Centrering+fitting for image, with captation and label (not auto) \newlength\imageheight \newlength\imagewidth \newcommand{\pic}[3]{% \settoheight\imageheight{\includegraphics{pictures/#1.png}}% \settowidth\imagewidth{\includegraphics{pictures/#1.png}}% \ifthenelse{\lengthtest{\imagewidth &gt; \textwidth}}{\ifthenelse{\lengthtest{\imageheight &gt; \imagewidth}}{\par\vspace{0.95em}% \begin{figure}     \centering\includegraphics[height=0.85\textheight]{pictures/#1.png}     \caption{#2}     \label{#3} \end{figure}% \par\vspace{0.95em}}{\par\vspace{0.95em}% \begin{figure}     \centering\includegraphics[width=0.95\textwidth]{pictures/#1.png}     \caption{#2}     \label{#3} \end{figure}% \par\vspace{0.95em}}}{\ifthenelse{\lengthtest{\imageheight &gt; \textheight}}{\par\vspace{0.95em}% \begin{figure}     \centering\includegraphics[height=0.85\textheight]{pictures/#1.png}     \caption{#2}     \label{#3} \end{figure}% \par\vspace{0.95em}}{\par\vspace{0.95em}% \begin{figure}     \centering\includegraphics{pictures/#1.png}     \caption{#2}     \label{#3} \end{figure}% \par\vspace{0.95em}}}} %   To use it : put your png files in a "pictures" directory, then, just simply call the picture like this : \pic{name_whitout_extension}{Captation_if_needed}{Label_if_needed}.    Edit 2 :   Thanks to Martin Scharrer's easyfig package, I've got a more or less 1,6 times faster solution to put my pictures, centred, with the perfect size.  CTAN:   VC:   Version v1.2 – 2012/05/15    This could be useful for some others, I hope.
How should we handle downvote retaliation? In Star Trek canon, what's the range of operation of Transporters? By "range of operation" of the transporter, I mean "distance up to which it could transport" or "distance from which it could transport something to its own location". The range of operation would have increased with time without a doubt but I want to know the average range at any period. It'll be better if you provide full stats of all times. adding @2x to src above certain resolution on none retina devices This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex? Is the set of all finite sequences of letters of Latin alphabet countable/uncountable? How to prove either? Algorithm faster than Newton's for calculating $\sqrt{2}$ Getting Started to Xetex for Devangari? Allow questions to be saved as drafts prior to posting what is the real use case of dependency injection? Is Checksum to file back decoding possible? So, I was having this weird thought. If the checksums(MD5 or SHA...) are unique to any file and are modified if any part of the file is edited, why cant the checksums be decoded back to get the original file? That is if I want to send a large(say 700MB) video, instead I could send just the hash and the file be decoded locally in my friend's computer. I know the thought is stupid, but is it possible by any chance? Or am I missing some thing here? And forgive me if I'm wrong, I ain't a professional. Disable Ctrl+Alt+Del on Windows 7 It is quite straightforward to find the fundamental solutions for a given Pell's equation when $d$ is small. But I am unable to solve this equation, as I'm unable to find the fundamental solutions:  Solve: $x^2-29y^2=1$ and $x^2-29y^2=-1$ with $y\not=0$.  Could you please guide me through the solution Java process memory check test Express symmetric polynomial $\prod_{i < j} (X_i+X_j)$ in terms of elementary symmetric functions Exercise: Define a polynomial $\Sigma(X_1,\ldots,X_n)$ as \begin{align*} \Sigma(X_1,\ldots,X_n) = \prod_{i &lt; j} (X_i+X_j) \end{align*} This is a symmetric polynomial, quite clearly. I want to express $\Sigma$ as a polynomial in the elementary symmetric functions, for $n=2,3,4$. Case $n=2$ is trivial: $\Sigma(X_1,X_2)= \sigma_1 = X_1+X_2$. Case $n=3$ is easy. I write $\Sigma$ as follows: \begin{align*} \Sigma(X_1,X_2,X_3) = (\sigma_1 - X_1)(\sigma_1 - X_2)(\sigma_1 - X_3), \end{align*} then apply  formally, obtaining \begin{align*} \Sigma(X_1,X_2,X_3) = \sigma_1^3 - \sigma_1 \sigma_1^2 + \sigma_2 \sigma_1 - \sigma_3 = \sigma_2 \sigma_1 - \sigma_3. \end{align*} The case $n=4$ seems harder to me, and I'm unable to work it out. I hope there is some trick to avoid unnecessary computations. My attempt is to write down $\Sigma$ completely: \begin{align*} \Sigma = (X_1+X_2)(X_3+X_4)(X_1+X_4)(X_2+X_3)(X_2+X_4)(X_1+X_3) \end{align*} and then multiply factors in groups of two, obtaining: \begin{align*} \Sigma = (\sigma_2 - X_1X_2-X_3X_4)(\sigma_2 - X_1X_4 - X_2X_3)(\sigma_2 - X_2X_4-X_1X_3), \end{align*} but it doesn't seem to help much. How can I solve the exercise? I'm trying to display models that have shading drawn or baked directly on the textures, but I can't figure out how to disable Blender's default scene lighting. If there are no lights in the scene, everything is black, but I want to see the textured objects fully bright. How do I disable the lighting?  NOTE: Just before posting this, I found the "Shadeless" material property, which does more or less what I want. However, is there a way to globally toggle the default lighting? Creating a copy of primary database and attaching the copy database in the same sql instance I just got into a project in which we have only one SQL Server 2012 copy. We have 12 databases attached to the primary instance of SQL Server 2012.  As I don't have SQL Server 2012 or supporting OS, I have to depend on the primary instance of SQL Server 2012.  I am not sure whether it is good to create copy/clone of all 12 databases and attach it to same instance and work on the copy for data manipulation and query testing purpose.  Based on Kin's query  SELECT    SERVERPROPERTY ('MachineName') AS PhysicalMachineName,    SERVERPROPERTY ('ServerName') AS SQLServerName,    SERVERPROPERTY ('Edition') AS ServerEdition,    CAST(SUBSTRING(@@Version,charindex('SQL',@@version, 1),15) AS VARCHAR(255)) +  ' + '         + CAST (SERVERPROPERTY ('productlevel')AS VARCHAR (50)) + ' + (Build'        + CAST (SERVERPROPERTY ('ProductVersion') AS VARCHAR (50)) +')' AS ProductVersion,     RIGHT(@@version, (Len(@@Version)-charindex('Windows',@@version, 1))+1) AS [O.S.],  SERVERPROPERTY ('Collation') AS Collation   Following is the output. I ignored PhysicalMachineName and SQLServerName.  ServerEdition : Business Intelligence Edition (64-bit) ProductVersion : SQL Server 2012 + RTM + (Build11.0.2100.60) O.S.           : Windows NT 6.1 &lt;X64&gt; (Build 7601: Service Pack 1)  Collation      : SQL_Latin1_General_CP1_CI_AS Integrating Floor Functions $\int_0^{1102} \lfloor{x^{1/2}}\rfloor \mathrm{d}x$ I want to find a general formula to calculate the integral of such function (x&gt;0) Could someone kindly help me? $$\int_0^{1102} \lfloor{x^{1/2}}\rfloor \mathrm{d}x$$ Thank you! Maximum power of $2$ which divides $3^{1024}-1$ What is the maximum power of $2$ which completely divides $3^{1024}-1$?  I proceeded thus: $\phi(2^n)=2^{n-1}$ for all $n\ge1$ $$3^{1024}=3^{2^{10}}\equiv1\pmod {2^{11}}$$ $$3^{1024}-1\equiv0\pmod {2^{11}}$$ Since $\phi(2^{11})=2^{10}$.  So, maximum power of $2$ must be $11$. But the answer says it is $12$. Where am I wrong and how to solve it correctly? Other than the general inductive method,how could we show that $$\sum_{r=0}^n \frac{(-1)^r}{r+1}\binom{n}{r} = \frac1{n+1}$$  Apart from induction, I tried with  to check the validity, but I can't think of an easy (manual) alternative.  Please suggest an intuitive/easy method. Add a legend in an ArcGIS Javascript API I am quite new to Javascript. I have made a html script that includes services I published to ArcGIS for server. It all does exactly what I want and I made it by copying working scripts together and getting help from more experienced scripters. I want to finetune my service by adding a legend. Unfortunately I am not able to create a working script. I have added the parts of my script I assume that are necessary to create my legend. Does anybody see what I am doing wrong?        &lt;script&gt;         var map;         var wmsLayer;         var URL;         var legend;         require(["dojo/query", "esri/map", "esri/layers/WMSLayer", "esri/dijit/Legend", "esri/config", "dojo/domReady!"],         function (query, Map, WMSLayer, Legend, esriConfig) {          esriConfig.defaults.io.proxyUrl = "/proxy/proxy_gcx.php";            map = new Map("map", {               basemap: "topo",               center: [5.5, 52.485],               minZoom: 8,               maxZoom: 13,               zoom: 8,               slider: true           });            wmsLayer = new WMSLayer("URL", {               format: "png",               visibleLayers: ["31", "30", "29", "28"]           });            map.on("layer-add", function (results) {               //add the legend               legend = new Legend({                   map: map,                   layerInfos: [{                       layer: results,                       title: "test"                   }]               }, "legendDiv");               legend.startup();           });             map.addLayer(wmsLayer);       });     &lt;/script&gt; &lt;/head&gt;  &lt;body&gt;     &lt;div id="map"&gt;     &lt;/div&gt;     &lt;div id="legendDiv"&gt;     &lt;/div&gt; &lt;/body&gt;   EDIT: I have edited the code. I am still not done. It does give me a legend on my browser but it says there is no content in there. On my arcgis server manager there is a legend.