Hello all,
I just recently switch from LyX to LaTeX so beg with me if what I am about to ask is silly or easy to do but could not figure out how to proceed.
As per subject I'm using the Legrand Orange Book template to write a book, I was able to make some customization to fit my needs (images, colors etc.) but would like to customize the Theorem textbox.
If I use the \begin{theorem} \end{theorem} I get a result similar to the attached image what I would like to do is to use the same fancy "boX" changing the word Theorem x.y.z with something different in the specific Note and/or Tip which I use frequently in the book.
In addition to the above I would also like to use the same box style just withot any caption (basically the Theorem x.y.z part) just with text I will insert in it.
I've tried to play around with the structure.tex file but well results were not exactly encouraging due my ignorance.
Would anyone able to guide me or give me tips for the customization?
Thanks in advance, D.
Theses, Books, Title pages ⇒ Legrand Orange Book Template - Change Theorem Text box
Legrand Orange Book Template - Change Theorem Text box
- Attachments
-
- Theorem.png (6.64 KiB) Viewed 4853 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Legrand Orange Book Template - Change Theorem Text box
The theorem boxes are currently done using package mdframed. The manual shows you many many ways of defining your own boxes with any style you want.
An alternative to mdframed would be package tcolorbox.
An alternative to mdframed would be package tcolorbox.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Legrand Orange Book Template - Change Theorem Text box
Thanks I'll read through the linked docs even if what I'm trying to do is simpler (at least I think) as I'm compeltely fine with the defined styles I was just trying to figure out to changeTheorem to something else.
Agian thanks for the info and links
Agian thanks for the info and links
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Legrand Orange Book Template - Change Theorem Text box
I guess you can do so by searching the string
Package tcolorbox will get you much better results once you got the hang of it.
Theorem
in structure.tex and replace it at the appropriate place with something you like ... but, you will still get a number as theorems are numbered y default. Also, the implementation of using two different packages isn't very good, in my opinion. Package tcolorbox will get you much better results once you got the hang of it.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Legrand Orange Book Template - Change Theorem Text box
Thanks Johanners for your patience
As I said I'm new to LaTeX (that's why I started using LyX until I realized using "pure" LaTeX is just easier) and still figuring out lot of things, I know this is not the best appraoch as I usually tend to learn something before using it... but sometimes it cannot be helped.
I will read through tcolorbox and see if can come up with something useful for my needs but in the meantime, just in case anybody needs it, I've found a way to achieve what I needed.
The theorem style definition reads like this
To create a simple box with the same style just without the Theorem part I've adjusted as follows:

As I said I'm new to LaTeX (that's why I started using LyX until I realized using "pure" LaTeX is just easier) and still figuring out lot of things, I know this is not the best appraoch as I usually tend to learn something before using it... but sometimes it cannot be helped.
I will read through tcolorbox and see if can come up with something useful for my needs but in the meantime, just in case anybody needs it, I've found a way to achieve what I needed.
The theorem style definition reads like this
Code: Select all
{\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)
With this I will probably orrify anyone who actually knows LaTeX and the template creator... but at least is working fine for my needs.{\small\sffamily\color{ocre}\nobreakspace% Theorem text (e.g. Theorem 2.1)