问题描述:用xelatex编译结果中,图片显示为灰色块,且不在正确位置,已确保路径正确。
```latex
%-- coding: UTF-8 --
% !TEX program = xelatex
% 完整编译: xelatex -> bibtex -> xelatex -> xelatex
\documentclass{article}
\usepackage[UTF8]{ctex}
\usepackage{float}
\usepackage{graphicx}
\usepackage{color,framed}%文本框
\usepackage{listings}
\usepackage{amssymb}
\usepackage{enumerate}
\usepackage{xcolor}
\usepackage{bm}
\usepackage{lastpage}%获得总页数
\usepackage{fancyhdr}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage{minted}
\usepackage{zhlipsum}
\usepackage[colorlinks = true]{hyperref}
\usepackage{array}
\usepackage{indentfirst}%首行缩进
\usepackage{amsmath}%aligned所需包
\newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}}
\catcode`\^^I=12
%书签
%页面边距
\geometry{a4paper,left=2.3cm,right=2.3cm,top=2.7cm,bottom=2.7cm}
\setlength{\parindent}{2em}%缩进2字符
% 如果有一个段落你不想首行缩进, 在段落前使用命令 \noindent.
% 同样的, 你要保证这一段是首行缩进, 使用命令 \indent
%代码段设置
\lstset{
numbers=left,
basicstyle=\tiny,
numberstyle=\tiny,
keywordstyle=\color{blue!70},
commentstyle=\color{red!50!green!50!blue!50},
frame=single, rulesepcolor=\color{red!20!green!20!blue!20},
escapeinside=``
}
\renewcommand{\papertitle}{禀赋和跨时期选择}
% 页眉页脚
% \pagestyle{fancy}
% \lhead{\papertitle}
% \rhead{\rightmark}
\cfoot{\thepage\ of\ \pageref{LastPage}}%当前页 of 总页数
\renewcommand{\headrulewidth}{0.4pt}%改为0pt即可去掉页眉下面的横线
\renewcommand{\footrulewidth}{0.4pt}%改为0pt即可去掉页脚上面的横线
\renewcommand{\thefigure}{\thesection{}.\arabic{figure}}%图片按章标号
\renewcommand{\figurename}{图}
\renewcommand{\contentsname}{目录} % 对Contents 进行汉化为目录
% 标题页设置
\title{\kaishu{\textbf{\papertitle}}}
\author{\kaishu{你好}}
\date{\today}
\begin{document}
% 将上面定义的title加入到document中
\maketitle
\clearpage
\section{判断题}
% 题目内容
\subsection{如果一个效用最大化的理性消费者是一种商品的净需求者,并且随着该商
品价格的上升,其购买该商品的数量更多,那么该商品一定是低档商品}
\textbf{答:}
% 答案
对
% 题目内容
\subsection{如果一个人是一种正常商品的净供给者,当其他商品价格不变时,该商品
价格上升,他对该商品的需求必然降低。}
\textbf{答:}
% 答案
错,这取决于替代效应和收入效应的总和
% 题目内容
\subsection{如果追求效用最大化者是某种商品的净销售者,当这种商品的价格上升,
其他商品的价格保持不变时,那么他的境况会得到较大改善,以至于他可
能成为净购买者。}
\textbf{答:}
% 答案
对
% 题目内容
\subsection{某人有一个向后弯曲的劳动供给曲线,当工资为每小时 5 时,他选择每周
工作 50 小时。现在他的老板希望他每周工作更长时间,因此,在每周开
始的 50 个小时内,支付给他每小时 5 的工资,之后变为每小时 7 的工资。
因为他拥有向后弯曲的劳动供给曲线,因此他实际上可能会选择工作更少
的时间。}
\textbf{答:}
% 答案
对
% 题目内容
\subsection{如果实际利率为正,则未来为了得到一个单位消费所需要放弃的现在的消
费小于一个单位。}
\textbf{答:}
% 答案
对
% 题目内容
\subsection{如果利率低于通货膨胀,理性人绝不会选择储蓄。}
\textbf{答:}
% 答案
对
\clearpage
\section{选择题}
% 题目内容
\subsection{某人的效用函数为 u (c1, c2) = min {c1, c2},其中 c1, c2 分别是他在时期
1 和时期 2 的消费,他在第 1 期的收入为 189,在第二期的收入为 63,他
可以在 10\%的利率下借贷,没有通货膨胀。则()A. 他将储蓄 60, B. 他
将借款 60, C. 他不会借贷, D. 他将储蓄 124, E. 以上都不对}
\textbf{答:}
% 答案
A
$$189-x=1.1x+63 \Rightarrow x=60$$
\clearpage
\section{计算题}
% 题目内容
\subsection{在一个偏僻的农村,唯一的农作物是玉米,好收成和坏收成交替发生。今年
的收成为 1000 单位玉米,明年为 150 单位玉米。这个村和其他地区没有往来。
玉米可以被存储,但老鼠会啃掉每年储存玉米的 25\%。村民们的效用函数为
u (c1, c2) = c1c2。}
\textbf{答:}
\subsubsection{以横轴表示今年的消费,纵轴表示明年的消费,画该村的预算线,在图上
标明预算线的横截距和纵截距}
假设会存储t的粮食,那么c1=1000-t,c2=150+0.75t,可以得到
\begin{equation}
\begin{align}
c_2=900-0.75*c_1\\
s.t. c_1 \le 1000, c_2 \ge 150
\end{align}
\end{equation}
可以看到,图中DC即预算约束。
\begin{figure}[!htb] %H为当前位置,!htb为忽略美学标准,htbp为浮动图形
\centering %图片居中
\includegraphics[width=0.7\textwidth]{images/1.jpg} %插入图片,[]中设置图片大小,{}中是图片文件名
\end{figure}
\subsubsection{村民们今年消费多少玉米?}
\begin{equation}
\left.
\begin{align}
max U(c_1,c_2)=max(c_1*c_2)=max((1000-t)(150+0.75t))\\
s.t. 0 \le t \le 1000
\end{align}
\right\}\Rightarrow t=400
\end{equation}
即今年消费600
\subsubsection{老鼠啃掉多少玉米?}
老鼠啃掉400*0.25=100
\subsubsection{村民们明年消费多少玉米?}
村民明年300+150=450
\clearpage
\end{document}
```