Skip to content

Error defining custom command with parameters in tagged command #4

@YanMing-lxb

Description

@YanMing-lxb

Error:

CN-Manuscript.tex:66: Illegal parameter number in definition of \taggedy.
<to be read again>
                   1
l.66 }

example:

\tagged{cn}{
    \usepackage{ctex} % 中文宏包, 取消注释即可输入中文内容 

    \usepackage{ifluatex}
    \ifluatex % 设置使用 lualatex 引擎时高亮颜色
        \usepackage{emoji}
        \usepackage{luacolor,lua-ul} % lualatex需要使用lua-ul宏包进行高亮设置
        \newcommand{\gl}[1]{\highLight{#1}}
    \else  % 设置使用 xelatex 引擎时高亮颜色
        \usepackage{xeCJKfntef} % 中文高亮设置, 导入此包支持汉字特殊下划线效果 
        \newcommand{\gl}{\CJKsout*[thickness=2.5ex,format=\color{yellow}]} % 新定义高亮命令\gl 用来高亮显示中文
    \fi
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions