yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] acadoid:
Today two examples for writing music, a simple one

width = LN.getWidth();
height = LN.getHeight();
LN.setStrokeWidth(0.001 * width);
left = 0.05 * width;
right = 0.95 * width;
step = 0.005 * height;
for(y = 0.05 * height; y < 0.95 * height; y += 0.05 * height) {
LN.drawLine(left, y, right, y);
LN.drawLine(left, y + step, right, y + step);
LN.drawLine(left, y + 2 * step, right, y + 2 * step);
LN.drawLine(left, y + 3 * step, right, y + 3 * step);
LN.drawLine(left, y + 4 * step, right, y + 4 * step);
LN.drawLine(left, y, left, y + 4 * step);
LN.drawLine(right, y, right, y + 4 * step);
}

and a double one

width = LN.getWidth();
height = LN.getHeight();
LN.setStrokeWidth(0.001 * width);
left = 0.05 * width;
right = 0.95 * width;
step = 0.005 * height;
for(y = 0.05 * height; y < 0.9 * height; y += 0.1 * height) {
LN.drawLine(left, y, right, y);
LN.drawLine(left, y + step, right, y + step);
LN.drawLine(left, y + 2 * step, right, y + 2 * step);
LN.drawLine(left, y + 3 * step, right, y + 3 * step);
LN.drawLine(left, y + 4 * step, right, y + 4 * step);
LN.drawLine(left, y + 9 * step, right, y + 9 * step);
LN.drawLine(left, y + 10 * step, right, y + 10 * step);
LN.drawLine(left, y + 11 * step, right, y + 11 * step);
LN.drawLine(left, y + 12 * step, right, y + 12 * step);
LN.drawLine(left, y + 13 * step, right, y + 13 * step);
LN.drawLine(left, y, left, y + 13 * step);
LN.drawLine(right, y, right, y + 4 * step);
LN.drawLine(right, y + 9 * step, right, y + 13 * step);
}

(step size etc. can easily be adjusted).
[Android Apps and Games] acadoid:
Since v1.16.13, there is an additional JavaScript command LN.setColor(r, g, b) that allows to use colors other then the one chosen in the dialog. This allows now, for instance, a ruled pattern with a red line on the left side

width = LN.getWidth();
height = LN.getHeight();
LN.drawRuledPattern(LN.getScale(), false);
LN.setStrokeWidth(0.002 * width);
LN.setColor(1, 0, 0);
LN.drawLine(0.05 * width, 0, 0.05 * width, height);
[Android Apps and Games] RETIEF:
isometric problems

I love this app. I am using it on a Galaxy Note 10.1. The isometric script give an error message that it takes too long and aborts. Thought you would want to know.

By the way, I tested it three times using cut ans paste. Once from the help page, and twice from here.

