Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: let blank lines end at the end of the line #75

Open
Sk1nk opened this issue Jan 7, 2021 · 4 comments
Open

Suggestion: let blank lines end at the end of the line #75

Sk1nk opened this issue Jan 7, 2021 · 4 comments
Labels
suggestion suggestions and feature requests support I need help with the usage of the package

Comments

@Sk1nk
Copy link

Sk1nk commented Jan 7, 2021

Since the lockdown I need to create more and more exercise-sheets and your package is saving me a lot of trouble ever since. Thank you very much for all the effort you put into this.

I recently came across a problem I couldn't figure out. Is there a way to let the blank line end at the end of a line like \hrulefill would? Right now I am adjusting the width=.xx\linewidth for each blank space to give my students as much writing space as possible, but I would love a boolean, that would complete the line to the end of the line, after commands such as width are fulfilled. That way I could do something like

"Give the definition for the following

  • factor: ______
  • product: _____
  • meaning of life: _____________________________________________________________________ _____________________________________________________________________________________________________________________________________________"
@muzimuzhi
Copy link

The \linegoal from linegoal package might be helpful:

\documentclass{article}
\usepackage{lipsum}
\usepackage[pass, showframe]{geometry}

\usepackage{linegoal}
\usepackage{xsim}

\begin{document}
\lipsum[2]

abc \blank[width=\linegoal]{text}
\end{document}

image

@cgnieder cgnieder added suggestion suggestions and feature requests support I need help with the usage of the package labels Jan 7, 2021
@cgnieder
Copy link
Owner

cgnieder commented Jan 7, 2021

It's a reasonable wish and shouldn't be too hard to implement. Meanwhile @muzimuzhi's suggestion seems a valid way to go :)

@cgnieder
Copy link
Owner

After thinking about this a little bit more I believe using \linegoal might be a better option than to implement something myself.

What do you think?

@muzimuzhi
Copy link

Perhaps users may also want to add a punctuation after such blank lines, and when width=\linegoal is used, that could (only) be supported by adding a new blank option:

\documentclass{article}
\usepackage[pass, showframe]{geometry}

\usepackage{linegoal}
\usepackage{xsim}

\begin{document}
current:

abc \blank[width=-3pt+\linegoal]{text}.

def \blank[width=2\linewidth-3pt+\linegoal]{text}.

% expected:

% abc \blank[width=\linegoal, end-punct={.}]{text}
\end{document}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions and feature requests support I need help with the usage of the package
Projects
None yet
Development

No branches or pull requests

3 participants