Need help getting raw line to work #3958
Answered
by
IllustratedMan-code
lettuceDestroyer
asked this question in
Q&A
-
I can't get What I tried is the following: Typst file: #set raw(theme: "dark_modern.tmTheme")
#show raw: it => block(
fill: rgb("#1d2433"),
inset: 8pt,
radius: 5pt,
text(fill: rgb("#a2aabc"), it)
)
#raw.line(1,3,"System",
raw(read("./CSharp_Example_File.cs"), lang: "cs")
)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProbeIPA.Shared.DTO
{
public class BuildingDto
{
public int Id { get; set; }
public List<RoomDto> Rooms { get; set; }
public List<UserDto> FacilityManagers { get; set; }
public string Test { get; set; }
}
public void Test()
{
string name = "\"Tobi\"";
}
} The tmTheme can be found in this repository Additional information:
|
Beta Was this translation helpful? Give feedback.
Answered by
IllustratedMan-code
Apr 24, 2024
Replies: 1 comment
-
What exactly are you trying to do with You can't use #{
show raw.line: it => if it.number <= 3 {
show "System": set text(blue)
it
} else {
it
}
raw(
read("./CSharp_Example_File.cs"),
lang: "cs",
)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lettuceDestroyer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What exactly are you trying to do with
raw.line
? Are you trying to highlight the "system" text in the first 3 lines?You can't use
raw.line
that way, though you can modify it with show rules. I managed to highlight the first three "System" occurrences using the following code: