LaTeX forum ⇒ Text FormattingMaking a custom environment

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
bertibott
Posts: 14
Joined: Wed Dec 12, 2018 3:32 pm

Making a custom environment

Postby bertibott » Mon Jan 28, 2019 3:23 pm

Hi,
here is what I am trying to do. I want parts of my document to be "separated" (for lack of a better word) from the rest of the text. Think of a history book that has original letters or speeches from the time in a separate box. Not actually part of the text but providing additional detail or "fluff".

I think that fancybox has what I am looking for... but I am not sure how to get it to work. The ctan website says this: "Save the file fancybox.sty in a directory, which is part of your
local TeX tree.
Then do not forget to run texhash to update this tree."
And I have no idea what any of this means.

Another thing I would like to do is use a different font for my new environment. How do I do that?

User avatar
Stefan Kottwitz
Site Admin
Posts: 9367
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Jan 28, 2019 3:47 pm

Hi!

bertibott wrote:I think that fancybox has what I am looking for.


I think tcolorbox may be a very good choice.

bertibott wrote:"Save the file fancybox.sty in a directory, which is part of your
local TeX tree. Then do not forget to run texhash to update this tree."
And I have no idea what any of this means.


That's only needed if you do would bout use a package manager for installing. Do you use TeX Live or MiKTeX?

bertibott wrote:Another thing I would like to do is use a different font for my new environment.


I suggest, at first definitely decide which package you would like to use. Then create a box layout with it. Finally you could add something for the font. If I would post something for a different font in some new environment, that would need to be adapted to the box environment anyway.

Stefan
Site admin

bertibott
Posts: 14
Joined: Wed Dec 12, 2018 3:32 pm

Postby bertibott » Mon Mar 04, 2019 3:41 pm

Following up on this project.
I have solved my issues concerning my texlive install... and the font... And have finally managed to create a tcolobox that I like...

It is half the width of the rest of the text. But if I just insert it into my document the space next to the box will remain empty. How do I get the text to flow around the box? And how do I get it so the box will always be on the outisde (at some point in the far away future I might print this thing).


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 1 guest