Skip to content

Commit

Permalink
v1.2 fix to labsplit
Browse files Browse the repository at this point in the history
  • Loading branch information
asjadnaqvi committed Oct 8, 2024
1 parent 914ff06 commit 8df7677
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Currently, this package contains:

|Program|Version|Updated|Description|
|----| ---- | ---- | ----- |
| [labsplit](#labsplit) | 1.0 | 28 Sep 2024 | Text wrapping |
| [labsplit](#labsplit) | 1.1 | 28 Sep 2024 | Text wrapping |
| [catspline](#catspline) | 1.0 | 04 Oct 2024 | Catmull-Rom splines |
| [arc](#arc) | 1.0 | 08 Oct 2024 | Arcs between two points |

Expand Down Expand Up @@ -55,7 +55,7 @@ graph set window fontface "Arial Narrow"
## Examples

### labsplit
*(v1.0: 28 Sep 2024)*
*(v1.1: 08 Oct 2024)*

The program allows users to split text labels based on flexible or fixed character length or word positions.

Expand Down Expand Up @@ -216,7 +216,8 @@ Please open an [issue](https://github.com/asjadnaqvi/stata-graphfunctions/issues

**v1.2 (08 Oct 2024)**
- `arc` added.
- Minor fixes to programs with additional checks. Version numbers stay the same.
- Bug fixes in `labsplit`.
- Additional checks in programs.

**v1.1 (04 Oct 2024)**
- `catspline` added.
Expand Down
7 changes: 4 additions & 3 deletions installation/labsplit.ado
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*! labsplit v1.0 (28 Sep 2024)
*! labsplit v1.1 (08 Oct 2024)
*! Asjad Naqvi (asjadnaqvi@gmail.com)

* v1.1 (08 Oct 2024): bug fixes
* v1.0 (28 Sep 2024): first release.


Expand Down Expand Up @@ -63,12 +64,11 @@ quietly {
summ `_words', meanonly
local items = `r(max)'



forval i = 2/`items' {

cap drop `_tempword'
gen `_tempword' = word(`varlist', `i') if !missing(`varlist')


replace `length0' = length(`current_line') if !missing(`varlist')
replace `length1' = length(`_tempword') if !missing(`varlist')
Expand All @@ -82,6 +82,7 @@ quietly {

replace `_myvar' = `_myvar' + `current_line' if !missing(`current_line') & `_myvar' != ""
replace `_myvar' = word(`varlist', 1) if `_words'==1
replace `_myvar' = `varlist' if missing(`_myvar')
}
}

Expand Down
4 changes: 2 additions & 2 deletions installation/labsplit.sthlp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ See {browse "https://github.com/asjadnaqvi/stata-graphfunctions":GitHub}.

{title:Package details}

Version : {bf:labsplit} v1.0 in {stata help graphfunctions:graphfunctions}
This release : 28 Sep 2024
Version : {bf:labsplit} v1.1 in {stata help graphfunctions:graphfunctions}
This release : 08 Oct 2024
First release: 28 Sep 2024
Repository : {browse "https://github.com/asjadnaqvi/stata-graphfunctions":GitHub}
Keywords : Stata, graph, label wrap, text wrap, word wrap
Expand Down

0 comments on commit 8df7677

Please sign in to comment.