How to quote what's left of the remaining horizontal space?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I'm trying to come up with my own command to fill what's left of the horizontal space with dots but I want the dots slightly lowered relative to the text. Here's my code :
newcommandansfillraisebox-.2baselineskipmakebox[linewidth]dotfill
This works fine when there's nothing on my line
ansline
but goes into hbox overfull error when I add anything as the box from makebox is always linewidth.
e.g.
Example Text ansfill
gives me an overfull hbox error.
I need a parameter that changes depending on what's left of the horizontal space. Something like :
newcommandansfillraisebox-.2baselineskipmakebox[whatever-that-is-left]dotfill
Thanks.
line
add a comment |Â
up vote
2
down vote
favorite
I'm trying to come up with my own command to fill what's left of the horizontal space with dots but I want the dots slightly lowered relative to the text. Here's my code :
newcommandansfillraisebox-.2baselineskipmakebox[linewidth]dotfill
This works fine when there's nothing on my line
ansline
but goes into hbox overfull error when I add anything as the box from makebox is always linewidth.
e.g.
Example Text ansfill
gives me an overfull hbox error.
I need a parameter that changes depending on what's left of the horizontal space. Something like :
newcommandansfillraisebox-.2baselineskipmakebox[whatever-that-is-left]dotfill
Thanks.
line
Why don't you simply remove that box?dotfill
will fill the remaining line for you.
– TeXnician
Aug 27 at 11:13
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm trying to come up with my own command to fill what's left of the horizontal space with dots but I want the dots slightly lowered relative to the text. Here's my code :
newcommandansfillraisebox-.2baselineskipmakebox[linewidth]dotfill
This works fine when there's nothing on my line
ansline
but goes into hbox overfull error when I add anything as the box from makebox is always linewidth.
e.g.
Example Text ansfill
gives me an overfull hbox error.
I need a parameter that changes depending on what's left of the horizontal space. Something like :
newcommandansfillraisebox-.2baselineskipmakebox[whatever-that-is-left]dotfill
Thanks.
line
I'm trying to come up with my own command to fill what's left of the horizontal space with dots but I want the dots slightly lowered relative to the text. Here's my code :
newcommandansfillraisebox-.2baselineskipmakebox[linewidth]dotfill
This works fine when there's nothing on my line
ansline
but goes into hbox overfull error when I add anything as the box from makebox is always linewidth.
e.g.
Example Text ansfill
gives me an overfull hbox error.
I need a parameter that changes depending on what's left of the horizontal space. Something like :
newcommandansfillraisebox-.2baselineskipmakebox[whatever-that-is-left]dotfill
Thanks.
line
asked Aug 27 at 11:08
Chung Ren Khoo
1077
1077
Why don't you simply remove that box?dotfill
will fill the remaining line for you.
– TeXnician
Aug 27 at 11:13
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14
add a comment |Â
Why don't you simply remove that box?dotfill
will fill the remaining line for you.
– TeXnician
Aug 27 at 11:13
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14
Why don't you simply remove that box?
dotfill
will fill the remaining line for you.– TeXnician
Aug 27 at 11:13
Why don't you simply remove that box?
dotfill
will fill the remaining line for you.– TeXnician
Aug 27 at 11:13
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
You can emulate the definition of dotfill
. I also add an optional argument to set a minimum width for the dots. The last example shows what would happen without the [8em]
.
documentclassarticle
newcommandansfill[1][0pt]%
leavevmode
leaders
hbox to 0.44emhssraisebox-2pt.hss%
hskip #1 plus 1fill
kern0pt
begindocument
Here's a question. ansfill
Here's another longer question for which we need at least eight ems
of space for the answer. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill % <--- Uh, oh!
enddocument
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
add a comment |Â
up vote
3
down vote
The dimension linegoal
defined by the package of the same name is probably the right thing here:
documentclass[12pt]article
usepackagelinegoal
newcommandansfillraisebox-.2baselineskipmakebox[linegoal]dotfill
begindocument
This is something ansfill
enddocument
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (pdflatex
, TeXLive-2018).
– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
You can emulate the definition of dotfill
. I also add an optional argument to set a minimum width for the dots. The last example shows what would happen without the [8em]
.
documentclassarticle
newcommandansfill[1][0pt]%
leavevmode
leaders
hbox to 0.44emhssraisebox-2pt.hss%
hskip #1 plus 1fill
kern0pt
begindocument
Here's a question. ansfill
Here's another longer question for which we need at least eight ems
of space for the answer. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill % <--- Uh, oh!
enddocument
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
add a comment |Â
up vote
5
down vote
accepted
You can emulate the definition of dotfill
. I also add an optional argument to set a minimum width for the dots. The last example shows what would happen without the [8em]
.
documentclassarticle
newcommandansfill[1][0pt]%
leavevmode
leaders
hbox to 0.44emhssraisebox-2pt.hss%
hskip #1 plus 1fill
kern0pt
begindocument
Here's a question. ansfill
Here's another longer question for which we need at least eight ems
of space for the answer. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill % <--- Uh, oh!
enddocument
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
You can emulate the definition of dotfill
. I also add an optional argument to set a minimum width for the dots. The last example shows what would happen without the [8em]
.
documentclassarticle
newcommandansfill[1][0pt]%
leavevmode
leaders
hbox to 0.44emhssraisebox-2pt.hss%
hskip #1 plus 1fill
kern0pt
begindocument
Here's a question. ansfill
Here's another longer question for which we need at least eight ems
of space for the answer. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill % <--- Uh, oh!
enddocument
You can emulate the definition of dotfill
. I also add an optional argument to set a minimum width for the dots. The last example shows what would happen without the [8em]
.
documentclassarticle
newcommandansfill[1][0pt]%
leavevmode
leaders
hbox to 0.44emhssraisebox-2pt.hss%
hskip #1 plus 1fill
kern0pt
begindocument
Here's a question. ansfill
Here's another longer question for which we need at least eight ems
of space for the answer. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill[8em]
Here's another longer question for which we need at least eight ems
of space for the answer, even though the line would be almost filled up
with text. ansfill % <--- Uh, oh!
enddocument
answered Aug 27 at 11:26


