0
\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} 
  • 2
    you have removed the code formatting which makes your question very hard to read – David Carlisle Apr 29 at 17:33
  • 4
    please do not edit the question asking a completely different question after answers have been posted. It makes the site impossible for later readers to understand. If you want to ask a new question then post a new question. Clearly your posted document makes no pdf as it has no text. – David Carlisle Apr 29 at 17:35
3

To bring this to an end please see the following minimalized code:

\listfiles
\documentclass[a4paper,fleqn]{cas-sc}


\begin{document}
test
\end{document} 

I only added command \listfiles to get an list of used packages and version numbers at the end of the resulting log file:

*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
 *********** 

The compile run with my current MiKTeX 2.9 and used class cas-sc.cls 2018/09/22, 1.0 ends with the following error message:

! 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.

That shows that this version of the class is buggy and needs to be corrected/rewritten by its maintainer.

Based on the list of used packages I showed you you do not need to call for example package textcomp, graphicx, amssymb etc.

Because you did not tell us which version of class cas-sc you are using I can not tell you how to correct the buggy class. Best would be to ask the maintainer/owner of that class to correct it!

  • 1
    This happens because the class requires to (but does not) load natbib. Loading natbib makes this(!) problem disappear. Which does not mean the class works. – Phelype Oleinik May 1 at 0:47
  • 1
    The manual does say the class depends on natbib, but if it is mandatory the class should do it. Counts as a bug in my opinion :) – Phelype Oleinik May 1 at 1:30
1

The error in full is

! LaTeX Error: Option clash for package xcolor.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

Presumably because the class has already loaded xcolor, so you could delete

\usepackage[table]{xcolor}

There is a similar error

! LaTeX Error: Option clash for package amsmath.
  • 1
    They also load float at least three times. – Teepeemm Apr 29 at 13:18
  • 1
    @Teepeemm although that is just untidy it doesn't actually do any harm, later ones are ignored. – David Carlisle Apr 29 at 13:18
  • When I removed \usepackage[table]{xcolor}. Then error \usepackage{url} is generated. – Ghulam Hafeez Apr 29 at 13:20
  • 3
    @GhulamHafeez No! that error is the amsmath one that I gave, look in the log file at the actual error message, if you are using an editor that is just showing the error as ` \usepackage{url} ` that is most unhelpful. In both cases the error is on the line above. as the actual error message makes clear. – David Carlisle Apr 29 at 13:21
  • @DavidCarlisle, I removed \usepackage[table]{xcolor} and \usepackage{amsmath} but it generates other errors. Please help me – Ghulam Hafeez Apr 29 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.