LaTeXStudio
LaTeXStudio
这家伙很懒,什么也没写!

注册于 4年前

回答
470
文章
292
关注者
196

选自:https://tex.stackexchange.com/questions/235547/editing-theorem-environments
代码如下:

\documentclass{article}
\usepackage{lipsum}
\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}

\tcbset{
    thmbox/.style={
        enhanced,
        breakable,
        sharp corners=all,
        fonttitle=\bfseries\normalsize,
        fontupper=\normalsize\itshape,
         top=0mm,
         bottom=0mm,
         right=0mm,
        colback=white,
        colframe=white,
        colbacktitle=white,
        coltitle=black,
        attach boxed title to top left,
        boxed title style={empty, size=minimal, bottom=1.5mm},
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-%
                  (frame.south east)--(frame.north east);},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
            \draw (frame.north east)--(frame.south east);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
            \draw (frame.north east)--(frame.south east);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-%
                  (frame.south east)--(frame.north east);},
        },
    S/.style={thmbox, 
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        },
    L/.style={thmbox, 
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
        },
    LQ/.style={thmbox, 
        overlay unbroken ={
            \draw (title.south west)--(title.south east);
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
            \node[anchor=east] at (frame.south east) {$\square$};},
        overlay first={
            \draw (title.south west)--(title.south east); 
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay middle={
            \draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
        overlay last={
            \draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
            \node[anchor=east] at (frame.south east) {$\square$};},
    },  
}

\newtcbtheorem[]{tcbthmbox}{Theorem}{thmbox}{theo}
\newtcbtheorem[]{tcbSthmbox}{Theorem}{thmbox,S}{theo}
\newtcbtheorem[]{tcbLthmbox}{Theorem}{thmbox,L}{theo}
\newtcbtheorem[]{proof}{Démonstration}{thmbox,LQ}{theo}

\begin{document}

\begin{tcbthmbox}{First result}{}
\lipsum[3]
\end{tcbthmbox}

\begin{tcbSthmbox}{Important}{}
\lipsum[2]
\end{tcbSthmbox}

\begin{tcbLthmbox}{Final}{}
\lipsum[1]
\end{tcbLthmbox}

\begin{proof}{Proof}{}
\lipsum[1]
\end{proof}
\end{document}

image.png

代码如下:


\newcommand*\newop{\mathop{\raisebox{-5pt}{\normalfont\Huge K}}}
\begin{equation}
  1 + 1 = 2 \label{eq} \newop_a^b
\end{equation}

效果如下图:
image.png

可以用,但是需要特殊处理下,一般可以定义一个命令,专门放在页眉的内容放在定义里面。
比如:

\makeatletter
\let\runauthor\@author
\let\runtitle\@title
\makeatother
\lhead{\runauthor}
\rhead{\runtitle}

times 没有数学字体可以用同类字体替代,比如 mathptmx, newtxmath等等

角标明显是用了边裁线,找找 crop 宏包,去掉相关内容即可。
另外目录部分,需要看看代码了,其他用户看看。

\usepackage[nofontspec]{newtxtext}

这是老问题了。

亲,咱编译东西不可以这样糊涂的。正常编译的是:xelatex -> biber -> xelatex 毫无问题。

image.png

你是加了重复的宏包,但是参数不一致,你最好这样来加

\PassOptionsToPackage{dvipsnames}{xcolor} 

revtex 一定要认真读文档再去使用,很多日常习惯的代码,在这个包里面,嘿嘿嘿,不好使。

发布
问题