egreg
680k8318083056
680k8318083056
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
add a comment |Â
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
This works exactly as expected for me. Thanks.
– Chung Ren Khoo
Aug 27 at 11:36
add a comment |Â
up vote
3
down vote
The dimension linegoal
defined by the package of the same name is probably the right thing here:
documentclass[12pt]article
usepackagelinegoal
newcommandansfillraisebox-.2baselineskipmakebox[linegoal]dotfill
begindocument
This is something ansfill
enddocument
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (pdflatex
, TeXLive-2018).
– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
add a comment |Â
up vote
3
down vote
The dimension linegoal
defined by the package of the same name is probably the right thing here:
documentclass[12pt]article
usepackagelinegoal
newcommandansfillraisebox-.2baselineskipmakebox[linegoal]dotfill
begindocument
This is something ansfill
enddocument
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (pdflatex
, TeXLive-2018).
– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
add a comment |Â
up vote
3
down vote
up vote
3
down vote
The dimension linegoal
defined by the package of the same name is probably the right thing here:
documentclass[12pt]article
usepackagelinegoal
newcommandansfillraisebox-.2baselineskipmakebox[linegoal]dotfill
begindocument
This is something ansfill
enddocument
The dimension linegoal
defined by the package of the same name is probably the right thing here:
documentclass[12pt]article
usepackagelinegoal
newcommandansfillraisebox-.2baselineskipmakebox[linegoal]dotfill
begindocument
This is something ansfill
enddocument
answered Aug 27 at 11:16
AlexG
30.9k475137
30.9k475137
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (pdflatex
, TeXLive-2018).
– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
add a comment |Â
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (pdflatex
, TeXLive-2018).
– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
I'm getting an error saying "Extended allocation already in use" and the line appears to be slightly shorter than expected.
– Chung Ren Khoo
Aug 27 at 11:20
No such message at my end (
pdflatex
, TeXLive-2018).– AlexG
Aug 27 at 11:22
No such message at my end (
pdflatex
, TeXLive-2018).– AlexG
Aug 27 at 11:22
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
Hmm odd. Must be conflicting with some of my packages then.
– Chung Ren Khoo
Aug 27 at 11:25
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f447956%2fhow-to-quote-whats-left-of-the-remaining-horizontal-space%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Why don't you simply remove that box?
dotfill
will fill the remaining line for you.– TeXnician
Aug 27 at 11:13
I'm trying to get it to be lower relative to the text.
– Chung Ren Khoo
Aug 27 at 11:14