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

Allow to not include Country in Location #9

Closed
kyawzazaw opened this issue Dec 21, 2023 · 5 comments
Closed

Allow to not include Country in Location #9

kyawzazaw opened this issue Dec 21, 2023 · 5 comments

Comments

@kyawzazaw
Copy link

If I comment out the Country in the value part, it still adds a comma after the Region

@jskherman
Copy link
Owner

Hi, just like in #10 you can also override the #addresstext and #cvheading functions for this in cv.typ in your example.typ file. For example:

// Each section function can be overridden by re-declaring it here
#let addresstext(info, uservars) = {
    if uservars.showAddress {
        block(width: 100%)[
            #info.personal.location.city, #info.personal.location.region // <===== Edit the address text
            #v(-4pt)
        ]
    } else {none}
}


// Create layout of the title + contact info
// Just copied this verbatim with no change for new addresstext() function to work
#let cvheading(info, uservars) = {
    align(center)[
        = #info.personal.name
        #addresstext(info, uservars)
        #contacttext(info, uservars)
        // #v(0.5em)
    ]
}

You need to redeclare both of these functions in the example.typ for it to be overwritten properly.

@mangkoran
Copy link
Contributor

mangkoran commented Jan 26, 2024

@jskherman I think we could make several fields optional/won't be shown if user don't provide the YAML key/value. What do you think?

@jskherman
Copy link
Owner

That would be for the best, but I don't think I'll be able to work on this anytime soon. If someone could do a PR along the lines of phamson02's suggestion...

@mangkoran
Copy link
Contributor

I will try to work on it!

@mangkoran mangkoran mentioned this issue Jan 27, 2024
mangkoran added a commit to mangkoran/cv.typ that referenced this issue Jan 28, 2024
mangkoran added a commit to mangkoran/cv.typ that referenced this issue Apr 11, 2024
@jskherman
Copy link
Owner

Hi sorry for taking so long, the country and other address fields can now be omitted for this with the v1.0.1 release, pending merge in the Typst packages repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants