0

When I use "figure" environment, before the picture I inserted, there is a strange string "1.bb" I have never used exposing in my pdf. And if I change another picture to insert, the "1.bb" disappeared. I think there must be something wrong with my environment but I inserted another picture and it turns out a clean picture. And I've search the word "bb" in my source code and I find nothing. I wonder where it came from and how I can delete it if I insist to insert that certain picture.

\begin{figure}
    \centering
    \includegraphics[width=3in]{//Users/wuzihan/Downloads/图片 1.jpg}
    \caption{\ce{BF3}正比计数管的脉冲幅度谱}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=4in]{//Users/wuzihan/desktop/未命名图片.png}
    \caption{坪曲线与脉冲幅度谱的关系}
\end{figure}

problempic

the first part of source code is like this:

\documentclass[]{ctexart}
\usepackage{lmodern}
\usepackage[version=4]{mhchem}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}


% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage[unicode=true]{hyperref}
\hypersetup{
        pdfborder={0 0 0},
        breaklinks=true}
\urlstyle{same}  % don't use monospace font for urls
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother


\date{}
Torbjørn T.
  • 206,688

1 Answers1

2

A space is a delimiter, it ends a file name unless you use quotes but it is not easy to get the quotes right automatically so that it works in all cases on all OS.

If you have graphics with file names with spaces you can try the package grffile but I simply don't use spaces and curious chars in file names.

Ulrike Fischer
  • 327,261