How to make boxes like these?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
2












I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks:



LinguisticAssistantfrance
EntityFrancecountry


enter image description hereenter image description here



I've done the work of finding the colors, and defined them in my code. The fonts are as follows:
- LinguisticAssistant: (the first box with the orange equals sign) uses Ariel
- Entity: this uses bold and then smaller all-caps Helvitica.



This what I have so far:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
psframebox[fillcolor=lightyellow]textcolortextdarkFrance textcolorcountrygrayCOUNTRY
hspace1cm
pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
psframebox[fillcolor=white]textcolorblackfrance
endpspicture
enddocument​


enter image description here



But I still don't know how to:



  • make the little equal sign

  • scale/format the text to look just like the images

I'm looking at the package tcolorbox now, not sure if it is easier or better than pstricks.



Update:



I made the equal sign icon as a little pdf.










share|improve this question























  • Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
    – A.Ellett
    2 hours ago










  • tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
    – TeXnician
    2 hours ago














up vote
3
down vote

favorite
2












I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks:



LinguisticAssistantfrance
EntityFrancecountry


enter image description hereenter image description here



I've done the work of finding the colors, and defined them in my code. The fonts are as follows:
- LinguisticAssistant: (the first box with the orange equals sign) uses Ariel
- Entity: this uses bold and then smaller all-caps Helvitica.



This what I have so far:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
psframebox[fillcolor=lightyellow]textcolortextdarkFrance textcolorcountrygrayCOUNTRY
hspace1cm
pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
psframebox[fillcolor=white]textcolorblackfrance
endpspicture
enddocument​


enter image description here



But I still don't know how to:



  • make the little equal sign

  • scale/format the text to look just like the images

I'm looking at the package tcolorbox now, not sure if it is easier or better than pstricks.



Update:



I made the equal sign icon as a little pdf.










share|improve this question























  • Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
    – A.Ellett
    2 hours ago










  • tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
    – TeXnician
    2 hours ago












up vote
3
down vote

favorite
2









up vote
3
down vote

favorite
2






2





I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks:



LinguisticAssistantfrance
EntityFrancecountry


enter image description hereenter image description here



I've done the work of finding the colors, and defined them in my code. The fonts are as follows:
- LinguisticAssistant: (the first box with the orange equals sign) uses Ariel
- Entity: this uses bold and then smaller all-caps Helvitica.



This what I have so far:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
psframebox[fillcolor=lightyellow]textcolortextdarkFrance textcolorcountrygrayCOUNTRY
hspace1cm
pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
psframebox[fillcolor=white]textcolorblackfrance
endpspicture
enddocument​


enter image description here



But I still don't know how to:



  • make the little equal sign

  • scale/format the text to look just like the images

I'm looking at the package tcolorbox now, not sure if it is easier or better than pstricks.



Update:



I made the equal sign icon as a little pdf.










share|improve this question















I'd like to have custom commands for making boxes that look like the Wolfram|Alpha entities in Mathematica notebooks:



LinguisticAssistantfrance
EntityFrancecountry


enter image description hereenter image description here



I've done the work of finding the colors, and defined them in my code. The fonts are as follows:
- LinguisticAssistant: (the first box with the orange equals sign) uses Ariel
- Entity: this uses bold and then smaller all-caps Helvitica.



This what I have so far:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
psframebox[fillcolor=lightyellow]textcolortextdarkFrance textcolorcountrygrayCOUNTRY
hspace1cm
pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
psframebox[fillcolor=white]textcolorblackfrance
endpspicture
enddocument​


enter image description here



But I still don't know how to:



  • make the little equal sign

  • scale/format the text to look just like the images

I'm looking at the package tcolorbox now, not sure if it is easier or better than pstricks.



Update:



I made the equal sign icon as a little pdf.







formatting boxes tcolorbox tikz-styles






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 43 mins ago

























asked 2 hours ago









M.R.

1436




1436











  • Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
    – A.Ellett
    2 hours ago










  • tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
    – TeXnician
    2 hours ago
















  • Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
    – A.Ellett
    2 hours ago










  • tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
    – TeXnician
    2 hours ago















Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
– A.Ellett
2 hours ago




Show us what you've already tried. We're happy to help you if you're not fully able to implement what you want. We're here to help you, but not to do your work for you.
– A.Ellett
2 hours ago












tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
– TeXnician
2 hours ago




tcolorbox is definitely a good option. The manual details which keys are needed, so please post a minimal compilable code example of where you are stuck.
– TeXnician
2 hours ago










2 Answers
2






active

oldest

votes

















up vote
3
down vote













It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how you can do this from TikZ



This answer is broken into five parts:



  • How to draw the France COUNTRY box. This is the most straight-forward.

  • How to draw the Equal france box. I use a few more subtle tricks here.

  • Customizing your own colors using RGB specifications.

  • Using your own image file to create an Equal france box like result

  • Implementing this with macros

Box for "France COUNTRY"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc

newcommandmakegray[1]colorgray#1
begindocument

begintikzpicture

node[rounded corners,
draw=orange,
fill=orange!25,text=black,font=sffamily]
France makegrayCOUNTRY;

endtikzpicture

enddocument


Box for "Equal france"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
begintikzpicture[x=(4pt,0),
y=(0,4pt)]
fill[orange] (0,0) rectangle (5,3);
draw[white,line width=2pt] (1,1) -- ++ (3,0);
draw[white,line width=2pt] (1,2) -- ++ (3,0);
endtikzpicture
endlrbox

begindocument

begintikzpicture

node[inner sep=0pt] (AEEQUAL) useboxaeequalsign;
node[anchor=west,
font=sffamilybfseries] (FRANCE) at (AEEQUAL.east) france;
node[fit=(AEEQUAL) (FRANCE),inner ysep=5pt,inner xsep=0pt] (COMBINED) ;
draw[rounded corners=4pt]
(AEEQUAL.north) |- (COMBINED.north east)
-- (COMBINED.south east) -| (AEEQUAL.south);

endtikzpicture

enddocument


Colors:



If you don't like my colors, you can define your own, much like you did with pstricks using the definecolor macro provided with xcolor (which is automatically loaded with TikZ).



definecolor<color name>rgb<decimal>,<decimal>,<decimal>
definecolor<color name>RGB<int>,<int>,<int>


Here is an implementation for this in TikZ:



tikzsetdefine color/.code 2 args=definecolor#1RGB#2


Then you can write



begintikzpicture
[
define color=borderorange253,129,36,
define color=lightyellow255,250,236,
]

node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
France makegrayCOUNTRY;

endtikzpicture


Including image files:



If you have an image file you would already like to include, that's straight-forward.



enter image description here



Just repurpose the code above for the equal sign as follows:



newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[width=2em]image/no_you_cant
endlrbox


Macros for in-text implementation



enter image description here



This was executed using



documentclassarticle
usepackagelipsum

usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[height=3ex]image/no_you_cant
endlrbox

tikzsetdefine color/.code 2 args=definecolor#1RGB#2
tikzsetdefine color=borderorange253,129,36,
define color=lightyellow255,250,236,


newcommandEntity[2]%%
begintikzpicture
node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
#1 makegray#2;
endtikzpicture

newcommandLinguisticAssistant[1]- (COMBINED.north east)
-- (COMBINED.south east) -


begindocument

LinguisticAssistantARMA Entityvirumquecano, Troiae qui primus ab oris
Italiam, fato profugus, Laviniaque venit
litora, multum ille et terris iactatus et alto
vi superum saevae memorem Iunonis ob iram;
multa quoque et bello passus, dum conderet urbem,
inferretque deos Latio, genus unde Latinum,
Albanique patres, atque altae moenia Romae.

LinguisticAssistantMusa, Entitymihicausas memora, quo numine laeso,
quidve dolens, regina deum tot volvere casus
insignem pietate virum, tot adire labores
impulerit. Tantaene animis caelestibus irae?

LinguisticAssistantUrbs Entityantiquafuit, Tyrii tenuere coloni,
Karthago, Italiam contra Tiberinaque longe
ostia, dives opum studiisque asperrima belli;
quam Iuno fertur terris magis omnibus unam
posthabita coluisse Samo; hic illius arma,
hic currus fuit; hoc regnum dea gentibus esse,
si qua fata sinant, iam tum tenditque fovetque.
Progeniem sed enim Troiano a sanguine duci
audierat, Tyrias olim quae verteret arces;
hinc populum late regem belloque superbum
venturum excidio Libyae: sic volvere Parcas.
Id metuens, veterisque memor Saturnia belli,
prima quod ad Troiam pro caris gesserat Argis---
necdum etiam causae irarum saevique dolores
exciderant animo: manet alta mente repostum
iudicium Paridis spretaeque iniuria formae,
et genus invisum, et rapti Ganymedis honores.
His accensa super, iactatos aequore toto
Troas, reliquias Danaum atque immitis Achilli,
arcebat longe Latio, multosque per annos
errabant, acti fatis, maria omnia circum.
Tantae molis erat Romanam condere gentem!

enddocument





share|improve this answer






















  • Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
    – M.R.
    1 hour ago










  • @M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
    – Werner
    1 hour ago










  • No but I added the equals icon in a link - if you can try adding that?
    – M.R.
    42 mins ago










  • @M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
    – A.Ellett
    32 mins ago


















up vote
2
down vote













A solution using pstricks:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantomxfrance
rput[l](0,1)psframebox[fillcolor=orange,framesep=2pt]tinytextcolorwhite=
endpspicture
enddocument


enter image description here



The positioning is done using rput with coordinates, which allows to place a box with an = on top of the box with france. This text has been shifted a bit to the right using a phantom letter (which is not printed but the space it would occupy if it was 'real' is taken into account). The box with the = sign has a bit smaller margin (2pt) to look more like the original picture. The font is sans serif, using textsf (in combination with boldface textbf for the second France). The text COUNTRY is made smaller with footnotesize to simulate small caps.



However, this kind of drawing may be easier with TikZ, see also the other answer.




UPDATE using Helvetica (usepackagehelvet) and some tweaks to the equal sign (box more square using smaller framesep and a vertical phantom |, rounded corners, equal sign slightly raised, bit less space before 'france' with phantom.).



