\documentclass[a4paper,fleqn]{cas-sc}
\usepackage{cite}
\usepackage{multirow}
%\usepackage[utf8x]{inputenc}
\usepackage{mathrsfs}
\usepackage{amssymb,amsthm}
\usepackage{caption}
\captionsetup[figure]{position=below, margin=1cm, labelfont=bf, labelsep=period, skip=12pt, justification=justified}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{float}
\usepackage{etoolbox}
\usepackage{booktabs}
%\usepackage[table]{xcolor}
%\usepackage{float}
%\usepackage[cmex10]{amsmath}
%\usepackage{url}
\usepackage[T1]{fontenc}
\usepackage{soul}
\let\labelindent\relax
\usepackage{enumitem}
\usepackage{array}
\usepackage{longtable}
\usepackage{epstopdf}
%\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{multirow}
\usepackage{pdflscape}
%\usepackage{rotating}
%\restylefloat*{figure} %% create a line before and after an image
\floatstyle{plain}
\captionsetup{labelsep=space,justification=centering,singlelinecheck=on}
\usepackage{mathcomp}
\usepackage{lscape}
%\usepackage{float}
\usepackage{longtable}
\usepackage{lineno}
\setlength\columnsep{25pt}
\newcommand{\PreserveBackslash}[1]{\let\temp = \\#1\let\\ = \temp}
\newcolumntype{C}[1]{>{\PreserveBackslash\centering}p{#1}}
\newcolumntype{R}[1]{>{\PreserveBackslash\raggedleft}p{#1}}
\newcolumntype{L}[1]{>{\PreserveBackslash\raggedright}p{#1}}
\setcounter{page}{1}
\twocolumn
%% %%%%%%
%%% Packages to add the vertical line with in algorithm:pseudocode
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{etoolbox}
\makeatletter
% start with some helper code
% This is the vertical rule that is inserted
\newcommand*{\algrule}[1][\algorithmicindent]{%
\makebox[#1][l]{%
\hspace*{.2em}% <------------- This is where the rule starts from
\vrule height .75\baselineskip depth .25\baselineskip
}
}
\newcount\ALG@printindent@tempcnta
\def\ALG@printindent{%
\ifnum \theALG@nested>0% is there anything to print
\ifx\ALG@text\ALG@x@notext% is this an end group without any text?
% do nothing
\else
\unskip
% draw a rule for each indent level
\ALG@printindent@tempcnta=1
\loop
\algrule[\csname ALG@ind@\the\ALG@printindent@tempcnta\endcsname]%
\advance \ALG@printindent@tempcnta 1
\ifnum \ALG@printindent@tempcnta<\numexpr\theALG@nested+1\relax
\repeat
\fi
\fi
}
% the following line injects our new indent handling code in place of the default spacing
\patchcmd{\ALG@doentity}{\noindent\hskip\ALG@tlm}{\ALG@printindent}{}{\errmessage{failed to patch}}
\patchcmd{\ALG@doentity}{\item[]\nointerlineskip}{}{}{} % no spurious vertical space
% end vertical rule patch for algorithmicx
\makeatother
\usepackage{textcomp}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}
\end{document}
答案1
为了结束此过程,请参阅以下简化代码:
\listfiles
\documentclass[a4paper,fleqn]{cas-sc}
\begin{document}
test
\end{document}
\listfiles
我在结果日志文件的末尾仅添加了命令来获取使用的软件包和版本号的列表:
*File List*
cas-sc.cls 2018/09/22, 1.0: Formatting class for CAS single column articles
article.cls 2014/09/29 v1.4h Standard LaTeX document class
fleqn.clo 2016/12/29 v1.2b Standard LaTeX option (flush left equations)
size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
graphicx.sty 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
graphics.sty 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
trig.sty 2016/01/03 v1.10 sin cos tan (DPC)
graphics.cfg 2016/06/04 v1.11 sample graphics configuration
pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
amsmath.sty 2018/12/01 v2.17b AMS math features
amstext.sty 2000/06/29 v2.01 AMS text
amsgen.sty 1999/11/30 v2.0 generic functions
amsbsy.sty 1999/11/29 v1.2d Bold Symbols
amsopn.sty 2016/03/08 v2.02 operator names
amsfonts.sty 2013/01/14 v3.01 Basic AMSFonts support
amssymb.sty 2013/01/14 v3.01 AMS font symbols
expl3.sty 2019-04-21 L3 programming layer (loader)
expl3-code.tex 2019-04-21 L3 programming layer
l3pdfmode.def 2019-04-06 v L3 Experimental driver: PDF mode
xparse.sty 2019-03-05 L3 Experimental document command parser
etoolbox.sty 2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
booktabs.sty 2005/04/14 v1.61803 publication quality tables
makecell.sty 2009/08/03 V0.1e Managing of Tab Column Heads and Cells
array.sty 2018/12/30 v2.4k Tabular extension package (FMi)
multirow.sty 2019/01/01 v2.4 Span multiple rows of a table
colortbl.sty 2018/12/12 v1.0d Color table columns (DPC)
color.sty 1999/02/16
color.cfg 2016/01/02 v1.6 sample color configuration
dcolumn.sty 2014/10/28 v1.06 decimal alignment package (DPC)
stfloats.sty 2017/03/27 v3.3 Improve float mechanism and baselineskip settings
xspace.sty 2014/10/28 v1.13 Space after command names (DPC,MH)
xstring.sty 2019/02/06 v1.83 String manipulations (CT)
footmisc.sty 2011/06/06 v5.5b a miscellany of footnote facilities
xcolor.sty 2016/05/11 v2.12 LaTeX color extensions (UK)
color.cfg 2016/01/02 v1.6 sample color configuration
dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
svgnam.def 2016/05/11 v2.12 Predefined colors according to SVG 1.1 (UK)
hyperref.sty 2018/11/30 v6.88e Hypertext links for LaTeX
hobsub-hyperref.sty 2016/05/16 v1.14 Bundle oberdiek, subset hyperref (HO)
hobsub-generic.sty 2016/05/16 v1.14 Bundle oberdiek, subset generic (HO)
hobsub.sty 2016/05/16 v1.14 Construct package bundles (HO)
infwarerr.sty 2016/05/16 v1.4 Providing info/warning/error messages (HO)
ltxcmds.sty 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
ifluatex.sty 2016/05/16 v1.4 Provides the ifluatex switch (HO)
ifvtex.sty 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
intcalc.sty 2016/05/16 v1.2 Expandable calculations with integers (HO)
ifpdf.sty 2018/09/07 v3.3 Provides the ifpdf switch
etexcmds.sty 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
kvsetkeys.sty 2016/05/16 v1.17 Key value parser (HO)
kvdefinekeys.sty 2016/05/16 v1.4 Define keys (HO)
pdftexcmds.sty 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
pdfescape.sty 2016/05/16 v1.14 Implements pdfTeX's escape features (HO)
bigintcalc.sty 2016/05/16 v1.4 Expandable calculations on big integers (HO)
bitset.sty 2016/05/16 v1.2 Handle bit-vector datatype (HO)
uniquecounter.sty 2016/05/16 v1.3 Provide unlimited unique counter (HO)
letltxmacro.sty 2016/05/16 v1.5 Let assignment for LaTeX macros (HO)
hopatch.sty 2016/05/16 v1.3 Wrapper for package hooks (HO)
xcolor-patch.sty 2016/05/16 xcolor patch
atveryend.sty 2016/05/16 v1.9 Hooks at the very end of document (HO)
atbegshi.sty 2016/06/09 v1.18 At begin shipout hook (HO)
refcount.sty 2016/05/16 v3.5 Data extraction from label references (HO)
hycolor.sty 2016/05/16 v1.8 Color options for hyperref/bookmark (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
auxhook.sty 2016/05/16 v1.4 Hooks for auxiliary files (HO)
kvoptions.sty 2016/05/16 v3.12 Key value format for package options (HO)
pd1enc.def 2018/11/30 v6.88e Hyperref: PDFDocEncoding definition (HO)
hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
url.sty 2013/09/16 ver 3.4 Verb mode for urls, etc.
hpdftex.def 2018/11/30 v6.88e Hyperref driver for pdfTeX
rerunfilecheck.sty 2016/05/16 v1.8 Rerun checks for auxiliary files (HO)
cas-common.sty
moreverb.sty 2008/06/03 v2.3a `more' verbatim facilities
verbatim.sty 2014/10/28 v1.5q LaTeX2e package for verbatim enhancements
wrapfig.sty 2003/01/31 v 3.6
fontenc.sty
t1enc.def 2018/08/11 v2.0j Standard LaTeX file
stix.sty 2018/04/17 v1.1.3-latex STIX fonts support package
textcomp.sty 2018/08/11 v2.0j Standard LaTeX package
ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
ts1enc.dfu 2018/10/05 v1.2f UTF-8 support for inputenc
geometry.sty 2018/04/16 v5.8 Page Geometry
geometry.cfg
ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
ls1stix.fd 2015/04/17 v1.1.2-latex STIX LS1 font definitions
ls2stix.fd 2015/04/17 v1.1.2-latex STIX LS2 font definitions
t1stix.fd 2015/04/17 v1.1.2-latex STIX T1 font definitions
supp-pdf.mkii
epstopdf-base.sty 2016/05/15 v2.6 Base part for package epstopdf
grfext.sty 2016/05/16 v1.2 Manage graphics extensions (HO)
nameref.sty 2016/05/21 v2.44 Cross-referencing by name of section
gettitlestring.sty 2016/05/16 v1.5 Cleanup title references (HO)
488234.out
488234.out
t1cmss.fd 2014/09/29 v2.5h Standard LaTeX font definitions
ls1stixscr.fd 2015/04/17 v1.1.2-latex STIX script LS1 font definitions
ls2stixex.fd 2015/04/17 v1.1.2-latex STIX extentions LS2 font definitions
umsa.fd 2013/01/14 v3.01 AMS symbols A
umsb.fd 2013/01/14 v3.01 AMS symbols B
ls1stixfrak.fd 2015/04/17 v1.1.2-latex STIX fraktur LS1 font definitions
ls1stixbb.fd 2015/04/17 v1.1.2-latex STIX blackboard LS1 font definitions
ls2stixcal.fd 2015/04/17 v1.1.2-latex STIX calligraphic LS2 font definitions
ls1stixsf.fd 2015/04/17 v1.1.2-latex STIX sans-serif LS1 font definitions
ls2stixtt.fd 2015/04/17 v1.1.2-latex STIX typewriter LS2 font definitions
***********
使用我当前的 MiKTeX 2.9 和使用的类进行编译运行cas-sc.cls 2018/09/22, 1.0
以以下错误消息结束:
! Undefined control sequence. \@begindocumenthook ...\@afterindentfalse \bibsep =0pt\gdef \bibfont {\fonts... l.89 \begin{document} The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.
这表明该版本的类存在错误,需要维护者进行更正/重写。
根据我向您展示的已用包列表,您不需要调用例如包textcomp
、等。graphicx
amssymb
因为你没有告诉我们cas-sc
你使用的是哪个版本的类,所以我无法告诉你如何更正这个有问题的类。最好的办法是请该类的维护者/所有者来更正它!
答案2
完整错误如下
! LaTeX Error: Option clash for package xcolor.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
大概是因为该类已经加载了xcolor,所以你可以删除
\usepackage[table]{xcolor}
有类似的错误
! LaTeX Error: Option clash for package amsmath.