yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] junglefish:
New paper feature? Thanks!

OH -- maybe the dot-pattern discussion is moot, now. It looks like there's been an update to the app... adding the option of using an IMAGE for the background.

I think this is the perfect solution! I can just make my own dot pattern as an image, and use that. Bim, bam, done. I even fancied it up a bit more by adding a subtle gradient to the edges to make it look like the page of a book.

Thanks @acadoid. You rock! :highfive:

junglefish
[Android Apps and Games] acadoid:
@junglefish: You can of course use an image with dots, but note that this will be slower than the JavaScript variant.
[Android Apps and Games] RETIEF:
dotted page

I found i could not reliably copy from ANY android browser. I use a pc. Make a text file using notebook, and copy that file to the tablet. I open it in a text editor, usually the one in root explorer. Then i select all, copy, hit the home button, open lecture notes, create a notebook, and paste the text. Convoluted, I know, but it works.:cyclops:
[Android Apps and Games] ratindahat:
Here is a layout i just made. It is engineering paper, for US letter size. It is for a 1280x1677 resolution. I do not think it will scale well to different resolutions, but here it is if anyone wants it. I'm sure there are some ways to clean it up, but it seems to be working well for me so far.

width = LN.getWidth();
height = LN.getHeight();
page = LN.getPage();

pxperin=width/8.5;
pxperline=pxperin/5;
lborder=pxperin; rborder=(pxperin*7)+lborder;
totalgridwidth=pxperin*7;

LN.setColor(.957,.976,.849);
LN.drawFilledRect(0, 0, width, height);

LN.setColor(.365,.690,.173);
LN.setStrokeWidth(width/500);
LN.drawLine(0, pxperin/2, width, pxperin/2);
LN.drawLine(lborder, 0, lborder, height);
LN.drawLine(rborder,0,rborder,height);
LN.drawLine(lborder+(totalgridwidth*.33),0,lborder+(totalgridwidth*.33),pxperin/2);
LN.drawLine(lborder+(totalgridwidth*.67),0,lborder+(totalgridwidth*.67),pxperin/2);

LN.setStrokeWidth(width/1000);
LN.setColor(.2,.365,.690,.173);
for (x = 0; x < 50; x=x+1)
LN.drawLine(lborder,(pxperin/2)+((x+1)*pxperline) ,rborder,(pxperin/2)+((x+1)*pxperline));

LN.setStrokeWidth(width/500);
LN.setColor(.3,.365,.690,.173);
for (x = 0; x <11 ; x=x+1)
LN.drawLine(lborder,(pxperin/2)+((x+1)*pxperline*5) ,rborder,(pxperin/2)+((x+1)*pxperline*5));

LN.setStrokeWidth(width/1000);
LN.setColor(.2,.365,.690,.173);
for (x = 0; x < 35; x=x+1)
LN.drawLine(((x+1)*pxperline)+lborder,pxperin/2,((x+1)*pxperline)+lborder ,(pxperin/2)+(pxperin*10));

LN.setStrokeWidth(width/500);
LN.setColor(.3,.365,.690,.173);
for (x = 0; x < 7; x=x+1)
LN.drawLine(((x+1)*pxperline*5)+lborder,pxperin/2,((x+1)*pxperline*5)+lborder , (pxperin/2)+(pxperin*10));

LN.setTextSize(0.02 * width);
LN.setTextAlign(0);
LN.drawText("Page " + page, 0.05 * width, 0.97 * height);
LN.drawText("Page " + page, 0.05 * width, 0.02 * height);
[Android Apps and Games] acadoid:
Here is a pattern for a story board

width = LN.getWidth();
height = LN.getHeight();
boardsPerRow = (width < height) ? 3 : 4;
marginPerBoardWidth = 0.1;
extraSpacePerRow = 0.15;
boardWidth = width / (boardsPerRow + (boardsPerRow + 1) * marginPerBoardWidth);
margin = boardWidth * marginPerBoardWidth;
stepX = boardWidth + margin;
boardHeight = boardWidth / 16 * 9;
rows = Math.floor(height / (boardHeight * (1 + extraSpacePerRow) + margin));
stepY = boardHeight + (height - boardHeight * rows - margin * 2) / (rows - 1);
LN.setStrokeWidth(0.002 * width);
for(x = margin; x < width; x += stepX) {
for(y = margin; y < height; y += stepY) {
LN.drawRect(x, y, x + boardWidth, y + boardHeight);
}
}

It places 3 (portrait) or 4 (landscape) rectangles of 16:9 aspect ratio per row, with a 10% (0.1) margin and a 15% (0.15) extra margin per row.
[Android Apps and Games] RETIEF:
thanks

