GithubHelp home page GithubHelp logo

Comments (12)

anti-the-social avatar anti-the-social commented on June 1, 2024

Hi!

Could you explain how do you do that using Word?

from docx.

mwashambw avatar mwashambw commented on June 1, 2024

I have never done this in Word my self, but I have seen many documents that look like that.

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

Well, its all about text: "%1" and what you put there for different levels. All the formatting is up to you.
https://docx.js.org/#/usage/numbering?id=using-ordered-lists-in-docx
If you provide some example document we can extract that format from there

from docx.

mwashambw avatar mwashambw commented on June 1, 2024

Okay, thanks 🙏 for your response.
This is an example of the document part is that have that arrangement
Screenshot_20231127-064922~2

I just took screenshot for the part and it was already in PDF format.

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

Unfortunately, I cannot help with pdf or images.
.docx is .zip with .xml files and there we can get exact format
So .docx file required

from docx.

mwashambw avatar mwashambw commented on June 1, 2024

Ok, this is the docx file with the same arrangement,
example_124722.docx

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

This example doesn't have any numberings, the things you see are only paragraphs, spaces and tab stop combined :)

from docx.

mwashambw avatar mwashambw commented on June 1, 2024

So to attain that arrangement I need to play With spaces and tab stop? Or is there any other work round?

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

You are correct.
I don't think there is workaround.
The only approach I could've thought didn't work:
lvl1: <w:lvlText w:val="%1."/>
lvl2: <w:lvlText w:val="%1 (%2)"/>
lvl3: <w:lvlText w:val="(%2)"/>
Leads to:
image

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

Not something to complain about docxjs library, but rather Word (OOXML standard) that is not flexible enough for your case.

from docx.

mwashambw avatar mwashambw commented on June 1, 2024

I get the point.Thank you very much for your time

from docx.

anti-the-social avatar anti-the-social commented on June 1, 2024

Don't forget to close an issue once your problem is resolved :)

from docx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.