我正在使用 Beamer 制作演示文稿。我下载了 Metropolis Beamer 主题,但收到错误消息:
“扫描 \setsansfont 的使用情况时文件结束。}”
我不知道为什么。
\documentclass[xcolor=x11names,xcolor=table,compress]{beamer}
\usetheme{m}
\usepackage{booktabs}
\usepackage{wrapfig}
\usepackage{float}
\usepackage{subfigure}
\usepackage{datetime}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[spanish, es-tabla, es-lcroman]{babel}
\usepgfplotslibrary{dateplot}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{width=12cm, height=7cm, compat=1.11}
\pgfplotsset{major grid style={dotted, gray!50}}
\usepackage{pgfplotstable}
\usepackage{pgfplots,tikz}
\usepackage{dtklogos}
\usepackage{graphicx,multicol,ragged2e,tabularx,wasysym}
\usepackage{helvet}
\usepackage{amsfonts}
\usepackage[eulergreek]{sansmath}
\usepackage{siunitx}
\usepackage{pgfplotstable}
\usepackage{inputenc}
\usepackage{fontenc}
\usepackage{xpatch}
\usepackage{amsmath}
\renewcommand{\ttdefault}{ul9}
\xpatchcmd{\ttfamily}{\selectfont}{\fontencoding{T1}\selectfont}{}{}
\DeclareTextCommand{\nobreakspace}{T1}{\leavevmode\nobreak\ }
\usepackage{newpxmath}
\usepackage{newpxtext}
\usepackage{listings}
\lstset{language=[LaTeX]TeX,
basicstyle=\normalsize\ttfamily,
keywordstyle=,
numbers=left,
numberstyle=\tiny\ttfamily,
stepnumber=1,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
frame=tb,
framerule=0.5pt,
tabsize=4,
framexleftmargin=0.5em,
framexrightmargin=0.5em,
xleftmargin=0.5em,
xrightmargin=0.5em
}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% LOADING TIKZ LIBRARIES
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\usetikzlibrary{backgrounds, mindmap}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% BEAMER OPTIONS
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\setbeameroption{show notes} % Use metropolis theme
\title{Presentaci\'on Mendoza}
\date{15 de octubre, 2015. Mendoza, Argentina.}
\author{Crist\'obal N. Juli\'a de la Vega}
\institute{Centro de Estudios Avanzados en Zonas \'Aridas}
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
% DOCUMENT
%-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\begin{document}
\maketitle
\section{Primera Secci\'on}
\begin{frame}{Resumen}
Hello, world!
\end{frame}
\begin{frame}{Desertificaci\'on}
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=south,xshift=-5pt,yshift=30pt] at (current page.south) {\resizebox{12cm}{5.2cm}{\input{precipitacion.tex}}};
\node[anchor=north,xshift=-5pt,yshift=-60pt] at (current page.north){\textbf{?`C\'omo se manifiesta la <<\textit{Desertificaci\'on?}>>}};
\end{tikzpicture}
\end{frame}
\end{document}
有人能帮帮我吗?可以通过从以下网址下载源文件来生成正常工作方案所需的“.sty”这里非常感谢。precipitacion.tex
文件如下:
\pgfplotsset{
/pgfplots/ybar legend/.style={
/pgfplots/legend image code/.code={%
\draw[##1,/tikz/.cd,bar width=0.1cm,yshift=-0.2em,bar shift=0.5*\pgfplotbarwidth]
plot coordinates {(0.5*\pgfplotbarwidth,0.6em) (2.5*\pgfplotbarwidth,0.4em) (4.5*\pgfplotbarwidth,0.2em)};},
}
}
\begin{tikzpicture} [font=\sansmath\scriptsize]
\begin{axis}[
title style={align=center},
title={\textsc{Precipitaci\'on Anual Regi\'on de Coquimbo Periodo 1870--2015}},
ymin=0,
ymax=400,
xmin=1870,
xmax=2015,
xticklabels= {1865,1870,1875,1880,1885,1890,1895,1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2000,2005,2010,2015,2020,2025},
xtick={1865,1870,1875,1880,1885,1890,1895,1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2000,2005,2010,2015,2020,2025},
xticklabel style={font=\sansmath\scriptsize,rotate=45,anchor=north east},
yticklabels={0,40,80,120,160,200,240,280,320,360},
ytick={0,40,80,120,160,200,240,280,320,360},
ymajorgrids=true,
xmajorgrids=true,
ylabel=PP (mm),
xlabel=d\'ia,
legend style={at={(0.99,0.96)},
anchor=north east, font={\sansmath\tiny}},
legend cell align = left,
width=17.5cm,
]
\addplot[ybar,
bar width=1.5pt,draw=cyan,fill=cyan, ybar legend] coordinates {(1869,106)
(1870,NaN)
(1871,128)
(1872,71)
(1873,80.5)
(1874,107)
(1875,94)
(1876,93)
(1877,180.5)
(1878,70)
(1879,125.5)
(1880,366)
(1881,161.5)
(1882,61)
(1883,194)
(1884,80.5)
(1885,54)
(1886,70)
(1887,93.5)
(1888,53.6)
(1889,80)
(1890,148)
(1891,238.6)
(1892,17.5)
(1893,78.7)
(1894,189.7)
(1895,49.3)
(1896,33.3)
(1897,192.6)
(1898,135.1)
(1899,78.6)
(1900,232.8)
(1901,167.7)
(1902,170.4)
(1903,46.2)
(1904,236.5)
(1905,302.4)
(1906,58.6)
(1907,119.3)
(1908,58.7)
(1909,51.4)
(1910,70.5)
(1911,32.6)
(1912,48.4)
(1913,26.8)
(1914,254)
(1915,106.2)
(1916,29.1)
(1917,71)
(1918,41.4)
(1919,306.6)
(1920,7)
(1921,126.7)
(1922,145.9)
(1923,116)
(1924,22)
(1925,18.5)
(1926,199.2)
(1927,141.1)
(1928,206)
(1929,116.3)
(1930,197.3)
(1931,107.2)
(1932,122.8)
(1933,52.5)
(1934,180.5)
(1935,70.7)
(1936,60.9)
(1937,96.3)
(1938,114.5)
(1939,119.2)
(1940,178.7)
(1941,209.9)
(1942,142.8)
(1943,84.4)
(1944,147.2)
(1945,27.7)
(1946,74.7)
(1947,33.8)
(1948,72.3)
(1949,90.8)
(1950,80.8)
(1951,43.6)
(1952,165.2)
(1953,42.3)
(1954,87.8)
(1955,44.1)
(1956,97.2)
(1957,270.9)
(1958,159.6)
(1959,98.8)
(1960,10.4)
(1961,133.1)
(1962,34.3)
(1963,117)
(1964,25.4)
(1965,222.6)
(1966,111.7)
(1967,44.6)
(1968,34.2)
(1969,7.7)
(1970,31)
(1971,80.1)
(1972,188.1)
(1973,58.7)
(1974,49.4)
(1975,68.3)
(1976,44.2)
(1977,66.5)
(1978,45.7)
(1979,4.3)
(1980,69.5)
(1981,68)
(1982,77.9)
(1983,160.1)
(1984,177.5)
(1985,36)
(1986,36.1)
(1987,195.6)
(1988,11.2)
(1989,58.9)
(1990,17.5)
(1991,104.8)
(1992,193.9)
(1993,65)
(1994,17)
(1995,12)
(1996,48)
(1997,186)
(1998,18)
(1999,60)
(2000,66)
(2001,137)
(2002,188)
(2003,92)
(2004,118)
(2005,68)
(2006,37)
(2007,26)
(2008,107)
(2009,53)
(2010,67)
(2011,212)
(2012,70.5)
(2013,39.8)
(2014,43.2)
};
\addplot[draw=DeepSkyBlue4,very thick,smooth] coordinates {(1869,NaN)
(1870,NaN)
(1871,128)
(1872,71)
(1873,80.5)
(1874,107)
(1875,94)
(1876,93)
(1877,180.5)
(1878,105.4)
(1879,107.35)
(1880,131.55)
(1881,134.9)
(1882,133.9)
(1883,145.25)
(1884,142.6)
(1885,138.6)
(1886,136.3)
(1887,127.6)
(1888,125.96)
(1889,121.41)
(1890,99.61)
(1891,107.32)
(1892,102.97)
(1893,91.44)
(1894,102.36)
(1895,101.89)
(1896,98.22)
(1897,108.13)
(1898,116.28)
(1899,116.14)
(1900,124.62)
(1901,117.53)
(1902,132.82)
(1903,129.57)
(1904,134.25)
(1905,159.56)
(1906,162.09)
(1907,154.76)
(1908,147.12)
(1909,144.4)
(1910,128.17)
(1911,114.66)
(1912,102.46)
(1913,100.52)
(1914,102.27)
(1915,82.65)
(1916,79.7)
(1917,74.87)
(1918,73.14)
(1919,98.66)
(1920,92.31)
(1921,101.72)
(1922,111.47)
(1923,120.39)
(1924,97.19)
(1925,88.42)
(1926,105.43)
(1927,112.44)
(1928,128.9)
(1929,109.87)
(1930,128.9)
(1931,126.95)
(1932,124.64)
(1933,118.29)
(1934,134.14)
(1935,139.36)
(1936,125.53)
(1937,121.05)
(1938,111.9)
(1939,112.19)
(1940,110.33)
(1941,120.6)
(1942,122.6)
(1943,125.79)
(1944,122.46)
(1945,118.16)
(1946,119.54)
(1947,113.29)
(1948,109.07)
(1949,106.23)
(1950,96.44)
(1951,79.81)
(1952,82.05)
(1953,77.84)
(1954,71.9)
(1955,73.54)
(1956,75.79)
(1957,99.5)
(1958,108.23)
(1959,109.03)
(1960,101.99)
(1961,110.94)
(1962,97.85)
(1963,105.32)
(1964,99.08)
(1965,116.93)
(1966,118.38)
(1967,95.75)
(1968,83.21)
(1969,74.1)
(1970,76.16)
(1971,70.86)
(1972,86.24)
(1973,80.41)
(1974,82.81)
(1975,67.38)
(1976,60.63)
(1977,62.82)
(1978,63.97)
(1979,63.63)
(1980,67.48)
(1981,66.27)
(1982,55.25)
(1983,65.39)
(1984,78.2)
(1985,74.97)
(1986,74.16)
(1987,87.07)
(1988,83.62)
(1989,89.08)
(1990,83.88)
(1991,87.56)
(1992,99.16)
(1993,89.65)
(1994,73.6)
(1995,71.2)
(1996,72.39)
(1997,71.43)
(1998,72.11)
(1999,72.22)
(2000,77.07)
(2001,80.29)
(2002,79.7)
(2003,82.4)
(2004,92.5)
(2005,98.1)
(2006,97)
(2007,81)
(2008,89.9)
(2009,89.2)
(2010,89.3)
(2011,96.8)
(2012,85.05)
(2013,79.83)
(2014,72.35)};
\node[gray!60] at (axis cs: 1.5,1.5) {ceazamet};
\legend{Precipitaci\'on Anual, Media 10 A\~nos};
\end{axis}
\end{tikzpicture}