As you can see in the picture below, the diagram is shifted to the left. The code I am using to display this image is give below:   \begin{center} \includegraphics[width=\textwidth]{"Law 2".png} \end{center}   The name of the image file is "Law 2".  How should I go about fixing this problem? I've also read answers to a related question, but, since I am a beginner in Latex, it's difficult for me to understand their logic. So, an ideal answer would be one that strictly deals with my case.   Update   After trying \fbox{\includegraphics{"Law 2".png}} I got, the following:     Update   After trying \fbox{\includegraphics[width=\textwidth]{"Law 2".png}} I got the following picture:
29163
I'm inserting an image with a simple:  \includegraphics[height=5cm]{filename.png}   This results in an image that maintains the aspect ratio, and so gives me something like 6cm width. I only really want the left side of the image though, and would like to crop it to 50% width. Is it possible to do this?  If possible, I'd like to do this in a portable way (i.e. something that other authors of this document won't have to install packages for, and something that works with a reasonably old version of pdflatex - our computers at work are in sore need of an upgrade).
111188
I have to draw a snake lemma, as here: .  The code is  \documentclass{article}     \usepackage{tikz-cd}     \usepackage{amsmath}     \DeclareMathOperator{\Tor}{Tor}     \begin{document}     \begin{tikzcd}               \cdots \rar   &amp; \Tor_3^A(A, M) \rar &amp; \Tor_3^A(K,M) \rar &amp; \Tor_3^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   &amp; \\                     &amp; \Tor_2^A(A, M) \rar &amp; \Tor_2^A(K,M) \rar &amp; \Tor_2^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   &amp; \\                     &amp; \Tor_1^A(A, M) \rar &amp; \Tor_1^A(K,M) \rar &amp; \Tor_1^A(K/A,M) \ar[out=0, in=180, looseness=2]{dll}   &amp; \\                     &amp; A \otimes_A M  \rar &amp; K \otimes_A M \rar &amp; K/A\otimes_A M \rar                    &amp; 0         \end{tikzcd} \end{document}   The resulting diagram is shifted on the very right side of the page. The more I increase the value of looseness the more the figure is shifted.  How can I center the figure?
88236
I'm struggling with placing some plots in latex. I'm trying to include the plots (sideways, but not the heading) in an appendix, so the first plot needs to be placed at the same page as the appendix heading.  Also the plots, including the caption need to be placed inside the top/bottom/left/right margins.  When using sidewaysfigure  i get (1) a pagebreak, such that the heading and plot are placed at two different pages and (2) when the caption is long, it gets outside the margins.   Is there any way I can prevent the pagebreak? and how to prevent the plot and caption to break the margins? (is there any way to measure the total height of plot and caption, and scale the plot (graphic) so that it has width=textheight (inside margins?), and height=textwidth(inside margins?)-"captionheight"....  my preamble   \documentclass[pdftex,10pt,b5paper,twoside]{report} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}   and  \begin{sidewaysfigure} \captionsetup{width=0.75\textwidth} \begin{center} \includegraphics[keepaspectratio=true, width=\textwidth]{./Figur/fundvar.png} \caption[Commercial crude oil inventories, SPX excess returns, S\&amp;P GCSI excess return time series]{Commercial crude oil inventories calculated as the logarithm of the current value divided by the mean of same weekly values over the past 5 years, Log excess returns on the S\&amp;P Goldman Sachs Commodity Index,  Log excess returns on the S\&amp;P 500 index.} \label{fig:fundvar} \end{center} \end{sidewaysfigure}
113929
Is there an way to avoid this behavior of the pictures    This is have is wrap the picture:  \begin{wrapfigure}{r}{0.5\textwidth}  \vspace{-20pt}   \begin{center}     \includegraphics[width=0.4\textwidth]{./pictures/DBuserTabel.png}%{./Pictures/mainscreen1.png}     \caption{Uklip af User tablen i Databasen}     \label{fig:databaseUserTable}   \end{center}   \vspace{-20pt}   \vspace{1pt} \end{wrapfigure}
32210
I'm using IEEEtran to format an article, and I wanted to include an image. I included the graphicx and hyperref packages, and used the following code, like normal, to include an image.  \begin{figure}[!t] \centering \includegraphics[width=3in]{fetch} \caption{Pipeline: Fetch Instruction} \label{fig:fetch} \end{figure}   What appears, however, is this:    Fetch.png is a file in the directory, and if I remove it, pdflatex errors instead of producing an output. I'm using MiKTeX 2.9 on Windows 7. Any ideas?
28167
%This is figure 1         \begin{figure}           \centering           \caption{blahblah}           \label{figure1}          \vspace{0.5 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel A         \end{center}         \includegraphics[scale=0.8]{s1.pdf}          \vspace{1 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel B         \end{center}         \includegraphics[scale=0.8]{s2.pdf}           \end{figure}           %This is Figure 1 continued         \begin{figure}         \vspace{-1.8cm}           \centering           \caption{blahblah}           \label{figure1cont}          \vspace{0.5 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel C: Bank $\Delta$\textit{CoJPoD}         \end{center}         \includegraphics[scale=0.8]{s3.pdf}          \vspace{8 cm}           \end{figure}   %This is figure 2 \begin{figure}   \centering   \caption{blahblah}   \label{figure2}  \vspace{0.5 cm}  \begin{center} \fontsize{10pt}{12pt}\selectfont Panel A \end{center} \includegraphics[scale=0.8]{s4.pdf}  \vspace{1 cm}  \begin{center} \fontsize{10pt}{12pt}\selectfont Panel B \end{center} \includegraphics[scale=0.8]{s5.pdf}  \end{figure}     When I use the above, I get my first figure is called Figure 1, however the second figure (which is meant to be called Figure 1 (Cont.)) appears as Figure 2 on the next page and the final figure (which is meant to be called Figure 2) appears as Figure 3.  I also tried using subfig package with \ContinuedFloat:          %This is figure 1         \begin{figure}           \centering           \caption{blahblah}           \label{figure1}          \vspace{0.5 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel A         \end{center}         \includegraphics[scale=0.8]{s1.pdf}          \vspace{1 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel B         \end{center}         \includegraphics[scale=0.8]{s2.pdf}           \end{figure}           %This is Figure 1 continued         \begin{figure}         \vspace{-1.8cm}           %Using ContinuedFloat here         \ContinuedFloat           \centering           \caption{blahblah}           \label{figure1cont}          \vspace{0.5 cm}          \begin{center}         \fontsize{10pt}{12pt}\selectfont Panel C: Bank $\Delta$\textit{CoJPoD}         \end{center}         \includegraphics[scale=0.8]{s3.pdf}          \vspace{8 cm}           \end{figure}   %This is figure 2 \begin{figure}   \centering   \caption{blahblah}   \label{figure2}  \vspace{0.5 cm}  \begin{center} \fontsize{10pt}{12pt}\selectfont Panel A \end{center} \includegraphics[scale=0.8]{s4.pdf}  \vspace{1 cm}  \begin{center} \fontsize{10pt}{12pt}\selectfont Panel B \end{center} \includegraphics[scale=0.8]{s5.pdf}  \end{figure}   But all this does is it makes my first figure called "Figure 1", then my Figure 1 continued figure is named as "Figure 0" and the figure that's meant to be my Figure 2 called Figure 1.  Any help would be appreciated.
43206
Firstly and fore-mostly I am a complete new comer to the world of LaTeX and so please do bear with me. I will try to be as accurate as I can but if you need any more info please let me know.  All I want is to figure out how to import a graphic into LaTeX (MacTeX).  I am using the following in my code:  \documentclass[10pt,a4paper,draft]{report} \usepackage{graphicx}   Then in my document section I'm using   \begin{figure} \includegraphics[width = 50mm]{Name.jpg} \caption{Label} \end{figure}   Once I compile the document, the area for the picture has been allocated but there is no image, I have tried .png and .pdf files also.  I know that this is a very simple question and I hope there is a simple solution but I cannot find anything on the net about this (which may mean I'm being dim).  Also I'm using Latexian but I have tried 4 different editors and it doesn't work in any.
80472
I recently updated MikTex and it seems Xelatex is not able to place figures correctly anymore. Before updating all figures were shown correctly. I work with Texworks and Miktex 2.9  Here it is the code that I run:  \documentclass[10pt,a4paper]{report} \usepackage{graphicx} \graphicspath{{method1/}{method2/}{dpfig/}}  \begin{document}  \begin{figure}[!htbp] \centering \begin{tabular}{cc} \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure1.eps}&amp; \includegraphics[trim=6cm 2.5cm 6cm 2.5cm,clip=true,width=0.33\textwidth]{figure2.eps}\\ \end{tabular} \caption{Two figures} \end{figure} \end{document} \end{figure}   With this code, figures are correctly trimmed and the relative position between figure 1 and figure 2 is maintained. However, the position in the document is wrong: figure are placed upper and more right than expected (as the bottom-left corner of the table was placed in the middle of the page). The unusual thing is that this does not happen in draft mode and picture are shown centered as it would be.  I usually compile with Xelatex, Makeindex and Bibtex.  I hope to have been clear.. bye!  EDIT: Sorry, I forgot to add the images I prepared from the file that run that script:
464
I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks).
16921
Can anyone help me in giving commands for commutative diagrams in LaTeX ? It doesn't seem to appear properly in the LaTeX guides that I have. A command for a simple triangular diagram with arrows associated to maps would be good enough, or maybe some appropriate reference.
84695
I have a single image which contains two sub-images. I want the following subtitles (a) and (b) to be shown correctly.   In which, left sides is my current image which contains two rectangular. And right sides is my expected result. I found a solution is that we can use subfig package. However, it requires separating the original figure into two subfigure. In that question, I am regarding that we do not need split original figure, I want to write (a),(b) directly below figure. Thanks Current solution is  \begin{figure}[H] \captionsetup{labelfont={bf}}   \centering     \subfloat[]{\centering\includegraphics[scale=0.5]{Fig1a.png}} \\     \subfloat[]{\centering\includegraphics[scale=0.5]{Fig1b.png}}   \caption{This is main figure}   \label{fig:9} \end{figure}
84002
I'm writing a manual for a class, and I never liked add images as files in my tex, so I'm drawning the logo with this code:   \documentclass{article} \usepackage{tikz} \begin{document} \definecolor{xdxdff}{rgb}{0.5,0.5,1.} \definecolor{qqqqff}{rgb}{0.,0.,1.} \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75} \begin{tikzpicture} \clip(-4.42,-1.90) rectangle (8.03,4.69); \draw [color=red,fill=red,fill opacity=1.0] (-0.67,1.06) circle (2.41cm); \draw [color=white,fill=white,fill opacity=1.0] (-0.66,1.71) circle (1.92cm); \draw [shift={(-0.05,2.21)},color=red]  plot[domain=2.01:4.03,variable=\t]({1.*1.40*cos(\t r)+0.*1.40*sin(\t r)},{0.*1.40*cos(\t r)+1.*1.40*sin(\t r)}); \draw [shift={(-1.60,0.27)},color=red]  plot[domain=-0.48:0.92,variable=\t]({1.*1.08*cos(\t r)+0.*1.08*sin(\t r)},{0.*1.08*cos(\t r)+1.*1.08*sin(\t r)}); \draw [shift={(-1.26,1.06)},color=red]  plot[domain=-1.12:0.68,variable=\t]({1.*1.43*cos(\t r)+0.*1.43*sin(\t r)},{0.*1.43*cos(\t r)+1.*1.43*sin(\t r)}); \draw [shift={(0.42,3.0)},color=red] plot[domain=2.72:4.22,variable=\t]({1.*1.18*cos(\t r)+0.*1.18*sin(\t r)},{0.*1.18*cos(\t r)+1.*1.18*sin(\t r)}); \end{tikzpicture} \end{document}   which gives me this image   How can I color red the thing in middle?
101844
I'm wondering about a way to exclude the axis labels and axis graduation from how latex will center the figure with respect to the caption. Labels and graduation along the y-axis (assuming it lies on the left of the figure) will tend to move the rest of the content to the right. I feel like it looks better when only the "main" content serves for centering purposes. Is such feature available?
41203
\documentclass [12pt]{article} \oddsidemargin=0pt \topmargin=0pt \textwidth=6.5in \textheight=8.5in \begin{document} \begin{center} {\large\bf\LaTeX\ Example 6} \end{center} We can typeset array structures \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\      a_1  &amp;      a_2        &amp; a_3 \\       b_1  &amp;      b_2        &amp; b_3  \end{array}  \right| \end{equation} \begin{quote} \begin{verbatim} \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\  a_1  &amp;  a_2   &amp; a_3 \\  b_1  &amp;  b_2   &amp; b_3 \end{array} \right| \end{equation} \end{verbatim} \end{quote} Or \begin{equation} \mathbf{A}=\left( \begin{array}{ccc} a_{11} &amp; a_{12} &amp; \cdots &amp; a_{1n} \\ a_{21} &amp; a_{22} &amp; \cdots &amp;  a_{2n} \\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\ a_{n1} &amp; a_{n2} &amp; \cdots &amp; a_{nn} \end{array} \right) \end{equation} \end{document}
8276
Does any one know if I can do this figure in Latex?  I know I can make the cube by the following code but how I can put that plan in the middle and write those numbers below it? \begin{figure} \begin{center} \caption{A labeled cube} \begin{tikzpicture}\label{f1} \foreach \n/\x/\l/\p in{ 1/{( 0  , 0)}/{$3$}/below, 2/{( 4, 0)}/{$4$}/below, 3/{( .8, 1)}/{$7$}/south east, 4/{( 4.8, 1)}/{$8$}/right, 5/{( 0, 4)}/{$1$}/left, 6/{( 4, 4)}/{$2$}/south west, 7/{( 0.8, 4.8)}/{$5$}/above, 8/{( 4.8, 4.8)}/{$6$}/above } {         \node[inner sep=2pt,circle,draw,fill,label={\p:\l}] (\n) at \x {};     } \draw (1) -- (2) -- (6) -- (5) -- (1); \draw (5) -- (6) -- (8) -- (7) -- (5); \draw (2) -- (4) -- (8) -- (6) -- (2); \draw[dashed] (1) -- (3) -- (4); \draw[dashed] (3) -- (7); \end{tikzpicture} \end{center} \end{figure}
66893
The LaTeX reference card states for example     \strut box w/ ht and depth of “(”, zero width   I came to see text as a two dimensional feature, but I must be missing out on something...  (following was off-topic: by the way, im trying to find documentation on how to use \vbox, \hbox,… i.e. to align a hbox within a vbox to the right)
84052
Using vim with latex suite on two different computers, on one it's fine, but on the other my tikz pictures ''colapses'' (all text is put to the center of the figure, nothing is drawn) The same pc can compile fine from texstudio, but not from vim- latex suite  Edit: Seems the problem was compiling to dvi instead of pdf