Comments (12)
I'm having the same problem with an ordered list. Any updates on this issue?
from phpword.
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.
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.
@RLovelett Some news ? :)
from phpword.
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.
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.
Is there any updates to this issue?
from phpword.
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.
@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.
Ok, @RLovelett. Thanks.
from phpword.
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?
from phpword.
@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)
- Images produced by templateProcessor->setImageValue look different in Windows versus Mac HOT 1
- Reader ERROR -> libxml_disable_entity_loader() is deprecated in PHP8
- TemplateProcessor deleteBlock is not working HOT 2
- Extension for PHPWord/src/PhpWord/IOFactory.php::extractVariables
- Contents of the cells are not vertically centered
- cloneBlock property does not function properly with files exceeding 145KB in the template.
- Invalid image: zip:///tmp/......../iamge4.png
- Incorrect variable naming conventions
- Replace all image by their alttext attribute
- Race condition in ZipArchive::$tempDir
- When using addHtml function, the width of the image is not measured in pt
- RTF increases support for Chinese reading
- Corrupted file after SaveAs from templateProcessor
- When I've tried to use it i'd get the error: "Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) ". I've modified the amount of memory via ini_set but the error continues
- Error: Class "ZipArchive" not found (0) En el archivo I:\MisWebs\test\vendor\phpoffice\phpword\src\PhpWord\Shared\ZipArchive.php en la lΓnea: 138 HOT 1
- not adding header and footer on pdf:(dompdf and mpdf) HOT 3
- setImageValue added image doesn't have common image properties
- Uncaught ValueError: Invalid or uninitialized Zip object
- Avoid page break inside table
- Why not use a better HTML parser?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpword.