Creating a nice-looking box without using minipage
Clash Royale CLAN TAG#URR8PPP
up vote
7
down vote
favorite
I would like to create the following box and title without using minipage
With :
- small box before Title
- Title with counter
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm,fancybox
usepackageenumitem
newtheoremtestTest
usepackage[margin=1cm]geometry
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
shadowbox
beginminipage[c]7in
subsubsectionMéthode1.3-Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endminipage
enddocument
Here is another attempt :
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[svgnames]xcolor
usepackage[most]tcolorbox
usetikzlibraryshadows
usepackagepifont
newcounterexa
tcbset
myexample/.style=
enhanced,
colback=white,
colframe=black,
fonttitle=bfseries,
breakable,
drop shadow=black,opacity=1,
sharp corners,
titlerule=0pt,
title=refstepcounterexading111 Methode~theexa.,
title style=fill=white,
coltitle=black,
drop shadow,
highlight math style=reset,colback=white,colframe=black
newtcolorboxEducBoxmyexample
begindocument
beginEducBox
centering
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endEducBox
enddocument
which produces :
tikz-pgf boxes counters tcolorbox newtheorem
add a comment |Â
up vote
7
down vote
favorite
I would like to create the following box and title without using minipage
With :
- small box before Title
- Title with counter
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm,fancybox
usepackageenumitem
newtheoremtestTest
usepackage[margin=1cm]geometry
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
shadowbox
beginminipage[c]7in
subsubsectionMéthode1.3-Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endminipage
enddocument
Here is another attempt :
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[svgnames]xcolor
usepackage[most]tcolorbox
usetikzlibraryshadows
usepackagepifont
newcounterexa
tcbset
myexample/.style=
enhanced,
colback=white,
colframe=black,
fonttitle=bfseries,
breakable,
drop shadow=black,opacity=1,
sharp corners,
titlerule=0pt,
title=refstepcounterexading111 Methode~theexa.,
title style=fill=white,
coltitle=black,
drop shadow,
highlight math style=reset,colback=white,colframe=black
newtcolorboxEducBoxmyexample
begindocument
beginEducBox
centering
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endEducBox
enddocument
which produces :
tikz-pgf boxes counters tcolorbox newtheorem
Have you tried using a package liketcolorbox
?
â TeXnician
Aug 10 at 8:40
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
1
Why do you want to avoidminipage
? What is the underlying goal?
â Paà Âlo Ebermann
Aug 10 at 22:25
add a comment |Â
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I would like to create the following box and title without using minipage
With :
- small box before Title
- Title with counter
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm,fancybox
usepackageenumitem
newtheoremtestTest
usepackage[margin=1cm]geometry
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
shadowbox
beginminipage[c]7in
subsubsectionMéthode1.3-Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endminipage
enddocument
Here is another attempt :
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[svgnames]xcolor
usepackage[most]tcolorbox
usetikzlibraryshadows
usepackagepifont
newcounterexa
tcbset
myexample/.style=
enhanced,
colback=white,
colframe=black,
fonttitle=bfseries,
breakable,
drop shadow=black,opacity=1,
sharp corners,
titlerule=0pt,
title=refstepcounterexading111 Methode~theexa.,
title style=fill=white,
coltitle=black,
drop shadow,
highlight math style=reset,colback=white,colframe=black
newtcolorboxEducBoxmyexample
begindocument
beginEducBox
centering
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endEducBox
enddocument
which produces :
tikz-pgf boxes counters tcolorbox newtheorem
I would like to create the following box and title without using minipage
With :
- small box before Title
- Title with counter
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm,fancybox
usepackageenumitem
newtheoremtestTest
usepackage[margin=1cm]geometry
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
shadowbox
beginminipage[c]7in
subsubsectionMéthode1.3-Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endminipage
enddocument
Here is another attempt :
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[svgnames]xcolor
usepackage[most]tcolorbox
usetikzlibraryshadows
usepackagepifont
newcounterexa
tcbset
myexample/.style=
enhanced,
colback=white,
colframe=black,
fonttitle=bfseries,
breakable,
drop shadow=black,opacity=1,
sharp corners,
titlerule=0pt,
title=refstepcounterexading111 Methode~theexa.,
title style=fill=white,
coltitle=black,
drop shadow,
highlight math style=reset,colback=white,colframe=black
newtcolorboxEducBoxmyexample
begindocument
beginEducBox
centering
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endEducBox
enddocument
which produces :
tikz-pgf boxes counters tcolorbox newtheorem
edited Aug 10 at 9:49
asked Aug 10 at 8:37
Educ
1,80441640
1,80441640
Have you tried using a package liketcolorbox
?
â TeXnician
Aug 10 at 8:40
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
1
Why do you want to avoidminipage
? What is the underlying goal?
â Paà Âlo Ebermann
Aug 10 at 22:25
add a comment |Â
Have you tried using a package liketcolorbox
?
â TeXnician
Aug 10 at 8:40
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
1
Why do you want to avoidminipage
? What is the underlying goal?
â Paà Âlo Ebermann
Aug 10 at 22:25
Have you tried using a package like
tcolorbox
?â TeXnician
Aug 10 at 8:40
Have you tried using a package like
tcolorbox
?â TeXnician
Aug 10 at 8:40
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
1
1
Why do you want to avoid
minipage
? What is the underlying goal?â Paà Âlo Ebermann
Aug 10 at 22:25
Why do you want to avoid
minipage
? What is the underlying goal?â Paà Âlo Ebermann
Aug 10 at 22:25
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
8
down vote
accepted
With tcolorbox
and its tcbtheorems
is not too difficult.
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm
usepackage[margin=1cm]geometry
usepackage[most]tcolorbox
usepackagelmodern
usepackagebbding
tcbset
methstyle/.style=
enhanced,
theorem style=plain,
sharp corners,
colframe=black,
colback=white,
coltitle=black,
fonttitle=bfseriesupshape,
drop shadow=black,opacity=1,
separator sign dash,
before title=SquareShadowBottomRight ,
newtcbtheorem[number within=section]MethodeMéthodemethstyleMet
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
sectionMethodes
beginMethodeA new méthodeanm
Soit $G$ un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endMethode
enddocument
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
@Edut I've found something similar inbbding
. If you don't like, try to find something else inThe Comprehensive LaTeX Symbol List
list
â Ignasi
Aug 10 at 10:41
 |Â