Thanks. This one is nice.
[Android Apps and Games] ratindahat:
Took me all semester to finally decide to make it. Glad you like it.
[Android Apps and Games] junglefish:
Very cool idea! However, I still can't get any code to work, including this. I can't figure out what I'm doing wrong. I saved it into a text file, loaded the file on my tablet, copied and pasted the code from that file into the Custom window, but the notebook doesn't show any pattern, just a blank page.

However, a new facet to the issue is: When I go into the "Notebook overview" for that notebook, the preview of the page DOES have storyboards on it! So something's happening correctly. It's just not getting all the way to the full drawing view.

What do you think could be happening?

JF
[Android Apps and Games] acadoid:
@junglefish: This is a bit strange, either the JavaScript works or not. For notebook overview (PDF export, etc). the timing constraint is relaxed, so that the JavaScript code has more time. What you can try to do is to build up the code step by step and see where it fails.
[Android Apps and Games] _yupa_:
My daughter's practice paper (second year italian elementary school), written with portrait 800x1132 resolution (note 10.1- a4) in mind.

width = LN.getWidth();
height = LN.getHeight();
page = LN.getPage ();
LN.setStrokeWidth(0.001 * width);
LN.setTextSize(0.02*width);
LN.setTextAlign(0);
LN.drawText("Pag. " + page, 0.5* width, 0.95* height);
mleft = 0.05 * width;
mright = 0.95 * width;
mdiff=mright-mleft;
step = 0.01 * height;
for(y = 0.05 * height; y < 0.9 * height; y += 0.087 * height) {
LN.drawLine(0, y, width, y);
LN.drawLine(0, y + 3.2 * step, width, y + 3.2 * step);
LN.drawLine(0, y + 5.5 * step, width, y + 5.5 * step);
LN.drawLine(0, y + 8.7 * step, width, y + 8.7 * step);
}
for(x = mleft; x< mright; x += 0.25 * mdiff) {
LN.drawLine(x, 0, x, height);
}
LN.setColor(1, 0, 1);
LN.drawLine(mleft, 0, mleft, height) ;
LN.drawLine(mright, 0, mright, height) ;
[Android Apps and Games] RETIEF:
Thanks

Very nice. Thanks for sharing.
[Android Apps and Games] acadoid:
Here is a pattern for the Cornell note-taking system (paper format is US letter, 8.5 inch times 11 inch):

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 8.5 * 2.5;
vertical = height / 11 * 9;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(0, vertical, width, vertical);
LN.drawLine(horizontal, 0, horizontal, vertical);
step = width / 150 + scale * width / 25;
drawLinesInCue = false;
drawLinesInSummaries = false;
for(y = step / 2; y < vertical; y += step) {
LN.drawLine(horizontal, y, width, y);
}
if (drawLinesInCue) {
for(y = step / 2; y < vertical; y += step) {
LN.drawLine(0, y, horizontal, y);
}
}
if (drawLinesInSummaries) {
for(y = vertical + step / 2; y < height; y += step) {
LN.drawLine(0, y, width, y);
}
}

You can enable whether you would like to have lines in the `cue´ and/or `summaries´ area. Distance between lines can be adjusted with the slider in the notebook settings dialog.
[Android Apps and Games] jeggen:
Curious - is there a simple way to swap what side the 'cue' is on? Technically this is perfect to my knowledge but just a user preference to have the 'cue' on the other side.
[Android Apps and Games] Cocax:
Thanks a lot for this! I use the "modified Cornell system", that doesn't have the summary section, just the cues and notes ones. Could you please make a pattern without the summary section? And maybe in A4 format? :3
[Android Apps and Games] acadoid:
@jeggen: Here is a variant with the cue on the right side

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 8.5 * 6;
vertical = height / 11 * 9;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(0, vertical, width, vertical);
LN.drawLine(horizontal, 0, horizontal, vertical);
step = width / 150 + scale * width / 25;
drawLinesInCue = false;
drawLinesInSummaries = false;
for(y = step / 2; y < vertical; y += step) {
LN.drawLine(0, y, horizontal, y);
}
if (drawLinesInCue) {
for(y = step / 2; y < vertical; y += step) {
LN.drawLine(horizontal, y, width, y);
}
}
if (drawLinesInSummaries) {
for(y = vertical + step / 2; y < height; y += step) {
LN.drawLine(0, y, width, y);
}
}
[Android Apps and Games] acadoid:
@Cocax: Here is a variant with no summary, cue on the left

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 210 * 65;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(horizontal, 0, horizontal, height);
step = width / 150 + scale * width / 25;
drawLinesInCue = false;
for(y = step / 2; y < height; y += step) {
LN.drawLine(horizontal, y, width, y);
}
if (drawLinesInCue) {
for(y = step / 2; y < height; y += step) {
LN.drawLine(0, y, horizontal, y);
}
}

and on the right

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
horizontal = width / 210 * 145;
LN.setStrokeWidth(0.002 * width);
LN.drawLine(horizontal, 0, horizontal, height);
step = width / 150 + scale * width / 25;
drawLinesInCue = false;
for(y = step / 2; y < height; y += step) {
LN.drawLine(0, y, horizontal, y);
}
if (drawLinesInCue) {
for(y = step / 2; y < height; y += step) {
LN.drawLine(horizontal, y, width, y);
}
}

To adjust this to US letter, use `/ 8.5 * 2.5´ instead of `/ 210 * 65´ and `/ 8.5 * 6.5´ instead of `/ 210 * 145´, respectively.
[Android Apps and Games] Cocax:
Thanks a lot! You're the best, Acadoid! ;D
[Android Apps and Games] acadoid:
Here is a simple pattern for a to-do-list with boxes and lines

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += step) {
LN.drawLine(2 * step, y, width, y);
}
for(y = step / 2; y < height - 2 * step; y += 3 * step) {
LN.drawRect(0.5 * step, y, 1.5 * step, y + step);
}

with three lines per box and a second simpler one

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
step = width / 150 + scale * width / 25;
for(y = step / 2; y < height; y += step) {
LN.drawLine(step, y, width, y);
}
for(y = step / 2; y < height - step; y += step) {
LN.drawRect(0.25 * step, y + 0.25 * step, 0.75 * step, y + 0.75 * step);
}

with one line per box.
[Android Apps and Games] RETIEF:
3 lines per box

Is it possible to get this one with a line spacing about twice the one here?
[Android Apps and Games] acadoid:
@RETIEF: The line spacing is not fixed but is controlled by the slider in the new notebook and notebook settings dialogs.
[Android Apps and Games] RETIEF:
thanks

That did the trick. Thanks.

Any possibility of a 2013 calendar?
[Android Apps and Games] acadoid:
@RETIEF: A calender like post #2? This is an eternal one, just change 2012 to 2013 in the first line and the first page will be January 2013.
[Android Apps and Games] RETIEF:
worked. Thanks .
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

hi would it be possible to make a timetable pattern? With all weekdays?

thanks!!!
[Android Apps and Games] acadoid:
@osgoku: I am not sure what you refer to by `timetable pattern´. Do you have a calendar in mind? Post #14 of this thread is a weekly calendar.
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

i mean an weekcalendar from monday to sunday. With a lot of rows where i can write in.Thanks for the fast answer.

---------- Post added at 10:07 PM ---------- Previous post was at 09:46 PM ----------

would it be possible to make 7 columns for each weekday and more notespace per our? Thank you!
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

well as i wrote, the pattern is good, but would it be possible to make 7 columns for each weekday? Thank you!
[Android Apps and Games] acadoid:
@osgoku: Could you prepare and post a sketch?
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

sure i can. like this would be great.
[Android Apps and Games] acadoid:
@osgoku: The code in post #14 yields more or less that, the main differences are that Saturday and Sunday are in one column and that the day is written on top of the column additionally to the weekday.
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

yes thanks that is what i meant, but i need sutarday and sunday like i drew it. would that be possible?
[Android Apps and Games] acadoid:
@osgoku: This can be done, I will have a look on this when I have a moment free time.
[Android Apps and Games] osgoku:
AW: [APP][3.0+] LectureNotes - custom pattern JavaScript codes

perfect! that is what i wanted! thanks a lot!
[Android Apps and Games] hygradeb:
Hi

I tried to copy and paste you java into my LN but got an error I not sure wat I did wrong I was reading anout wat can go wrong

Wat I did was click on reply quote then copy script but I must of did sumting wrong.

Is it possible for all that are doing the hard work of making the script to put up a print screen of the finished work and maybe a txt file that can b downloaded?
[Android Apps and Games] acadoid:
@hygradeb: All codes are tested and should be fine, but sometimes they get messed up upon copy and paste (for instance, if new lines get converted to spaces, the codes can become syntactically wrong). If you drop an email to me, I can send the code as file to you.
[Android Apps and Games] acadoid:
Here is so-called Seyès ruling for A4 page format

width = LN.getWidth();
height = LN.getHeight();
LN.setStrokeWidth(0.001 * width);
step = 2 / 210 * width;
for(y = step; y < height; y += step) {
LN.drawLine(0, y, width, y);
}
LN.setStrokeWidth(0.002 * width);
step = 8 / 210 * width;
for(y = step; y < height; y += step) {
LN.drawLine(0, y, width, y);
}
for(x = 24 / 210 * width; x < width; x += step) {
LN.drawLine(x, 0, x, height);
}
LN.setColor(1, 0, 0);
LN.drawLine(16 / 210 * width, 0, 16 / 210 * width, height);
[Android Apps and Games] Elfsiren:
Code for a Ledger

Hey guys I have a request. Can anyone make a ledger style page? Kind of like those used in accounting? Thanks in advance! :)
[Android Apps and Games] acadoid:
@Elfsiren: Can you provide an image of such page?
[Android Apps and Games] Elfsiren:
Sure thing. I guess I didn't think it through completely when I asked. There are so many, but I have attached a few templates. I hope it's not to tedious! It doesn't have to be exact, in the ballpark would be fine I think. Thank you very much.

Edit: I think the 4th one my be easiest to do? Also I think it's simple and elegant.
[Android Apps and Games] acadoid:
@Elfsiren: These sheets are quite complex and detailed (maybe with the exception of the last one). They can certainly be coded in JavaScript, but an easier solution would be to scan them and use the resulting image as paper background (LectureNotes allows to use an image as paper background, select `image´ in the new notebook or notebook settings dialog).
[Android Apps and Games] Elfsiren:
Thank you! I'll definitely try that.
[Android Apps and Games] slow68:
scan them and use the resulting image as paper background = brilliant

Have not tried this yet, you have given me many ideas with this.

Stefan
[Android Apps and Games] Polycron:
Notepad template

I take no credit for this, It was all acadoid's work and template with one or two VERY minor modifications.

width - LN.getWidth();
height = LN.getHeight();
LN.drawRuledPattern(LN.getScale(), false);
LN.setStrokeWidth(0.002 * width);
LN.setColor(1, 0, 0);
LN.drawLine(0.1 * width, 0, 0.1 * width, height);
LN.drawLine(0.105 * width, 0, 0.105 * width, height);
[Android Apps and Games] osgoku:
I just noticed that it shows the wrong week number. For example this week's number is 18 but it shows 17.

could you please fix this and post the corrected pattern?

Thanks in advance!
[Android Apps and Games] acadoid:
[MENTION=4224824]osgoku[/MENTION]: You are right, the week number that is displayed is not the `official´ week number according to ISO 8601, it is simply calculated by dividing the day number within the year by seven and rounding up. The definition of the first week of a given year according to ISO 8601 is the week that contains the first Thursday of that year. This makes automatic determination of the week number much more complicated, as for instance the last days of a year can be within the first week of the next year.
[Android Apps and Games] osgoku:
Okay thanks, so it isn't possible?

---------- Post added at 11:58 AM ---------- Previous post was at 11:57 AM ----------

Okay thanks, so it isn't possible?
[Android Apps and Games] acadoid:
[MENTION=4224824]osgoku[/MENTION]: Well, not impossible, there are algorithms known to do that, but rather complicated.
[Android Apps and Games] osgoku:
Ok, but could you at least, change the pattern so that I don't see the week number? Thank you
[Android Apps and Games] acadoid:
Another example of a checkered pattern for which the page number and the notebook name is displayed at the top

width = LN.getWidth();
height = LN.getHeight();
scale = LN.getScale();
LN.drawCheckeredPattern(scale, false);
LN.drawFilledRect(0, 0, width, 0.025 * height);
LN.setColor(1, 1, 1);
LN.setTextSize(0.0125 * height);
LN.setTextAlign(1);
LN.drawText("page " + LN.getPage(), 0.005 * height, 0.015 * height);
LN.setTextAlign(-1);
LN.drawText(LN.getName(), width - 0.005 * height, 0.015 * height);
[Android Apps and Games] ffmenezes:
Anyone have a pattern example of game field? Like rugby field (or soccer/football, or others).
[Android Apps and Games] acadoid:
[MENTION=5084727]ffmenezes[/MENTION]: Game fields could easily be coded in JavaScript, but have you considered to use an image as background? To do that, select `image´ in the new notebook (or notebook settings) dialog and select the image file in question.
[Android Apps and Games] ffmenezes:
Thanks [MENTION=4619147]acadoid[/MENTION]. I already considered and used like it. But the custom Java pattern would be greater. Maybe in the future a sports coach share with us. :)
[Android Apps and Games] Eline:
Does anyone know how to insert the create date on top of each date?

Verstuurd van mijn GT-N8010 met Tapatalk
[Android Apps and Games] acadoid:
[MENTION=2084547]Eline[/MENTION]: You refer to the creation date of the notebook? LectureNotes does not keep track of that, I am sorry. The current date can be accessed in JavaScript via the `Date´ object.
[Android Apps and Games] njdroid2:
---------------

This is great. Can you show us how to turn this into an 'Engineering Notebook' page by adding a multi-line footer that would have a signature line and date field to be written in (not an autogenerated date), witness signature line and date field to be written in, and the words 'Proprietary and Confidential' centered at the bottom of the page? Thanks!
[Android Apps and Games] acadoid:
[MENTION=5383042]njdroid2[/MENTION]: In principle, this can be done (an image would be helpful, though). However, if you have this paper pattern as file, it is usually much easier to convert it to an image and set this image as paper background.
[Android Apps and Games] njdroid2:
The image approach worked extremely well. Just what I needed. Thanks for the suggestion. I'd load the image file up here for others to use, but as a new person to this site I can't seem to get the site to upload .png image files without the site transforming them to .jpg. Needs to be .png to work well. Anyway thanks again.
[Android Apps and Games] big_w:
Sorry to be the stupid noob here, but after reading all 3 pages I cant see how to actually use the code. Can someone post a really simple "idiots guide" step by step (screen shots would be fantastic). Of hoe to use these.
[Android Apps and Games] acadoid:
[MENTION=5345164]big_w[/MENTION]: In the `new notebook´ or `notebook settings´ dialogs, click on `custom´ as paper pattern, this will start the JavaScript editor. You can type or paste code there, alternatively select `use template´ in the main menu, this brings up an overview over custom paper pattern used in other notebooks as well as examples that come with LectureNotes and clicking on one of them copies the code into the editor. In case of your own code, you can select `run´ in the main menu of the editor to see whether the code is OK. Finally, click on the `back´ icon in the system bar and confirm that you wish to use the code.
[Android Apps and Games] big_w:
Thanks will have a go.
[Android Apps and Games] big_w:
Got this to work, but struggling to get what I need. Can someone please help me out and create me a template that looks like this. See attached pdf, also need 10mm margins all way round, and footer 5mm up from bottom of page, with rdd line on the 10mm mark from bottom, and the red line on left on 10mm mark.

Hope this makes sense and one of you knowable people can help me out.
[Android Apps and Games] cadilhac:
Here is a dumbed-down version of #14, with a simple one-day timetable.

width = LN.getWidth();
height = LN.getHeight();

headertext = height * 0.05;
headerheight = height * 0.10;
toplineheight = headerheight + headertext;
leftmargin = width * 0.1;
rightmargin = leftmargin;
starthour = 7;
endhour = 23;
headlinecolor = [0,0,0];
defaultcolor = [150,150,150];

widthtext = width-leftmargin-rightmargin;
lineheight = (height - toplineheight) / (endhour - starthour + 2);

LN.setColor(defaultcolor[0]/255, defaultcolor[1]/255, defaultcolor[2]/255);
LN.drawLine(leftmargin, toplineheight, leftmargin, height-lineheight);
LN.setTextAlign(1);
LN.setTextSize(lineheight*0.9);
LN.setStrokeWidth(1);
for (y = toplineheight + lineheight, hour = starthour;
hour <= endhour; y += lineheight, ++hour) {
LN.drawLine(leftmargin,	y,
leftmargin + widthtext, y);
LN.drawText(hour, leftmargin, y - 0.15 * lineheight);
LN.setDashing (3, 3);
LN.drawLine(leftmargin+LN.getTextWidth(hour), y - 0.5 * lineheight,
leftmargin + widthtext,	y - 0.5 * lineheight);
LN.setDashing ();
}

LN.setStrokeWidth(4);
LN.drawLine(leftmargin, toplineheight, leftmargin + widthtext, toplineheight);
LN.setTextSize(headertext);
LN.setColor(headlinecolor[0]/255, headlinecolor[1]/255, headlinecolor[2]/255);
LN.setTextAlign(1);
LN.drawText("Date", leftmargin, headerheight);
LN.drawLine(leftmargin + LN.getTextWidth ("Date "), headerheight,
leftmargin + 3 * widthtext / 4, headerheight);
[Android Apps and Games] Kumabjorn:
Would it be possible to store these different Java files in a location that would be easily accesible to LectureNotes users?
[Android Apps and Games] acadoid:
[MENTION=4215264]Kumabjorn[/MENTION]: LectureNotes includes the examples that I coded: Select `use template´ in the JavaScript editor main menu, this brings up an overview, a click on the example will copy the code.