▲ 2 r/typst

Need help setting up #outline() in Bundle

Edit: solved

#document("index.html", title: [Home])[
#title()
#set heading(numbering: "1.")
#outline()

#link(<blog>)[Go to blog]
]


#document("chapter-01.html", title: [Blog])[
#title()
Welcome to my blog!
= Heading 01
== Heading 02
=== Heading 03
==== Heading 04
===== Heading 05
This blog also exists as a
#link(<blog-pdf>)[single PDF].
] <blog>

#document("book.pdf", title: [Blog])[
#set heading(numbering: "1.")
#outline()
Welcome to my blog!
= Heading 01
== Heading 02
=== Heading 03
==== Heading 04
===== Heading 05
include "other chapters..."
] <blog-pdf>

#asset(
"favicon.ico",
read("images/favicon.ico", encoding: none),
)

cmd: typst compile main.typ dist --format bundle

The problem I am facing is that the outline produced in index.html contains TOC of both html and pdf. while I only want TOC of appropriate format.

reddit.com
u/abhinandh_s_ — 4 days ago

Built "Pikachu" - A Telegram bot for instant access to PYQs and MQPs

Pikachu is a Telegram bot I built to quickly retrieve PYQs and MQPs. Currently it have ~600 files in its database, covering almost 90% PYQs and MQPs of Syllabus 2022.

Link: Pikachu

I'm looking for some feedbacks. If you have a moment to test it out, I’d love to hear your thoughts or feature suggestions!

Current status

PYQs

Foundation (couldn't find)

  • 26J
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D

Inter

  • 26J // haven't fully published yet by the institute
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D

Final

  • 26J // haven't fully published yet by the institute
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D

MQPs

Foundation

  • 26J
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D // couldn't find

Inter

  • 26J
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D

Final

  • 26J
  • 25D
  • 25J
  • 24D
  • 24J
  • 23D

I would appreciate your contributions towards missing files : )

Note: I gain absolutely zero monetary benefit from this. It is a passion project and I do not collect any user data.

u/abhinandh_s_ — 2 months ago

Monitor showing "No signal"

guys, I need help. today when I turned on my PC the monitor is showing "No signal". not even seeing the BIOS screen. I did some troubleshooting.

I tried to switch HDMI cables, monitor is actually picking up both ports (when I pull one cable off it tells me, there is other one; should I switch display to that)

then I pluged out all peripherals from CPU.

added fresh thermal paste

cleaned ram

reseted CMOS

still showing "no signal"

then I removed GPU and connected HDMI via motherboards port.

then when I turned it on. i saw the BIOS screen and then the bootloader. but it didn't make it till the login screen. again "no signal".

i restarted many time but I didn't saw the BIOS screen ever again : ( I waited for some time to cool down everything and tried again. still "no signal" from the start.

what should I do now? i dont have any parts spare to test. my only option is to buy new one. is there anything I can do to pin point the problem? can I be sure that it 100% ram issue?

edit: I disconnected the HardDisk. and pulged in a USB to boot from it.

it showed BIOS screen and I selected os live environment. clicked on grub option with nomodset. after 5 secs of selecting, again "no signal".

i restart it many times, still no signal, form start not even seeing BIOS screen. (still only USB connected no harddisk)

reddit.com
u/abhinandh_s_ — 3 months ago
▲ 37 r/rust

Hey all,

I am a CMA intermediate student. And I have been building a finance library based on what I am studying.

One thing that keep bugging me is floating point precision. No matter what I do the api looks kinda off. There is always some downsides to it. And now I think I should build my funtions using only generics. This seems the right choice ig. I am really confused at this point.

In finance there is a lot of area where f64 is enough. And some funtions would be better with rust_decimal::Decimal or any other such crate.

I looked into many crate to learn how they manage this problem. Most of them force user to use f64. Some provide a feature flag for rust_decimal. If we turn on that, literally every function; even the one I don't need such high presicon would get the performance penalty of rust_decimal.

My question is why people dont use generics. For example

pub fn quick<C>(current_assets: C, inventory: C, current_liabilities: C) -> C
where
    C: Div<Output = C> + Sub<Output = C>,
{
    (current_assets - inventory) / current_liabilities
}

This is the function I wrote for finding quick ratio. I can use both f64 and Decimal or any type which impl Sub and Div trait. Isn't this the easy way of doing this from library authors POV and users POV? No feature flags or any other constrains. Things just works! Atleast thats what I think.

Is generics bad or anything? Am I missing something?

If anyone can guide me on this. I would really appreciate it.

How I wrote Variance computation using generics: https://github.com/abhinandh-s/airborne/blob/master/src%2Fstats%2Fdispersion.rs#L137-L165

Feel free to roast my code! I’m here to learn :)

u/abhinandh_s_ — 4 months ago