environment
win10 + texlive + texstudio
Various errors when using templates
(1)Environment abstract undefined. \begin{abstract}
Add the following line of code before \begin{document}:
\usepackage{amsmath}
Reference link: https://blog.csdn.net/binbinczsohu/article/details/107692891
(2)File `slashbox.sty' not found. \RequirePackage
【method one】
Download slashbox.sty from the link below
https://www.ctan.org/tex-archive/macros/latex/contrib/
Then place the entire folder in D:\texlive\2021\texmf-dist\tex\latex\slashbox (change the specific path to your own)
Open cmd as administrator and enter the following command: (note the administrator identity)
texhash
to refresh the Tex file database before running
Reference links:
https://blog.csdn.net/GodWriter/article/details/97624231
https://www.cnblogs.com/zxhyxiao/p/9356996.html
【Method Two】
After downloading slashbox.sty, place it in the template folder for temporary use.
(3)Package inputenc Error: Invalid UTF-8 byte
The debugging process is as follows:
1. Try changing the file encoding format to UTF-8
View the current format of the file:
Change format: Edit->Set encoding
Result : Useless
2. Try to find the Chinese characters in the line where the error is reported, and then change it to English.
Result : No Chinese characters were found. Even if they were found, it would not work. There were too many errors reported and they could not be corrected.
Reference links:
https://blog.csdn.net/qq_36607894/article/details/104034060
https://blog.csdn.net/weixin_43722880/article/details/101564077·
3. Change PdfLaTex to XeLaTex: (because XeLaTex supports Chinese)
Result : A new error was reported: Package hyperref Error: Wrong DVI mode driver option `dvipdfm',(hyperref) because XeTeX is running. \ProcessKeyvalOptions{Hyp}
4. For new errors, change the main .tex file and its referenced secondary .tex files, .sty files, and .cls.
\usepackage[dvipdfm]{hyperref}
Change to:
\RequirePackage{hyperref}
[dvipdfm] will be deleted soon.
Result : Success!
Just comment out the following dvipdfm with %
\RequirePackage[dvipdfm, %pdflatex,pdftex ÕâÀï¾ö¶¨ÔËÐÐÎļþµÄ·½Ê½²»Í¬
pdfstartview=FitH,%
CJKbookmarks=true,%
bookmarksnumbered=true,%
bookmarksopen=true,%
colorlinks=true, %×¢Ê͵ô´ËÏîÔò½»²æÒýÓÃΪ²ÊÉ«±ß¿ò(½«colorlinksºÍpdfborderͬʱעÊ͵ô)
pdfborder=001, %×¢Ê͵ô´ËÏîÔò½»²æÒýÓÃΪ²ÊÉ«±ß¿ò
linkcolor=black,%
citecolor=black,%
pagecolor=black,%
urlcolor=black]{hyperref}
Reference link: https://blog.csdn.net/weixin_43872190/article/details/113786752
(4)Undefined control sequence.
Change XeTex to LaTex
(5)Cannot determine size of graphic in
LaTeX changed to pdfLaTeX
Reference link: https://blog.csdn.net/simmel_92/article/details/83618694
(6) Missing \begin{document}. I
The main .tex file is not running (personally understands it as the main program)