How to draw a partial or incomplete box around one or more words within a paragraph
I am trying to draw a partial box around one or more words within a paragraph--that is, a rectangle with one or more sides missing. I have read the documentation for the fancybox
package and it doesn't seem to be able to do what I want. I was able to produce thus ugly hack:
That's just a vertical bar | followed by a word with overline and uline. The trick is to connect the vertical and horizontal lines so that you have a rectangle missing just one side.
Is there an easy, general way to do this, perhaps with Tikz? I don't know enough about that package to be able to do this myself, but I'm wondering if there might be other solutions too.
tikz-pgf boxes fancybox
add a comment |
I am trying to draw a partial box around one or more words within a paragraph--that is, a rectangle with one or more sides missing. I have read the documentation for the fancybox
package and it doesn't seem to be able to do what I want. I was able to produce thus ugly hack:
That's just a vertical bar | followed by a word with overline and uline. The trick is to connect the vertical and horizontal lines so that you have a rectangle missing just one side.
Is there an easy, general way to do this, perhaps with Tikz? I don't know enough about that package to be able to do this myself, but I'm wondering if there might be other solutions too.
tikz-pgf boxes fancybox
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38
add a comment |
I am trying to draw a partial box around one or more words within a paragraph--that is, a rectangle with one or more sides missing. I have read the documentation for the fancybox
package and it doesn't seem to be able to do what I want. I was able to produce thus ugly hack:
That's just a vertical bar | followed by a word with overline and uline. The trick is to connect the vertical and horizontal lines so that you have a rectangle missing just one side.
Is there an easy, general way to do this, perhaps with Tikz? I don't know enough about that package to be able to do this myself, but I'm wondering if there might be other solutions too.
tikz-pgf boxes fancybox
I am trying to draw a partial box around one or more words within a paragraph--that is, a rectangle with one or more sides missing. I have read the documentation for the fancybox
package and it doesn't seem to be able to do what I want. I was able to produce thus ugly hack:
That's just a vertical bar | followed by a word with overline and uline. The trick is to connect the vertical and horizontal lines so that you have a rectangle missing just one side.
Is there an easy, general way to do this, perhaps with Tikz? I don't know enough about that package to be able to do this myself, but I'm wondering if there might be other solutions too.
tikz-pgf boxes fancybox
tikz-pgf boxes fancybox
asked Aug 9 '16 at 11:21
twoblackboxestwoblackboxes
23318
23318
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38
add a comment |
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38
add a comment |
5 Answers
5
active
oldest
votes
This solution EDITED to allow multiple sides to be stricken.
Made into a macro partbox{<sides>}{<content>}
where sides
are the sides to be stricken, in any combination (in any order) of l
, b
, r
, or t
. By using fbox
, it is customizeable with the use of fboxsep
and fboxrule
.
Being a box, the words if more than one, will not be permitted to break across a line.
documentclass{article}
usepackage{trimclip}
newififlclip
newififbclip
newififrclip
newififtclip
defCLIP{dimexprfboxrule+.2ptrelax}
defnulclip{0pt}
newcommandpartbox[2]{%
lclipfalsebclipfalserclipfalsetclipfalse%
letlkernrelaxletrkernrelax%
letlclipnulclipletbclipnulclipletrclipnulcliplettclipnulclip%
parseclip#1relaxrelax%
iflclipdeflkern{kernCLIP}deflclip{CLIP}fi
ifbclipdefbclip{CLIP}fi
ifrclipdefrkern{kernCLIP}defrclip{CLIP}fi
iftclipdeftclip{CLIP}fi
lkernclipbox{lclip{} bclip{} rclip{} tclip}{fbox{#2}}rkern%
}
defparseclip#1#2relax{%
ifx l#1lcliptrueelse
ifx b#1bcliptrueelse
ifx r#1rcliptrueelse
ifx t#1tcliptrueelse
fifififi
ifxrelax#2relaxelseparseclip#2relaxfi
}
parskip 1ex
begin{document}
partbox{l}{dans} partbox{b}{dans} partbox{r}{dans} partbox{t}{dans}
partbox{lt}{dans} partbox{lr}{dans} partbox{lb}{dans}
partbox{tb}{dans} partbox{tr}{dans}
partbox{br}{dans}
partbox{rlt}{dans} partbox{rbt}{dans} partbox{blt}{dans} partbox{blr}{dans}
end{document}
Just to show the ability to use fboxsep
and fboxrule
, here is the identical result, but with fboxsep=0ptrelaxfboxrule=1ptrelax
set at the beginning of the document:
If one wishes it not to interfere with linespacing, then this tweak should work, adding a vphantom
and smash
. Of course, it will not prevent overlap, if fboxsep
and/or fboxrule
are set large enough (NOTE: this solution is still the original variety, only allowing a single side to be stricken):
documentclass{article}
usepackage[nopar]{lipsum}
usepackage{trimclip}
defCLIP{dimexprfboxrule+.2ptrelax}
newcommandpartbox[2]{leavevmodevphantom{#2}smash{%
ifx#1lclipbox{CLIP{} 0pt 0pt 0pt}{fbox{#2}}else
ifx#1bclipbox{0pt CLIP{} 0pt 0pt}{fbox{#2}}else
ifx#1rclipbox{0pt 0pt CLIP{} 0pt}{fbox{#2}}else
ifx#1tclipbox{0pt 0pt 0pt CLIP{}}{fbox{#2}}else
fifififi
}}
parskip 1ex
begin{document}
lipsum[4] partbox{l}{dans}
lipsum[4] partbox{b}{dans}
lipsum[4] partbox{r}{dans}
lipsum[4] partbox{t}{dans}
lipsum[4]
end{document}
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
@Matsmath It will behave likefbox
, subject to changes infboxrule
andfboxsep
.
– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
add a comment |
Is there an easy, general way to do this, perhaps with Tikz?
I cannot understand the tendency of people to use a sledgehammer to crack a nut. Perhaps with tabular
?
documentclass{article}
begin{document}
tabcolsep.2em
Un voyage begin{tabular}{|c }hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|}hline dans\ end{tabular} l'space.
Un voyage begin{tabular}{ c|}hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|} dans\hline end{tabular} l'space.
end{document}
If you hate tabular
, some makebox
, rule
and vrule
commands can do the same work. However, it is tedious finding manually the right widths of the horizontal rules. But this is solved using widthof of
the calc
package. This make a complete framed box with automatic width:
vrule%
makebox[0pt][l]{rule[-.25em]{widthof{dans}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{dans}+.2em}{.4pt}}%
makebox[widthof{dans}+.2em][c]{dans}%
vrule
Simply removing rows 1,2,3 or 5 in the above code you can obtain the incomplete boxes.
Convert both solutions in macros is straightforward. For simplicity, instead of a single macro with two arguments, I suggest make four macros where the text is the unique argument. For instance:
documentclass{article}
usepackage{calc}
newcommandopenleftbox[1]{%
vrule
makebox[0pt][l]{rule[-.25em]{widthof{#1}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{#1}+.2em}{.4pt}}%
makebox[widthof{#1}+.2em][c]{#1}%
%vrule
}
begin{document}
Un voyage openleftbox{dans} l'space.
end{document}
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
add a comment |
Another solution with tcbox
(from tcolorbox
.
documentclass{article}
usepackage{tcolorbox}
usepackage{lmodern}
newtcbox{lbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, leftrule=0pt,#1}
newtcbox{rbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, rightrule=0pt,#1}
newtcbox{tbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, toprule=0pt,#1}
newtcbox{bbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, bottomrule=0pt,#1}
begin{document}
The lbox{quick} tbox{brown} bbox{fox} rbox{jumps} over the lbox[colback=red!30, colframe=blue]{lazy dog}.
end{document}
add a comment |
This can be achieved with the efbox
package.
Examples from the documentation:
documentclass[convert]{standalone}
usepackage{efbox}
begin{document}
efbox{Foo}
efbox[rightline=false,topline=false]{Foo}
efbox[topline,backgroundcolor=red]{Foo}
efbox[linewidth=2pt,font=Large]{Large Foo}
efbox[rightline=false,topline=false,linecolor=blue,linewidth=2pt]{Foo}
efbox[margin=10pt,backgroundcolor=yellow,font=ttfamilyitshape]{Italic Typewriter Foo}
efbox[linewidth=3pt,margin=5pt,backgroundcolor=red]{Foo}
efbox[hidealllines,backgroundcolor=red]{Foo}
efbox{Foo}
efbox[hidealllines,backgroundcolor=red,margin=15pt]{Foo}
efbox[margin=15pt,linewidth=5pt]{Foo}
efbox[bottomline=false,rightline=false,linewidth=2pt,margin=1pt,backgroundcolor=yellow]{Foo}
efbox{Foo}
end{document}
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
add a comment |
Package fbox
has been recently added to CTAN. This package adds an optional parameter to fbox
. This new parameter allows to declare which box sides should be drawn.
documentclass{article}
usepackage{fbox}
begin{document}
The fbox[tb]{quick} fbox[lr]{brown} fbox[ltb]{fox} fbox[trb]{jumps} fbox[lb]{over} fbox[tr]{the} fbox{lazy dog}.
end{document}
add a comment |
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f323986%2fhow-to-draw-a-partial-or-incomplete-box-around-one-or-more-words-within-a-paragr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
This solution EDITED to allow multiple sides to be stricken.
Made into a macro partbox{<sides>}{<content>}
where sides
are the sides to be stricken, in any combination (in any order) of l
, b
, r
, or t
. By using fbox
, it is customizeable with the use of fboxsep
and fboxrule
.
Being a box, the words if more than one, will not be permitted to break across a line.
documentclass{article}
usepackage{trimclip}
newififlclip
newififbclip
newififrclip
newififtclip
defCLIP{dimexprfboxrule+.2ptrelax}
defnulclip{0pt}
newcommandpartbox[2]{%
lclipfalsebclipfalserclipfalsetclipfalse%
letlkernrelaxletrkernrelax%
letlclipnulclipletbclipnulclipletrclipnulcliplettclipnulclip%
parseclip#1relaxrelax%
iflclipdeflkern{kernCLIP}deflclip{CLIP}fi
ifbclipdefbclip{CLIP}fi
ifrclipdefrkern{kernCLIP}defrclip{CLIP}fi
iftclipdeftclip{CLIP}fi
lkernclipbox{lclip{} bclip{} rclip{} tclip}{fbox{#2}}rkern%
}
defparseclip#1#2relax{%
ifx l#1lcliptrueelse
ifx b#1bcliptrueelse
ifx r#1rcliptrueelse
ifx t#1tcliptrueelse
fifififi
ifxrelax#2relaxelseparseclip#2relaxfi
}
parskip 1ex
begin{document}
partbox{l}{dans} partbox{b}{dans} partbox{r}{dans} partbox{t}{dans}
partbox{lt}{dans} partbox{lr}{dans} partbox{lb}{dans}
partbox{tb}{dans} partbox{tr}{dans}
partbox{br}{dans}
partbox{rlt}{dans} partbox{rbt}{dans} partbox{blt}{dans} partbox{blr}{dans}
end{document}
Just to show the ability to use fboxsep
and fboxrule
, here is the identical result, but with fboxsep=0ptrelaxfboxrule=1ptrelax
set at the beginning of the document:
If one wishes it not to interfere with linespacing, then this tweak should work, adding a vphantom
and smash
. Of course, it will not prevent overlap, if fboxsep
and/or fboxrule
are set large enough (NOTE: this solution is still the original variety, only allowing a single side to be stricken):
documentclass{article}
usepackage[nopar]{lipsum}
usepackage{trimclip}
defCLIP{dimexprfboxrule+.2ptrelax}
newcommandpartbox[2]{leavevmodevphantom{#2}smash{%
ifx#1lclipbox{CLIP{} 0pt 0pt 0pt}{fbox{#2}}else
ifx#1bclipbox{0pt CLIP{} 0pt 0pt}{fbox{#2}}else
ifx#1rclipbox{0pt 0pt CLIP{} 0pt}{fbox{#2}}else
ifx#1tclipbox{0pt 0pt 0pt CLIP{}}{fbox{#2}}else
fifififi
}}
parskip 1ex
begin{document}
lipsum[4] partbox{l}{dans}
lipsum[4] partbox{b}{dans}
lipsum[4] partbox{r}{dans}
lipsum[4] partbox{t}{dans}
lipsum[4]
end{document}
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
@Matsmath It will behave likefbox
, subject to changes infboxrule
andfboxsep
.
– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
add a comment |
This solution EDITED to allow multiple sides to be stricken.
Made into a macro partbox{<sides>}{<content>}
where sides
are the sides to be stricken, in any combination (in any order) of l
, b
, r
, or t
. By using fbox
, it is customizeable with the use of fboxsep
and fboxrule
.
Being a box, the words if more than one, will not be permitted to break across a line.
documentclass{article}
usepackage{trimclip}
newififlclip
newififbclip
newififrclip
newififtclip
defCLIP{dimexprfboxrule+.2ptrelax}
defnulclip{0pt}
newcommandpartbox[2]{%
lclipfalsebclipfalserclipfalsetclipfalse%
letlkernrelaxletrkernrelax%
letlclipnulclipletbclipnulclipletrclipnulcliplettclipnulclip%
parseclip#1relaxrelax%
iflclipdeflkern{kernCLIP}deflclip{CLIP}fi
ifbclipdefbclip{CLIP}fi
ifrclipdefrkern{kernCLIP}defrclip{CLIP}fi
iftclipdeftclip{CLIP}fi
lkernclipbox{lclip{} bclip{} rclip{} tclip}{fbox{#2}}rkern%
}
defparseclip#1#2relax{%
ifx l#1lcliptrueelse
ifx b#1bcliptrueelse
ifx r#1rcliptrueelse
ifx t#1tcliptrueelse
fifififi
ifxrelax#2relaxelseparseclip#2relaxfi
}
parskip 1ex
begin{document}
partbox{l}{dans} partbox{b}{dans} partbox{r}{dans} partbox{t}{dans}
partbox{lt}{dans} partbox{lr}{dans} partbox{lb}{dans}
partbox{tb}{dans} partbox{tr}{dans}
partbox{br}{dans}
partbox{rlt}{dans} partbox{rbt}{dans} partbox{blt}{dans} partbox{blr}{dans}
end{document}
Just to show the ability to use fboxsep
and fboxrule
, here is the identical result, but with fboxsep=0ptrelaxfboxrule=1ptrelax
set at the beginning of the document:
If one wishes it not to interfere with linespacing, then this tweak should work, adding a vphantom
and smash
. Of course, it will not prevent overlap, if fboxsep
and/or fboxrule
are set large enough (NOTE: this solution is still the original variety, only allowing a single side to be stricken):
documentclass{article}
usepackage[nopar]{lipsum}
usepackage{trimclip}
defCLIP{dimexprfboxrule+.2ptrelax}
newcommandpartbox[2]{leavevmodevphantom{#2}smash{%
ifx#1lclipbox{CLIP{} 0pt 0pt 0pt}{fbox{#2}}else
ifx#1bclipbox{0pt CLIP{} 0pt 0pt}{fbox{#2}}else
ifx#1rclipbox{0pt 0pt CLIP{} 0pt}{fbox{#2}}else
ifx#1tclipbox{0pt 0pt 0pt CLIP{}}{fbox{#2}}else
fifififi
}}
parskip 1ex
begin{document}
lipsum[4] partbox{l}{dans}
lipsum[4] partbox{b}{dans}
lipsum[4] partbox{r}{dans}
lipsum[4] partbox{t}{dans}
lipsum[4]
end{document}
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
@Matsmath It will behave likefbox
, subject to changes infboxrule
andfboxsep
.
– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
add a comment |
This solution EDITED to allow multiple sides to be stricken.
Made into a macro partbox{<sides>}{<content>}
where sides
are the sides to be stricken, in any combination (in any order) of l
, b
, r
, or t
. By using fbox
, it is customizeable with the use of fboxsep
and fboxrule
.
Being a box, the words if more than one, will not be permitted to break across a line.
documentclass{article}
usepackage{trimclip}
newififlclip
newififbclip
newififrclip
newififtclip
defCLIP{dimexprfboxrule+.2ptrelax}
defnulclip{0pt}
newcommandpartbox[2]{%
lclipfalsebclipfalserclipfalsetclipfalse%
letlkernrelaxletrkernrelax%
letlclipnulclipletbclipnulclipletrclipnulcliplettclipnulclip%
parseclip#1relaxrelax%
iflclipdeflkern{kernCLIP}deflclip{CLIP}fi
ifbclipdefbclip{CLIP}fi
ifrclipdefrkern{kernCLIP}defrclip{CLIP}fi
iftclipdeftclip{CLIP}fi
lkernclipbox{lclip{} bclip{} rclip{} tclip}{fbox{#2}}rkern%
}
defparseclip#1#2relax{%
ifx l#1lcliptrueelse
ifx b#1bcliptrueelse
ifx r#1rcliptrueelse
ifx t#1tcliptrueelse
fifififi
ifxrelax#2relaxelseparseclip#2relaxfi
}
parskip 1ex
begin{document}
partbox{l}{dans} partbox{b}{dans} partbox{r}{dans} partbox{t}{dans}
partbox{lt}{dans} partbox{lr}{dans} partbox{lb}{dans}
partbox{tb}{dans} partbox{tr}{dans}
partbox{br}{dans}
partbox{rlt}{dans} partbox{rbt}{dans} partbox{blt}{dans} partbox{blr}{dans}
end{document}
Just to show the ability to use fboxsep
and fboxrule
, here is the identical result, but with fboxsep=0ptrelaxfboxrule=1ptrelax
set at the beginning of the document:
If one wishes it not to interfere with linespacing, then this tweak should work, adding a vphantom
and smash
. Of course, it will not prevent overlap, if fboxsep
and/or fboxrule
are set large enough (NOTE: this solution is still the original variety, only allowing a single side to be stricken):
documentclass{article}
usepackage[nopar]{lipsum}
usepackage{trimclip}
defCLIP{dimexprfboxrule+.2ptrelax}
newcommandpartbox[2]{leavevmodevphantom{#2}smash{%
ifx#1lclipbox{CLIP{} 0pt 0pt 0pt}{fbox{#2}}else
ifx#1bclipbox{0pt CLIP{} 0pt 0pt}{fbox{#2}}else
ifx#1rclipbox{0pt 0pt CLIP{} 0pt}{fbox{#2}}else
ifx#1tclipbox{0pt 0pt 0pt CLIP{}}{fbox{#2}}else
fifififi
}}
parskip 1ex
begin{document}
lipsum[4] partbox{l}{dans}
lipsum[4] partbox{b}{dans}
lipsum[4] partbox{r}{dans}
lipsum[4] partbox{t}{dans}
lipsum[4]
end{document}
This solution EDITED to allow multiple sides to be stricken.
Made into a macro partbox{<sides>}{<content>}
where sides
are the sides to be stricken, in any combination (in any order) of l
, b
, r
, or t
. By using fbox
, it is customizeable with the use of fboxsep
and fboxrule
.
Being a box, the words if more than one, will not be permitted to break across a line.
documentclass{article}
usepackage{trimclip}
newififlclip
newififbclip
newififrclip
newififtclip
defCLIP{dimexprfboxrule+.2ptrelax}
defnulclip{0pt}
newcommandpartbox[2]{%
lclipfalsebclipfalserclipfalsetclipfalse%
letlkernrelaxletrkernrelax%
letlclipnulclipletbclipnulclipletrclipnulcliplettclipnulclip%
parseclip#1relaxrelax%
iflclipdeflkern{kernCLIP}deflclip{CLIP}fi
ifbclipdefbclip{CLIP}fi
ifrclipdefrkern{kernCLIP}defrclip{CLIP}fi
iftclipdeftclip{CLIP}fi
lkernclipbox{lclip{} bclip{} rclip{} tclip}{fbox{#2}}rkern%
}
defparseclip#1#2relax{%
ifx l#1lcliptrueelse
ifx b#1bcliptrueelse
ifx r#1rcliptrueelse
ifx t#1tcliptrueelse
fifififi
ifxrelax#2relaxelseparseclip#2relaxfi
}
parskip 1ex
begin{document}
partbox{l}{dans} partbox{b}{dans} partbox{r}{dans} partbox{t}{dans}
partbox{lt}{dans} partbox{lr}{dans} partbox{lb}{dans}
partbox{tb}{dans} partbox{tr}{dans}
partbox{br}{dans}
partbox{rlt}{dans} partbox{rbt}{dans} partbox{blt}{dans} partbox{blr}{dans}
end{document}
Just to show the ability to use fboxsep
and fboxrule
, here is the identical result, but with fboxsep=0ptrelaxfboxrule=1ptrelax
set at the beginning of the document:
If one wishes it not to interfere with linespacing, then this tweak should work, adding a vphantom
and smash
. Of course, it will not prevent overlap, if fboxsep
and/or fboxrule
are set large enough (NOTE: this solution is still the original variety, only allowing a single side to be stricken):
documentclass{article}
usepackage[nopar]{lipsum}
usepackage{trimclip}
defCLIP{dimexprfboxrule+.2ptrelax}
newcommandpartbox[2]{leavevmodevphantom{#2}smash{%
ifx#1lclipbox{CLIP{} 0pt 0pt 0pt}{fbox{#2}}else
ifx#1bclipbox{0pt CLIP{} 0pt 0pt}{fbox{#2}}else
ifx#1rclipbox{0pt 0pt CLIP{} 0pt}{fbox{#2}}else
ifx#1tclipbox{0pt 0pt 0pt CLIP{}}{fbox{#2}}else
fifififi
}}
parskip 1ex
begin{document}
lipsum[4] partbox{l}{dans}
lipsum[4] partbox{b}{dans}
lipsum[4] partbox{r}{dans}
lipsum[4] partbox{t}{dans}
lipsum[4]
end{document}
edited Aug 9 '16 at 13:34
answered Aug 9 '16 at 11:40
Steven B. SegletesSteven B. Segletes
160k9205413
160k9205413
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
@Matsmath It will behave likefbox
, subject to changes infboxrule
andfboxsep
.
– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
add a comment |
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
@Matsmath It will behave likefbox
, subject to changes infboxrule
andfboxsep
.
– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
I wonder how does this look like in a paragraph, surrounded by running text.
– Matsmath
Aug 9 '16 at 11:44
1
1
@Matsmath It will behave like
fbox
, subject to changes in fboxrule
and fboxsep
.– Steven B. Segletes
Aug 9 '16 at 11:46
@Matsmath It will behave like
fbox
, subject to changes in fboxrule
and fboxsep
.– Steven B. Segletes
Aug 9 '16 at 11:46
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
Beautiful solution. I wonder, is there any easy way to modify this code to remove two of the sides--say, the top and left, at one time?
– twoblackboxes
Aug 9 '16 at 12:48
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@twoblackboxes Please see revision of 1st answer to see how it can be done.
– Steven B. Segletes
Aug 9 '16 at 13:26
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
@StevenB.Segletes This is really excellent work. Thank you so much!
– twoblackboxes
Aug 9 '16 at 13:33
add a comment |
Is there an easy, general way to do this, perhaps with Tikz?
I cannot understand the tendency of people to use a sledgehammer to crack a nut. Perhaps with tabular
?
documentclass{article}
begin{document}
tabcolsep.2em
Un voyage begin{tabular}{|c }hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|}hline dans\ end{tabular} l'space.
Un voyage begin{tabular}{ c|}hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|} dans\hline end{tabular} l'space.
end{document}
If you hate tabular
, some makebox
, rule
and vrule
commands can do the same work. However, it is tedious finding manually the right widths of the horizontal rules. But this is solved using widthof of
the calc
package. This make a complete framed box with automatic width:
vrule%
makebox[0pt][l]{rule[-.25em]{widthof{dans}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{dans}+.2em}{.4pt}}%
makebox[widthof{dans}+.2em][c]{dans}%
vrule
Simply removing rows 1,2,3 or 5 in the above code you can obtain the incomplete boxes.
Convert both solutions in macros is straightforward. For simplicity, instead of a single macro with two arguments, I suggest make four macros where the text is the unique argument. For instance:
documentclass{article}
usepackage{calc}
newcommandopenleftbox[1]{%
vrule
makebox[0pt][l]{rule[-.25em]{widthof{#1}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{#1}+.2em}{.4pt}}%
makebox[widthof{#1}+.2em][c]{#1}%
%vrule
}
begin{document}
Un voyage openleftbox{dans} l'space.
end{document}
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
add a comment |
Is there an easy, general way to do this, perhaps with Tikz?
I cannot understand the tendency of people to use a sledgehammer to crack a nut. Perhaps with tabular
?
documentclass{article}
begin{document}
tabcolsep.2em
Un voyage begin{tabular}{|c }hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|}hline dans\ end{tabular} l'space.
Un voyage begin{tabular}{ c|}hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|} dans\hline end{tabular} l'space.
end{document}
If you hate tabular
, some makebox
, rule
and vrule
commands can do the same work. However, it is tedious finding manually the right widths of the horizontal rules. But this is solved using widthof of
the calc
package. This make a complete framed box with automatic width:
vrule%
makebox[0pt][l]{rule[-.25em]{widthof{dans}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{dans}+.2em}{.4pt}}%
makebox[widthof{dans}+.2em][c]{dans}%
vrule
Simply removing rows 1,2,3 or 5 in the above code you can obtain the incomplete boxes.
Convert both solutions in macros is straightforward. For simplicity, instead of a single macro with two arguments, I suggest make four macros where the text is the unique argument. For instance:
documentclass{article}
usepackage{calc}
newcommandopenleftbox[1]{%
vrule
makebox[0pt][l]{rule[-.25em]{widthof{#1}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{#1}+.2em}{.4pt}}%
makebox[widthof{#1}+.2em][c]{#1}%
%vrule
}
begin{document}
Un voyage openleftbox{dans} l'space.
end{document}
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
add a comment |
Is there an easy, general way to do this, perhaps with Tikz?
I cannot understand the tendency of people to use a sledgehammer to crack a nut. Perhaps with tabular
?
documentclass{article}
begin{document}
tabcolsep.2em
Un voyage begin{tabular}{|c }hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|}hline dans\ end{tabular} l'space.
Un voyage begin{tabular}{ c|}hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|} dans\hline end{tabular} l'space.
end{document}
If you hate tabular
, some makebox
, rule
and vrule
commands can do the same work. However, it is tedious finding manually the right widths of the horizontal rules. But this is solved using widthof of
the calc
package. This make a complete framed box with automatic width:
vrule%
makebox[0pt][l]{rule[-.25em]{widthof{dans}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{dans}+.2em}{.4pt}}%
makebox[widthof{dans}+.2em][c]{dans}%
vrule
Simply removing rows 1,2,3 or 5 in the above code you can obtain the incomplete boxes.
Convert both solutions in macros is straightforward. For simplicity, instead of a single macro with two arguments, I suggest make four macros where the text is the unique argument. For instance:
documentclass{article}
usepackage{calc}
newcommandopenleftbox[1]{%
vrule
makebox[0pt][l]{rule[-.25em]{widthof{#1}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{#1}+.2em}{.4pt}}%
makebox[widthof{#1}+.2em][c]{#1}%
%vrule
}
begin{document}
Un voyage openleftbox{dans} l'space.
end{document}
Is there an easy, general way to do this, perhaps with Tikz?
I cannot understand the tendency of people to use a sledgehammer to crack a nut. Perhaps with tabular
?
documentclass{article}
begin{document}
tabcolsep.2em
Un voyage begin{tabular}{|c }hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|}hline dans\ end{tabular} l'space.
Un voyage begin{tabular}{ c|}hline dans\hline end{tabular} l'space.
Un voyage begin{tabular}{|c|} dans\hline end{tabular} l'space.
end{document}
If you hate tabular
, some makebox
, rule
and vrule
commands can do the same work. However, it is tedious finding manually the right widths of the horizontal rules. But this is solved using widthof of
the calc
package. This make a complete framed box with automatic width:
vrule%
makebox[0pt][l]{rule[-.25em]{widthof{dans}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{dans}+.2em}{.4pt}}%
makebox[widthof{dans}+.2em][c]{dans}%
vrule
Simply removing rows 1,2,3 or 5 in the above code you can obtain the incomplete boxes.
Convert both solutions in macros is straightforward. For simplicity, instead of a single macro with two arguments, I suggest make four macros where the text is the unique argument. For instance:
documentclass{article}
usepackage{calc}
newcommandopenleftbox[1]{%
vrule
makebox[0pt][l]{rule[-.25em]{widthof{#1}+.2em}{.4pt}}%
makebox[0pt][l]{rule[.85em]{widthof{#1}+.2em}{.4pt}}%
makebox[widthof{#1}+.2em][c]{#1}%
%vrule
}
begin{document}
Un voyage openleftbox{dans} l'space.
end{document}
edited Aug 10 '16 at 10:31
answered Aug 10 '16 at 2:23
FranFran
53.5k6119183
53.5k6119183
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
add a comment |
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
Sledgehammer? If you go to my profile, you will see that "I enjoy... reinventing the wheel" Perhaps I should add that I enjoy cracking nuts with a sledgehammer.
– Steven B. Segletes
Aug 10 '16 at 3:22
1
1
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
@StevenB.Segletes In this way?
– Fran
Aug 10 '16 at 3:38
add a comment |
Another solution with tcbox
(from tcolorbox
.
documentclass{article}
usepackage{tcolorbox}
usepackage{lmodern}
newtcbox{lbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, leftrule=0pt,#1}
newtcbox{rbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, rightrule=0pt,#1}
newtcbox{tbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, toprule=0pt,#1}
newtcbox{bbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, bottomrule=0pt,#1}
begin{document}
The lbox{quick} tbox{brown} bbox{fox} rbox{jumps} over the lbox[colback=red!30, colframe=blue]{lazy dog}.
end{document}
add a comment |
Another solution with tcbox
(from tcolorbox
.
documentclass{article}
usepackage{tcolorbox}
usepackage{lmodern}
newtcbox{lbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, leftrule=0pt,#1}
newtcbox{rbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, rightrule=0pt,#1}
newtcbox{tbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, toprule=0pt,#1}
newtcbox{bbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, bottomrule=0pt,#1}
begin{document}
The lbox{quick} tbox{brown} bbox{fox} rbox{jumps} over the lbox[colback=red!30, colframe=blue]{lazy dog}.
end{document}
add a comment |
Another solution with tcbox
(from tcolorbox
.
documentclass{article}
usepackage{tcolorbox}
usepackage{lmodern}
newtcbox{lbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, leftrule=0pt,#1}
newtcbox{rbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, rightrule=0pt,#1}
newtcbox{tbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, toprule=0pt,#1}
newtcbox{bbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, bottomrule=0pt,#1}
begin{document}
The lbox{quick} tbox{brown} bbox{fox} rbox{jumps} over the lbox[colback=red!30, colframe=blue]{lazy dog}.
end{document}
Another solution with tcbox
(from tcolorbox
.
documentclass{article}
usepackage{tcolorbox}
usepackage{lmodern}
newtcbox{lbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, leftrule=0pt,#1}
newtcbox{rbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, rightrule=0pt,#1}
newtcbox{tbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, toprule=0pt,#1}
newtcbox{bbox}[1]{on line, sharp corners, colback=white, colframe=black, size=small, bottomrule=0pt,#1}
begin{document}
The lbox{quick} tbox{brown} bbox{fox} rbox{jumps} over the lbox[colback=red!30, colframe=blue]{lazy dog}.
end{document}
answered Aug 9 '16 at 15:43
IgnasiIgnasi
95.6k4175319
95.6k4175319
add a comment |
add a comment |
This can be achieved with the efbox
package.
Examples from the documentation:
documentclass[convert]{standalone}
usepackage{efbox}
begin{document}
efbox{Foo}
efbox[rightline=false,topline=false]{Foo}
efbox[topline,backgroundcolor=red]{Foo}
efbox[linewidth=2pt,font=Large]{Large Foo}
efbox[rightline=false,topline=false,linecolor=blue,linewidth=2pt]{Foo}
efbox[margin=10pt,backgroundcolor=yellow,font=ttfamilyitshape]{Italic Typewriter Foo}
efbox[linewidth=3pt,margin=5pt,backgroundcolor=red]{Foo}
efbox[hidealllines,backgroundcolor=red]{Foo}
efbox{Foo}
efbox[hidealllines,backgroundcolor=red,margin=15pt]{Foo}
efbox[margin=15pt,linewidth=5pt]{Foo}
efbox[bottomline=false,rightline=false,linewidth=2pt,margin=1pt,backgroundcolor=yellow]{Foo}
efbox{Foo}
end{document}
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
add a comment |
This can be achieved with the efbox
package.
Examples from the documentation:
documentclass[convert]{standalone}
usepackage{efbox}
begin{document}
efbox{Foo}
efbox[rightline=false,topline=false]{Foo}
efbox[topline,backgroundcolor=red]{Foo}
efbox[linewidth=2pt,font=Large]{Large Foo}
efbox[rightline=false,topline=false,linecolor=blue,linewidth=2pt]{Foo}
efbox[margin=10pt,backgroundcolor=yellow,font=ttfamilyitshape]{Italic Typewriter Foo}
efbox[linewidth=3pt,margin=5pt,backgroundcolor=red]{Foo}
efbox[hidealllines,backgroundcolor=red]{Foo}
efbox{Foo}
efbox[hidealllines,backgroundcolor=red,margin=15pt]{Foo}
efbox[margin=15pt,linewidth=5pt]{Foo}
efbox[bottomline=false,rightline=false,linewidth=2pt,margin=1pt,backgroundcolor=yellow]{Foo}
efbox{Foo}
end{document}
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
add a comment |
This can be achieved with the efbox
package.
Examples from the documentation:
documentclass[convert]{standalone}
usepackage{efbox}
begin{document}
efbox{Foo}
efbox[rightline=false,topline=false]{Foo}
efbox[topline,backgroundcolor=red]{Foo}
efbox[linewidth=2pt,font=Large]{Large Foo}
efbox[rightline=false,topline=false,linecolor=blue,linewidth=2pt]{Foo}
efbox[margin=10pt,backgroundcolor=yellow,font=ttfamilyitshape]{Italic Typewriter Foo}
efbox[linewidth=3pt,margin=5pt,backgroundcolor=red]{Foo}
efbox[hidealllines,backgroundcolor=red]{Foo}
efbox{Foo}
efbox[hidealllines,backgroundcolor=red,margin=15pt]{Foo}
efbox[margin=15pt,linewidth=5pt]{Foo}
efbox[bottomline=false,rightline=false,linewidth=2pt,margin=1pt,backgroundcolor=yellow]{Foo}
efbox{Foo}
end{document}
This can be achieved with the efbox
package.
Examples from the documentation:
documentclass[convert]{standalone}
usepackage{efbox}
begin{document}
efbox{Foo}
efbox[rightline=false,topline=false]{Foo}
efbox[topline,backgroundcolor=red]{Foo}
efbox[linewidth=2pt,font=Large]{Large Foo}
efbox[rightline=false,topline=false,linecolor=blue,linewidth=2pt]{Foo}
efbox[margin=10pt,backgroundcolor=yellow,font=ttfamilyitshape]{Italic Typewriter Foo}
efbox[linewidth=3pt,margin=5pt,backgroundcolor=red]{Foo}
efbox[hidealllines,backgroundcolor=red]{Foo}
efbox{Foo}
efbox[hidealllines,backgroundcolor=red,margin=15pt]{Foo}
efbox[margin=15pt,linewidth=5pt]{Foo}
efbox[bottomline=false,rightline=false,linewidth=2pt,margin=1pt,backgroundcolor=yellow]{Foo}
efbox{Foo}
end{document}
answered Aug 10 '16 at 12:08
RomildoRomildo
1,86832545
1,86832545
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
add a comment |
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
This is the easiest method presented here. However, I don't know why, but it is bugged. I managed to draw what i want after many experiments, adding backslashes in front etc..
– Nik-Lz
Feb 22 '17 at 10:27
add a comment |
Package fbox
has been recently added to CTAN. This package adds an optional parameter to fbox
. This new parameter allows to declare which box sides should be drawn.
documentclass{article}
usepackage{fbox}
begin{document}
The fbox[tb]{quick} fbox[lr]{brown} fbox[ltb]{fox} fbox[trb]{jumps} fbox[lb]{over} fbox[tr]{the} fbox{lazy dog}.
end{document}
add a comment |
Package fbox
has been recently added to CTAN. This package adds an optional parameter to fbox
. This new parameter allows to declare which box sides should be drawn.
documentclass{article}
usepackage{fbox}
begin{document}
The fbox[tb]{quick} fbox[lr]{brown} fbox[ltb]{fox} fbox[trb]{jumps} fbox[lb]{over} fbox[tr]{the} fbox{lazy dog}.
end{document}
add a comment |
Package fbox
has been recently added to CTAN. This package adds an optional parameter to fbox
. This new parameter allows to declare which box sides should be drawn.
documentclass{article}
usepackage{fbox}
begin{document}
The fbox[tb]{quick} fbox[lr]{brown} fbox[ltb]{fox} fbox[trb]{jumps} fbox[lb]{over} fbox[tr]{the} fbox{lazy dog}.
end{document}
Package fbox
has been recently added to CTAN. This package adds an optional parameter to fbox
. This new parameter allows to declare which box sides should be drawn.
documentclass{article}
usepackage{fbox}
begin{document}
The fbox[tb]{quick} fbox[lr]{brown} fbox[ltb]{fox} fbox[trb]{jumps} fbox[lb]{over} fbox[tr]{the} fbox{lazy dog}.
end{document}
answered 7 hours ago
IgnasiIgnasi
95.6k4175319
95.6k4175319
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f323986%2fhow-to-draw-a-partial-or-incomplete-box-around-one-or-more-words-within-a-paragr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you provide a minimal working example (MWE) with your partial solution?
– heather
Aug 9 '16 at 11:38