I want to add this code in local layout in lyx:

\usepackage{etoolbox}%إطار النظريات

\newtcbtheorem[number within=section]{tdr}{تدريب}%
{overlay={},left=5pt,breakable,colback=red!5,colframe=red!35!black,fonttitle=\bfseries,title after break={Lemma \csuse{the\tcbcounter} -- \raggedleft Continued}}{tdr}

I tried a lot but I can't solve this problem.

best regards

  • Would you please add a minimal (not) working example of your TeX file that shows the error?
    – Salim Bou
    Jul 22, 2015 at 10:50
  • 1
    @salimbou Asking for an MWE is not very helpful in this case I think, it's more about using LyX than problems with LaTeX code. Jul 22, 2015 at 11:20

1 Answer 1


Paste this code in LyX local layout then click enable then apply then save:

Style مثال
Category              MainText
Margin                Static
LatexType             Environment
LatexName             exarab
NextNoIndent          1
LeftMargin            MMM
RightMargin           MMM
ParIndent             MM
ParSkip               0
ItemSep               0
TopSep                0.5
BottomSep             0.5
ParSep                0
Align                 Block
AlignPossible         Block, Left, Right, Center
   \newtcbtheorem[number within=section]{exarab}{مثال}{breakable,overlay={ },colback=blue!5,colframe=blue!25!black,fonttitle=\bfseries,title after break={Proof \csuse{the\tcbcounter} -- \raggedleft Continued}}{exarab}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .