Execute this snippet of AppleScript with Script Editor:

    tell application "BBEdit"
        set vContents to ""
        repeat with i from 1 to 250
            set vNumber to i as string
            if i < 10 then
                set vNumber to "00" & vNumber
            else if i < 100 then
                set vNumber to "0" & vNumber
            end if
            set vContents to vContents & "<figure>\n<img src=\"images/eq/" 
& vNumber & ".jpeg\" width=\"100%\" />\n</figure>\n"
        end repeat
        make new document with properties {contents:vContents}
    end tell

HTH

Jean Jourdain
On Wednesday, December 8, 2021 at 4:24:18 AM UTC+1 Tom Robinson wrote:

> Right, that’s an issue.
>
> You could search for a single digit and replace with 00<digit>, then do 
> the same for double digits — or start at 1000 and remove the leading digit 
> — but easier to use a spreadsheet :]
>
>
> On 2021-12-08, at 15:18, Tim A <timaa...@gmail.com> wrote:
>
> Still are faced with adding 0 or 00 to numbers less than 100 of the 
> generated line numbers, no? Or is there a buried preference for asserting 
> the number of leading zeros?
> Numbers.app allows this with the Cells/Data Format/Numeral System   Base 
> and Places 
>
>
> On Monday, December 6, 2021 at 5:11:48 PM UTC-8 Tom Robinson wrote:
>
>> No need for a spreadsheet, BBEdit has a line numbering command :]
>> 1. create document with 250 blank lines
>> 2. Text > Add/Remove Line Numbers.  Don’t add spaces or justify — we just 
>> want a plain number
>> 3. Do a Grep search for an entire line:
>> ^.*$
>>
>>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/9ae01ca7-9ed4-48e2-9cda-152027d8f973n%40googlegroups.com.

Reply via email to