GithubHelp home page GithubHelp logo

Comments (12)

elwinarens avatar elwinarens commented on May 5, 2024

I'm having the same problem with an ordered list. Any updates on this issue?

from phpword.

RLovelett avatar RLovelett commented on May 5, 2024

Yes, kind of. I never got it fully ready for prime-time. That is why I never submitted a pull-request.

But I have a branch in a personal fork called saic. In that branch I have worked-around this issue by completely allowing you to design your own numbered lists. Similar to the way you can create paragraph and font styles.

The specific commit is this one: https://github.com/RLovelett/PHPWord/commit/1a6c6851f0d2444245f457c245d717ab18084672

If you make patches/changes to it I would love to see them. I want to make this feature complete and get it merged into master. πŸ‘

from phpword.

ivanlanin avatar ivanlanin commented on May 5, 2024

Hi @RLovelett, can you please check the latest version of the develop branch to verify that this feature is already in place and perhaps give us some suggestion for improvement? Thanks.

from phpword.

Progi1984 avatar Progi1984 commented on May 5, 2024

@RLovelett Some news ? :)

from phpword.

RLovelett avatar RLovelett commented on May 5, 2024

Yeah there is news. The code is way different now between when I made https://github.com/RLovelett/PHPWord/commit/1a6c6851f0d2444245f457c245d717ab18084672.

What is more, code that I wrote, has been cut-n-paste into the PHPWord repository rather than cherry-picked or merged. Which is causing git to choke on my rebase/merge. Which is causing me to have resolve a lot of conflicts. Basically making me have to re-review all the code.

I need to figure out if the code that I wrote has already been merged into master/develop. Also, there is entirely new chunks of code that I cannot figure out when it came into existence and why it came it to existence because of all the renaming/moving of files (e.g., when did indent start existing in Paragraph?). For instance I know that the proper use of indenting (i.e., w:ind) is required to cause lists to restart their numbering. It does not appear that the version of indenting and hanging lines was implemented fully to take advantage of that...

Point is a lot has changed and I need to figure out what has been implemented and what has not. Then I can go about figuring out how to apply the old restart numbering fix to this new code. Bottom line though is I should be able submit a new patch against develop.

from phpword.

ivanlanin avatar ivanlanin commented on May 5, 2024

Hi @RLovelett. Yes, heavy changes to the code base has been made since codeplex (0.6.*). I don't know when indent was added to paragraph style, but I add hanging in #48.

Since there's no pull request and the code base is quite different, I focused on implementing the functionality and the result is probably quite different with your approach. Please feel free to change my implementation.

Thanks.

from phpword.

alpha1125 avatar alpha1125 commented on May 5, 2024

Is there any updates to this issue?

from phpword.

ivanlanin avatar ivanlanin commented on May 5, 2024

Custom numbering has been added since 0.10. See Sample_14_ListItem.php for the implementation example. Recipe to create numbered headings (#193) has also been added. We kept all issues open until the original submitter confirm.

from phpword.

RLovelett avatar RLovelett commented on May 5, 2024

@ivanlanin go ahead and just write this down as a confirm from me.

I am not going to have the time to recreate the project that caused me to make the pull request using the new PHPWord. Without that tool I have no way to confirm if it is "working" or not working. (PHPWord did not have a testing framework back when I originally was working this stuff).

If I ever do end up using the project again and I find that it is not working; I will submit a new pull request then.

from phpword.

ivanlanin avatar ivanlanin commented on May 5, 2024

Ok, @RLovelett. Thanks.

from phpword.

Kell avatar Kell commented on May 5, 2024

Hey folks,
i see the issue is closed but i don't see how list numbering is restarted just custom numbering styling was added?
I also found this https://stackoverflow.com/questions/34390893/phpword-and-listitemrun-reset-numbering , which seems to me that its still not possible in proper way and i need to make new style if i want a reset ?
Setting numbers manually isn't possible, right? for example to set the "counter" back to 1?

@ivanlanin

from phpword.

alpha1125 avatar alpha1125 commented on May 5, 2024

@Kell that was how I eventually approached it. New style id for every list restart. Wasn't the end of the world, but the output was generated, and more meant for human editing... so it wasn't much of a problem.

from phpword.

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.