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

Line spacing for doc.p #160

Open
ArisNance opened this issue Dec 17, 2023 · 2 comments
Open

Line spacing for doc.p #160

ArisNance opened this issue Dec 17, 2023 · 2 comments

Comments

@ArisNance
Copy link

This has been an issue. I'm trying to add a double line space and have followed the documentation and Line 720, Line: :double or spacing, doesn't work. Even with adding a custom_style. What am I missing or where can I refer for an example? Thanks.

@ArisNance
Copy link
Author

ArisNance commented Dec 17, 2023

@jdugan I've tried overriding the default style, and have followed the documentation. It's confusing seeing line 480 or line :double and so on without knowing exactly how to achieve the double spaced line element. Can you provide clarity?

doc.style id: 'Normal', name: 'normal', font: 'Times New Roman', size: 24, line: 720, color: '000000', style: 'Normal'

doc.p('some text'.s, font: 'Times New Roman', size: 24, align: :center, style: 'Normal') do
style 'Normal'
line <--- undefined method for line

end

@chelosobaka
Copy link

@ArisNance This should be done in style block

docx.style do
    id 'CustomStyle'
    name 'Custom Style'
    line 200
end
  docx.p 'some text' do
     style 'CustomStyle'
     align :left
     size 24
     bold true
   end

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

2 participants