enter image description here



With an image instead of the equals sign:



enter image description here



Note that the pdf of the image should be converted to eps for use with latex-dvips-ps2pdf, when using xelatex (or lualatex) this is not necessary.



documentclassarticle
usepackagepstricks
usepackagexcolor
usepackagehelvet
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantom.france
pssetframearc=.5
rput[l](0,1)psframebox[fillcolor=orange,framesep=1pt]vphantomtinytextcolorwhiteraisebox1.2pt=
% alternatively, include an image here
% rput[l](0,1)includegraphics[width=3mm]small-equals-icon.eps
endpspicture

enddocument





share|improve this answer






















  • This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
    – M.R.
    1 hour ago










  • @M.R. is this any better?
    – Marijn
    45 mins ago










  • Great! one last thing - I added the equals icon in a link - can you add that?
    – M.R.
    43 mins ago










  • @M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
    – Marijn
    16 mins ago










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454653%2fhow-to-make-boxes-like-these%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how you can do this from TikZ



This answer is broken into five parts:



  • How to draw the France COUNTRY box. This is the most straight-forward.

  • How to draw the Equal france box. I use a few more subtle tricks here.

  • Customizing your own colors using RGB specifications.

  • Using your own image file to create an Equal france box like result

  • Implementing this with macros

Box for "France COUNTRY"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc

newcommandmakegray[1]colorgray#1
begindocument

begintikzpicture

node[rounded corners,
draw=orange,
fill=orange!25,text=black,font=sffamily]
France makegrayCOUNTRY;

endtikzpicture

enddocument


Box for "Equal france"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
begintikzpicture[x=(4pt,0),
y=(0,4pt)]
fill[orange] (0,0) rectangle (5,3);
draw[white,line width=2pt] (1,1) -- ++ (3,0);
draw[white,line width=2pt] (1,2) -- ++ (3,0);
endtikzpicture
endlrbox

begindocument

begintikzpicture

node[inner sep=0pt] (AEEQUAL) useboxaeequalsign;
node[anchor=west,
font=sffamilybfseries] (FRANCE) at (AEEQUAL.east) france;
node[fit=(AEEQUAL) (FRANCE),inner ysep=5pt,inner xsep=0pt] (COMBINED) ;
draw[rounded corners=4pt]
(AEEQUAL.north) |- (COMBINED.north east)
-- (COMBINED.south east) -| (AEEQUAL.south);

endtikzpicture

enddocument


Colors:



If you don't like my colors, you can define your own, much like you did with pstricks using the definecolor macro provided with xcolor (which is automatically loaded with TikZ).



definecolor<color name>rgb<decimal>,<decimal>,<decimal>
definecolor<color name>RGB<int>,<int>,<int>


Here is an implementation for this in TikZ:



tikzsetdefine color/.code 2 args=definecolor#1RGB#2


Then you can write



begintikzpicture
[
define color=borderorange253,129,36,
define color=lightyellow255,250,236,
]

node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
France makegrayCOUNTRY;

endtikzpicture


Including image files:



If you have an image file you would already like to include, that's straight-forward.



enter image description here



Just repurpose the code above for the equal sign as follows:



newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[width=2em]image/no_you_cant
endlrbox


Macros for in-text implementation



enter image description here



This was executed using



documentclassarticle
usepackagelipsum

usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[height=3ex]image/no_you_cant
endlrbox

tikzsetdefine color/.code 2 args=definecolor#1RGB#2
tikzsetdefine color=borderorange253,129,36,
define color=lightyellow255,250,236,


newcommandEntity[2]%%
begintikzpicture
node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
#1 makegray#2;
endtikzpicture

newcommandLinguisticAssistant[1]- (COMBINED.north east)
-- (COMBINED.south east) -


begindocument

LinguisticAssistantARMA Entityvirumquecano, Troiae qui primus ab oris
Italiam, fato profugus, Laviniaque venit
litora, multum ille et terris iactatus et alto
vi superum saevae memorem Iunonis ob iram;
multa quoque et bello passus, dum conderet urbem,
inferretque deos Latio, genus unde Latinum,
Albanique patres, atque altae moenia Romae.

LinguisticAssistantMusa, Entitymihicausas memora, quo numine laeso,
quidve dolens, regina deum tot volvere casus
insignem pietate virum, tot adire labores
impulerit. Tantaene animis caelestibus irae?

LinguisticAssistantUrbs Entityantiquafuit, Tyrii tenuere coloni,
Karthago, Italiam contra Tiberinaque longe
ostia, dives opum studiisque asperrima belli;
quam Iuno fertur terris magis omnibus unam
posthabita coluisse Samo; hic illius arma,
hic currus fuit; hoc regnum dea gentibus esse,
si qua fata sinant, iam tum tenditque fovetque.
Progeniem sed enim Troiano a sanguine duci
audierat, Tyrias olim quae verteret arces;
hinc populum late regem belloque superbum
venturum excidio Libyae: sic volvere Parcas.
Id metuens, veterisque memor Saturnia belli,
prima quod ad Troiam pro caris gesserat Argis---
necdum etiam causae irarum saevique dolores
exciderant animo: manet alta mente repostum
iudicium Paridis spretaeque iniuria formae,
et genus invisum, et rapti Ganymedis honores.
His accensa super, iactatos aequore toto
Troas, reliquias Danaum atque immitis Achilli,
arcebat longe Latio, multosque per annos
errabant, acti fatis, maria omnia circum.
Tantae molis erat Romanam condere gentem!

enddocument





share|improve this answer






















  • Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
    – M.R.
    1 hour ago










  • @M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
    – Werner
    1 hour ago










  • No but I added the equals icon in a link - if you can try adding that?
    – M.R.
    42 mins ago










  • @M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
    – A.Ellett
    32 mins ago















up vote
3
down vote













It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how you can do this from TikZ



This answer is broken into five parts:



  • How to draw the France COUNTRY box. This is the most straight-forward.

  • How to draw the Equal france box. I use a few more subtle tricks here.

  • Customizing your own colors using RGB specifications.

  • Using your own image file to create an Equal france box like result

  • Implementing this with macros

Box for "France COUNTRY"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc

newcommandmakegray[1]colorgray#1
begindocument

begintikzpicture

node[rounded corners,
draw=orange,
fill=orange!25,text=black,font=sffamily]
France makegrayCOUNTRY;

endtikzpicture

enddocument


Box for "Equal france"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
begintikzpicture[x=(4pt,0),
y=(0,4pt)]
fill[orange] (0,0) rectangle (5,3);
draw[white,line width=2pt] (1,1) -- ++ (3,0);
draw[white,line width=2pt] (1,2) -- ++ (3,0);
endtikzpicture
endlrbox

begindocument

begintikzpicture

node[inner sep=0pt] (AEEQUAL) useboxaeequalsign;
node[anchor=west,
font=sffamilybfseries] (FRANCE) at (AEEQUAL.east) france;
node[fit=(AEEQUAL) (FRANCE),inner ysep=5pt,inner xsep=0pt] (COMBINED) ;
draw[rounded corners=4pt]
(AEEQUAL.north) |- (COMBINED.north east)
-- (COMBINED.south east) -| (AEEQUAL.south);

endtikzpicture

enddocument


Colors:



If you don't like my colors, you can define your own, much like you did with pstricks using the definecolor macro provided with xcolor (which is automatically loaded with TikZ).



definecolor<color name>rgb<decimal>,<decimal>,<decimal>
definecolor<color name>RGB<int>,<int>,<int>


Here is an implementation for this in TikZ:



tikzsetdefine color/.code 2 args=definecolor#1RGB#2


Then you can write



begintikzpicture
[
define color=borderorange253,129,36,
define color=lightyellow255,250,236,
]

node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
France makegrayCOUNTRY;

endtikzpicture


Including image files:



If you have an image file you would already like to include, that's straight-forward.



enter image description here



Just repurpose the code above for the equal sign as follows:



newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[width=2em]image/no_you_cant
endlrbox


Macros for in-text implementation



enter image description here



This was executed using



documentclassarticle
usepackagelipsum

usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[height=3ex]image/no_you_cant
endlrbox

tikzsetdefine color/.code 2 args=definecolor#1RGB#2
tikzsetdefine color=borderorange253,129,36,
define color=lightyellow255,250,236,


newcommandEntity[2]%%
begintikzpicture
node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
#1 makegray#2;
endtikzpicture

newcommandLinguisticAssistant[1]- (COMBINED.north east)
-- (COMBINED.south east) -


begindocument

LinguisticAssistantARMA Entityvirumquecano, Troiae qui primus ab oris
Italiam, fato profugus, Laviniaque venit
litora, multum ille et terris iactatus et alto
vi superum saevae memorem Iunonis ob iram;
multa quoque et bello passus, dum conderet urbem,
inferretque deos Latio, genus unde Latinum,
Albanique patres, atque altae moenia Romae.

LinguisticAssistantMusa, Entitymihicausas memora, quo numine laeso,
quidve dolens, regina deum tot volvere casus
insignem pietate virum, tot adire labores
impulerit. Tantaene animis caelestibus irae?

LinguisticAssistantUrbs Entityantiquafuit, Tyrii tenuere coloni,
Karthago, Italiam contra Tiberinaque longe
ostia, dives opum studiisque asperrima belli;
quam Iuno fertur terris magis omnibus unam
posthabita coluisse Samo; hic illius arma,
hic currus fuit; hoc regnum dea gentibus esse,
si qua fata sinant, iam tum tenditque fovetque.
Progeniem sed enim Troiano a sanguine duci
audierat, Tyrias olim quae verteret arces;
hinc populum late regem belloque superbum
venturum excidio Libyae: sic volvere Parcas.
Id metuens, veterisque memor Saturnia belli,
prima quod ad Troiam pro caris gesserat Argis---
necdum etiam causae irarum saevique dolores
exciderant animo: manet alta mente repostum
iudicium Paridis spretaeque iniuria formae,
et genus invisum, et rapti Ganymedis honores.
His accensa super, iactatos aequore toto
Troas, reliquias Danaum atque immitis Achilli,
arcebat longe Latio, multosque per annos
errabant, acti fatis, maria omnia circum.
Tantae molis erat Romanam condere gentem!

enddocument





share|improve this answer






















  • Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
    – M.R.
    1 hour ago










  • @M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
    – Werner
    1 hour ago










  • No but I added the equals icon in a link - if you can try adding that?
    – M.R.
    42 mins ago










  • @M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
    – A.Ellett
    32 mins ago













up vote
3
down vote










up vote
3
down vote









It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how you can do this from TikZ



This answer is broken into five parts:



  • How to draw the France COUNTRY box. This is the most straight-forward.

  • How to draw the Equal france box. I use a few more subtle tricks here.

  • Customizing your own colors using RGB specifications.

  • Using your own image file to create an Equal france box like result

  • Implementing this with macros

Box for "France COUNTRY"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc

newcommandmakegray[1]colorgray#1
begindocument

begintikzpicture

node[rounded corners,
draw=orange,
fill=orange!25,text=black,font=sffamily]
France makegrayCOUNTRY;

endtikzpicture

enddocument


Box for "Equal france"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
begintikzpicture[x=(4pt,0),
y=(0,4pt)]
fill[orange] (0,0) rectangle (5,3);
draw[white,line width=2pt] (1,1) -- ++ (3,0);
draw[white,line width=2pt] (1,2) -- ++ (3,0);
endtikzpicture
endlrbox

begindocument

begintikzpicture

node[inner sep=0pt] (AEEQUAL) useboxaeequalsign;
node[anchor=west,
font=sffamilybfseries] (FRANCE) at (AEEQUAL.east) france;
node[fit=(AEEQUAL) (FRANCE),inner ysep=5pt,inner xsep=0pt] (COMBINED) ;
draw[rounded corners=4pt]
(AEEQUAL.north) |- (COMBINED.north east)
-- (COMBINED.south east) -| (AEEQUAL.south);

endtikzpicture

enddocument


Colors:



If you don't like my colors, you can define your own, much like you did with pstricks using the definecolor macro provided with xcolor (which is automatically loaded with TikZ).



definecolor<color name>rgb<decimal>,<decimal>,<decimal>
definecolor<color name>RGB<int>,<int>,<int>


Here is an implementation for this in TikZ:



tikzsetdefine color/.code 2 args=definecolor#1RGB#2


Then you can write



begintikzpicture
[
define color=borderorange253,129,36,
define color=lightyellow255,250,236,
]

node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
France makegrayCOUNTRY;

endtikzpicture


Including image files:



If you have an image file you would already like to include, that's straight-forward.



enter image description here



Just repurpose the code above for the equal sign as follows:



newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[width=2em]image/no_you_cant
endlrbox


Macros for in-text implementation



enter image description here



This was executed using



documentclassarticle
usepackagelipsum

usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[height=3ex]image/no_you_cant
endlrbox

tikzsetdefine color/.code 2 args=definecolor#1RGB#2
tikzsetdefine color=borderorange253,129,36,
define color=lightyellow255,250,236,


newcommandEntity[2]%%
begintikzpicture
node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
#1 makegray#2;
endtikzpicture

newcommandLinguisticAssistant[1]- (COMBINED.north east)
-- (COMBINED.south east) -


begindocument

LinguisticAssistantARMA Entityvirumquecano, Troiae qui primus ab oris
Italiam, fato profugus, Laviniaque venit
litora, multum ille et terris iactatus et alto
vi superum saevae memorem Iunonis ob iram;
multa quoque et bello passus, dum conderet urbem,
inferretque deos Latio, genus unde Latinum,
Albanique patres, atque altae moenia Romae.

LinguisticAssistantMusa, Entitymihicausas memora, quo numine laeso,
quidve dolens, regina deum tot volvere casus
insignem pietate virum, tot adire labores
impulerit. Tantaene animis caelestibus irae?

LinguisticAssistantUrbs Entityantiquafuit, Tyrii tenuere coloni,
Karthago, Italiam contra Tiberinaque longe
ostia, dives opum studiisque asperrima belli;
quam Iuno fertur terris magis omnibus unam
posthabita coluisse Samo; hic illius arma,
hic currus fuit; hoc regnum dea gentibus esse,
si qua fata sinant, iam tum tenditque fovetque.
Progeniem sed enim Troiano a sanguine duci
audierat, Tyrias olim quae verteret arces;
hinc populum late regem belloque superbum
venturum excidio Libyae: sic volvere Parcas.
Id metuens, veterisque memor Saturnia belli,
prima quod ad Troiam pro caris gesserat Argis---
necdum etiam causae irarum saevique dolores
exciderant animo: manet alta mente repostum
iudicium Paridis spretaeque iniuria formae,
et genus invisum, et rapti Ganymedis honores.
His accensa super, iactatos aequore toto
Troas, reliquias Danaum atque immitis Achilli,
arcebat longe Latio, multosque per annos
errabant, acti fatis, maria omnia circum.
Tantae molis erat Romanam condere gentem!

enddocument





share|improve this answer














It's been a while since I've used pstricks, so I'll leave that for someone else to address. Also, I'm not fluent in using tcolorbox. So, that too I'll leave for someone else. But, I will show how you can do this from TikZ



This answer is broken into five parts:



  • How to draw the France COUNTRY box. This is the most straight-forward.

  • How to draw the Equal france box. I use a few more subtle tricks here.

  • Customizing your own colors using RGB specifications.

  • Using your own image file to create an Equal france box like result

  • Implementing this with macros

Box for "France COUNTRY"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc

newcommandmakegray[1]colorgray#1
begindocument

begintikzpicture

node[rounded corners,
draw=orange,
fill=orange!25,text=black,font=sffamily]
France makegrayCOUNTRY;

endtikzpicture

enddocument


Box for "Equal france"



enter image description here



documentclass[tikz,border=6pt]standalone
usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
begintikzpicture[x=(4pt,0),
y=(0,4pt)]
fill[orange] (0,0) rectangle (5,3);
draw[white,line width=2pt] (1,1) -- ++ (3,0);
draw[white,line width=2pt] (1,2) -- ++ (3,0);
endtikzpicture
endlrbox

begindocument

begintikzpicture

node[inner sep=0pt] (AEEQUAL) useboxaeequalsign;
node[anchor=west,
font=sffamilybfseries] (FRANCE) at (AEEQUAL.east) france;
node[fit=(AEEQUAL) (FRANCE),inner ysep=5pt,inner xsep=0pt] (COMBINED) ;
draw[rounded corners=4pt]
(AEEQUAL.north) |- (COMBINED.north east)
-- (COMBINED.south east) -| (AEEQUAL.south);

endtikzpicture

enddocument


Colors:



If you don't like my colors, you can define your own, much like you did with pstricks using the definecolor macro provided with xcolor (which is automatically loaded with TikZ).



definecolor<color name>rgb<decimal>,<decimal>,<decimal>
definecolor<color name>RGB<int>,<int>,<int>


Here is an implementation for this in TikZ:



tikzsetdefine color/.code 2 args=definecolor#1RGB#2


Then you can write



begintikzpicture
[
define color=borderorange253,129,36,
define color=lightyellow255,250,236,
]

node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
France makegrayCOUNTRY;

endtikzpicture


Including image files:



If you have an image file you would already like to include, that's straight-forward.



enter image description here



Just repurpose the code above for the equal sign as follows:



newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[width=2em]image/no_you_cant
endlrbox


Macros for in-text implementation



enter image description here



This was executed using



documentclassarticle
usepackagelipsum

usepackagetikz
usetikzlibrarycalc
usetikzlibraryfit

newcommandmakegray[1]colorgray#1

newsaveboxaeequalsign
beginlrboxaeequalsign
includegraphics[height=3ex]image/no_you_cant
endlrbox

tikzsetdefine color/.code 2 args=definecolor#1RGB#2
tikzsetdefine color=borderorange253,129,36,
define color=lightyellow255,250,236,


newcommandEntity[2]%%
begintikzpicture
node[rounded corners,
draw=borderorange,
fill=lightyellow,text=black,font=sffamilybfseries]
#1 makegray#2;
endtikzpicture

newcommandLinguisticAssistant[1]- (COMBINED.north east)
-- (COMBINED.south east) -


begindocument

LinguisticAssistantARMA Entityvirumquecano, Troiae qui primus ab oris
Italiam, fato profugus, Laviniaque venit
litora, multum ille et terris iactatus et alto
vi superum saevae memorem Iunonis ob iram;
multa quoque et bello passus, dum conderet urbem,
inferretque deos Latio, genus unde Latinum,
Albanique patres, atque altae moenia Romae.

LinguisticAssistantMusa, Entitymihicausas memora, quo numine laeso,
quidve dolens, regina deum tot volvere casus
insignem pietate virum, tot adire labores
impulerit. Tantaene animis caelestibus irae?

LinguisticAssistantUrbs Entityantiquafuit, Tyrii tenuere coloni,
Karthago, Italiam contra Tiberinaque longe
ostia, dives opum studiisque asperrima belli;
quam Iuno fertur terris magis omnibus unam
posthabita coluisse Samo; hic illius arma,
hic currus fuit; hoc regnum dea gentibus esse,
si qua fata sinant, iam tum tenditque fovetque.
Progeniem sed enim Troiano a sanguine duci
audierat, Tyrias olim quae verteret arces;
hinc populum late regem belloque superbum
venturum excidio Libyae: sic volvere Parcas.
Id metuens, veterisque memor Saturnia belli,
prima quod ad Troiam pro caris gesserat Argis---
necdum etiam causae irarum saevique dolores
exciderant animo: manet alta mente repostum
iudicium Paridis spretaeque iniuria formae,
et genus invisum, et rapti Ganymedis honores.
His accensa super, iactatos aequore toto
Troas, reliquias Danaum atque immitis Achilli,
arcebat longe Latio, multosque per annos
errabant, acti fatis, maria omnia circum.
Tantae molis erat Romanam condere gentem!

enddocument






share|improve this answer














share|improve this answer



share|improve this answer








edited 2 mins ago

























answered 1 hour ago









A.Ellett

35.3k1063163