Keep up the good work.
[Android Apps and Games] acadoid:
@RETIEF: To double-check, I copied and paste the content shown in this thread, and it works. Note, however, that on my Samsung Galaxy Note 10.1 (for instance in difference to my Lenovo ThinkPad Tablet), the copy/paste converts a `new line´ into nothing (instead of a space), this causes problems, for instance `else y1´ becomes `elsey1´, which is wrong. Please check whether this is causing the problem in your case.
[Android Apps and Games] RETIEF:
Attempt to fix calendar

I didn't have that exact problem, but the if else structures left out lines in the paste so that that all read if (xxxxx); else ;next line.

I manually edited the script to match exactly what was posted here and I still get the same error message. This is for the isometric code.

On the calendar code, if I use a task killer (I use the factory Samsung one), I can get the code to load and execute if I stopped on January. But if I left the document later in the year, I get the same error message.

I'm no coder (at least not since the Fortran G and Turbo Pascal days), but I wounder if extending the process time a second would solve the problem.

Like I said. I'm no coder.

In any case, I appreciate your help. I'm sure you have better things to do.
[Android Apps and Games] acadoid:
@RETIEF: All the posted codes work fine on my Samsung Galaxy Note 10.1. I can increase the maximal time, but I do not think that this is the problem. Have you tried to share such page or export it to PDF? In these cases, the maximal waiting time is ten times longer (these operations are not time critical), so if you get an abort message there, then something is wrong in your code.

If you drop me an email, I can send the code as email attachment to you, this will exclude all possible sources of error.
[Android Apps and Games] RETIEF:
PMed you with address. Didn't now your address.

see the PM

Edit. I get a partial rendering in landscape mode before abort. I get horizontal lines, and one diagonal in the upper left.
[Android Apps and Games] RETIEF:
Isometric paper

Thanks for the e-mail. It works like a champ. I've talked with a lot of developers in my time, but you are the most responsive and responsible I have ever had the pleasure to know. Thanks.
[Android Apps and Games] acadoid:
@RETIEF: Curious, the text in the post above is copied and pasted from the same file. In any case, glad that it works.
[Android Apps and Games] jewnersey:
Heye acadoid. Really dig the app, but im looking for something with type capabilities as well. Are you thinking about implementng this at all?

I am familiar with other apps, but some offer too much and have strange and annoying options (freenote) or great simple user and user friendly text environments with no drawing capabilities(jotterpad hd).
[Android Apps and Games] acadoid:
@jewnersey: LectureNotes has a text drawing tool for typed text, but this is intended for a keyword or a small phrase, not for longer text. To improve in this respect is on my agenda.

Note that this is not quite the right thread, there are several general threads on LectureNotes, this one is specific for custom paper pattern.
[Android Apps and Games] RETIEF:
Thanks for the Weekly Calendar

Thanks for this post. It took a couple of edits to get it perfect on my note 10.1, but I like it. Thanks for your work and sharing.:good:
[Android Apps and Games] tyfoxx:
Just turned on to LectureNotes and this Forum will make me appreciate it all the more.
[Android Apps and Games] tech.towan:
page x of y

The programmer added the funtion LNgetNumberOfPages();

My custom pattern is checkered and shoes the number of pages (page x of y) at the bottom:

width = LN.getWidth();

height = LN.getHeight();

page = LN.getPage ();

pages = LN.getNumberOfPages();

scale = LN.getScale ();

LN.drawCheckeredPattern (scale, false);

LN.setColor (1, 1, 1);

LN.drawFilledRect(width/2-0.07*width, height-0.025*height, width/2+0.07*width, height);

LN.setColor (0.4, 0.4,0.4);

LN.setTextSize (0.02 * width);

LN.setTextAlign (0);

LN.drawText("Seite " + page + " von " + pages , 0.5*width, 0.99*height);

Hope you like it as well.
[Android Apps and Games] RETIEF:
Thanks

Thanks. This works well. Anyone skilled enough to make one that is checkered with every fifth line bold or red?

:)
[Android Apps and Games] acadoid:
@RETIEF: Try

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
LN.drawCheckeredPattern(scale, false);
LN.setStrokeWidth(0.002 * width);
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += 5 * step) {
LN.drawLine(0, y, width, y);
}
for(x = step / 2; x < width; x += 5 * step) {
LN.drawLine(x, 0, x, height);
}

This draws a thicker line every fifth line, the scale of the pattern is controlled by the slider in the notebook settings dialog. To get red lines, add a

LN.setColor(1, 0, 0);

after the LN.setStrokeWidth.
[Android Apps and Games] RETIEF:
thanks

this is perfect. Thanks.
[Android Apps and Games] ShapeShifter499:
Hi,

[MENTION=4619147]acadoid[/MENTION] I brought your app because it's pretty darn good for note taking and it allows for recording audio while note taking.

However I have one issue; the paper template for "Simple daily calender" isn't getting today's date correctly just the year is correct, it starts at January 1 of this year. I don't know how to fix this in the template code. Can someone please help?

EDIT: I've noticed this on all the paper templates that include today's date, this needs fixing.
[Android Apps and Games] acadoid:
[MENTION=2022267]ShapeShifter499[/MENTION]: All daily calendar custom paper pattern are for the whole year and display the first day of the year (January 1) on the first page, the second day of the year (January 2) on the second page, and so on, and the last day of the year (December 31) on the 365th or on the 366th page (the latter for leap years); the year is determined by the creation date of the notebook. This is intentionally and will not change.

If you wish to skip pages and, let's say, have October 1 on the first page, you need to modify the line

page = LN.getPage();

to

page = LN.getPage() + 274;
[Android Apps and Games] ShapeShifter499:
Oh this makes sense, when I first looked at the code I thought the expected behaviour was to start the date on the creation date of the notebook. So I just have to count up to the day I want to start on and add that to the page variable, thanks for pointing that out.
[Android Apps and Games] Friedel042:
Hello everybody,

I'm new to LN and I'm looking for a solution to get a picture or icon in my template. Is this possible?

Thanks for your answers

JF
[Android Apps and Games] acadoid:
[MENTION=7867346]Friedel042[/MENTION]: What exactly do you refer to by `get´? Load a PNG/JPEG file from the file system/network? That is not possible. However, you can draw anything that you like using the drawing commands (point, line, etc.).
[Android Apps and Games] dwcasey:
nice!

[MENTION=4619147]acadoid[/MENTION], just discovered this app and the XDA thread. Fantastic app. Love the template options and ability to import PDF.

Have you ever considered supporting embedded links inside a PDF?

Going to try your tip above to create a planner of sorts starting on the day of my choice, and using the built-in Index to allow me to link days and/or weeks.
[Android Apps and Games] acadoid:
[MENTION=2745769]dwcasey[/MENTION]: Does your suggestion refer (1) to PDF files imported into a notebook or (2) to PDF files exported from a notebook?
[Android Apps and Games] dwcasey:
PDFs imported as a new or existing notebook.

?
[Android Apps and Games] dwcasey:
Javascript a Daily Planner

I'm not a Javascript guy, so apologies for asking. All this got me thinking, since there is a Monthly calendar and a Daily planner, what about some combined JavaScript generated page? Something like here https://www.emilyley.com/pages/printables and look at the "Simplified Planner Daily Page" .

Then Indexes for the months could be created after the fact...unless that could be java-scripted as well??
[Android Apps and Games] acadoid:
[MENTION=2745769]dwcasey[/MENTION]: The difference to the daily planer example being the to-do-list on the right?
[Android Apps and Games] dwcasey:
Todo list on the right and notepad/scratchpad at the bottom. I've taken the PDF sample and modified it so that there is a grid on the bottom and not just blank space. Attached pic.
[Android Apps and Games] acadoid:
[MENTION=2745769]dwcasey[/MENTION]: I will have a look into it as soon as I have some time.
[Android Apps and Games] pedroaugustofaria:
How to insert a dotted pattern on this sheet? [Cornell Note-Taking System]

I used as a base an already done pattern in the app, and I inserted the function for the dotted pattern as well, but the points became infinitesimally small. This is the original code I modified from the app:

drawLinesInCue = false;
width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 210 * 35;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(horizontal, 0, horizontal, height);
if (drawLinesInCue) {
LN.drawCheckeredPattern(scale, false);
} else {
LN.drawCheckeredPattern(scale, horizontal, 0, width, height, false);
}
LN.drawFilledRect(0, 0, width, 0.025 * height);
LN.setColor(0, 0, 0);
LN.setTextSize(0.0125 * height);
LN.setTextAlign(1);
LN.drawText("Pág. " + LN.getPage(), 0.005 * height, 0.015 * height);
LN.setTextAlign(-1);
LN.drawText(LN.getName(), width - 0.005 * height, 0.015 * height);

And the one where I changed a word only to the dotted pattern:

drawLinesInCue = false;
width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 210 * 35;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(horizontal, 0, horizontal, height);
if (drawLinesInCue) {
LN.drawDottedPattern(scale, false);
} else {
LN.drawDottedPattern(scale, horizontal, 0, width, height, false);
}
LN.drawFilledRect(0, 0, width, 0.025 * height);
LN.setColor(0, 0, 0);
LN.setTextSize(0.0125 * height);
LN.setTextAlign(1);
LN.drawText("Pág. " + LN.getPage(), 0.005 * height, 0.015 * height);
LN.setTextAlign(-1);
LN.drawText(LN.getName(), width - 0.005 * height, 0.015 * height);

How to make the dotting more visible?
[Android Apps and Games] acadoid:
[MENTION=8052545]pedroaugustofaria[/MENTION]: Try

LN.drawDottedPattern(scale, 0.002 * width, false);

and

LN.drawDottedPattern(scale, 0.002 * width, horizontal, 0, width, height, false);

(additional parameter `0.002 * width´ at second place) and adjust the factor 0.002 as needed.
[Android Apps and Games] pedroaugustofaria:
Great! It was exactly what I needed, thank you!
[Android Apps and Games] Valkyriemind:
Hello.

I'm looking for a pattern code to make a simple paper frame with page number in the middle bottom.

Thanks in advance
[Android Apps and Games] acadoid:
[MENTION=10126538]Valkyriemind[/MENTION]: Have a look at the custom paper examples, there are several ones with page partitioning and page number centered at the bottom. Which ones come the closest to what you have in mind?
[Android Apps and Games] caffeinatedinsanity:
Trying but failing to scale.

I have been trying to figure out how to get this to scale and maybe have the engineering grid run the entire page like in physical engineering paper but haven't had any luck. I hope one of yall with more Javascript experience might be able to figure it out for me.
[Android Apps and Games] caffeinatedinsanity:
Engineering Paper that will scale!

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
line= 0.05* width;
clear_t= 0.025 *height;
clear_b= 0.975*height
page= LN.getPage();

LN.setColor(0.957, 0.976, 0.849);
LN.drawFilledRect(0,0, width, height);

LN.drawCheckeredPattern(scale, false);
LN.setStrokeWidth(0.002 * width);
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += 5 * step) {
LN.setColor(0.2, 0.365, 0.690, 0.173);
LN.drawLine(0, y, width, y);
}
for(x = step / 2; x < width; x += 5 * step) {
LN.setColor(0.3, 0.365, 0.690, 0.173);
LN.drawLine(x, 0, x, height);
}

LN.setColor(0.365, 0.690, 0.173);
LN.drawLine(line,0,line,height);
LN.drawLine(width - line, 0, width-line,height);
LN.drawLine(0,clear_t, width, clear_t);
LN.drawLine(0,clear_b,width,clear_b);
LN.drawLine(width/3,0, width/3, clear_t);
LN.drawLine(width/3 + width/3, 0, width/3+width/3, clear_t);

LN.setColor(0,0,0);
LN.setTextSize(0.02 * width);
LN.setTextAlign(0);
LN.drawText("Pg" + page, 0.025*width, 0.99 * height);
LN.drawText("Pg"+page, 0.025* width, 0.02*height);

I finally figured out an engineering paper pattern that will scale! thanks to the double checkered example patter and the previously posted engineering paper pattern, but I can't get the checkered pattern to use a the green I want with the LN.setColor(); command.
[Android Apps and Games] acadoid:
[MENTION=11003651]caffeinatedinsanity[/MENTION]: The four parameter form of LN.setColor() has opacity as first parameter.
[Android Apps and Games] caffeinatedinsanity:
Yes i want it to have some opacity to simulate the engineering paper having the pattern printed on the back side.

I figured out what was the problem it is that the base version of LN.drawCheckeredPattern() doesn't allow the color to be coded.

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
line= 0.05* width;
clear_t= 0.025 *height;
clear_b= 0.975*height
page= LN.getPage();

LN.setColor(0.957, 0.976, 0.849);
LN.drawFilledRect(0,0, width, height);

LN.setColor(0.2,0.365, 0.690, 0.173)
LN.drawCheckeredPattern(0,0, width, height,scale, 0, 0, width, height);
LN.setStrokeWidth(0.002 * width);
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += 5 * step) {
LN.setColor(0.2, 0.365, 0.690, 0.173);
LN.drawLine(0, y, width, y);
}
for(x = step / 2; x < width; x += 5 * step) {
LN.setColor(0.3, 0.365, 0.690, 0.173);
LN.drawLine(x, 0, x, height);
}

LN.setColor(0.365, 0.690, 0.173);
LN.drawLine(line,0,line,height);
LN.drawLine(width - line, 0, width-line,height);
LN.drawLine(0,clear_t, width, clear_t);
LN.drawLine(0,clear_b,width,clear_b);
LN.drawLine(width/3,0, width/3, clear_t);
LN.drawLine(width/3 + width/3, 0, width/3+width/3, clear_t);

LN.setColor(0,0,0);
LN.setTextSize(0.02 * width);
LN.setTextAlign(0);
LN.drawText("Pg" + page, 0.025*width, 0.99 * height);
LN.drawText("Pg"+page, 0.025* width, 0.02*height);
[Android Apps and Games] Tintinnuntius:
[MENTION=4619147]acadoid[/MENTION]

Would it be possible to include the Dotted pattern with the standard patterns in the Notebook settings menu? I use it a lot and now that it's under Custom every single notebook I've used that pattern in recently gets shown in the Use template menu before all other patterns, so there's a lot of unnecessary scrolling to get to other custom patterns (the first dozen all say "identical to Dotted"). There's currently 5 choices in two columns, so Dotted would fit right in the remaining spot.
[Android Apps and Games] acadoid:
[MENTION=4226212]Tintinnuntius[/MENTION]: You can hide the notebooks in the custom paper pattern overview.
[Android Apps and Games] tdeacon:
When exporting to PDF, will LectureNotes preserve the Audio, and possibly Video embedded on the PDF as a Rich Media PDF? Or does it only take a flat layer image of the Note and convert it to PDF. Likewise is the text still selectable/searchable on the PDF?
[Android Apps and Games] acadoid:
@tdeacon: Audio and video are not preserved upon PDF import in LectureNotes.
[Android Apps and Games] epipremnum:
Hi @acadoid,

I've tried adding a new post on your 2 most previous help threads, but the forum logs me out and won't allow it.

Firstly, thank you so much for this app. I've tried others which pale in comparison to this one, and I recommend it to all my peers in engineering as well.

Problem:

I'd love to be able to have my tablet crash entirely, and have the ability to access my most up to date files on my computer as I take exams using LN. I have all the relevant backup apps installed and working, the last piece of the puzzle is to have LN store my files in a directory that isn't the hidden com.acadoid.lecturenotes folder.

What I've tried:

- Setting storage permissions in Android to give access to LN.

- Using a abs filepath (/storage/[SDCARD#]/Android/data/com.acadoid.lecturenotes/files) works, but this directory is hidden.

- Using any other filepath (/storage/emulated/0 or /storage/emulated/0/pictures or /storage/[SDCARD#]/[Random folder]/ or anything else) the app says it cannot write to this location and writes to default directory.

- Searching for this problem all over google, I find it's a fault of Google itself and not the app, but maybe there's a workaround?

- I cannot root my device as it's still under warranty.

I'd appreciate any help, thanks!

Google tags: LectureNotes custom app directory default directory backup export SD card
[Android Apps and Games] acadoid:
@epipremnum: My apologies, I just saw your post.

I assume that you use a device running Android 11?

Google has revised access to the file system in Android 11, the vast majority of apps cannot freely access the file system despite having the ‘Storage’ permission.

Only apps belonging to a small number of allowed categories can have full file system access via a privileged interface, for instance file manager apps or cloud service apps. These apps have to be updated accordingly and certified by Google. The certification is very strict, only apps belonging to the allowed categories are considered.

All other apps cannot freely access the file system; LectureNotes can only access a few places in the file system, including the default app directory.

Note that you can connect the device to a ‘normal’ computer via USB and access the device's file system as external storage.
[Android Apps and Games] epipremnum:
Thanks so much for the response, I've found a good workaround for my situation with your help!

For anyone else who might look for this in the future:

Apps I use:

LectureNotes, DriveSync by MetaCtrl (upgraded version), Backup & Sync from Google

From my hand to the laptop:

- When I'm writing something, I've set LectureNotes to automatically save every 2 minutes.

- DriveSync has elevated storage permissions and can access the LN data files, so I've set up a 1 way mirror to a google drive folder. DriveSync is then set to trigger when the directory changes at all (i.e my autosave takes place).

- Backup & Sync from Google then sees the change and downloads it into my local PC directory.

If I drop my tablet mid-lecture/mid-exam I can open my laptop and know I've only missed at most 2 minutes of work and carry on.

Cheers Markus, glad I can continue to use this app next semester!
[Android Apps and Games] acadoid:
Another example, an adjustable dotted pattern

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
LN.setStrokeWidth(0.002 * width);
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += step) {
for(x = step / 2; x < width; x += step) {
LN.drawPoint(x, y);
}
}
[Android Apps and Games] RETIEF:
Thanks

Works well.

Is it possible to create one the horizontal lines and wider spaced lines very light lines at 37.5 degrees. (used for Spencerian caligraphy). Thanks.
[Android Apps and Games] acadoid:
@RETIEF: Try

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
LN.drawRuledPattern(scale, false);
LN.setStrokeWidth(0.002 * width);
LN.setAlpha(0.5);
step = width / 150 + scale * width / 25;
offset = 0.608761 * height;
for(x = -offset + step / 2; x < width; x += step) {
LN.drawLine(x, height, x + offset, 0);
}

Adjust line width, alpha, and line distance as needed (note that sin(37.5) approx. 0.608761).
[Android Apps and Games] RETIEF:
Thanks again.

This is what I wanted. I made a couple of tweaks, but ended up with perfect Spencerian practice paper.

:good:
[Android Apps and Games] acadoid:
@RETIEF: I would be curious to see the final result, feel free to post it here.
[Android Apps and Games] junglefish:
Dot pattern isn't working for me. :-/

Thanks for all the code examples, @acadoid.

Unfortunately, the dot-pattern code doesn't work on my Galaxy Note 10.1. When I copy-paste it (after adding in line breaks) it just doesn't put anything on the page. If I copy-paste without adding line breaks, same issue. I scoured through the code and found no errors. (If this sounds familiar, I'm the same guy who was emailing you about a dot pattern. :)

@RETIEF, can you summarize for me what you did to get it working?

Thanks!
[Android Apps and Games] acadoid:
@junglefish: The posted coded should work fine. I guess that RETIEF did not meant that she/he corrected a mistake but rather adjusted step sizes.
[Android Apps and Games] RETIEF:
Spencerian

Exactly. I adjust the step size, and line width. I did about a half page of Spencerian writing and it worked well.

The attached PDF is exactly what a practice sheet looks like except it has the characters on it already.

The one here works well and helped me check if I still had my characters at the correct slant and size.
[Android Apps and Games] RETIEF:
What I did

Honestly, I just copy and pasted the code from here into the notebook. It resulted in a page of evenly spaced dots. If that was what was intended, it worked well. If something else was intended, it didn't work. I find this kind of page useful because the dots are unobtrusive but can still be used as guides.
[Android Apps and Games] junglefish:
Dang.

Yes, the evenly spaced grid of dots is what I was hoping for. I find it very valuable on my print notebook, and was hoping for the same on my electric notebook. :)

Dang. I'll mess with it some more and see if I can get it to work. Maybe it's copying the text improperly -- using the wrong browser on Android? I'm somewhat new to the Android experience, and might be doing something wrong.

Thanks for the confirmation, though. And for all the support! :)

JF