show 3 more comments
up vote
6
down vote
Here's a starter with tcolorbox. I do not have your section and subsection styles, so this is with default styles. Please note that the tcolorbox manual is no quick read, it requires some patience.
In the code example the box is drawn with optional arguments, but feel free to use newtcolorbox
instead if your original aim was to shorten the code.
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[most]tcolorbox
begindocument
begintcolorbox[enhanced, sharp corners, colback=white, colframe=black, drop shadow=black,opacity=1]
subsubsectionMéthode1.3
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endtcolorbox
enddocument
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also addopacity=1
to thedrop shadow
option to get a bit closer to the OP's demand :)
â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
add a comment |Â
up vote
6
down vote
Quick and dirty implementation of your box without any packages:
documentclassarticle
usepackageduckuments
newsaveboxcustomboxbox
newlengthcustomboxOuterWidth
newlengthcustomboxOuterHeight
newlengthcustomboxOuterDepth
newlengthcustomboxInnerWidth
newlengthcustomboxRuleWidth
newlengthcustomboxShadowHeight
newlengthcustomboxShadowDepth
newlengthcustomboxShadowWidth
newlengthcustomboxInnerSep
customboxInnerSep3fboxsep
customboxRuleWidth.6pt
customboxShadowWidth4pt
newenvironmentcustombox[1][linewidth]
%
noindent
customboxOuterWidth#1
advancecustomboxOuterWidth-customboxShadowWidth
customboxInnerWidth#1
advancecustomboxInnerWidth-2customboxRuleWidth
advancecustomboxInnerWidth-2customboxInnerSep
advancecustomboxInnerWidth-customboxShadowWidth
setboxcustomboxboxvboxbgroup
hsizecustomboxInnerWidth
linewidthhsize
noindent
ignorespaces
%
ifhmodeunskipfi
egroup
customboxOuterHeighthtcustomboxbox
advancecustomboxOuterHeightcustomboxInnerSep
customboxOuterDepthdpcustomboxbox
advancecustomboxOuterDepthcustomboxInnerSep
customboxShadowHeightcustomboxOuterHeight
advancecustomboxShadowHeight-customboxShadowWidth
customboxShadowDepthcustomboxOuterDepth
advancecustomboxShadowDepthcustomboxShadowWidth
raiseboxcustomboxOuterHeight
rlapvrule height customboxRuleWidth width customboxOuterWidth%
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
rlap
%
hskipcustomboxInnerSepuseboxcustomboxbox
hskipcustomboxInnerSep
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
vrule height customboxShadowHeight
depth customboxShadowDepth
width customboxShadowWidth
%
raisebox-customboxOuterDepth
%
rlap
%
vrule height customboxRuleWidth
depth 0pt
width customboxOuterWidth
%
hskipcustomboxShadowWidth
advancecustomboxOuterWidth-customboxRuleWidth
vrule height customboxRuleWidth
depth customboxShadowWidth
width customboxOuterWidth
%
begindocument
begincustombox
blindduck
endcustombox
enddocument
The environment takes an optional argument which specifies the used total width. Content width is calculated based on total width, customboxInnerSep
, customboxRuleWidth
and customboxShadowWidth
.
It doesn't add any outer spacing.
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
With tcolorbox
and its tcbtheorems
is not too difficult.
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm
usepackage[margin=1cm]geometry
usepackage[most]tcolorbox
usepackagelmodern
usepackagebbding
tcbset
methstyle/.style=
enhanced,
theorem style=plain,
sharp corners,
colframe=black,
colback=white,
coltitle=black,
fonttitle=bfseriesupshape,
drop shadow=black,opacity=1,
separator sign dash,
before title=SquareShadowBottomRight ,
newtcbtheorem[number within=section]MethodeMéthodemethstyleMet
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
sectionMethodes
beginMethodeA new méthodeanm
Soit $G$ un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endMethode
enddocument
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
@Edut I've found something similar inbbding
. If you don't like, try to find something else inThe Comprehensive LaTeX Symbol List
list
â Ignasi
Aug 10 at 10:41
 |Â
show 3 more comments
up vote
8
down vote
accepted
With tcolorbox
and its tcbtheorems
is not too difficult.
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm
usepackage[margin=1cm]geometry
usepackage[most]tcolorbox
usepackagelmodern
usepackagebbding
tcbset
methstyle/.style=
enhanced,
theorem style=plain,
sharp corners,
colframe=black,
colback=white,
coltitle=black,
fonttitle=bfseriesupshape,
drop shadow=black,opacity=1,
separator sign dash,
before title=SquareShadowBottomRight ,
newtcbtheorem[number within=section]MethodeMéthodemethstyleMet
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
sectionMethodes
beginMethodeA new méthodeanm
Soit $G$ un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endMethode
enddocument
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
@Edut I've found something similar inbbding
. If you don't like, try to find something else inThe Comprehensive LaTeX Symbol List
list
â Ignasi
Aug 10 at 10:41
 |Â
show 3 more comments
up vote
8
down vote
accepted
up vote
8
down vote
accepted
With tcolorbox
and its tcbtheorems
is not too difficult.
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm
usepackage[margin=1cm]geometry
usepackage[most]tcolorbox
usepackagelmodern
usepackagebbding
tcbset
methstyle/.style=
enhanced,
theorem style=plain,
sharp corners,
colframe=black,
colback=white,
coltitle=black,
fonttitle=bfseriesupshape,
drop shadow=black,opacity=1,
separator sign dash,
before title=SquareShadowBottomRight ,
newtcbtheorem[number within=section]MethodeMéthodemethstyleMet
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
sectionMethodes
beginMethodeA new méthodeanm
Soit $G$ un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endMethode
enddocument
With tcolorbox
and its tcbtheorems
is not too difficult.
documentclassarticle
usepackage[T1]fontenc
usepackage[utf8]inputenc
usepackageamsmath,amssymb,amsthm
usepackage[margin=1cm]geometry
usepackage[most]tcolorbox
usepackagelmodern
usepackagebbding
tcbset
methstyle/.style=
enhanced,
theorem style=plain,
sharp corners,
colframe=black,
colback=white,
coltitle=black,
fonttitle=bfseriesupshape,
drop shadow=black,opacity=1,
separator sign dash,
before title=SquareShadowBottomRight ,
newtcbtheorem[number within=section]MethodeMéthodemethstyleMet
begindocument
Comment rechercher l'ordre d'un élément d'un groupe
sectionMethodes
beginMethodeA new méthodeanm
Soit $G$ un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endMethode
enddocument
edited Aug 10 at 10:38
answered Aug 10 at 9:53
Ignasi
86.6k4153287
86.6k4153287
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
@Edut I've found something similar inbbding
. If you don't like, try to find something else inThe Comprehensive LaTeX Symbol List
list
â Ignasi
Aug 10 at 10:41
 |Â