35.3k1063163











  • Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
    – M.R.
    1 hour ago










  • @M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
    – Werner
    1 hour ago










  • No but I added the equals icon in a link - if you can try adding that?
    – M.R.
    42 mins ago










  • @M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
    – A.Ellett
    32 mins ago

















  • Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
    – M.R.
    1 hour ago










  • @M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
    – Werner
    1 hour ago










  • No but I added the equals icon in a link - if you can try adding that?
    – M.R.
    42 mins ago










  • @M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
    – A.Ellett
    32 mins ago
















Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
– M.R.
1 hour ago




Thanks for your response, but I'm trying to get the exact pixel-for-pixel look - i.e. color/fonts - see in my question where I added them.
– M.R.
1 hour ago












@M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
– Werner
1 hour ago




@M.R.: You can, of course, just use the fonts you specify. The basic principle in the box designs remain the same. Do you know how to add fonts?
– Werner
1 hour ago












No but I added the equals icon in a link - if you can try adding that?
– M.R.
42 mins ago




No but I added the equals icon in a link - if you can try adding that?
– M.R.
42 mins ago












@M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
– A.Ellett
32 mins ago





@M.R. updated per your most recent request. Everything else in terms of pixel-for-pixel, that's up to you. I don't necessarily have access to the same fonts as you, for example.
– A.Ellett
32 mins ago











up vote
2
down vote













A solution using pstricks:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantomxfrance
rput[l](0,1)psframebox[fillcolor=orange,framesep=2pt]tinytextcolorwhite=
endpspicture
enddocument


enter image description here



The positioning is done using rput with coordinates, which allows to place a box with an = on top of the box with france. This text has been shifted a bit to the right using a phantom letter (which is not printed but the space it would occupy if it was 'real' is taken into account). The box with the = sign has a bit smaller margin (2pt) to look more like the original picture. The font is sans serif, using textsf (in combination with boldface textbf for the second France). The text COUNTRY is made smaller with footnotesize to simulate small caps.



However, this kind of drawing may be easier with TikZ, see also the other answer.




UPDATE using Helvetica (usepackagehelvet) and some tweaks to the equal sign (box more square using smaller framesep and a vertical phantom |, rounded corners, equal sign slightly raised, bit less space before 'france' with phantom.).



enter image description here



With an image instead of the equals sign:



enter image description here



Note that the pdf of the image should be converted to eps for use with latex-dvips-ps2pdf, when using xelatex (or lualatex) this is not necessary.



documentclassarticle
usepackagepstricks
usepackagexcolor
usepackagehelvet
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantom.france
pssetframearc=.5
rput[l](0,1)psframebox[fillcolor=orange,framesep=1pt]vphantomtinytextcolorwhiteraisebox1.2pt=
% alternatively, include an image here
% rput[l](0,1)includegraphics[width=3mm]small-equals-icon.eps
endpspicture

enddocument





share|improve this answer






















  • This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
    – M.R.
    1 hour ago










  • @M.R. is this any better?
    – Marijn
    45 mins ago










  • Great! one last thing - I added the equals icon in a link - can you add that?
    – M.R.
    43 mins ago










  • @M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
    – Marijn
    16 mins ago














up vote
2
down vote













A solution using pstricks:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantomxfrance
rput[l](0,1)psframebox[fillcolor=orange,framesep=2pt]tinytextcolorwhite=
endpspicture
enddocument


enter image description here



The positioning is done using rput with coordinates, which allows to place a box with an = on top of the box with france. This text has been shifted a bit to the right using a phantom letter (which is not printed but the space it would occupy if it was 'real' is taken into account). The box with the = sign has a bit smaller margin (2pt) to look more like the original picture. The font is sans serif, using textsf (in combination with boldface textbf for the second France). The text COUNTRY is made smaller with footnotesize to simulate small caps.



However, this kind of drawing may be easier with TikZ, see also the other answer.




UPDATE using Helvetica (usepackagehelvet) and some tweaks to the equal sign (box more square using smaller framesep and a vertical phantom |, rounded corners, equal sign slightly raised, bit less space before 'france' with phantom.).



enter image description here



With an image instead of the equals sign:



enter image description here



Note that the pdf of the image should be converted to eps for use with latex-dvips-ps2pdf, when using xelatex (or lualatex) this is not necessary.



documentclassarticle
usepackagepstricks
usepackagexcolor
usepackagehelvet
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantom.france
pssetframearc=.5
rput[l](0,1)psframebox[fillcolor=orange,framesep=1pt]vphantomtinytextcolorwhiteraisebox1.2pt=
% alternatively, include an image here
% rput[l](0,1)includegraphics[width=3mm]small-equals-icon.eps
endpspicture

enddocument





share|improve this answer






















  • This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
    – M.R.
    1 hour ago










  • @M.R. is this any better?
    – Marijn
    45 mins ago










  • Great! one last thing - I added the equals icon in a link - can you add that?
    – M.R.
    43 mins ago










  • @M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
    – Marijn
    16 mins ago












up vote
2
down vote










up vote
2
down vote









A solution using pstricks:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantomxfrance
rput[l](0,1)psframebox[fillcolor=orange,framesep=2pt]tinytextcolorwhite=
endpspicture
enddocument


enter image description here



The positioning is done using rput with coordinates, which allows to place a box with an = on top of the box with france. This text has been shifted a bit to the right using a phantom letter (which is not printed but the space it would occupy if it was 'real' is taken into account). The box with the = sign has a bit smaller margin (2pt) to look more like the original picture. The font is sans serif, using textsf (in combination with boldface textbf for the second France). The text COUNTRY is made smaller with footnotesize to simulate small caps.



However, this kind of drawing may be easier with TikZ, see also the other answer.




UPDATE using Helvetica (usepackagehelvet) and some tweaks to the equal sign (box more square using smaller framesep and a vertical phantom |, rounded corners, equal sign slightly raised, bit less space before 'france' with phantom.).



enter image description here



With an image instead of the equals sign:



enter image description here



Note that the pdf of the image should be converted to eps for use with latex-dvips-ps2pdf, when using xelatex (or lualatex) this is not necessary.



documentclassarticle
usepackagepstricks
usepackagexcolor
usepackagehelvet
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantom.france
pssetframearc=.5
rput[l](0,1)psframebox[fillcolor=orange,framesep=1pt]vphantomtinytextcolorwhiteraisebox1.2pt=
% alternatively, include an image here
% rput[l](0,1)includegraphics[width=3mm]small-equals-icon.eps
endpspicture

enddocument





share|improve this answer














A solution using pstricks:



documentclassarticle
usepackagepstricks
usepackagexcolor
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantomxfrance
rput[l](0,1)psframebox[fillcolor=orange,framesep=2pt]tinytextcolorwhite=
endpspicture
enddocument


enter image description here



The positioning is done using rput with coordinates, which allows to place a box with an = on top of the box with france. This text has been shifted a bit to the right using a phantom letter (which is not printed but the space it would occupy if it was 'real' is taken into account). The box with the = sign has a bit smaller margin (2pt) to look more like the original picture. The font is sans serif, using textsf (in combination with boldface textbf for the second France). The text COUNTRY is made smaller with footnotesize to simulate small caps.



However, this kind of drawing may be easier with TikZ, see also the other answer.




UPDATE using Helvetica (usepackagehelvet) and some tweaks to the equal sign (box more square using smaller framesep and a vertical phantom |, rounded corners, equal sign slightly raised, bit less space before 'france' with phantom.).



enter image description here



With an image instead of the equals sign:



enter image description here



Note that the pdf of the image should be converted to eps for use with latex-dvips-ps2pdf, when using xelatex (or lualatex) this is not necessary.



documentclassarticle
usepackagepstricks
usepackagexcolor
usepackagehelvet
definecolorlightyellowRGB255, 250, 236
definecolortextdarkRGB100, 52, 20
definecolorborderorangeRGB253, 129, 36
definecolorlightgrayRGB214, 214, 214
definecolorcountrygrayRGB153, 153, 153
begindocument
beginpspicture(5,5)
pssetfillstyle=solid, framearc=.4, linecolor=borderorange, linewidth=.8pt
rput[l](0,0)psframebox[fillcolor=lightyellow]textcolortextdarktextsftextbfFrance textcolorcountrygrayfootnotesizetextsfCOUNTRY

pssetfillstyle=solid, framearc=.2, linecolor=lightgray, linewidth=.4pt
rput[l](0.15,1)psframebox[fillcolor=white]textcolorblacktextsfphantom.france
pssetframearc=.5
rput[l](0,1)psframebox[fillcolor=orange,framesep=1pt]vphantomtinytextcolorwhiteraisebox1.2pt=
% alternatively, include an image here
% rput[l](0,1)includegraphics[width=3mm]small-equals-icon.eps
endpspicture

enddocument






share|improve this answer














share|improve this answer



share|improve this answer








edited 18 mins ago

























answered 1 hour ago









Marijn

7,006634




7,006634











  • This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
    – M.R.
    1 hour ago










  • @M.R. is this any better?
    – Marijn
    45 mins ago










  • Great! one last thing - I added the equals icon in a link - can you add that?
    – M.R.
    43 mins ago










  • @M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
    – Marijn
    16 mins ago
















  • This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
    – M.R.
    1 hour ago










  • @M.R. is this any better?
    – Marijn
    45 mins ago










  • Great! one last thing - I added the equals icon in a link - can you add that?
    – M.R.
    43 mins ago










  • @M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
    – Marijn
    16 mins ago















This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
– M.R.
1 hour ago




This is almost exactly it! See my updated question where I added the exact fonts - can you tweak the equal sign to make it look more like the one I added?
– M.R.
1 hour ago












@M.R. is this any better?
– Marijn
45 mins ago




@M.R. is this any better?
– Marijn
45 mins ago












Great! one last thing - I added the equals icon in a link - can you add that?
– M.R.
43 mins ago




Great! one last thing - I added the equals icon in a link - can you add that?
– M.R.
43 mins ago












@M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
– Marijn
16 mins ago




@M.R. added - note that the pdf needs to be converted first if you use latex-dvips-ps2pdf.
– Marijn
16 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f454653%2fhow-to-make-boxes-like-these%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)