show 3 more comments
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
@Edut I've found something similar inbbding
. If you don't like, try to find something else inThe Comprehensive LaTeX Symbol List
list
â Ignasi
Aug 10 at 10:41
1
1
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Just to forward the comment @BambOo has made on my tcolorbox post: "You can also add opacity=1 to the drop shadow option to get a bit closer to the OP's demand :)". But great answer, +1.
â TeXnician
Aug 10 at 10:03
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
Yes, I agree with @TeXnician for opacity thing. +1 very nice work Thank you
â Educ
Aug 10 at 10:07
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
@TeXnician Done. Thank you for pointing it.
â Ignasi
Aug 10 at 10:19
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
could you replace the quare with a square with shadows like the picture That I post I try 'shadowbox' but with no luck I used pifont pakcage too but with no sucess
â Educ
Aug 10 at 10:21
1
1
@Edut I've found something similar in
bbding
. If you don't like, try to find something else in The Comprehensive LaTeX Symbol List
listâ Ignasi
Aug 10 at 10:41
@Edut I've found something similar in
bbding
. If you don't like, try to find something else in The Comprehensive LaTeX Symbol List
listâ Ignasi
Aug 10 at 10:41
 |Â
show 3 more comments
up vote
6
down vote
Here's a starter with tcolorbox. I do not have your section and subsection styles, so this is with default styles. Please note that the tcolorbox manual is no quick read, it requires some patience.
In the code example the box is drawn with optional arguments, but feel free to use newtcolorbox
instead if your original aim was to shorten the code.
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[most]tcolorbox
begindocument
begintcolorbox[enhanced, sharp corners, colback=white, colframe=black, drop shadow=black,opacity=1]
subsubsectionMéthode1.3
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endtcolorbox
enddocument
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also addopacity=1
to thedrop shadow
option to get a bit closer to the OP's demand :)
â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
add a comment |Â
up vote
6
down vote
Here's a starter with tcolorbox. I do not have your section and subsection styles, so this is with default styles. Please note that the tcolorbox manual is no quick read, it requires some patience.
In the code example the box is drawn with optional arguments, but feel free to use newtcolorbox
instead if your original aim was to shorten the code.
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[most]tcolorbox
begindocument
begintcolorbox[enhanced, sharp corners, colback=white, colframe=black, drop shadow=black,opacity=1]
subsubsectionMéthode1.3
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endtcolorbox
enddocument
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also addopacity=1
to thedrop shadow
option to get a bit closer to the OP's demand :)
â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
add a comment |Â
up vote
6
down vote
up vote
6
down vote
Here's a starter with tcolorbox. I do not have your section and subsection styles, so this is with default styles. Please note that the tcolorbox manual is no quick read, it requires some patience.
In the code example the box is drawn with optional arguments, but feel free to use newtcolorbox
instead if your original aim was to shorten the code.
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[most]tcolorbox
begindocument
begintcolorbox[enhanced, sharp corners, colback=white, colframe=black, drop shadow=black,opacity=1]
subsubsectionMéthode1.3
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endtcolorbox
enddocument
Here's a starter with tcolorbox. I do not have your section and subsection styles, so this is with default styles. Please note that the tcolorbox manual is no quick read, it requires some patience.
In the code example the box is drawn with optional arguments, but feel free to use newtcolorbox
instead if your original aim was to shorten the code.
documentclassarticle
usepackageamsmath,amssymb,amsthm
usepackage[most]tcolorbox
begindocument
begintcolorbox[enhanced, sharp corners, colback=white, colframe=black, drop shadow=black,opacity=1]
subsubsectionMéthode1.3
Soit G un groupe, noté multiplicativement, et soit $ain G$. Pour déterminer l'ordre de l'élément $a$, on peut:
beginitemize
item Calculer les puissances successives de l'élément $a$ jusqu'àl'obtention de l'élément neutre.
item Trouver une propriété qui montre qu'aucune puissance de $a$ ne peut être le neutre.
enditemize
endtcolorbox
enddocument
edited Aug 10 at 9:01
answered Aug 10 at 8:54
TeXnician
20.2k52880
20.2k52880
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also addopacity=1
to thedrop shadow
option to get a bit closer to the OP's demand :)
â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
add a comment |Â
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also addopacity=1
to thedrop shadow
option to get a bit closer to the OP's demand :)
â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Thank you but where is small box before title 'Methode'
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
Where is also counter ?
â Educ
Aug 10 at 8:55
@Texnician, you can also add
opacity=1
to the drop shadow
option to get a bit closer to the OP's demand :)â BambOo
Aug 10 at 9:00
@Texnician, you can also add
opacity=1
to the drop shadow
option to get a bit closer to the OP's demand :)â BambOo
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@Educ You do not provide your sectioning style (you're using a styled subsubsection for the picture as it seems), so I don't attempt to replicate it. As you are using a different setup to create the picture in your question than your MWE produces, I only try to give you a starter on the box you've asked for.
â TeXnician
Aug 10 at 9:00
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
@BambOo Thanks, totally forgot that.
â TeXnician
Aug 10 at 9:01
add a comment |Â
up vote
6
down vote
Quick and dirty implementation of your box without any packages:
documentclassarticle
usepackageduckuments
newsaveboxcustomboxbox
newlengthcustomboxOuterWidth
newlengthcustomboxOuterHeight
newlengthcustomboxOuterDepth
newlengthcustomboxInnerWidth
newlengthcustomboxRuleWidth
newlengthcustomboxShadowHeight
newlengthcustomboxShadowDepth
newlengthcustomboxShadowWidth
newlengthcustomboxInnerSep
customboxInnerSep3fboxsep
customboxRuleWidth.6pt
customboxShadowWidth4pt
newenvironmentcustombox[1][linewidth]
%
noindent
customboxOuterWidth#1
advancecustomboxOuterWidth-customboxShadowWidth
customboxInnerWidth#1
advancecustomboxInnerWidth-2customboxRuleWidth
advancecustomboxInnerWidth-2customboxInnerSep
advancecustomboxInnerWidth-customboxShadowWidth
setboxcustomboxboxvboxbgroup
hsizecustomboxInnerWidth
linewidthhsize
noindent
ignorespaces
%
ifhmodeunskipfi
egroup
customboxOuterHeighthtcustomboxbox
advancecustomboxOuterHeightcustomboxInnerSep
customboxOuterDepthdpcustomboxbox
advancecustomboxOuterDepthcustomboxInnerSep
customboxShadowHeightcustomboxOuterHeight
advancecustomboxShadowHeight-customboxShadowWidth
customboxShadowDepthcustomboxOuterDepth
advancecustomboxShadowDepthcustomboxShadowWidth
raiseboxcustomboxOuterHeight
rlapvrule height customboxRuleWidth width customboxOuterWidth%
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
rlap
%
hskipcustomboxInnerSepuseboxcustomboxbox
hskipcustomboxInnerSep
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
vrule height customboxShadowHeight
depth customboxShadowDepth
width customboxShadowWidth
%
raisebox-customboxOuterDepth
%
rlap
%
vrule height customboxRuleWidth
depth 0pt
width customboxOuterWidth
%
hskipcustomboxShadowWidth
advancecustomboxOuterWidth-customboxRuleWidth
vrule height customboxRuleWidth
depth customboxShadowWidth
width customboxOuterWidth
%
begindocument
begincustombox
blindduck
endcustombox
enddocument
The environment takes an optional argument which specifies the used total width. Content width is calculated based on total width, customboxInnerSep
, customboxRuleWidth
and customboxShadowWidth
.
It doesn't add any outer spacing.
add a comment |Â
up vote
6
down vote
Quick and dirty implementation of your box without any packages:
documentclassarticle
usepackageduckuments
newsaveboxcustomboxbox
newlengthcustomboxOuterWidth
newlengthcustomboxOuterHeight
newlengthcustomboxOuterDepth
newlengthcustomboxInnerWidth
newlengthcustomboxRuleWidth
newlengthcustomboxShadowHeight
newlengthcustomboxShadowDepth
newlengthcustomboxShadowWidth
newlengthcustomboxInnerSep
customboxInnerSep3fboxsep
customboxRuleWidth.6pt
customboxShadowWidth4pt
newenvironmentcustombox[1][linewidth]
%
noindent
customboxOuterWidth#1
advancecustomboxOuterWidth-customboxShadowWidth
customboxInnerWidth#1
advancecustomboxInnerWidth-2customboxRuleWidth
advancecustomboxInnerWidth-2customboxInnerSep
advancecustomboxInnerWidth-customboxShadowWidth
setboxcustomboxboxvboxbgroup
hsizecustomboxInnerWidth
linewidthhsize
noindent
ignorespaces
%
ifhmodeunskipfi
egroup
customboxOuterHeighthtcustomboxbox
advancecustomboxOuterHeightcustomboxInnerSep
customboxOuterDepthdpcustomboxbox
advancecustomboxOuterDepthcustomboxInnerSep
customboxShadowHeightcustomboxOuterHeight
advancecustomboxShadowHeight-customboxShadowWidth
customboxShadowDepthcustomboxOuterDepth
advancecustomboxShadowDepthcustomboxShadowWidth
raiseboxcustomboxOuterHeight
rlapvrule height customboxRuleWidth width customboxOuterWidth%
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
rlap
%
hskipcustomboxInnerSepuseboxcustomboxbox
hskipcustomboxInnerSep
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
vrule height customboxShadowHeight
depth customboxShadowDepth
width customboxShadowWidth
%
raisebox-customboxOuterDepth
%
rlap
%
vrule height customboxRuleWidth
depth 0pt
width customboxOuterWidth
%
hskipcustomboxShadowWidth
advancecustomboxOuterWidth-customboxRuleWidth
vrule height customboxRuleWidth
depth customboxShadowWidth
width customboxOuterWidth
%
begindocument
begincustombox
blindduck
endcustombox
enddocument
The environment takes an optional argument which specifies the used total width. Content width is calculated based on total width, customboxInnerSep
, customboxRuleWidth
and customboxShadowWidth
.
It doesn't add any outer spacing.
add a comment |Â
up vote
6
down vote
up vote
6
down vote
Quick and dirty implementation of your box without any packages:
documentclassarticle
usepackageduckuments
newsaveboxcustomboxbox
newlengthcustomboxOuterWidth
newlengthcustomboxOuterHeight
newlengthcustomboxOuterDepth
newlengthcustomboxInnerWidth
newlengthcustomboxRuleWidth
newlengthcustomboxShadowHeight
newlengthcustomboxShadowDepth
newlengthcustomboxShadowWidth
newlengthcustomboxInnerSep
customboxInnerSep3fboxsep
customboxRuleWidth.6pt
customboxShadowWidth4pt
newenvironmentcustombox[1][linewidth]
%
noindent
customboxOuterWidth#1
advancecustomboxOuterWidth-customboxShadowWidth
customboxInnerWidth#1
advancecustomboxInnerWidth-2customboxRuleWidth
advancecustomboxInnerWidth-2customboxInnerSep
advancecustomboxInnerWidth-customboxShadowWidth
setboxcustomboxboxvboxbgroup
hsizecustomboxInnerWidth
linewidthhsize
noindent
ignorespaces
%
ifhmodeunskipfi
egroup
customboxOuterHeighthtcustomboxbox
advancecustomboxOuterHeightcustomboxInnerSep
customboxOuterDepthdpcustomboxbox
advancecustomboxOuterDepthcustomboxInnerSep
customboxShadowHeightcustomboxOuterHeight
advancecustomboxShadowHeight-customboxShadowWidth
customboxShadowDepthcustomboxOuterDepth
advancecustomboxShadowDepthcustomboxShadowWidth
raiseboxcustomboxOuterHeight
rlapvrule height customboxRuleWidth width customboxOuterWidth%
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
rlap
%
hskipcustomboxInnerSepuseboxcustomboxbox
hskipcustomboxInnerSep
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
vrule height customboxShadowHeight
depth customboxShadowDepth
width customboxShadowWidth
%
raisebox-customboxOuterDepth
%
rlap
%
vrule height customboxRuleWidth
depth 0pt
width customboxOuterWidth
%
hskipcustomboxShadowWidth
advancecustomboxOuterWidth-customboxRuleWidth
vrule height customboxRuleWidth
depth customboxShadowWidth
width customboxOuterWidth
%
begindocument
begincustombox
blindduck
endcustombox
enddocument
The environment takes an optional argument which specifies the used total width. Content width is calculated based on total width, customboxInnerSep
, customboxRuleWidth
and customboxShadowWidth
.
It doesn't add any outer spacing.
Quick and dirty implementation of your box without any packages:
documentclassarticle
usepackageduckuments
newsaveboxcustomboxbox
newlengthcustomboxOuterWidth
newlengthcustomboxOuterHeight
newlengthcustomboxOuterDepth
newlengthcustomboxInnerWidth
newlengthcustomboxRuleWidth
newlengthcustomboxShadowHeight
newlengthcustomboxShadowDepth
newlengthcustomboxShadowWidth
newlengthcustomboxInnerSep
customboxInnerSep3fboxsep
customboxRuleWidth.6pt
customboxShadowWidth4pt
newenvironmentcustombox[1][linewidth]
%
noindent
customboxOuterWidth#1
advancecustomboxOuterWidth-customboxShadowWidth
customboxInnerWidth#1
advancecustomboxInnerWidth-2customboxRuleWidth
advancecustomboxInnerWidth-2customboxInnerSep
advancecustomboxInnerWidth-customboxShadowWidth
setboxcustomboxboxvboxbgroup
hsizecustomboxInnerWidth
linewidthhsize
noindent
ignorespaces
%
ifhmodeunskipfi
egroup
customboxOuterHeighthtcustomboxbox
advancecustomboxOuterHeightcustomboxInnerSep
customboxOuterDepthdpcustomboxbox
advancecustomboxOuterDepthcustomboxInnerSep
customboxShadowHeightcustomboxOuterHeight
advancecustomboxShadowHeight-customboxShadowWidth
customboxShadowDepthcustomboxOuterDepth
advancecustomboxShadowDepthcustomboxShadowWidth
raiseboxcustomboxOuterHeight
rlapvrule height customboxRuleWidth width customboxOuterWidth%
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
rlap
%
hskipcustomboxInnerSepuseboxcustomboxbox
hskipcustomboxInnerSep
vrule height customboxOuterHeight
depth customboxOuterDepth
width customboxRuleWidth
vrule height customboxShadowHeight
depth customboxShadowDepth
width customboxShadowWidth
%
raisebox-customboxOuterDepth
%
rlap
%
vrule height customboxRuleWidth
depth 0pt
width customboxOuterWidth
%
hskipcustomboxShadowWidth
advancecustomboxOuterWidth-customboxRuleWidth
vrule height customboxRuleWidth
depth customboxShadowWidth
width customboxOuterWidth
%
begindocument
begincustombox
blindduck
endcustombox
enddocument
The environment takes an optional argument which specifies the used total width. Content width is calculated based on total width, customboxInnerSep
, customboxRuleWidth
and customboxShadowWidth
.
It doesn't add any outer spacing.
edited Aug 10 at 11:15
answered Aug 10 at 9:14
Skillmon
17.2k11534
17.2k11534
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f445449%2fcreating-a-nice-looking-box-without-using-minipage%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Have you tried using a package like
tcolorbox
?â TeXnician
Aug 10 at 8:40
@TeXnician I read quickly this link mirror.hmc.edu/ctan/macros/latex/contrib/tcolorbox/⦠but I didn't find a box like what I want
â Educ
Aug 10 at 8:43
1
Why do you want to avoid
minipage
? What is the underlying goal?â Paà Âlo Ebermann
Aug 10 at 22:25