repo
stringlengths
26
115
file
stringlengths
54
212
language
stringclasses
2 values
license
stringclasses
16 values
content
stringlengths
19
1.07M
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/029%20-%20Aether%20Revolt/005_Burn.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Burn", set_name: "<NAME>", story_date: datetime(day: 04, month: 01, year: 2017), author: "<NAME>", doc ) #strong[This story contains references to suicidal thoughts.] #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #emph[The renegades of Kaladesh rose against Tezzeret's corrupted Consulate. Led by Pia and <NAME>, armed by the criminal mastermind Gonti, allied with inventors and aether pirates, and supported by the Planeswalkers of the Gatewatch, they have seized Ghirapur's vital Aether Hub. Now they must hold it against Consulate counterattack until the airship ] Heart of Kiran#emph[ can be fueled.] #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #emph[Skysovereign] 's plotting table was an impressive display of engineering brilliance, decorative artistry, and the Consulate's seemingly inexhaustible funding. It showed, in clear-eyed detail, how poorly the struggle for order proceeded. On the table before Dovin Baan, mechanical figurines slid along streets color-coded by district; here the green of Kujar, there the blue of Bomat. Cunning puppets in the shapes of the five Gearhulks whirred, stepping carefully, laboriously encircling the filigreed wedge representing the Aether Hub. Slanting dawn sun flooded through the viewports, casting deep shadows between knee-height buildings of brass and tin. Overhead, an arm-length replica of the dreadnought #emph[Skysovereign] dangled from the fixtures at the end of an array of wires, pulleys, and servos. Simulated internal lighting winked out from ranks of pinhole viewports. On a red-painted corner of the Weldfast, another figurine shut its lights off and retracted beneath the map. A dark pin-shape slid down the street to take its place. Peripherally, he heard the report whispered from the operator to his left: "Enforcement squad six-three's automatons have exhausted their aether. The operators spiked the cannon barrels and are pulling back." On the far side of the command deck, Head Judge Tezzeret—now Special Grand Consul Tezzeret, endowed by the Consuls for the duration of the present crisis—was too occupied with screaming in the face of an orderly to pay any mind to this latest setback. The Grand Consul seemed to spend more time each day communicating at great volume from short range. Regrettably, one could not dispute the effectiveness of his outbursts (timed, Baan had noted, to occur no more frequently than once an hour). Since the outbreak of the crisis, the command deck staff had been operating above their usual efficiency. Each was a tightly wound spring, noting systemic and situational faults with admirable speed, then moving swiftly to rectify the matter before the Grand Consul noticed himself. The orderly, a sturdy dwarf bearing an armful of hand-written reports, blinked as a drop of spittle arced onto her cheek. "Sir," she repeated, "that patrol doesn't have the aether. The renegades at the hub have been cutting off the feeds, piping it to some project—" "So help me," Tezzeret growled. "If you give me #emph[one] more excuse. Just. #emph[One] . I will #emph[personally] ram your head through the—" Baan stepped forward, heels clicking smartly on the steel deck plates. To have the Grand Consul threaten the life of a messenger, as if he were some criminal thug instead of a minister of the apparatus of state, would unacceptably undercut the moral authority of the Consulate for all those present. Not the #emph[legal] authority, of course, but one was oft-mistaken for the other. "This is the potential peril of a centralized aether distribution center," Baan took pains to keep his voice as neutral as possible; flat, unconcerned, perfectly gray. As cool and nondescript as the mists burning off the Vinday River far below. Tezzeret wheeled away from the orderly and marched around the plotting table, the command crew pulling back from his path, busying themselves at their dials and kinetic readouts. "We were assured that the facility would be sufficiently protected," Baan continued. "Cons<NAME> stated that usurpation by elements hostile to the government would be, if I may quote, 'an utter imposs—'" Tezzeret glared up into Baan's face. The skin around his lips pulled taut, prematurely gray hair spilling over his shoulders, the crimson tattoos on his forehead crumpled on his furrowed brow. Baan had not yet ascertained the marks' significance, though the pondering of that esoteric knowledge had occupied many idle moments in the last week. They bore no descent from any of Kaladesh's tattooing traditions, and were unlikely to be of his own design; while the Grand Consul's engineering abilities never failed to impress, aesthetics were clearly a matter beneath the level of his concern. It was a matter of wonder that none of the command staff—nor, indeed, any of the Consuls—suspected Tezzeret's origins. Tattoos of indeterminate origin; the physically impossible tensile strength and conductivity of the metal composing his prosthetic arm; his peculiar manners of enunciation. That unquestioning acceptance would surely end once knowledge of Rashmi's breakthrough became common. Popular imagination would be seized by the possibilities suggested by her device. Entire libraries of speculative fiction would be written. "I should rip your tongue out," Tezzeret snarled. Baan raised one brow, carefully, and clasped his hands behind his back. He pitched his voice to polite curiosity; "Indeed?" #figure(image("005_Burn/01.jpg", width: 100%), caption: [<NAME> | Art by <NAME>], supplement: none, numbering: none) The Grand Consul's nostrils flared as obscenities flew from his mouth. Vile, perhaps even shocking, but lacking a certain creative vitality. Not that it was an endeavor worth marking individual distinctions, he supposed. Beyond Tezzeret's shoulder, a member of the bridge crew winced and sank his head lower between his shoulders. When the Grand Consul fell silent, Baan returned his attention to him. Quietly, so no one beyond the two of them could hear, he said, "I acknowledge the effectiveness of your harangues at keeping this crew aligned and attentive. I, however, am...unimpressed." The rage fell away from Tezzeret's face, as abruptly as if it had never been there. His eyes, cold and calculating, tightened to a blazing diamond glitter. The Grand Consul had not seemed a danger a moment ago. Now, there was a gleam in his eyes that spoke of an urge to bend something until it creaked and cracked and wriggled...and hold it at that point, just to see what it would do. One corner of his mouth bent upward, though Baan could not imagine what humor the man perceived. "I need the Aether Hub under our control," the Grand Consul said, in his normal speaking voice. "We pay you to see flaws. Do your job. Find a way. Make it happen." Baan inhaled slowly. It had been ten hours since the plan had come to him, but he had been unable to persuade anyone of consequence to listen. "If I may?" he gestured to the plotting table. The Grand Consul gave a curt nod. Baan stepped down to the table, and worked the controls. The majority of the mechanical cityscape retracted into the table, leaving only the regions surrounding the Aether Hub. The renegade barricades, marked by dark pins, cast an ominous, irregular bulge across the smoothly curving lines of roads, railways, canals, and aethertubes of his city. At the hub itself sat a cluster of pins and six mechanical figurines of glittering brass, each marked with a color-coded banner. Baan pointed to the renegade deployments around the Hub. "They have positioned the majority of their forces at the Hub. A direct assault would be...calamitous. The criminal Renegade Prime commands the position personally." The Grand Consul's elongated metal claws clacked into something vaguely like a fist. "<NAME>." "Yes," Baan acknowledged. <NAME>, partner of Kiran, mother of Chandra. All three had been issued death certificates twelve years and seven months previous. He'd been disturbed to find two of the three alive and delved into the archives. But there they were, exactly as he recalled. Place of death: Bunarat. Cause of death: arson. Witnessed by: Captain <NAME>. Baan worked the controls, and a spotlight fell on a section of the renegade positions: the thin neck connecting the Aether Hub to the wards they controlled. "This focus on defending the Hub leaves their connection to their comrades under-defended. Sufficient pressure from both sides will allow us to complete an encirclement of the Hub." Tezzeret loomed over the table on uneven fists, glaring at the black pins representing renegade defenders. "No siege, Baan. Every minute, automatons and vehicles run out of aether. Just keeping the Gearhulks powered—" "I predict they will withdraw defenders from the Hub to keep this corridor open. The architect of their defensive strategy exhibits a certain...two-dimensional thinking. I think it likely to be the—to be our #emph[guest] , Mr. Jura." Tezzeret lifted a brow at his dissembling, and glanced around at the command crew. If any had noted Baan's tilt to the word, they did not look up. "He was an infantry commander, according to my research. It is doubtful he has significant experience opposing forces enjoying aerial mobility." He twisted a knob, and a series of black pins at road intersections rose higher. "These are defended barricades of overgrown plants. Almost certainly created by their elven accomplice, Nissa." Baan's long fingers worked the controls like a concert sitarist, setting legions into motion. "Their defenses are primarily along that outer perimeter, with a reserve at the Hub. Our pincer attack," the ticking figurines pressed the black pins back along the neck of the renegade position, "will draw off that reserve." The pins clustered around the Hub trickled away, bolstering their retreating comrades. "And now..." A flight of miniature thopters whirred to life on the deck of the model #emph[Skysovereign] . They wobbled across the table, and delicately alighted atop the model Aether Hub. Baan nodded and stepped back from the dials and control sticks. "Transports loaded with Inspectors. I am reasonably confident that aerial deployment behind Mr. Jura's forward positions would take him unprepared. We land on the upper decks and press downward. If nonlethal glimmersnap and aetherpulse charges fail to dislodge the defenders, canister explosives would be most effective. Few renegades wear full armor, and there would be little risk of shrapnel damaging the Hub itself." Tezzeret turned to him, a slight tilt to his neck, an appraising look in his eyes. "Why, Baan. What an uncommonly bloodthirsty suggestion. For you." "This proposal depends upon timing and inertia," he replied, coolly. "If the renegades decline to retreat or surrender, they must be swept aside, lest delay allow them to concentrate fire upon our inspectors. Deaths are inevitable at this juncture. Better they be militants than our civil servants." The Grand Consul smiled approval. "Can you assure me this will work?" Baan frowned. "Of course not. I can only make projections based on what knowledge I am privy to. I estimate an 85-percent chance of success." Tezzeret drummed his living fingers on the edge of the table, then pushed himself back. He tossed a careless gesture at the model Aether Hub, at the brass figures with their colored flags. "What of your #emph[guests] , Baan? They complicate things." "I would judge each to be worth twelve to thirty inspectors, depending on their individual abilities and training. Fortunately, I have had the opportunity to assess their flaws. Most critical is their divided leadership. Gideon and Jace both believe themselves the overall leader. Additionally, Mr. Beleren—" "I know his flaws." Tezzeret's teeth appeared, momentarily, humorless as a cobra tasting the wind. "Neither man entirely trusts Liliana. She thinks little of Gideon in turn. Her regard of Jace is more difficult to analyze; a peculiar mélange of protectiveness and contempt. If questioned, I suspect she would be unable to explain it herself. "Aside from leadership, the group's greatest weakness is <NAME>'s daughter. She is easily provoked into rash acts, which makes the others overprotective of her. Particularly Gideon and Nissa." The Grand Consul yanked a speaking tube down from the overhead tangle. "Chief of Compliance Baral to the command deck. #emph[Now] ," he bellowed into the tube. He heard the words reverberate through the halls of the ship. "Your plan is acceptable." Tezzeret examined his false arm and drew a finger down the length of it. The impossible metal flowed like water under his touch. "I'm #emph[improving] it slightly. The Nalaars have other weaknesses." "I am curious," Baan ventured. "What is the significance of the tattoos on your forehead?" Tezzeret's eyes flickered up and down the length of him, reading his scrupulously neutral posture. "They are to remind me of a debt." One corner of his mouth bent upward, humorlessly. "I wonder, Baan. What flaws do you see when you look at me?" He considered, briefly. "On that matter, I think it prudent to keep my conclusions to myself." The Grand Consul barked a short, sharp laugh. "You're not stupid." He supposed that was what passed for a compliment from Tezzeret. Baral clanked on to the command deck in full combat gear, helmet tucked in the crook of his elbow. He stopped before the two and made a perfunctory salute. "Baral. As ordered." After a moment, he added, "Sir." "You've dealt with the Nalaars," the Grand Consul said. A slow, unpleasant grin spread across Baral's face, turning his scarred cheek into a wasteland of crags and canyons. "That I have." "You reported the entire family to be deceased," Baan said. The Chief Inspector's eyes narrowed. He glanced to Tezzeret, who, uncharacteristically, said nothing. At last, Baral grunted, "The fire the child started. It #emph[confused] things. We discovered the mother among the survivors later." "Indeed?" Baan said, noncommittally. "It troubles me that the reports do not reflect that." "Paperwork's your business, Minister," Baral growled. "I #emph[work] for a living. If you spent a day on the streets—" "Baral," Tezzeret interrupted, "I want you to distract them." The Chief Inspector's eyes drifted back and forth between the two, puzzlement bending his mouth. "Sir?" "#emph[Annoy] the Nalaars. Lure them away from the Aether Hub. Them, and as many of their friends as you can get to follow." Baral chortled through his ruined half-nose. "Easy enough. Then what?" Tezzeret waved a dismissive hand. "Whatever you want." The Chief Inspector raised his remaining brow. "#emph[Whatever] , huh?" The Grand Consul clicked his metal talons together. "Traitors to the Consulate, Baral. Mages with a history of violence. If they won't surrender..." he raised the palm of his mortal hand into the air, face impassive. Baral straightened, and one canine showed between his lips. Baan couldn't decide if it was a smile or a sneer. "Sure enough. Can't have any dangerous #emph[mages] running about." He turned to leave. "Take your squad with you," Tezzeret said. "And Minister Baan." Baral grunted and slammed his helmet down over his shoulder plates. "Hangar seven, Minister," the words echoed out. "We lift in ten minutes." Then he stomped out, metal-shod feet banging on the deck plates. Baan turned to the Grand Consul. "Explain." "Baral's an attack dog," Tezzeret said, looking back to the table. "You're his leash. Let him bite, not chase." Logical, so far as it went. Baan shifted his weight to the other foot. "What of my plan?" "I'll oversee its execution. Don't worry," he smiled unpleasantly. "I'll credit you. Failure #emph[or] success." The Grand Consul hunched over the display, his claws etching fine lines across the polished brass. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Mom's upstairs, I guess. That's where all the other Big Names are. Gonti and Kari and Saheeli and probably some people who don't have names that end in #emph[-i] . She's in total and complete Renegade Prime mode, so she's not mom right now. She's an engineer, solving a problem. All of them at the top of the Aether Hub are trying to figure out how to punch the Consuls in the nethers. I yawn because I didn't get much sleep again. Every night since the crackdown, it's just flames and screaming, nightmares like I used to have at Keral Keep. I'm looking out over Ghirapur, trying to match the blurry places in my head with the sharp ones in front of me. I'm home, but somebody moved all the furniture. I haven't been able to find the water tower I used to climb. I remember it being the tallest thing around. We'd watch the air races from on top, me and my friends. The boring official ones at mid-day, or the ones the older kids ran at night, shrieking through the streets until Consulate traffic-cutters showed up. Sometimes they'd swoop over my tower, or around, and I had to hold on as hot lightning-smell rushed past. Everything's #emph[taller] . The white stone walls and flat roofs I ran across got sunk under brass and turquoise and swirly bits, all glinting and shimmering under noon sun. #figure(image("005_Burn/02.jpg", width: 100%), caption: [Aetherflux Reservoir | Art by Cliff Childs], supplement: none, numbering: none) The wind smells like a thousand million lunches, dust and metal, aether. Across the streets, beyond the barricades, the Consulate's panharmonicons are still blaring "The Gremlin's Wedding March" at us on infinite repeat at double speed. They left them on all night, and after the moon set Nissa started crying, hands clamped over her ears. I didn't know what to do. I wanted to help but my hands wouldn't go, they just flapped around her like peafowl, and I probably said something dumb again. Jace sat down with her. They talked a minute and his eyes flashed. She curled up in a big potted plant and didn't wake up until the sun fell on her. I miss mom. I missed her for a long time, but I got over it. Twelve years is a long time to walk around being a wreck. Which I guess is funny, since everyone probably thinks I'm a wreck all the time, but for like two years I couldn't even breathe. Now she's back, somewhere up above me, just a little bit away. She's so busy fighting a war, I only see her—hear her—when she covers me with a blanket. She probably thinks I'm asleep because it's so late when she gets out of her meetings, but I'm always awake, turned away with my face in the pillow, holding my breath and waiting for her to sit down on the edge of the cot. But she never does and I can't be #emph[over it] anymore. I want her to hug me like at the arena. To talk to me about anything that's not the Consulate for just ten minutes, to put her hands on my too-pale cheeks and #emph[tsk] at me for getting sunburned when she doesn't. I want to smell spilled oil and electric burns on her coat. I want her to braid my hair, like she did before I took the pruning shears to my own head that summer it got super hot. I came down from the rafters and spun around all proud, enjoying the wind on the back of my neck, and she started crying. Then she got <NAME>'s old scissors and evened it out, and told me I looked great, real grown-up. I want to tell her what I've done, what I made of myself, because she only knows the Chandra that screws up all the time. The last time she saw me, I was screwing up. Bringing the Consuls down on us. Getting dad killed. Is that it? Does she blame me? Is that why she won't talk to me? I would, if I were her. I blame me. That was what the Purifying Fire showed me, back on Regatha. When I last had nightmares. I thought, #emph[I'm responsible, I did it, I screwed up and got everyone killed] . Dad. The villagers. Mom. That was why the cold of it stopped burning. Why the hiss of the flame whispered, "You can be forgiven." But I never forgave me. It was a stupid fire anyways. You couldn't even roast nuts with it. The deck creaks behind me. Footsteps. I swipe at my eyes because what if it's someone I don't know? Or worse, someone I know. What if it's Nissa? I haven't thought about what I did on Ravnica. Every time I do, I wanna curl up and pull a blanket over my head. She was nothing but nice to me and I—#emph[It's just, you've been staring at me.] I watched her die a little inside. My cheeks and hair ignite. I slap out the flames. The footsteps get closer, slower. Then we got here, to Kaladesh, all I did was yell at her about my mom. I didn't even think about her. Why did she even #emph[come] , after I made her so uncomfort— Oh #emph[crap] . I hugged her when we were looking for mom. #emph[Twice] . Without even thinking, because when do I ever? Even though I #emph[know] how she twitches just when someone brushes past her. She must have been mentally clawing the ceiling. I'm such a— "Chandra?" A big voice, pitched low, hesitant. Oh. "Hey Gids." He hangs himself over the rail an arm's length away, resting on big, muscly forearms. The slouch brings his eyes down level with my own. "How are you holding up?" I look out across the streets. Except for panharmonicons, everything's still and empty. A hundred thousand people hide in their homes, waiting for the monsoon to break. Hot wind presses my hair back from my forehead. "...I'm fine." A small breath escapes him, half laugh, half sigh. "Chandra, it's...This is none of my business. I know that. I'm sorry. You've had a lot of shocks. Coming home. Finding your mother alive...That's a #emph[good] shock, but still a lot to adjust to. Then the man who—then a man tried to murder you. Now your home's in the middle of a civil war. That's more than anyone should have to deal with in two months." "So you're saying I'm, what, #emph[unstable? ] That it?" Are my hands shaking? My hands are shaking. Damn it, stop that. I feel big sympathetic Gideon eyes on my shoulder. His voice turns even quieter. Over the frenzied bridge of "The Gremlin's Wedding March" he rumbles, "I'm saying...you feel things very deeply. That's one of the things I—one of the things that's great about you. If you need someone to talk to, or just to vent at, I'm here, all right? Whenever." He's so damn #emph[sincere] . I liked that about him when we met. After I was done being mad at him, anyway. A very sincere, bossy, kind, preachy, thoughtful, annoying, adorable stick in the mud. With muscles in all sorts of potentially interesting places. And eyes with a million colors, like a landscape by...some artist who's real good at landscapes. Also abs you could grate cheese on, which I totally did not think about running my hands over for like six months afterward, so far as he knows. Feels like forever ago. Was I really just nineteen? Like, a kid? I wonder how old he was. Or is. Either'd be fine. I can do math; my mom's an engineer. I yawn again, so hard my eyes tear up. I don't know why I say, "Gids, you remember when we met?" and look at him sidelong through my hair. He looks up fast and opens his mouth, but stops and shakes his head. "...Very well." "I've been thinking about it lately." He looks out over the streets. "Why's that?" "I've been dreaming again." I look away into the wind, and it stings my eyes. He inhales, and tries to make it sound all casual-like. "I see." He hangs awkwardly over the rail, and scratches at his beard. "Like the one you had—?" "On Diraden. Yeah." Diraden, where night was forever, and we slept in one sagging cot that smelled like mold in a rotting village full of jerkwads. I woke up sweating and panting and gritting my teeth so I didn't shriek from another dream about Bunarat burning. And his big arms locked around me, holding me awake in that horrible present and not the nightmare past, and he didn't let go until my shakes went away. "Sorry," he says quietly, blushing at the deck. "I shouldn't have done that. Not without asking first. I just woke up, and you were...#emph[hurting] ." "Yeah, I was." I punch his arm, but I'm not feeling it. It's more a tap. At least not a whiff. "If I hadn't been all right with it, you #emph[better] believe I'd have told you. Then set you on fire." "I was wondering why you seemed tired lately." He picks the peeling paint on the rail. A flake pops off and spins away on the wind. "You told me then that you came from a place where magic, especially fire magic, was illegal. That your family tried to hide it. That you were responsible for a village being burned, for your parents' deaths." He hunts for words. "You confessed...a shadow of the truth." My brain brings old thoughts back, foggy and full of holes. A darkened cell, lit by shimmery moon-on-water light from spells that kept me from casting. #emph[You face the things you've done] , he said, #emph[and accept the weight of your responsibility for your deeds. Without lies, or excuses. What did you do that left you with ghosts to carry?] Just for a breath, I'm back in that cell, feeling sick, ashamed. Wondering if there was a bucket I could puke into, and if not, where I could aim that would miss his shoes? "I didn't know you, Gids. Not enough, not then. Everything I said was true, it just wasn't #emph[all] the truth. I told you the important bits. The fire. The screams and—and the smells, and how it felt. How it was my fault. H-how I got them all killed." I clear my throat to hide the break in my voice, which he probably heard, but wouldn't ever say, because that's the sort of Gideon he is. I rub under my nose with a shaking hand, sniff, and wipe it off on my shawl. He sighs, and slides his hand next to mine on the rail. Not quite touching. Just...offering. One part of me wants to grab it and hold on. "Well," he says, "what you admitted must have been enough. The Purifying Fire wanted acceptance of responsibility. Not all the i's dotted and t's crossed." He pauses. "At least, that's what they told me. I didn't walk through it like you did." I crack a smile and reach up to ruffle his hair. I have to stand on tiptoes for it, and lemme tell you, that's not easy in armored boots. "A good guy like you wouldn't have had anything to worry about." His arms tense. "I wish that were true." He glances at me, then turns his head aside, like a shy puppy. "I'm responsible for things I can't make up for." My hand drifts under my nose, and I pretend to rub away a sneeze. My fingers smell like his hair. Like herbs that don't grow here. Is that what the wind smells like on Theros? "I blew up a museum," I blurt. #emph[WHAT?] He looks back to me, wide-eyed. "#emph[What?] " #emph[Roll with it, Chandra.] "I didn't mean to! When we met. On Kephalai. Remember? The Sanctum of Stars. Trying to steal the Dragon Scroll? You turned me in for it. Prison, snake-head guys, all that?" He winces. #emph[Wait, no, wrong direction, put the thopter in reverse, ARG!] "You were right, though. When you said I was hurting innocents. I—I don't know about the #emph[guards] . I don't trust guards. Not anymore, maybe not #emph[ever] . But the Sanctum was all full of people, and—" When the walls came down, I thought of all the people I'd seen inside. The grandmothers pointing to displays and saying I remember that, in those days, now here's a funny old story, in exactly the same way Mrs. Pashiri used to, and the children rolling their eyes, bouncing in their fraying shoes and looking for a place to run, someplace not dusty and faded but full of light and impossible things. The stones came down on all of them. My fault. Not what I wanted, but #emph[my fault] . Another screw up. I think I've been quiet too long, because he takes a step toward me. "Chandra." He does lay his hand over mine this time. It's warm and dry, rough with old callouses. "You didn't #emph[mean] it." "But I #emph[did] it, Gids. There are these times when I'm sitting in the bath, and the memory comes up on me outta nowhere. I cringe and I say 'stupid,' like actually out loud, and then I sink under the water. And, um, usually the bath turns into a sauna at that point..." When was the last time I took a bath, anyway? After the last few weeks, I must smell like a goblin blacksmith. "You of all people—" "I know." He takes his hand away and passes it through his hair, settling the bits I left standing up. I kinda want to ruffle it again. "Chandra, you didn't think about them at the time. Now you do. That you regret it now...it means you've grown. And that you're a good person. #emph[Fundamentally] ." I turn away and pace across the deck. There's a potted ornamental jasmine by the stairs in full bloom. I pull off one white petal and twirl it between my fingers. "It means I'm a screw up, Gids." He takes a breath, and winces again. "Sometimes," he says, "yes. #emph[Sorry] . But you're always...doing your best. That doesn't always help, but it matters. It means you can make it right." My lips twist. The petal tumbles from my fingers, carried away by the wind. "Anyway...my point is that whatever you've done, it can't be as bad as all the things #emph[I've] done, and if the Purifying Fire would let someone like me through, someone like you—someone who thinks about the things they do, like, #emph[chronically] —would have no problem, and if it couldn't see that it's #emph[definitely] a stupid fire, and I'm glad I broke it." The words stop tumbling out, and I take a breath. He looks at me dubiously. "#emph[That] was your point?" "Maybe not when I started talking, but that's what it is now." I fold my arms across my chest and make a fake frowny face up at him. "So do you feel better or not?" Gids blinks. Then he laughs, broad and deep. "I actually do. Thanks." He steps back and glances up the tower. "But I should get back upstairs. See how the defenses are shaping up. If you need anything, just ask, all right?" #figure(image("005_Burn/03.jpg", width: 100%), caption: [Oath of Gideon | Art by <NAME>], supplement: none, numbering: none) I need my mom. I need to sit next to her, feel her arm and shoulder and hip bumping against me as she eats one-handed while scribbling equations. I need to eat methi thepla she made just for us, even though she always burns it a little. I need to rest my head on her shoulder. I need to feel her arms around me because it's been so long. He's five steps away when I blurt out over the rail, "Wait! This is dumb, but I could use a—a hug. If you don't mind. I know; that's weird. I was just thinking how I hadn't had any time with mom, not even #emph[just] #emph[ten minutes] , and—" "Chandra." "You don't have to. Hugs are super personal, right? I mean, you saved my life and all, but that's not a hug. Anyone would save anyone, that's just what you #emph[do] . Maybe not Lili. And anyways I saved you back, so that doesn't even count—" "Chandra." "And I know #emph[asking] for hugs isn't normal. You're supposed to #emph[offer] them. There's this moment when I'm looking at someone, and it's like gravity or something. It's like I just #emph[know] , but I don't know, you know? #emph[Sorry] . This is all coming out wrong, and—" "#emph[Chandra] ." Am I shaking again? I clench my twitching fingers. What the actual hell, Chandra? I swallow hard, wipe my eyes, and turn. He's standing with arms wide, smiling. His fingers wiggle #emph[come on, come on, you big silly] . Right. Now I have to be cool. Walk over slow, like it doesn't matter #emph[whoops] I'm already up against him with my arms around his waist. I'm absolutely sure that I didn't run over, so don't you tell me teleportation magic doesn't exist anymore. He's so damn huge. My head fits under his chin. He smells like sweat and oil, the grime of a long day #emph[lifting] things. I burrow into his arms like a puppy, rest my cheek on his chest, and close my eyes. His heart pounds under my ear. He wraps himself completely around me, armor and all, breath tickling the top of my head. It's been a long time since anyone held me like this. If Gids had done this four years ago, it would have made me feel tingly in all the places I like. Now it just feels... ...#emph[Safe] . There's a gentle clatter of porcelain. I open one eye and peer over a bicep to see—#emph[OH CRAP] . I shove at Gids, but he's so big I stumble backward instead. His jaw drops, and he takes a step back, looking at me in horror. Oh no, Gids, you didn't do anything— "I didn't mean to disturb you." Nissa sets a plate of eggplant and potato curry on one of the benches, eyes down, careful, long fingers sliding porcelain across steel. There's a huge, perfectly ripe mango nestled in the crook of her arm. Her braid sways in the wind. "You're not." I paw at the rail, grab, steady myself. "We were just talking, and—" "Don't mind me, then." She pulls apart the stem of the mango—was she growing that out of her #emph[clothes?] —and places it beside the plate. "I brought this in case you were hungry." She straightens and looks straight at me, calm, hands clasped before her. A million years of suspended green. #emph[BLINK] . #emph[BREATHE] . Don't screw this up. Just have a normal conversation with her. "Gids came down to see how I was, and we started talking, and there was this time he got me arrested for blowing up a museum—" #emph[YOU ARE SCREWING THIS UP] "—but actually he didn't want to, and we ended up on a plane where we fought this creepy I'm-a-gentleman-m'lady vampire, and then I was thinking about my mom and—" She lowers her eyes, lashes falling. "Tell me later, if you wish. Excuse me." She turns, framed by the ornamental jasmine. All its blooms have pulled tight, sealed and green. How do I keep screwing up like this? Innistrad gone all explodey? Perfectly fine, thanks. Talking to Nissa? #emph[Human trash fire] . That can't be my hand falling on her shoulder, making her shudder at the pull, because I know better, don't I? "D-don't go," I stammer. "I mean, you're upset. I upset you." "No?" she says, cautiously, testing the word. "#emph[No] . There is...much I don't understand. But I'm not upset with you. Believe that." She raises a hand, and gently peels my burning fingers from her shoulder. Hers are cool and smell of summer fruit, sunset bonfires, twilight rain. Or maybe I just imagine they do. "You needn't be concerned." "#emph[CHANDRA NALAAR!] " It's probably real funny, the way we jump. I should be more freaked out about freaking Nissa out by brushing her arm as I whirl around, but I'm too busy looking out across Ghirapur because "The Gremlin's Wedding March" has finally fallen silent and #emph[I know that voice] . "#emph[I know you can hear me.] " A deep rasp, magnified and tinny, bouncing off the stone and steel around us. "Who is that?" Gids. He puts his shoulder in front of me, frowning out at the glittering roofs. His whippity-swords snake out. I try to say "Baral," but my throat's full of dirty water. "#emph[I was wondering.] #emph[Have you told your friends the story? About how you got daddy killed? How you got mommy locked in a cell for five...long...years?] " Everything goes white. Sparks are flying from my eyes. I don't care. "#emph[Mommy and I talked every day. Oh yes, we did. I reminded her of everything you did. Every day. Did she tell you?] " Mom? "#emph[Maybe she was too ] ashamed#emph[.] " No! "#emph[Some days she cried. When I told her how your flames took daddy. How he died screaming, skin black and cracking. How he died cursing your birth.] " "#emph[THAT'S A DAMN LIE!] " It comes out shrill and ragged. The voice of an eleven-year-old. Gideon's yelling up the tower. Something about spotters, thopters, I don't know. Lightning cracks above my head and puffs of dust rise from the rooftops across the road. Baral's laughing. "#emph[So many died that day, little monster] ." "I'm gonna kill him. I'm gonna burn him." The words hiss through gritted teeth, falling like the stars from my eyes. #figure(image("005_Burn/04.jpg", width: 100%), caption: [Exquisite Firecraft | Art by Chase Stone], supplement: none, numbering: none) "That's what he wants." The only thing I can hear apart from heart-thunder is Nissa. Why is she still here? Why would she stay? "I can't leave this." My hands are balled up, glowing, wreathed in flame. "Don't stop me. I can't let him—" In the corner of my eye, her hand hovers over my arm, not quite touching. "I know," she says. "I'll stand with you." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Gideon bellowed at the upper decks, "Everyone on alert! This could be a diversion!" He squinted up into the noon sun, caught the acknowledging waves. He turned back. "Chandra—" Was gone. Over the bray of amplified laughter, he heard the thunder of her boots on the stairs, the shriek of metal on metal when she slipped on corners taken too fast, curses echoing skyward. "You should have stopped her!" He bolted to the rail and leaned over. Nissa was on the stairs leading down, one foot halted in midair by his question. "Why?" she said. He clenched his fists. "This is—She could get herself #emph[killed] . Calling her out like that? He's riling her up for an ambush. She's not thinking, just feeling, and we should be the ones who..." His stomach pulled taut, stabbed by ice, suspended in free-fall. Why wasn't he halfway down the stairs already? Nissa's head tilted to the side. "This is who she is, Gideon." Far below, a shock of flickering red flame leapt from the Hub, making his heart claw up his throat for long mid-air moments. Then she tumbled across the adjacent roof and staggered up to her feet, still snarling curses. "Jura!" a voice from above, faint on the wind. "The Gearhulks are advancing on our lines!" "I—" He was going after her. Wasn't he? He squeezed his eyes shut and pulled the hot midday air in through his nose, slowly, focusing on the scents of oil and smoke. The tinny bleating of the man on the loudspeaker fell away. A tremor passed up from his feet, as a hollow boom sounded in the distance. #emph[There comes a time, boy, ] Hixus' voice echoed forth from years long gone, #emph[when you must choose between what you want to protect, and what you ] need#emph[ to.] He opened his eyes, fixed them on Nissa's endless ones, and exhaled through his mouth, forcing the air into words that tasted like ash; "Keep her safe." She nodded and disappeared. He bolted up the stairs, and tried not to think about the fleeting heartbeats when he'd been privileged to hold a tiny, maddening, precious sun against his chest. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Baral's boots crunched into the pavement upon landing, driving the air out of his lungs. He was on his feet and running again in seconds. It was all going as planned. He was already slowing, though. Panting, breaths like handfuls of needles heaving from his lungs. He'd never had to run in the armor before. At least not more than a few dozen steps. Just enough to get within arm's-length of whatever would-be mage thought their abilities gave them a range advantage. He was old. Heavy. #emph[Slow] . He'd never recovered the feeling in his left arm. Oh, it hung at his side still, and after years of painful effort, it moved obediently again. But he'd never again be entirely sure he was holding a weapon or soup spoon tight enough. Once, in winter, his sleeve had caught on fire from standing too close to the barracks heater. All he could do was laugh as the already-ruined flesh charred and stank. It was too hilarious not to. He even wore the helmet less than he used to, in the years after the monster had burned half his face off. It had become another tool of intimidation, a reason for accused mages to flinch away. She'd ruined him. Baral clunked down the alleys—left, right, left again—in the order that Baan had insisted he repeat too damn many times on the flight in. Around him, the buildings were no longer new and bright, but trickled away in a slow decay of gravel and dust. Sweat pooled in his collar, hot breath thickened the air in his helmet. Behind him, the Nalaar girl raged and cursed, random obscenities echoing along the stone alleys. He grinned. She was taller than he remembered, but her brain seemed no bigger. Just as prone to screaming and throwing punches when staying quiet would be wiser. Blundering into one trap after another since she'd come home. That's why he'd win. That's why he'd ruin her. The location had been Baan's suggestion. A maze of old-construction stone buildings along the river, stripped and bare, their yards long dried up and blown away. Nothing #emph[combustible] anywhere. He swung around a corner, tipped up the filigree mesh of his helmet, and bellowed over his shoulder, "All that time your mother #emph[suffered] . Thinking you were #emph[dead] ." She sprinted around the far corner, wreathed in a crimson cometary nimbus. Lips pulled back from her teeth as she spread her fingers, stretched out her arm, and #emph[shoved] . The air between them ignited in a rush, a sucking roar he had to steady himself against the pull of. A curtain of white-gold fire rippled toward him like the Aradara Express. He raised a single hand, fingers spread through a corona of frigid blue, and with a dismissive wave evaporated the blast. Stray embers tumbled along the road, finding no purchase among the dust and stones. "And what were #emph[you] doing while she rotted?" he sneered. "Off enjoying life?" He ducked around the corner as she stumbled and swore, sparks streaming from her flaming hair. A high, giddy laugh of glee welled up from the pit of his stomach as he raced away from her, but he didn't allow it past his teeth. He'd spent thirty years suppressing the things that bubbled up from within him. The air reverberated with the whir of thopter wings. Almost to the target site. His squad would be circling around behind the monster, ready to spring the— He wheeled around the next corner and skidded to a halt. The road was blocked by a wall of red-black brambles, hook-tipped thorns, and spreading emerald leaves. #emph[That...wasn't here before.] He spun just in time to launch his armored boot into the girl's stomach. She folded around it, retching. He stumbled back and raised his sword as she vomited into the dirt. The flames enfolding her brightened to fever yellow as he charged forward, swinging the blade. She swung her armored forearm into the blow, sparks flying as metal slid across metal. Her left arm, wreathed in flame, swung around...a wide miss, passing behind him. He almost laughed. Then she spat bile on the road and lowered her left shoulder, slamming into his chest. Something popped. She gasped. He stumbled backward into furious heat. #emph[She set the thorns on fire!] With his dead left arm, he ripped the flaming cloak free off his pauldrons and dropped it in the street. He needed to get around her. She couldn't force him back into the blaze. Thopter buzz set pebbles of old pavement into clattering migrations. "#emph[Chief!] " a voice called down over the din, flat and tinny with mechanical amplification. The girl gritted her teeth, sparks whirling from her eyes, and moved to shove her left arm at him—but she only gasped, eyes unfocused with pain. The arm dangled limp at her side. There. He swung his sword into her corona, twisting to strike at the limp arm. She skittered back, overcompensating. Not a trained fighter. Just an angry child. A roiling ball of flame spun to life around her right fist, and...she went down hard, the dead weight of the limb pulling her down into the dust. He knew how an arm that wouldn't move affected balance. Yes, he certainly did. Flickering thopter-wing shadows passed over him as he raised the sword. The metal had been forged for heat tolerance, but passing through the girl's yellow-white blaze had already left it radiant and warped. He drove it down at her neck. #figure(image("005_Burn/05.jpg", width: 100%), caption: [Art by Min Yum], supplement: none, numbering: none) #figure(image("005_Burn/06.png", height: 40%), caption: [], supplement: none, numbering: none) His arm was yanked to a halt, wouldn't move. He glanced to it—#emph[wrapped in] #emph[a flaming vine?] —and that was all the mistake she needed. The fire held in her hand burst open, flaming petals licking across his armor, searing through his faceplate. He blinked away smoke, and coughed a laugh. By the smell in his helmet, he'd just lost the other eyebrow. The girl was scrabbling away on her back, gasping with pain as her limp arm trailed behind her. Overhead, his squad's thopters arced in, trailing streamers of white vapor across the blue sky. A trio of vines leapt up from the neighboring streets, raining debris. They snapped around the lead transport's cabin, pinning one of the fluttering wings. It slewed off balance, engine roaring, and slammed into the side of a building. He blinked away from the fireball. The building collapsed, pulsing out a wave of pale dust that rattled across his armor. His eyes leapt to the roofs. There! "#emph[Two hundred meters south!] " Baral bellowed over the din, waving toward the silhouette. "#emph[Elf on the roof!] " The second thopter spun, unleashing staggered forks of electricity. Thunder cracks rolled across the city. A wall of black earth and plant life reared up behind the elf, cupping massive hands of wood and soil around her. The bolts dissipated across them. The plants lunged up, twining into a four-legged monstrosity that crouched protectively over its mistress. #figure(image("005_Burn/07.jpg", width: 100%), caption: [Guardian of the Great Conduit | Art by <NAME>oi], supplement: none, numbering: none) Roaring, the elemental beast bounded after the support thopter. The elf leapt gracefully to the road, sprinting to the Nalaar girl. She was staggering to her feet, red hair extinguished by pale dust, cheeks streaked with tears. Of pain or anger, he couldn't tell. It didn't matter. This trap had failed. If the elf hadn't been here, he could've salvaged it, but—no time for that. He gestured to the final thopter and unlatched his warped gauntlet-blade, hurling it blindly at the two women. The thopter came in low over the road, raising a sandstorm of pale chalk. He armed and aimed his grapple. Baan leaned out of the cabin, frowning at the situation, then stumbled backward as Baral's hook slammed into the lift cage. The elf had reached the girl, who stumbled toward her, nostrils flaring. "I can't move my arm, #emph[I can't move my arm!] " she panted, eyes wide. "It's all right," the elf said, running her hands over the shoulder. "Just dislocated. Let me..." The grapple engaged, yanking him up as the Nalaar girl loosed a sharp yelp of pain. Baral swung into the cabin as the pilot lifted away. "I want a Gearhulk on the elf. #emph[Now!] " he snapped. Baan's eyes flickered over him. He grabbed a replacement gauntlet-blade off the rack and latched it fast, as casually as if he did it every day. When would he have learned that? "Chief Baral," he shouted over the engine's din, "we are not authorized to call in—" "We have to crush them," he growled. He clamped his dead left hand over the ceiling rail and leaned out into the wind, looking behind them. The other thopter was ascending, nose ducking as it accelerated toward— The elf's elemental leapt up from the streets and clawed it from the sky. He swore at the fireball. #emph[Just goddamn dirt!] "The Torrential could #emph[wash] this damn thing away—" "We are a #emph[diversion!] " Baan insisted. He stepped back from the edge, teeth bared, and loomed over the Minister. Baan stared up at him coolly. "You have no sensation in your left arm. I have determined three ways to use that knowledge to fully impair your movement." They glared at each other for long breaths. "Four, now," Baan said. "Fine," Baral snarled. He tapped the pilot on the shoulder and made a circle-around hand gesture. As the thopter banked, he grabbed a megaphone off the equipment rack, and positioned himself by the bay door. The Nalaar girl glared up, swiping at her eyes in the light of the burning wall of thorns. The elf stood by her side, one light hand on the injured shoulder. "#emph[Does ] she#emph[ know, little pyromancer?] " he bellowed down at them. "#emph[Did you tell her? About the village that burned because of you? The screams of the children?] " The monster just shrieked, high and inarticulate, hair ablaze. A gout of white flame shot upward. The thopter couldn't evade in time. He reached out and felt the red threads that bound the flames together. His fingers sank into the weave of it, flexed, ripped them apart. The flames scattered, impotent. At his side, Baan stiffened. The girl hollered obscenities up at them, constellations of sparks spinning from her eyes in the downdraft. Baan yanked the megaphone to his mouth. "#emph[Those devices are certified for external use only. A malfunction could seriously injure one's sph—] " She gestured up at him, emphatically. "#emph[I am only interested in the safety of all citizens] ," Baan said, huffily. Baral slapped the megaphone out of the Minister's hands. It pinwheeled into empty space. "She's #emph[diverted] . Get me someplace visible from the Aether Hub." He grinned. "Someplace we can inspire #emph[mommy] to join us." Baan held his appraising eyes on him for a moment, then looked away out of the cabin as they lifted away from the street. "The next phase of the operation has begun." Baral followed his glance. High above them, the black specks of thopters lifted from the decks of #emph[Skysovereign] . #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Gideon shoved the old man clear and had just enough time to look up before the massive steel foot stamped down on his head. Darkness. Grinding. Metal on metal shrieks, vibrations through gravel and dirt. Daylight, filtered through downward-spinning motes of dust. He reached up, grabbed splintered pavement edges, and pulled himself out of the hole. The old man, sprawled by the side of the road, gaped at him. Gideon gave him a reassuring grin and shook the dirt out of his hair with one hand. "It's all right," he called, with forced cheer. "I'm indestructible." The ground shook as the Gearhulk's foot fell again. He'd have to thank Nissa for their practice back on Ravnica. Nissa. #emph[Chandra] . Where were they? #emph[No time for that. On your feet, hoplite. Observe the situation. Keep moving. Turn the initiative.] He staggered to his feet, dust trailing from his clothes, and stumbled over the edge of the footprint-crater the Gearhulk had left in the pavement. A blast of air pushed him forward as the machine swung its hammer-arm in an underhand arc over his head, crumpling a fleetwheel cruiser and sending it careening down the street. Figures on the makeshift barricade down the block dove to either side. The cruiser smashed through the obstacle in a shriek of torn metal and bounced down the road, shredding scraps of brass and crystal. #emph[Well, hoplite, it appears there's a giant mechanical man strolling down the street, malleting parked vehicles through the renegade positions ahead. There are four other giants out there, pressing in. Three on this side, two on the other. You don't know exactly where, though. City streets are canyons, and you're at the bottom of one. Tactically, the worst place to be. Water and fire flow downhill.] #emph[What do you do, Gideon? There are lives at stake, and you're standing in the open like a child in their first sparring match.] #emph[First, you need to understand what's going on.] He needed a view from high ground. It would take too long to get to a roof. The front line would have moved on. If Ajani were here, #emph[he'd] be able to— #emph[Focus on the possible.] The Gearhulk #emph[was] the front line, and it towered over the roofs. He sprinted after it, timing the shudders of its ponderous footfalls. There were rungs leading up one of its legs, for maintenance or inspections. He picked his rung, leapt— —and missed— —and barely had time to slap his hands around the next one down, fingers shining gold against the sting of it. The Gearhulk's leg swung forward, leaving him dangling in midair, heels dragging in the dust. Jace would have planned this better. #emph[Chandra] could have planned this better. With ponderous creaks, the Gearhulk settled its weight on the leg. It tilted up beneath him. He barely had time to get his feet under him. It was a scramble to reach the machine's waist, pausing once more to simply hold on as the massive leg swung out from underneath him. Four streets to the left, a dual-headed Gearhulk with tubes for arms was hosing down a crowd of renegades with jets of water. A wave of faceless, armored inspectors passed in its wake, swirling around the protestors blown off their feet, truncheons rising and falling with scarcely contained enthusiasm. Dazed and bloodied bodies were shoved back toward oversized prison transport vans. #figure(image("005_Burn/08.jpg", width: 100%), caption: [Art by Daarken], supplement: none, numbering: none) A crew of three renegades scrambled across a roof as the water Gearhulk passed. They hurriedly set up a tubular device on a tripod at the edge of the roof. With a muffled thump, it rammed a spear through the thing's arm. For a moment, as they hesitated, the Gearhulk's operator's raised the arm to inspect the damage. The arm burst open, water gushing in all directions. The harpoon crew scrambled away. Looking across the collapsing renegade lines, Gideon could see the other two Gearhulks, far closer than he liked, hulls dotted with a barrage of popping explosions, lightning bolts, and flame jets. As he watched, a thopter hastily draped in renegade blues swerved in at one of them and drove itself into the shoulder mechanism. The monster's arms shuddered to a halt in mid-swing. Of the thopter pilot, there was no sign. A gigantic bug landed on Gideon's shoulder. He nearly fell off the ladder before he registered that it was wrought of brass and colored silk. "Hallo!" a tinny female voice piped from it. "You're 'Beefslab,' yes?" "Uh..." "'White Cat' said that wasn't your codename, but 'Night Queen' was #emph[quite] insistent it should be." He looked past the metal insect. Far below, a dark-skinned elf waved from the street, hand held before her lips, a twin metal butterfly clinging to her wrist. She pointed to it, lips moving. "Just talk into <NAME>," his butterfly echoed, crackling. "Hello?" he said carefully, waving down to her. The metal insect waggled its antennae. "Yes, hallo! Call me 'Shadowblayde.' Spelled with a #emph[y] , thank you ever so much I'm sure." Gideon was clinging to the waist of a giant mechanical man, but this conversation had quickly become the most surreal thing to happen today. "With 'Cloak Boy' away, I'm running communications." "Where's Liliana?" he asked the butterfly. "#emph[Night Queen] ," Shadowblayde's voice said, firmly. Three streets to the right, one of the other Gearhulks staggered. The living greenwood tree forming its spine shriveled, blackened. Explosive growths of pale fungus spotted its bark. "Never mind," he said. "I found her." The machine fell to one knee, keening like a wounded bear as the wood rotted away. Unsupported metal caved in on itself. Brackish liquid ran from every joint. Liliana appeared on a rooftop in a flourish of dark silks, planted one high-laced boot on the parapet, and raised a gloved hand over her head. She snapped her fingers, and the Gearhulk fell to pieces at her feet. A roar of delight went up from the renegades on the street. She curtseyed, ostentatiously, and blew a kiss to the crowd. "Out of curiosity, did Lili—did Night Queen choose all our codenames?" "Oh, yes. She was ever so helpful." "That's...great." The Gearhulk shifted unexpectedly, groaning as the torso rotated. He ducked under a passing pipe and leaned out to see what was ahead. It was approaching another parked vehicle, raising its hammer-arm to knock it toward the renegades down the street. The crowds fleeing the water Gearhulk were piled up in front of the barricade now, fleeing through the hole left by the fleetwheel cruiser, the wave of faceless Consulate inspectors pressing them into the line of fire. It would smash through them. #emph[What are you going to do about it, hoplite?] He looked around the surfaces of the Gearhulk. Solid metal. No obvious mechanisms or weak points, save for the junction where the legs met the torso. There was a large gap between the armor plates, allowing the limbs to move. Within, he could see massive toothed gears whirling and grinding by the aetherblue light of power tubing. He looked at his sural. Then back at the spinning gears. To the mechanical butterfly, he said, "You're going to want to get Mr. Wiggles in the air." "Right," the speaker squawked. A few whistled notes came through, and the insect fluttered off. He looked into the gap between the armor, took a few rapid breaths, and dropped into the gears. The darkness flooded with golden light. For too long, there was pain, noise, and motion. Metal shrieked, the world jumped upward. Falling sideways in golden darkness, a thousand tiny knives gnawing his legs and arms, pressing into his spine, filling his mouth with the tang of copper. His head slammed into a wall. Stillness. Breaths echoed in the dark. So...he was still breathing? A portion of the darkness lifted away. Warm brilliance flooded his stinging eyes. #emph[Chandra..?] A grinning face eclipsed the sun. "Who's a big hero?" Shadowblayde-with-a-#emph[y] . She peeled him from a smoking tomb, the shattered remains of finely-wrought gears cascading off him as he stood. His breastplate, bent and punctured, swung from one shoulder strap for a moment, then clattered to the road. The Gearhulk lay sprawled across the road, collapsed face-first in a building. The leg he'd just crawled out of had been shorn off. A legion of teenagers and mechanical creatures swarmed over the wreck, yanking out handfuls of salvage, trading bits and bobs among themselves. #figure(image("005_Burn/09.jpg", width: 100%), caption: [Art by <NAME>], supplement: none, numbering: none) "Found 'em, <NAME>!" a vedalken boy called, waving a six-fingered hand. Behind him, the war machine's operators climbed out of a hatch, a team of dour-looking dwarves in oil-stained Consulate uniforms. "Brilliant work, Beefslab," Shadowblayde grinned, slapping him on one bare, bruised shoulder. "How many more times can you do that?" Gideon looked across the streets at the three remaining Gearhulks, the sky full of ships. "Not enough." Liliana swished up, looked him slowly up and down, and languidly placed one hand on her hip. "...I see you lost your shirt." His eyes were drawn to a flock of Consulate thopters approaching the upper platforms of the Aether Hub, wheeling and circling like... The next breath came in tight, lightheaded, like the last one before your head sinks underwater. #emph[...like harpies over Akros.] "Get back to the Hub!" he shouted, breaking into a run. "#emph[Double time!] " #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) I'm gonna kill him. Tripping over stones. Curbs. Shoulder throbbing. Stomach cramping. Stumbling. Knees and palms scraped raw. Back up! Go! Not getting away. Never. Bastard. World's a tunnel. Dark except for the circling thopter. Laughter echoes from it. Words. Mommy. Daddy. #emph[Monster] . Dead. Suffer. Murder. #emph[Monster] . Village. Fire. Children. #emph[Monster] . I don't hear them anymore. Can't assemble them into thoughts. Just sounds. Just #emph[kindling] . No tears left. Just fire, cold and white. Purifying. I'll burn the rot from him. From this whole city. "Chandra, let me." Nissa, breathless at my back. She shouldn't be here. Shouldn't see me like this. A massive root lifts from the ground in front of us, stretching up to the roof. The thopter settles ahead there, cackling. I scramble up, cold dirt caking my burning fingers, boots sliding on damp wood. Raw fingers claw the edge of the roof, leaving bloody prints. The sky is gigantic, and full of ships. The streets are on fire. Metal giants wade through the flames, crowds fleeing before them. Thopters buzz in blackfly clouds, whirling around the Aether Hub. The upper decks loom over us. Where mom is. The thopters are landing there. Cracks and flashes. Figures running. Dropping. ...mom? "Look. What. You. #emph[Did] ." Baral, his ruined face split with a shatter-toothed grin. The lifting thopter blows grit into my eyes. "Maybe it would have been different if you'd been there." Sun gleams on the edge of his blade. He angles it into my face. "Or maybe...#emph[more] of them would be dead." I feel the hair lifting off my scalp. Scalding, frigid light floods the roof. "You're not exactly #emph[accurate] , after all. Are you, #emph[monster?] " "Screw you," I whisper, and blow his face off. My wall of white fire twirls away in the wind, scattering into flicks of candle flame. "Don't you get tired of that?" He lowers one glowing hand, and drops the visor of his helmet. "Even dogs know more tricks." The roof quakes. From one side, Nissa's elemental thunders, leaps— —and falls in a tumble of debris, black earth and gray stone, white wood and green leaves. Baral flicks a clod of soil off his shoulder with one glowing hand. "This is Ghirapur. Don't bring mud to a bot fight." A wave of metal heaves up behind him and floods the roof. Brass wheels and steel legs, flame jet nozzles and sparking antennae. "Find peace," Nissa murmurs, her hand a warmth passing across my shoulders, there and gone. Then she's midair, stabbing a thin blade through the optics of one automaton, rolling, jabbing an elbow into another, crunching a third with the heel of her hiking boot, slashing, jabbing. A windborne blossom of singing green steel and hard, sure muscle. Like she'd only been touching the ground as a courtesy. Wait. Hold up. This is crazy. Nissa has a #emph[sword?] #figure(image("005_Burn/10.jpg", width: 100%), caption: [Sword of the Animist | Art by <NAME>junggren], supplement: none, numbering: none) The bottom end of her staff rolls across the roof and thumps against my toes. I blink, and Baral's in my face, swinging. Left, right, crap, blast, stumble, back, back! Sharp sunlight. Ice lashes my arm. Stagger. On my knees. A puddle on the rooftop. A ripple of silver, red fractals exploding. I see his sword coming down on me, as an echo. Roll! Wind passes my ear. I shove power into the puddle, and it explodes into a cloud. The dim figure of him snarls and staggers back, waving it away from his face. I know what to do. The roof sealant liquefies into steaming tar. He roars in pain, blade cutting ahead through the clouds. Thopter-wing stutter overhead. Thunder cracks. Is Nissa all right? Where is—? I recoil from sudden cloud-shadow. Stinging needles of ice rake across my brow. Reflex, a firebolt back in the same direction. A blue pulse dissolves it into sparks. He limps through the tar, laughing. The left half of the world dissolves into a smear of red. I swipe at it, but it doesn't go away. Just makes my hand slippery. His blade is white from the air around me. Breath echoes from the filigree of his helmet. The building rattles beneath us. He grunts and sways, but keeps coming. Far behind him, dad's ship rises alongside the Aether Hub, trailing torn boarding gantries and snapped anchor lines. There's not enough air. Can't get enough. I'm staggering, wheezing. Have we been fighting hours? Minutes? I pitch flames with my left hand. As he dispels it, I punch his stupid face with my right. His stupid #emph[metal-covered] face. I scream at the crunch. "Idiot monster," he mutters, and kicks. Hard. Pain explodes from my gut. I retch into hot, stinking slime, struggling to inhale, every breath another endless agony. I'm not crying because #emph[screw that guy.] I need to get up. He limps over, rasping, boots splashed black and steaming. He reeks of Innistrad in the aftermath, mounds of burning, lurid, warped flesh. The air won't come. Nissa. Help. Raises the sword. I crawl. Help. Nissa. The blade falls. I want to look away. I want to #emph[move] . CLANG. I crack an eyelid to raining brass. A filigree bird, dented and shorn like my neck isn't. It rolls across the roof, scattering gears. Its whistles turn to sighs, then silence. "Stay away from that child, you #emph[son of a donkey!] " Mrs. <NAME>. I raise myself on trembling, bloody arms. She's on the Hub, a platform across from us, shaking her fist at Baral. Ajani's beside her, axe in hands, ears flat back and his good eye dilated into one enormous dead-black orb. #figure(image("005_Burn/11.jpg", width: 100%), caption: [Ajani Unyielding | Art by <NAME>], supplement: none, numbering: none) I can only puff weakly, sparks falling from my eyes. The crowds on the Hub are running to #emph[Heart of Kiran] 's gaping hatches. Half-fitted turrets spark and crack at ranks of faceless inspectors. Consulate thopters drop gleaming aerial torpedoes, coughing to life on wide contrails of hissing exhaust. "Gunner!" Baral bellows up to his thopter, tossing aside his ruined blade. "Take out the lifecrafter!" There's a shriek in my head and maybe I let it out because he turns back to me, I'm on my feet and everything's going bright blue-white, moonlight on a mirror, cloudless desert sky, and I send streams of eyestrain-bright flame up at the blurring wings and glinting brass— Baral's hands close around my fists. Everything stops. Magic dies. "Look what you did," he shouts in my face. "#emph[Watch!] " Mana is all around, but I can't grab it. It wriggles like oil on water. I reach, and his hands make it slip away. He tries to bend my arms, to break me. "Even daddy knew. When I shoved the blade under his ribs. I saw it in his eyes as he bled out. The #emph[shame] of you." Forks of cracking white light stab at Hub. Ajani is spitting rage, swinging as Mrs. Pashiri stumbles away from the rail. The thopter-lightning bounces away from his blades. Once. Twice. "That's the face," Baral grins. His breath smells of cheap vendor meat and too much sugared chai, weeks of meals alone. My arms strain against him. "#emph[Despair] . Just like when I had you in the arena, monster. My blade on your little neck." The third crack shatters the world. Mrs. Pashiri seizes and topples, smoke-colored braids flying apart. He laughs. "Is there #emph[anyone] you haven't killed?" Somehow my bloody hands are at his throat, finding the gaps in the metal and pushing through, squeezing as hard as I can, digging in the ragged nails, bloody thumbs pressing into the bulge. I think I'm screaming. My throat is raw. He slams his gauntleted hands against the sides of my head over and over, until I'm falling down a tunnel with only sparks at the end. When I can hear something besides my heart, a tin voice is booming, "...under arrest for conspiracy, treason, and assault. Get on your knees and put your hands behind your head." Baral's gagging and spitting into the congealing tar, straining to pull in air. Overheard, a Consulate airship, a dozen cannons swiveling down at me. I screwed up. Again. Everything is burning. "Chandra." Nissa is beside me, leaning on her blade. She's scorched and bleeding, her braid half-undone. Pulse-glowing shards of hot metal sizzle in the unbound waves. Jade spills from her eyes as she looks at me, trembling fingers hovering over the gash in my head. "You need to go now," I rasp, and get to my feet. I'm not a monster. But I can be. I gather the air, set it alight, and #emph[squeeze] . Between my hands, sparks ignite, blazing golden fish swarming. They shudder, frantic, turning arsenic-white. Like I've done a thousand times before. Baral tips his dented helmet back. It clatters across the roof. He's smiling. "I killed your daddy, renegade," he says. "I killed your #emph[auntie] ." The wind's growing. More air. More heat. Pin it down. Press until it can't move. Until all the breath is gone. I grit my teeth. My light is arctic now, throwing sharp blue shadows. "And now I'm going to kill you." He pulls a dagger from his sash. A simple dagger, with old stains on the blade and a charred grip. "And the best part, the absolute #emph[best] part, is that there's nothing you can do about it." It's so easy. I should've thought of it before. We tried it in Baral's trap but I was too upset. Now everything's clear. Blank, flat, and desperately clear. "There #emph[is] something I can do," I tell him. I can make amends. For Mrs. Pashiri. For dad. For mom. For the old women and little kids I killed in the Sanctum of Stars. For a lifetime of screwing up. All the awful things I've done. All the people I failed. The air between my hands is packed with stars, vibrating, superheated. Streaks of light scratch through my vision. "...Something I can #emph[always] do..." I can take out Baral. The ships and the Gearhulks. Tezzeret and the Consuls. I could take out all of Ghirapur, if I want. It's so #emph[easy] . I just have to bottle it up, and release. I just have to #emph[let go] . Because it doesn't matter anymore, does it? Everything's ruined. Let it go. Close your eyes. Let it happen. Let it be over. Doesn't matter. I close my aching eyes on Kaladesh, and whisper, "...I can #emph[burn] ." #figure(image("005_Burn/12.jpg", width: 100%), caption: [Chandra's Fury | Art by Volkan Baga], supplement: none, numbering: none) Arms from behind. The scent of flowers, and a soft wind at my ear. "But not alone." Nissa? "I'll hurt you. Let me go." Her arms squeeze tighter. "#emph[No] ." "I can't do this anymore. Let me go." My stars burn the tears away, but my voice is high and wavering, the words tumbling over each other as I start to shudder. I'm falling apart. "Please just let me go." "I can't. If you leave us like this, you'll have to take me too." "That's not—" I can't see anything now. There's just light, and her voice. "Don't go," she says. Mrs. Pashiri spasms and falls, her braids in a tangle, eyes locked on me, willing me to run for safety. Dad crumples, hands clamped over the red hole in his stomach, eyes locked on me, willing me to run for safety. Dead because of me. "Don't leave us," Nissa says, softly. "You're loved." The sucking wind between my hands is pulling a sea from my eyes. Sparks, embers, wobbling saltwater. I stop adding power. I stop squeezing. The stars slip and shiver between my hands. The light ripples, silver-blue sparks buzzing like angry flies, hissing like oil in a skillet. Something's wrong. The fire's gone strange. It's still getting hotter, collapsing inward. It's burning on its own, burning #emph[itself] , without anything from me. I blink, and scratches of light claw through the brief dark. It's still growing. I bleed off the heat, careful, slow, but it snaps at me, eager to escape the trap I've made. A wisp of impossibly hot flame jets free. I clamp it down, press my hands close to the raging blue light. Baral gasps. Somewhere nearby, there's the shudder and grind of buildings crashing down. "I can't do it," I pant. My heart's slamming against my bruised ribs. "It's wrong. It won't slow down." "Chandra," she says. "Remember what it feels like to swim? You told me on Ravnica. Describe it to me again. Tell me how it felt to float. Just blue and air above you. Everything cool and still...?" I close my eyes and I'm ten years old. The air is broiling and thick, too hot to sleep. Mom and dad are sprawled across the grass together, breathing slow, still touching in sleep despite the summer heat. I slip away and crawl down the mossy rocks. I slide in backward, and the water crawls through my frizzy hair, cool against my sweaty scalp. My throat constricts. "There—there was a quarry we'd go to. Overgrown. Green all over. At night I'd go out and float. The stars would reflect in the water. White and blue and orange. Patches of green and rose, like ghosts far away. The ripples would echo off the rocks. The sound of my breaths would keep coming back, keep getting smaller. Like I was falling away from everything. If I laid still enough, it was like...I was in the middle of them. Like I was floating between stars." "There's a lantern on the water, among the stars. It's the brightest thing you can see. Can you imagine that?" One pure white torch, burning straight and true, casting painful angles of ice-shine across shadowed rocks. "Yes." "That flame is growing smaller," Nissa whispers, like wind through leaves. "It's night. It's time for earthbound lights to dim. To let stars and ghosts illuminate. The water is lapping against you. It's cool on your skin. The light is fading." The savage brilliance beyond my lids is dimming. I'm floating, eyes closed. When I breathe I catch the scents of pine and night flowers from her hair. I'm swaying. A light bobbing on stilling waters. Warm arms across my stomach keep me from drifting away. "You're a lantern on the water," Nissa says, as she rocks me side to side, rolling my shoulders like spring tide. "But just a little one. A tiny flame, flickering in the night. Can you feel it? You're drifting. A precious light on endless water. And the stars are waiting for you." The light flickers, and goes out. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Baral swore as the Nalaar girl collapsed back into the elf's arms. One of her eyes was bloodshot and sunken with fatigue, the other sealed with dried blood from the sword gash he'd left across her forehead. Her cheeks were sunburnt and tear-streaked. "I can't stand up," she said, her voice thready and hoarse from screaming. "My legs...it's like Zendikar." "Then I'll carry you," the elf said. He'd almost had her. Wind up a monster until it's frantic with pain and fear, sure enough it will bite its own leg off. He'd made a hundred mages fall to pieces in the cells of the Dhund, in the forgotten dark where no one else knew to interfere. "Fine." He limped toward them, favoring the leg she'd seared. Sometimes you just had to get your hands dirty. Like father, like daughter. He tightened his grip on the stained old blade. "All you have is fire. If you're not willing to burn, what are you going to do?" he sneered. #emph["Punch] me again?" A tree slammed into him from the left. Metal bars cracked across his chest, and something splintered. He blinked away stars. Breath became a painful chore. He was crumpled against the guardrail at the edge of the roof. On the far side, the elf now held the girl limp across her arms. Over them both towered her reconstituted elemental beast, flicking blood off a root-fist the size of a thopter. It shook itself, and the leaves on its back hissed like a furious tiger. "#emph[Leave] ," the elf said coldly, and turned away. The roar of the thopter descended behind him. Boots clustered around his head. Baan's voice came over the thrum of wings, precise and clinically distant. "Multiple broken ribs and a hairline fracture of the collarbone. Mild concussion. Damage to the trachea and larynx. Second degree burns on the back, face, and feet. Third degree burns across the left leg. A stretcher, if you please, inspectors." A chorus of guttural acknowledgements as Baral's squad snapped to. Baan squatted beside his head, careful to keep his shoes clear of the blood. "This is why I insist on the proper installation of safety features. If that rail had not been there—" "Shut up!" Baral snarled, then huffed out a shallow, helpless breath at the agony in his chest. Baan's eyes narrowed, and he inhaled sharply. "Chief Baral," he said, crisply. "Your reports from twelve years ago claimed that <NAME> and her parents died in an incident of arson, with her as the culpable party. According to your statements today—which I have recorded with #emph[scrupulous] precision—you took <NAME>'s life yourself, imprisoned Pia Nalaar without a trial, then attempted to turn their daughter's execution into some form of...arena event." "The Nalaars were aether smugglers. The girl destroyed a foundry." "Crimes for which they should have been tried and justly punished. However, neither are capital offenses." "Damn you, Baan, she's a pyromancer!" "She is a #emph[citizen] ." "A monster!" he barked, and was left breathless by the words. "All mages are monsters," he whispered to the sky. Baan sighed and tented his fingers, forearms resting across his knees. His face was grave, stained with nauseating pity. "Chief Inspector <NAME>, I charge you with one count of murder—possibly with more yet to be uncovered—and one count of #emph[attempted] murder. I charge you with one count of extrajudicial incarceration—again, possibly with more to be revealed. Finally, I charge you with multiple counts of falsification of the public record, with the express intention of obscuring your crimes. "You are a disgrace to your uniform, and a disquieting aberration to the ideals the Consulate espouses. Though I personally find your offenses...vexing in the extreme, the law requires that even #emph[you] must be judged in court. Be aware that your every statement from this point forward shall be entered into the official record as evidence." "They're escaping," Baral rasped. "The elf and the pyromancer. You have to finish them." Baan tilted his head. "Incorrect. Our mission is complete and successful. The Aether Hub has been regained. The remainder of our detachment shall now redeploy to defend it against the likely counterattack. Will you come with me under arrest, or shall I leave you to engage in further pugilism with the shrubbery?" The air flooded out of him. That was it, then. He lay back and looked at the towering clouds. "I won't forget this, Baan." "Excellent. I do not care to repeat myself." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) <NAME>nelt and turned his back to her. "Climb up." "You don't have to do this." Her voice was smaller than he'd ever heard it, low and lifeless. "It's not a problem, Chandra. Big shoulders, you know. Plenty of room." He hoped it sounded as cheerful as he wanted it to. Her weight settled across his upper back. He inhaled quickly and quietly as knees and elbows fell across the bruises on his torso. He snugged his forearms under her bare knees as thin arms encircled his shoulders. All her fingertips were burnt, her palms and knuckles wrapped with stained bandages. The forearms beneath his chin were laced with ugly cuts from flying steel and glass. "All set?" he asked. "Sure," she mumbled. "#emph[Up] we go," he grunted, staggering to his feet. She didn't weigh much, not really. He was just...sore. The throbbing fever-heat of her felt good against the bright red bruises hidden under his shirt. He carried her down the halls of the abandoned apartment building. Crumbling, mold-damp walls were strung with erratic constellations of aetherblue light capsules. #emph[Heart of Kiran] had carried the escapees from the Aether Hub to the safety of Weldfast, solidly renegade territory. It now hung impossibly over a wide road, between tall and shambling steel workshops. Cars and trains passed under its bulk as welders in sling rigs cut away and replaced sections of damaged armor plate. A constant background din of thunder cracks from makeshift flak cannons warded away the Consulate skyships. At least it wasn't "The Gremlin's Wedding March." A group of renegades were clustered in the hall ahead, whispering. "...everything went wrong when the daughter..." "...don't know things would have been different..." "...hasn't Renegade Prime suffered enough?" "...heard she watched it all from the Hub..." They looked up as he approached, and fell falteringly silent under his glare. Chandra buried her face between his shoulders, arms squeezing tight, warm shudders of breath rolling down the back of his shirt. They turned into the stairway, leaving the group behind. Halfway down, she pulled one hand back and traced warm fingers across his shoulders with a lightness, a gentleness, that made all the many hairs on his arms stand up. "Do you have these everywhere? The bruises, I mean? You look like you fell down a flight of punches." He laughed shortly, for his own benefit as much as for hers, the echoes off it scattering forlornly up and down the stairs. "Afraid so." "I thought you were indestructible." "I had to get creative. But I'm here, so technically I'm still not...uh, destruct-abled." He turned in to the next floor down, what passed for a healer's quarter. "I don't think that's a word." "I'm sure Jace has six dictionaries memorized. When <NAME> returns him, we'll ask." He nodded to the renegade minding the door ahead, who pulled it open for them. Mrs. Pashiri lay on a sagging bed, hands clasped at her stomach, eyes closed, drawn and pale...but breathing. Ajani sat beside her, one massive hand covering both of hers, head bowed in concentration. A faint aura of silver light surrounded them both, ripples of power flowing from him to her. Chandra shuddered at the sight. "I can't—I can't do this," she whispered. "Take me back, Gids." Ajani's light faded. He looked up and studied her, inhaling quietly through his nose. "You're quite ill, Chandra," he said. #figure(image("005_Burn/13.jpg", width: 100%), caption: [Solidarity of Heroes | Art by Eric Deschamps], supplement: none, numbering: none) "What? I don't feel—" "You will, very soon. The damage is subtle, but widespread. And serious. You and Nissa both need care. Gideon, you'll bring them later?" He nodded. Chandra opened her mouth, but closed it without a word, and looked away. Nissa had carried her halfway across the city to the Weldfast, running most of the way, silent and watchful for Consulate inspectors. After handing her to Gideon, the elf had staggered to a spot of sunlit grass and collapsed into exhausted sleep. Ajani stood and indicated the chair. "Please sit. She was asking for you earlier." Gideon dropped to one knee before the chair, and she slid back into it. Her hand trembled in the air over Mrs. Pashiri's hands. "Is she...?" "Grandmother will be fine, in time. She will not be slain while I am present." Ajani paused and studied her. "This was not your fault, Chandra." She looked away to the far wall. "I...I know that." "Perhaps," he said. "It is to be hoped that you do. But you still need to #emph[hear] it." Her hand touched down on Mrs. Pashiri's. "Would you like us to leave?" Gideon said. Chandra's fingers curled around the older woman's. "I nearly got her killed today. Again. I haven't even been home two months, and I almost killed her twice." Tears swelled in her eyes, pulsing with the beat of her heart. "She covered for me the day I ran. Did I ever say? Let me hide in the place she worked. Distracted Baral and his men. And I never even asked her what happened when I got back. Like, did they put her in jail with mom?" "No," Ajani rumbled. "She went free. When your mother was released, they—" "But I never #emph[asked!] " she snarled, slamming a fist into her own knee. She wobbled to her feet, took a step toward the door, and collapsed. Ajani caught her with one arm. "Damn it!" she said, through gritted teeth. "I can't even—I just...I wanna #emph[leave] . I shouldn't be here. I don't deserve—" A door slammed at the far end of the hallway. She looked up and gasped. Mrs. Nalaar was walking towards them at a brisk pace, eyes fixed and piercing, scraps of old, water-crumpled paper flipping and swaying in her wake, smoke-streaked hair trailing behind her. Gideon slid beside Chandra and let her grab his forearm. "I have her," he murmured to Ajani. The leonin nodded and withdrew. "I screwed up," she whispered. "I always do. She's mad and she's got every right. I'm the worst, Gids. I don't know why you're even holding me off the floor." Three unfair, uncertain, unforgivable words resonated in Gideon's mind. Words that, once loosed, couldn't be taken back. "Talk to her," he said instead. Chandra straightened as best she could, one trembling hand clamped tight around his arm, supporting her weight. She didn't look up, but watched the feet approaching. "#emph[Child] ," <NAME> said, in a voice high and tight as a lyre string. "Mom, I—" Mrs. Nalaar swept her into a fierce embrace, staggering her backward. "I can't lose you again." Her voice had gone husky and quavering. A small plaintive sound escaped Chandra. She pulled back and looked Chandra in the eye, cupping dark hands on sunburnt cheeks, pressing her forehead to her daughter's as tears rolled across the old grief-lines etched in her face. "Do you hear me? I #emph[can't] . It would break me. #emph[I love you] ." Chandra's eyes spilled. "If you start crying, I'll start crying," she sobbed, the corners of her mouth crumpling. Gideon closed the door behind him, ground the heels of his hands into his own stinging eyes, and glanced at Ajani. "Mrs. Pashiri will be all right?" He'd never gotten the knack of reading leonin expressions, but it seemed as if the other man smiled. "Hearing this is better healing than anything magic offers." "But she's unconscious." Ajani's tail swayed horizontally, dismissively. "Truer things are sometimes heard in sleep." A clatter of boots stormed down the hallway; a crowd of renegades in ersatz uniforms, arguing among themselves about checklists, ordnance, and positions. Gideon and Ajani exchanged wry looks, then imperceptible shrugs, then arranged themselves in front of the door, arms folded, broad shoulders blocking any access. The dwarf in the lead had the harried look of a clerk. "We need to talk to Renegade Prime, immediately," the man grumped. "It's urge—" Gideon silenced him with one hand and a shake of his head. "In just ten minutes."
https://github.com/dipamsen/notebook
https://raw.githubusercontent.com/dipamsen/notebook/main/src/collisions.typ
typst
// // #set text(font: "Arial")//white) #set enum(tight: false) #set text(1.2em, hyphenate: false, region: "uk") #set par(justify: true) #set page( footer: context [ #set text(1.2em) #h(1fr)#counter(page).get().first()#h(1fr) ] ) #import "@preview/cetz:0.2.0" #let title(body) = { align(center, text(body, size: 1.8em, weight: 800)) } #let numbered(body) = { set math.equation(numbering: "(1)") body } #title[Elastic Collisions] During collision of two spherical masses, the total momentum of the system remains conserved, owing to the lack of any external force present on the system. #footnote[Even if any other force is present, it can be neglected in comparison to the force of collision, which is very large, as it causes a finite change in momentum in infinitesimal time.] Different types of collision are distinguished based on whether or not they conserve *kinetic energy*. If the total kinetic energy of the system is conserved, i.e. no energy is dissipated in form of heat, or sound, the collision is said to be *perfectly elastic*. = Perfectly Elastic Collisions in Space Consider two spheres in space having velocities in random directions, such that they collide at some point. Given the initial conditions, we can determine the final velocities of the spheres after the collision. There are two possible ways in which this can happen: 1. *Head-on Collision* (1D Collision): The spheres collide along the line joining their centers. (The initial velocities of the spheres are along this line.) 2. *Oblique Collision* (2D Collision): The velocities of the spheres are not along the line joining their centers. == One Dimensional Elastic Collision #let figa = cetz.canvas(length: 0.8cm, { import cetz.draw: * circle((0, 0), name: "a") line((0, 0), (radius: 1.6, angle: 0deg), mark: (end: "stealth", fill: black), name: "v1") content("v1.end", h(1mm) + $v_1$, anchor: "west") content("a", v(2mm) + $m_1$, anchor: "north") group({ translate((4, 0)) circle((0, 0), name: "b") line((0, 0), (radius: 1.5, angle: 0deg), mark: (end: "stealth", fill: black), name: "v2") content("v2.end", h(1mm) + $v_2$, anchor: "west") content("b", v(2mm) + $m_2$, anchor: "north") }) }) #let figb = cetz.canvas(length: 0.8cm, { import cetz.draw: * circle((0, 0), name: "a") line((0, 0), (radius: 1.6, angle: 0deg), mark: (end: "stealth", fill: black), name: "v1") content("v1.end", h(1mm) + $v'_1$, anchor: "west") content("a", v(2mm) + $m_1$, anchor: "north") group({ translate((4, 0)) circle((0, 0), name: "b") line((0, 0), (radius: 1.5, angle: 0deg), mark: (end: "stealth", fill: black), name: "v2") content("v2.end", h(1mm) + $v'_2$, anchor: "west") content("b", v(2mm) + $m_2$, anchor: "north") }) }) #align(center, grid(columns: 2, gutter: 3em, figa + [Initial], figb + [Final])) The two constraints in the collision are kinetic energy conservation and momentum conservation. Using these relations, we can determine the final velocities of the spheres. $ m_1 v_1 + m_2 v_2 &= m_1 v'_1 + m_2 v'_2 $ #numbered[ $ => m_1 (v_1 - v'_1) &= m_2 (v'_2 - v_2 ) $] $ 1/2 m_1 v_1^2 + 1/2 m_2 v_2^2 &= 1/2 m_1 v'_1^2 + 1/2 m_2 v'_2^2 $#numbered[$ => m_1 (v_1^2 - v'_1^2 ) &= m_2 (v'_2^2 - v_2^2) $ ] Dividing (2) by (1), we get: $ (m_1 (v_1^2 - v'_1^2))/(m_1 (v_1 - v'_1)) &= (m_2 (v'_2^2 - v_2^2))/(m_2 (v'_2 - v_2))\ => v_1 + v'_1 &= v'_2 + v_2\ => v'_1 - v'_2 &= v_2 - v_1 $ Using the above relation, along with (1), we have a system of two linear equations in two variables, which can be solved to find the final velocities of the spheres. #numbered[$ v'_1 - v'_2 = v_2 - v_1\ $ $ m_1 v'_1 + m_2 v'_2 = m_1 v_1 + m_2 v_2\ $ ] Multiply (3) by $m_1$ and subtract from (4), on simplification, we get our solutions: $ #block(stroke: black, inset : 1em)[$display(v'_1 &= (m_1 - m_2) / (m_1 + m_2 ) v_1 + (2 m_2)/ (m_1 + m_2) v_2)$] \ #block(inset: 1em, stroke: black)[$display(v'_2 &= (m_2 - m_1) / (m_1 + m_2 ) v_2 + (2 m_1)/ (m_1 + m_2) v_1)$] $ #let th = text(blue, $med hat(t)med$) #let nh = text(red, $med hat(n)med $) == Two Dimensional Elastic Collision For two non-spinning bodies in two dimensions, to solve for the final velocities, we can resolve the velocities into components along the line of impact (#nh) and tangent to the bodies at the point of contact (#th). Since the collision only imparts force along the line of impact, the tangential velocities don't change. #let fig1 = cetz.canvas({ import cetz.draw: * circle((0, 0), name: "a") line((0, 0), (radius: 1.2, angle: 15deg), mark: (end: "stealth", fill: black), name: "v1") content("v1.end", $v_1$, anchor: "north-west") content("a", v(2mm) + $m_1$, anchor: "north") translate((2 + calc.sqrt(2), -1)) circle((0, 0), name: "b") line((0, 0), (radius: 1.55, angle: 180deg), mark: (end: "stealth", fill: black), name: "v2") content("v2.end", $v_2$, anchor: "north-west") content("b",v(2mm) + $m_2$, anchor: "north") }) #let fig2 = cetz.canvas({ import cetz.draw: * circle((0, 0), name: "a") line((0, 0), (radius: 1.2, angle: 15deg), mark: (end: "stealth", fill: black), name: "v1") content("v1.end", $v_1$, anchor: "north-west") content("a",v(2mm) + $m_1$, anchor: "north") translate((calc.sqrt(2), -calc.sqrt(2))) circle((0, 0), name: "b") line((0, 0), (radius: 1.55, angle: 180deg), mark: (end: "stealth", fill: black), name: "v2") content("v2.end", $v_2$, anchor: "north-west") content("b", v(2mm) + $m_2$, anchor: "north") // translate((-1/calc.sqrt(2), 1/calc.sqrt(2))) line((-3,3), (1.5,-1.5), stroke: (dash: "dotted")) line((-1,-1), (2, 2), stroke: (dash: "dotted")) translate((-calc.sqrt(2), calc.sqrt(2))) line((-1,-1), (2, 2), stroke: (dash: "dotted")) translate((2.5,-2)) line((0, 0), (radius: 1, angle: -45deg), mark: (end: ">", fill: red), name: "n", stroke: red) content("n.end", h(1mm) + text(red, $hat(n)$) + v(1mm), anchor: "south-west") line((0, 0), (radius: 1, angle: 45deg), mark: (end: ">", fill: blue), name: "t", stroke: blue) content("t.end", h(1mm) + text(blue, $hat(t)$), anchor: "west") }) #let fig3 = cetz.canvas({ import cetz.draw: * group({ translate((calc.sqrt(2), -calc.sqrt(2))) line((-2.5,2.5), (1.5,-1.5), stroke: (dash: "dotted")) line((-1,-1), (2, 2), stroke: (dash: "dotted")) translate((-calc.sqrt(2), calc.sqrt(2))) line((-1,-1), (2, 2), stroke: (dash: "dotted")) }) group({ circle((0, 0), name: "a") line((0, 0), (radius: 1.2, angle: 15deg), mark: (end: "stealth", fill: gray), name: "v1", stroke:gray) line((0, 0), (radius: 1.2*calc.cos(30deg), angle: 45deg), mark: (end: "stealth", fill: blue), name: "v1t", stroke: blue) line((0, 0), (radius: 1.2*calc.sin(30deg), angle: -45deg), mark: (end: "stealth", fill: red), name: "v1n", stroke: red) content("v1.end", text(gray, $v_1$), anchor: "north-west") content("v1t.end", text(blue, $v_(1t)$) + h(2mm), anchor: "south-east") content("v1n.end", text(red, $v_(1n)$), anchor: "east") translate((calc.sqrt(2), -calc.sqrt(2))) circle((0, 0), name: "b") line((0, 0), (radius: 1.5, angle: 180deg), mark: (end: "stealth", fill: gray), name: "v2", stroke: gray) line((0, 0), (radius: 1.5*calc.cos(45deg), angle: 180deg-45deg), mark: (end: "stealth", fill: red), name: "v2n", stroke: red) line((0, 0), (radius: 1.5*calc.sin(45deg), angle: 180deg+45deg), mark: (end: "stealth", fill: blue), name: "v2t", stroke: blue) content("v2.end", text(gray, $v_2$), anchor: "north-west") content("v2n.end", h(2mm) + text(red, $v_(2n)$), anchor: "west") content("v2t.end", text(blue, $v_(2t)$), anchor: "north-west") }) // translate((-1/calc.sqrt(2), 1/calc.sqrt(2))) group({ translate((2.5,-2)) line((0, 0), (radius: 1, angle: -45deg), mark: (end: ">", fill: red), name: "n", stroke: red) content("n.end", h(1mm) + text(red, $hat(n)$) + v(1mm), anchor: "south-west") line((0, 0), (radius: 1, angle: 45deg), mark: (end: ">", fill: blue), name: "t", stroke: blue) content("t.end", h(1mm) + text(blue, $hat(t)$), anchor: "west") }) }) #align(center, grid(columns: 3, gutter: 2.5em, align(horizon, fig1), fig2, fig3)) Components of velocity in the #nh direction (along the line of impact) can be resolved by using the formula for one-dimensional elastic collision, whereas velocities in the #th direction remain unchanged. #align(center, grid(columns: 2, column-gutter: 3em, align: horizon, row-gutter: 1em)[ $ v'_(1n) = (m_1-m_2)/(m_1 + m_2)med v_(1n) + (2m_2)/(m_1 + m_2) med v_(2n) $ ][ $ v'_(1t) = v_(1t) $ ][ $ v'_(2n) = (m_2-m_1)/(m_1 + m_2) med v_(2n) + (2m_1)/(m_1 + m_2) med v_(1n) $ ][ $v'_(2t) = v_(2t)$ ]) The final velocities $arrow(v'_1)$ and $arrow(v'_2)$ are obtained by the vector sum of the respective #nh and #th components. $ => arrow(v'_1) &= v'_(1n) nh + v'_(1t) th \ arrow(v'_1) &= lr(((m_1-m_2)/(m_1 + m_2)med v_(1n) + (2m_2)/(m_1 + m_2) med v_(2n))) nh + v_(1t) th\ $ This is the value of $arrow(v'_1)$ in terms of components of initial velocities, and unit vectors along the line of impact and tangent to it. This can be converted into a vector expression, by subtracting the initial velocity vector $arrow(v_1) = v_(1n) nh + v_(1t) th$ from $arrow(v'_1)$. Subtracting $arrow(v_1)$ from $arrow(v'_1)$, $ arrow(v'_1) - arrow(v_1) &= (lr(((m_1-m_2)/(m_1 + m_2)med v_(1n) + (2m_2)/(m_1 + m_2) med v_(2n))) nh + med cancel(v_(1t) th)) - (v_(1n) nh + med cancel(v_(1t) th))\ &= ((m_1-m_2)/(m_1 + m_2)med v_(1n) + (2m_2)/(m_1 + m_2) med v_(2n) - v_(1n)) nh\ &= ((-2m_2)/(m_1 + m_2)med v_(1n) + (2m_2)/(m_1 + m_2) med v_(2n)) nh\ &= (2m_2)/(m_1 + m_2)med (v_(2n) - v_(1n)) nh\ $ Here, we can substitute $v_(1n) = arrow(v_1) dot nh$ and $v_(2n) = arrow(v_2) dot nh$. $ arrow(v'_1) = arrow(v_1) + (2m_2)/(m_1 + m_2)med ((arrow(v_2) - arrow(v_1)) dot nh) nh\ $ The unit vector along the line of impact, $nh$, is in the direction of the difference of position vectors of bodies 1 and 2. If $arrow(x)$ denotes the position vector of the centre of the body, $ nh = (arrow(x_2) - arrow(x_1))/(|arrow(x_2) - arrow(x_1)|) $ #pagebreak(weak: true) By substituting all values, we get a vector expression for $arrow(v'_1)$. The expression of $arrow(v'_2)$ can be symmetrically obtained. $ #block($ display(arrow(v'_1) = arrow(v_1) + (2 m_2) / (m_1 + m_2) ((arrow(v_2) - arrow(v_1)) dot (arrow(x_2) - arrow(x_1)))/(|arrow(x_2) - arrow(x_1)|^2) (arrow(x_2) - arrow(x_1)))$, stroke: black, inset: 5mm )\ #block($ display(arrow(v'_2) = arrow(v_2) + (2 m_1) / (m_1 + m_2) ((arrow(v_1) - arrow(v_2)) dot (arrow(x_1) - arrow(x_2)))/(|arrow(x_1) - arrow(x_2)|^2) (arrow(x_1) - arrow(x_2)))$, stroke: black, inset: 5mm ) $ #v(3em) #align(center, line(length: 50%))
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/multiline_04.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Test mixing lines with and some without alignment points. $ "abc" &= c \ &= d + 1 \ = x $
https://github.com/Clamentos/FabRISC
https://raw.githubusercontent.com/Clamentos/FabRISC/main/src/spec/Section8.typ
typst
Creative Commons Attribution Share Alike 4.0 International
/// #import "Macros.typ": * /// #section( [License], [ Attribution-ShareAlike 4.0 International #line(length: 100%, stroke: 0.5pt) //======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees #line(length: 100%, stroke: 0.5pt) //======================================================================= Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. Additional offer from the Licensor -- Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. c. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike. In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. #line(length: 100%, stroke: 0.5pt) //======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ]) ///
https://github.com/taylorh140/pikchr-wasm-typst
https://raw.githubusercontent.com/taylorh140/pikchr-wasm-typst/main/Readme.md
markdown
The Unlicense
= Purpose Draw Pikchr diagrams in typst. = Usage make sure pikchr.wasm is somewhere accessable, and you can use the following: ```typst #let pikchr-module = plugin("pikchr.wasm") #let Pikchr(body)={ image.decode( str(pikchr-module.PikchrRender(bytes(body))) ) } #Pikchr(` box "Hello World!" `.text) ``` Should produce: <img src="https://github.com/taylorh140/pikchr-wasm-typst/assets/10996543/659c6511-9117-4496-a79b-41e4c49e646c" width="300"> = Build tools - linux/wsl - emcc (for compileing things.) - wabt (for manually hacking the assembly) - python (automate imp substitutions since i can't make emcc do it.)
https://github.com/mitsuyukiLab/grad_thesis_typst
https://raw.githubusercontent.com/mitsuyukiLab/grad_thesis_typst/main/contents/case_study.typ
typst
= ケーススタディ <case_study> == ケース1 <case_1> === 問題設定 <problem_setting_in_case_1> 問題問題 === 結果 <result_in_case_1> 結果結果 == ケース2 <case_2> === 問題設定 <problem_setting_in_case_2> 問題問題 === 結果 <result_in_case_2> 結果結果
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/bytefield/0.0.3/example.typ
typst
Apache License 2.0
#import "@local/bytefield:0.0.2": * = Bytefield == Colored Example #bytefield( bytes(3, fill: red.lighten(30%))[Test], bytes(2)[Break], bits(24, fill: green.lighten(30%))[Fill], bytes(12)[Addr], padding(fill: purple.lighten(40%))[Padding], ) == Show all bits in the bitheader Show all bit headers with `bitheader: "all"` #bytefield( bits:32, msb_first: true, bitheader: "all", ..range(32).map(i => bit[#flagtext[B#i]]).rev(), ) == Smart bit header Show start bit of each bitbox with `bitheader: "smart"`. #bytefield( bits: 32, // same as bitheader: (0,8,13,18,23,31), bitheader: "smart", bits(8)[opcode], bits(5)[rd], bits(5)[rs1], bits(5)[rs2], padding()[] ) == Reversed bit order Select `msb_first: true` for a reversed bit order. #bytefield( msb_first: true, bitheader: "smart", byte[MSB],bytes(2)[Two], bit[#flagtext("URG")], bits(7)[LSB], ) == Custom bit header Pass an `array` to specify each number. #bytefield( bits:16, bitheader: (0,5,6,7,8, 12,15), bits(6)[First], bits(2)[Duo], bits(5)[Five], bits(3)[Last], ) Pass an `integer` to show all multiples of this number. #bytefield( bits:16, bitheader: 3, bits(6)[First], bits(2)[Duo], bits(5)[Five], bits(3)[Last], ) == Text header instead of numbers [*WIP*] Pass an `dictionary` as bitheader. Example: ```typst #let myCustomTextBitheader = ( "0": "LSB_starting_at_bit_0", "13": "test", "24": "next_field_at_bit_24", "31":"MSB", angle: -40deg, marker: auto // or none ) ``` #box(width: 100%)[ #bytefield( bitheader: ("0": "LSB_starting_at_bit_0", "13": "test", "25": "next_field_at_bit_25", "31":"MSB", angle: -45deg,), bits: 32, bit[F], byte[Start], bytes(2, fill: red.lighten(30%))[Test], bit[H], bits(5, fill: purple.lighten(40%))[CRC], bit[T], ) ] = Some predefined network protocols == IPv4 #ipv4 == IPv6 #ipv6 == ICMP #icmp == ICMPv6 #icmpv6 == DNS #dns == TCP #tcp #tcp_detailed == UDP #udp
https://github.com/maantjemol/Aantekeningen-Jaar-2
https://raw.githubusercontent.com/maantjemol/Aantekeningen-Jaar-2/main/IBIA/samenvatting.typ
typst
// Update this import to where you put the `lapreprint.typ` file // It should probably be in the same folder #import "../template/lapreprint.typ": template #import "../template/frontmatter.typ": loadFrontmatter #import "@preview/drafting:0.2.0": * #let defaultColor = rgb("#f2542d") #show: template.with( title: "IBIA", subtitle: "Samenvatting", short-title: "IBIA Samenvatting", venue: [ar#text(fill: red.darken(20%))[X]iv], // This is relative to the template file // When importing normally, you should be able to use it relative to this file. theme: defaultColor, authors: ( ( name: "<NAME> . ", ), ), kind: "Samenvatting", abstract: ( (title: "Samenvatting", content: [Deze samenvatting biedt een uitgebreide beschrijving van de verschillende aspecten en processen binnen een organisatie, waaronder situatie-analyse, procesverbetering, businessmodellen, dynamische capaciteiten en technologie. Het document bevat ook inzichten in organisatorische structuren, cultuurverandering, teamdynamiek en de implementatie van agile methodologieën. Daarnaast wordt er aandacht besteed aan softwareontwikkeling, architectuur en de rol van AI in organisaties.]), ), open-access: true, margin: ( ( title: "Key Points", content: [ - De Minto piramide is een effectieve manier om een advies te presenteren - Agile methodologieën zoals Scrum en Kanban zijn populair in softwareontwikkeling - Organisatiecultuur en teamdynamiek zijn belangrijke factoren voor het succes van een organisatie ], ), ), font-face: "Open Sans" ) #set page( margin: (left: 2in, right: 0.8in), paper: "us-letter" ) #let marginRatio = 0.8 #let default-rect(stroke: none, fill: none, width: 0pt, content) = { pad(left:width*(1 - marginRatio), rect(width: width*marginRatio, stroke: stroke)[ #content ]) } #set-page-properties() #show terms: it => [ #margin-note(rect: default-rect, side: left, stroke: 0pt)[#text(defaultColor, weight: 600, size: 10pt)[#it.children.first().term:]\ #it.children.first().description] ] #set heading(numbering: none) #show heading: set text(defaultColor, weight: "medium") = SCQ (& processen) == Situation: Beschrijving van de situatie. - Dit is het bedrijf, dit doen ze, feitelijk == Complication: Beschrijving van het probleem in de situatie. - Dit is het huidige proces, hier lopen ze tegenaan. == Question: Beschrijving van de vraag als reactie op de complicatie. - Hoe kunnen we dit proces verbeteren? == Answer: Beschrijving van het antwoord op de vraag of beschrijving van aanpak om tot oplossing te komen == BPMN diagram Voor een diagram heb je verschillende nodes die je kan gebruiken: #figure( image("./images/bpmn.png", width: 50%), caption: "BPMN nodes", ) Voorbeeld: #figure( image("./images/bmvoorbeeld.png", width: 80%), caption: "BPMN diagram", )<BPMNVoorbeeld> #pagebreak() = Business Model Canvas / Business Model Canvas: A business model describes the rationale of how an organization creates, delivers and captures values. #figure( image("./images/bmc.png", width: 80%), caption: "Business Model Canvas", ) == Cost centers: The cost centers of a business model are the most significant costs incurred while operating under a particular business model, such as fixed costs, variable costs, or economies of scale. *Key Resources:* The most important assets required to make a business model work, including physical, intellectual, human, and financial resources. *Key Activities:* The most important things a business must do to make its business model work, such as production, problem-solving, or platform/network management. *Key Partnerships:* The network of suppliers and partners that complement the business model and optimize operations. == Profit centers: The profit centers of a business model are the ways a business generates income from its customer segments, such as product sales, subscription fees, or advertising. *Customer Segments:* The different groups of customers a business aims to serve. This could be based on demographics, behaviors, or other characteristics. *Channels:* The means by which a business delivers its value propositions to its customer segments, such as sales channels, distribution channels, and communication channels. *Customer Relationships:* The types of relationships a business establishes and maintains with its customer segments, ranging from personal to automated. #pagebreak() == Summary *Value Propositions:* The products or services that create value for a specific customer segment by solving their problems or satisfying their needs. Summary of the model. *Revenue Streams:* The ways a business generates income from its customer segments, such as product sales, subscription fees, or advertising, summary of profit centers. *Cost Structure:* The most significant costs incurred while operating under a particular business model, such as fixed costs, variable costs, or economies of scale. Summary of cost centers. / Dynamic capabilities: the capability of an organization to purposefully adapt an organization's resource base = Dynamic Capabilities 3 onderdelen: sensing, seizing, transforming == Sensing - Het vermogen om veranderingen in de omgeving te detecteren en te begrijpen == Seizing - Het vermogen om snel en effectief te reageren op veranderingen in de omgeving == Transforming - Het vermogen om de organisatie te veranderen om te reageren op veranderingen in de omgeving #figure( image("./images/DC.png", width: 100%), caption: "Dynamic Capabilities", ) / Business Capabilities: Capabilities describe what an enterprise does, as they provide an organization's capacity to achieve a desired outcome. = Business Capabilities: Een *capability* is de *wat* van een organisatie, wat ze doen. Naast een *wat* oon een *waarom* en een *hoe*: - *Waarom*: missie, visie, strategie - *Hoe*: implementatie en richting == Dimensies van Business Capabilities - *processen:* processen, organisatiestructuren - *technologie:* systemen, tools - *mensen/competenties:* communicatie naar je mensen, inspireren, motiveren - *data:* data, analytics, AI // #image("./images/capabilities.png", width: 100%) #figure( image("./images/capabilities.png", width: 100%), caption: "Business Capabilities", ) Hierop kan je je capabilities zetten. Je kan dan een set aan capabilities (links) ordenen in de capability map. - Industrie best practice: - Innovation centers: - Complaint excellence: - Competitive advantage: = Technologie: Architectuur, Inkoop, ontwikkeling == Hoe kom je aan software? // #image("./images/software-koop.png", width: 100%) #figure( image("./images/software-koop.png", width: 80%), caption: "Software" ) Er zijn 3 opties om aan software te komen: + *Kopen:* je koopt software van een leverancier, bijvoorbeeld Microsoft Office + *Developen:* je bouwt software zelf, dit kan intern of door een extern team in te huren + *Outsourcen:* je huurt een partij in om software voor je te bouwen, gaat volledig buiten je om. == Software selectie: Bij een software selectie moet ja aan een aantal dingen denken: + Software moet passen binnen de organisatie en de mensen + Software moet makkelijk integreren + De aanpak past bij de gewoontes en partners van de organisatie + Softwareleverancier past bij de inkoopstrategie van het bedrijf *Software selectie fases:* + *Preparation & Mobilization:* Een gemeenschappelijke taal creëren en de organisatie en leveranciers mobiliseren. Definieer de business needs, analyseer de huidige situatie en stel duidelijk geformuleerde eisen (requirements) op. + *Prototyping:* Het creëren van concrete voorbeelden (prototypes) van de software om de functionaliteit en bruikbaarheid te demonstreren. + *Final Recommendation:* Een definitieve aanbeveling voor de beste software oplossing aan het managementteam presenteren. == Outsourcing: Bij delen van een architectuur kan er worden gekozen voor outsourcing: - Het scheelt tijd en resources die vrijgemaakt kunnen worden om te focussen op de core business - Het kan kostenbesparend zijn, maar vaak pas op lange termijn - Het verminderen van risico's, door het uitbesteden van kennis, capaciteit en continuïteit *Let op!* zonder enterprise-architectuur is de kans groot dat outsourcing niet goed gaat. == Software implementatie: // #image("./images/implementation-cycle.png", width: 100%) #figure( image("./images/implementation-cycle.png", width: 100%), caption: "Software implementatie" ) #pagebreak() / Architectuur: kunst en wetenschap van het ontwerpen en bouwen van gebouwen en andere fysieke structuren. = Architectuur: == Enterprise-architectuur Als iedereen maar wat IT systemen gaat maken en toevoegen wordt het een rommel. Daarom moet er een plan komen waar mensen aan kunnen toevoegen en weglaten wat ze willen. Het moet flexibel, efficient en robuust zijn. Hiervoor is een *enterprise-architectuur* nodig. == Problemen die we willen oplossen met enterprise-architectuur: - Eilandautomatisering: systemen die niet met elkaar praten - Beheersing van kosten - Waarborgen van continuïteit - Business & IT alignment - Creëren van flexibiliteit - Beheersing van risico's - Inzicht in samenhang systemen - communicatie - Strategie - Bestuur == Architectuur raamwerk: Een verzameling van gestandaardiseerde gezichtspunten op de architectuur van een systeem. == Domeinen: - *Businessarchitectuur:* geeft inzicht in de processen en organisatie van een bedrijf - *Informatiearchitectuur:* geeft inzicht in de informatievoorziening en gegevensstromen van een bedrijf - *Applicatiearchitectuur:* geeft inzicht in de software en onderlinge relaties - *Technologiearchitectuur:* geeft inzicht in de technologie en infrastructuur, zoals servers en netwerken = Technologie: De 4 industriële revoluties: + *Mechanisatie*, water- en stoomkracht + *Massaproductie*, elektriciteit, autofabrieken, de lopende band + *Automatisering*, elektronica, IT, robotica + *Digitalisering*, AI, IoT, big data #pagebreak() == Gartner hype cycle: #figure( image("./images/hype-cycle.png", width: 50%), caption: "Gartner Hype Cycle", )<Hype-cycle> In @Hype-cycle is te zien dat de hypecycle bestaat uit 5 fases: + *Technology Trigger:* de technologie wordt geïntroduceerd + *Peak of Inflated Expectations:* de technologie wordt gehypet + *Trough of Disillusionment:* de technologie valt tegen en is eigenlijk minder cool dan gedacht + *Slope of Enlightenment:* de technologie wordt beter begrepen en er komen meer toepassingen + *Plateau of Productivity:* de technologie is volwassen en wordt breed toegepast *BCG* maakt een ander model waarin value en maturity tegen elkaar worden gezet. == Interne en externe factoren die bedrijven forceren te veranderen: + *Flat world:* door globalisering en technologie is de wereld kleiner geworden + *Start-up disruptors:* start-ups kunnen met nieuwe technologieën en businessmodellen bestaande bedrijven ontwrichten + *Digital live:* de digitalisering van de wereld + *Faster innovation:* door technologie kunnen bedrijven sneller innoveren + *Sustainability & regulations:* bedrijven moeten duurzamer worden en voldoen aan regelgeving #pagebreak() = Mensen & competenties == Team dynamiek Een belangrijk model voor team dynamiek is het *Tuckman model*: - *Forming:* het team wordt gevormd - *Storming:* er ontstaan conflicten - *Norming:* er worden afspraken gemaakt - *Performing:* het team werkt goed samen - *Adjourning:* het team wordt opgeheven Deze fases gaan bijna altijd in deze volgorde. Een ander model wat vaak wordt gebruikt is het *Belbin teamrollen model*. Dit bestaat uit een aantal rollen die in een team aanwezig moeten zijn om goed te kunnen functioneren: - *Doen:* de actiegerichte rol _(bedrijfsman en brononderzoeker)_ - *Denken:* de creatieve rol _(plant en waarschuwer)_ - *Willen:* de motiverende rol _(vormen en voorzitter)_ - *Voelen:* de sociale rol _(zorgdrager en groepswerker)_ Al deze mensen hebben verschillende kwaliteiten en valkuilen. Het is belangrijk om een goede mix van deze rollen in een team te hebben. / Bedrijfscultuur: De wijze waarop de leden van de organisatie zich intern in hun onderlinge relaties en extern in hun relaties met klanten en leveranciers gedragen == Organisatie cultuur Binnen een organisatie is gedrag bepalend. Het model van *competing values framework/Organizational Culture Assessment Instrument* geeft inzicht in hoe de organisatie zich intern in hun onderlinge relaties en extern in hun relaties met klanten en leveranciers gedragen. #figure( image("./images/competing-values.png", width: 100%), caption: "Competing values framework / Organizational Culture Assessment Instrument", ) #pagebreak() Er zijn een aantal *culturele lagen* binnen een organisatie. Vanaf binnen naar buiten zijn dat: + *Waarden:* de diepste laag, de overtuigingen van de organisatie + *Rituelen:* de gewoontes en gebruiken van de organisatie + *Helden:* de mensen die de organisatie groot hebben gemaakt + *Symbolen:* de uiterlijke kenmerken van de organisatie Daardoorheen is de *werkwijze* van de organisatie verwikkeld. Hofstede heeft ook nog een ander model bedacht, de *culturele dimensies*. Dit model bestaat uit 6 dimensies: + *Power distance:* de mate waarin de minder machtige leden van de samenleving en organisaties de ongelijkheid in de macht accepteren + *Individualism vs. collectivism:* de mate waarin mensen zichzelf als individu zien of als onderdeel van een groep + *Masculinity vs. femininity:* de mate waarin een samenleving of organisatie masculiene of feminiene waarden heeft + *Uncertainty avoidance:* de mate waarin een samenleving of organisatie onzekerheid vermijdt + *Long-term orientation vs. short-term norm:* de mate waarin een samenleving of organisatie gericht is op de lange termijn of de korte termijn + *Indulgence vs. restraint:* de mate waarin een samenleving of organisatie zichzelf toestaat om plezier te hebben == Cultuurverandering Er zijn *8 succesfactoren* voor cultuurverandering: #figure( image("./images/successf.png", width: 100%), caption: "Cultuurverandering, 8 succesfactoren", ) Een ander probleem bij cultuur verandering is *weerstand*. Om uit te vinden waar weerstand vandaan komt kan het *WWK-model* worden gebruikt: - *Weten:* mensen weten niet waarom er iets verandert _(doelen, route, impact, wat heb ik hieraan?)_ - *Willen:* mensen willen niet veranderen _(motivatie, vertrouwen)_ - *Kunnen:* mensen kunnen niet veranderen _(kennis, vaardigheden)_ #pagebreak() Een ander model wat kan helpen bij cultuurverandering zijn de *6 competenties:* - *Bestuurlijk organisatorische competenties:* Ondernemen, leidinggeven, organiseren, visie - *Sociaal communicatieve competenties:* Communiceren, samenwerken, klantgerichtheid, netwerken - *Intellectuele competenties:* creativiteit, analyseren, leren, probleemoplossen - *Emotionele competenties:* inlevingsvermogen, zelfvertrouwen, zelfsturing, stressbestendigheid - *Taakgerichte competenties:* inzet, flexibiliteit, initiatief - *Competentie ontwikkeling:* reflecteren, leren, ontwikkelen, coachen #pagebreak() = Processen en organisatie: organisatie-eenheden, agile == Wat is een organisatiestructuur? / Business unit: separate division within a company. It has its own strategy, goals, and objectives. Een organisatiestructuur is opgebouwd uit drie substructuren: + *Functiestructuur:* alle voorkomende functies in het bedrijf + *Persoonlijke structuur:* koppelt functies uit de functiestructuur aan mensen + *Organieke structuur:* de manier waarop de functies en mensen met elkaar samenwerken, daarin weeggegeven de divisies, sectoren, afdelingen en teams == Hoofdtaken van besturing: - *Richting van de organisatie* bepalen, externe afstemming tussen organisatie en omgeving - *Inrichting van de organisatie*, organisatiestructuur, processen en systemen - *Beheersing van bedrijfsprocessen*, op gang brengen en op koers houden van doelgerichte activiteiten - *Netjes achterlaten* van de organisatie == Agile *Watervalmethode:* een lineaire aanpak van softwareontwikkeling, waarbij de fasen van het project in een vaste volgorde worden doorlopen. *Agile:* een iteratieve aanpak van softwareontwikkeling, waarbij het project in korte sprints wordt opgedeeld en de klant nauw betrokken is bij het proces. Er zijn verschillende opvattingen van agile, maar *4 kenmerken* komen altijd terug: + Flexibele strategie + Multidisciplinaire teams + In korte cycli werken + Visueel werken (informatie delen en zichtbaar maken) #figure( image("./images/agile.png", width: 100%), caption: "Agile" ) <Agile> In @Agile is te zien dat agile bestaat uit een aantal stappen: + *Backlog:* een lijst van taken die gedaan moeten worden + *Stories:* de taken die gedaan moeten worden + *Sprint:* een korte periode (3 weken) waarin een aantal taken worden gedaan + *Oplevering:* de taken worden opgeleverd #pagebreak() De belangrijkste punten in *agile:* - *Mensen en hun onderlinge interactie* $>$ processen en hulpmiddelen - *Werkende producten* $>$ allesomvattende documentatie - *Samenwerking met de klant* $>$ contractonderhandelingen - *Inspelen op verandering* $>$ het volgen van een plan Een aantal werkwijzen die gebruikt kunnen worden bij agile zijn: + *Scrum:* een framework voor het ontwikkelen, leveren en onderhouden van complexe producten + *Kanban:* een methode om te visualiseren, beheren en verbeteren van het werk + *Spotify model:* een model waarbij teams worden opgedeeld in squads, tribes, chapters en guilds == Scrum: / Scrum: Een raamwerk waarbinnen mensen *complexe, adaptieve problemen* adresseren en tegelijkertijd op een productieve en creatieve wijze producten van de hoogst mogelijk waarde leveren Er zijn drie rollen in scrum: + *Product owner:* bepaalt wat er gemaakt moet worden + *Scrum master:* zorgt ervoor dat het team goed kan werken + *Team:* maakt het product \ #line(length: 100%, stroke: gray) = Hoe presenteer je een advies? *De 5 P's:* Proper Preparation Prevents Poor Performance\ *De 3 V's:* - *Visueel* (lichaamstaal): - Sta recht op - Kijk richting het publiek - Sta in balans - Rustige houding - Let op handgebaren - *Vocaal* (intonatie) - Volume - Emphasis - Tempo - Toonhoogte - Stilte - Oogcontact - *Verbaal* (inhoud) #pagebreak() == Minto piramide: #figure( image("./images/minto.png", width: 100%), caption: "Minto piramide" )<Minto> De Minto piramide (@Minto) bestaat uit 4 lagen: + *Key message* + *Supporting points* + *Data* + *Conclusion* \ #line(length: 100%, stroke: gray) = AI voor organisaties / Generative AI: AI that can create new content, such as images, text, and music. Populaire genAI modellen zijn: \ Tekst: - *ChatGPT:* OpenAI - *Llama*: Meta - *Gemini:* Google - *Claude:* Anthropic Beeld: - *DALL-E:* OpenAI Muziek: - *Elevenlabs* Stem: - *Pi.ai* == LLM: Een LLM is een *Large Language Model* en is een AI model dat is getraind op een grote hoeveelheid tekst. Het model kan worden gebruikt om tekst te genereren, zoals nieuwsartikelen, verhalen of gedichten. LLMs kunnen gebruikt worden in: Contentcreatie en marketing, Klantenservice, Besluitvorming, Product ontwikkeling, Operationele efficiëntie en technologie voorspellingen. #pagebreak() == Risico's van AI: + *Bias:* AI kan bevooroordeeld zijn + *Misleiding* + *Plagiaat* + *Ethische kwesties* #pagebreak() = Vragen Tyron: - Moeten we de digital capability map uit ons hoofd weten? (nee) - Hoe heet het model op pagina 15 week college 3? = Tentamenstof dingen: Oefententamen gaat vooral om de manier van vragen. Veel toepassingsvragen in het tentamen. *Ligt alles wat je doet toe*. == Tentamenvragen: - Hoe moet je enterprise information system selecteren (software selectie) - Schrijf een SAQ (situatie, complicatie, vraag, #strike[antwoord]). Zorg dat het niet 1 regel is. Wees relevant. - Situation: beschrijf de feitelijke dingen (4 tot 5 zinnen) - Complicatie: wat is het probleem (4 tot 5 zinnen) - Question: 1 vraag mag, het liefst 2 vragen - Voorbeeld: wat bekent de nieuwe introductie van elektrische auto's voor BMW? - Zorg dat er nooit iets van je complicatie in je situatie staat. Hou situatie feitelijk. - Processen: - Tegen het logistieke proces van productie tot verzending van X. - Business model canvas: Ken deze, je moet hem zelf kunnen opstellen. 9 dingen onder elkaar. - Vul eerst value-proposition in. dan key partners en de rest van de linker kant. - Daarna revenue streams en de rest van de rechterkant. - Minimal 2 dingen per vakje met *toelichting* - Weet hoe je een organogram maakt - Weet hoe je een planning maakt - De dimensies van Business Capabilities weten (die 4 uit de opdracht) - Digital capability map hoef je niet uit je hoofd te kennen. Het geeft je context in voor een organisatie. - Capabilities map: gebruik die om je capabilities te ordenen. - Gartner Hype Cycle: kan je uitleggen waarom een technologie in een bepaalde fase zit. Je kan de assen gebruiken om dingen uit te leggen - Technologie trends zijn niet zo interessant - Weet hoe je de culturele lagen kan toepassen: - Nike: Symbolen: de swoosh, Helden: <NAME> - Apple: Symbolen: de appel, Helden: <NAME> - Ken de 8 stappen voor cultuur veranderen - Kan organogram tekenen - Hoe kan een technologie toegevoegde waarde hebben voor: - Een persoon - Een team - Een organisatie - Ken diverse hoofdactiviteiten - Ken de theorie van presenteren, dingen als Minto piramide - *Schrijf duidelijk* == Voorbereiding: *Eerste vraag:* opwarmen, niet super moeilijk\ *Tweede vraag:* iets meer toepassen\ *Derde vraag:* toepassen 3 grote onderdelen: - Verbanden leggen - Toepassing modellen 1.b Leg uit waarom Business & IT alignment relevant is voor een organisatie: - Als je dat soort dingen niet goed doet krijg je problemen, als je het wel goed doet kan je kansen creëren. 1.c Leg uit hoe het concept van business capabilities bijdraagt aan Business & IT alignment: - In de business capabilities zitten domeinen. Als je die 4 hebt heb je alignment 1.e Leg uit goe Agile kan bijdragen aan het dichter bij elkaar krijgen van Business & IT: - Agile is multidisciplinair, je hebt mensen vanuit de business en IT in een team. 3.a Leg uit wat het business model canvas is: - Niet de elementen - Legt uit hoe een business model canvas inzicht geeft in wat de waarde van een bedrijf is 3.c Werk het business model canvas uit voor Coolblue: - 18 punten, 2 per vakje, toelichting - Hou het algemeen: bezorg bedrijven in plaats van PostNL - Denk vooral aan onderscheidende dingen - Value proposition: denk aan de slogan. _Het leveren van producten en diensten met de focus op goede klantenservice_ 3.d Beschrijf de SCQ van AH omtrent de stakingen in de distributiecentra die in de maand mei plaatsvonden.
https://github.com/giacomocavalieri/curriculum-vitae
https://raw.githubusercontent.com/giacomocavalieri/curriculum-vitae/main/resume.typ
typst
// --- CONSTANTS --------------------------------------------------------------- #let font-color = color.rgb("192427") #let main-color = color.rgb("cceac3") #let accent-color = color.rgb("e8f3e5") // --- DEFAULT STYLING --------------------------------------------------------- #set text(font: "Mona Sans", fill: font-color, size: 0.9em) /// The main title should be big and bold. /// #show heading.where(level: 1): set text(size: 2em, weight: 700) /// Make leve 2 titles a bit bigger and add a small vertical space below. /// #show heading.where(level: 2): the-heading => [ #text(size: 1.2em, the-heading) #v(0.5em) ] // --- DATE TIME UTILITIES ----------------------------------------------------- /// Make a date with a resolution of year and month. /// #let year-month(year, month) = ( "year-month", datetime(year: year, month: month, day: 1) ) /// Make a date with a resolution of years. /// #let year(year) = ( "year", datetime(year: year, month: 1, day: 1) ) /// Formats a date created with `year-mont` of `year` according to its /// resolution. /// #let format-date(data) = { let format = data.at(0) let date = data.at(1) date.display( if format == "year-month" { "[year].[month]" } else if format == "year" { "[year]" } ) } /// Formats a time interval between start and end. /// If the end is `none` it simply outputs `present`. /// #let format-time-interval(start, end) = { if end == none { [#format-date(start) - present] } else { [#format-date(start) - #format-date(end)] } } // --- PRETTY PRINTING THE VARIOUS DATA ---------------------------------------- /// Underlines the text with an highlighter effect that only covers half of it. /// #let underline(color: accent-color, content) = { set text(weight: "bold") highlight( fill: color, top-edge: 0.2em, bottom-edge: -0.2em, extent: 0.2em, content, ) } /// Puts `aside` on a small column on the left and all the remaining contents /// on the remaining column on the right of the page. /// #let aside(aside, ..rest) = { grid( columns: (8em, auto), column-gutter: 2em, row-gutter: 1em, emph(align(right, aside)), ..rest.pos().intersperse([]) ) } /// A vertical stack with a big default spacing. /// #let vstack(spacing: 1.5em, ..content) = stack( dir: ttb, spacing: spacing, ..content ) /// Pretty print a work experience entry. /// #let show-work-experience(work-experience) = { let pretty-role = text(weight: "bold")[#work-experience.employer -- #work-experience.short-role] let pretty-interval = format-time-interval(work-experience.start, work-experience.end) aside(pretty-interval, pretty-role, work-experience.role) } /// Pretty print an education entry. /// #let show-education(education) = { let pretty-interval = format-time-interval(education.start, education.end) let pretty-place = if education.place == none [] else [-- #education.place] let pretty-school = text(weight: "bold")[#education.school #pretty-place] let pretty-mark = if education.mark == none [] else [-- #education.mark] aside(pretty-interval, pretty-school, [#education.degree #pretty-mark]) } /// Pretty print a language entry. /// #let show-language(language-data) = [ #language-data.language -- #language-data.level ] /// A section of the cv. /// #let show-section(title, ..content) = vstack( underline(color: accent-color)[== #title], vstack(..content), ) /// --- THE CV DATA -------------------------------------------------------------- #let skills = ( technical: ("Gleam", "Rust", "Haskell", "Elm", "Scala", "Java", "JavaScript", "Python"), soft: ("Empathy", "Communication", "Documentation"), languages: ( (language: "Italian", level: "native speaker"), (language: "English", level: "C1"), ), ) #let work-experience-entries = ( ( employer: "Gleam", place: none, start: year-month(2024, 1), end: none, short-role: "Core team member", role: [ Gleam is a statically typed, functional programming language that can be compiled to Erlang and JavaScript. I am a member of Gleam's core team and I have been regularly contributing the the language compiler. ], ), ( employer: "TwinLogix", place: "Cesena", start: year-month(2023, 7), end: year-month(2023, 11), short-role: "TypeScript Developer", role: [ TwinLogix is a company based in Cesena, member of the #emph("DIR (Distretto dell'Informatica Romagnolo)"). I worked on the #emph(link("https://github.com/mondrian-framework/mondrian-framework", "Mondrian Framework")) helping with a rewrite of its core internals and improving its documentation. ], ), ( employer: "Università di Bologna", place: "Cesena", start: year-month(2022, 3), end: year-month(2023, 9), short-role: "Teaching assistant", role: [ I have covered the role of teaching assistant for the Database course of the Computer Science and Engineering Course. I reviewed exams, graded the students' projects and carried out lab lectures. ], ), ( employer: "Università Ca' Foscari Venezia", place: "Venezia", start: year-month(2021, 4), end: year-month(2021, 7), short-role: "JavaScript Developer", role: [ With a team of three friends I have developed the online japanese dictionary #emph(link("https://jisho.unive.it", "Cafoscari Jisho Web")). This project was commissioned by professor <NAME>, from Ca' Foscari's Department of Asian and North African Studies. ], ), ) #let education-entries = ( ( school: "Università di Bologna", place: "Cesena", start: year(2020), end: year(2023), degree: "Master's Degree in Computer Science and Engineering", mark: "110/110 cum laude", ), ( school: "Università di Bologna", place: "Cesena", start: year(2017), end: year(2020), degree: "Bachelor's Degree in Computer Science and Engineering", mark: "110/110 cum laude", ), ( school: "Liceo Scientifico A. Righi", place: "Cesena", start: year(2012), end: year(2017), degree: "High school diploma in scientific studies", mark: "100/100", ) ) #let contacts = ( ( kind: "Phone", value: link("tel:+393452446512", "+39 345 244 6512"), ), ( kind: "Email", value: link("mailto:<EMAIL>", "<EMAIL>"), ), ( kind: "GitHub", value: link("https://github.com/giacomocavalieri", "@giacomocavalieri"), ), ) #let introduction = [ Hello! I am an Italian software developer with a soft spot for functional programming languages.\ Trying my best to write good and well documented code.\ Always striving to treat people with kindness, respect and honesty. ] /// --- LAY OUT THE CV ------------------------------------------------ #vstack( // Make the spacing bigger to give some room to each section. spacing: 3em, // A big bold title underlined with the main color. underline(color: main-color)[= Giacomo Cavalieri], // Add the introduction and contacts. introduction, vstack(..contacts.map(c => aside(c.kind, c.value))), // Skills section. show-section( "Skills", aside("Technical", skills.technical.join(", ")), aside("Soft skills", skills.soft.join(", ")), aside("Languages", skills.languages.map(show-language).join(", ")), ), // Work experience section. show-section( "Work Experience", ..work-experience-entries.map(show-work-experience), ), // Education section. show-section("Education", ..education-entries.map(show-education)) )
https://github.com/HenkKalkwater/aoc-2023
https://raw.githubusercontent.com/HenkKalkwater/aoc-2023/master/index.typ
typst
#import "aoc.typ" #show: aoc.template.with( title: "Advent of Code 2023" ) The first puzzles will unlock on December 1st at midnight EST (UTC-5). https://adventofcode.com/ #outline(depth: 3) #aoc.day(1, solved-parts: 2) #aoc.day(2, solved-parts: 2) #aoc.day(3, solved-parts: 2)
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/crates/tinymist-query/src/fixtures/hover/builtin_var.typ
typst
Apache License 2.0
#(/* ident after */ red);
https://github.com/dainbow/MatGos
https://raw.githubusercontent.com/dainbow/MatGos/master/themes/33.typ
typst
#import "../conf.typ": * = Неравенство Чебышева и закон больших чисел == Неравенство Чебышева #lemma("Неравенство Маркова")[ Пусть $xi >= 0$ -- случайная величина, $a in RR^(++)$. Тогда #eq[ $P(xi >= a) <= (EE xi) / a$ ] ] #proof[ Распишем цепочку очевидных неравенств: #eq[ $\ EE xi = EE (xi II(xi >= a) + xi II(xi < a)) = EE(xi II(xi >= a) + EE(xi II(xi < a))) >= \ EE (xi II(xi >= a)) >= a EE (II (xi >= a)) = a P(xi >= a)$ ] ] #lemma( "Неравенство Чебышева", )[ Пусть $xi$ -- случайная величина. Тогда #eq[ $forall epsilon > 0 : space P(abs(xi - EE xi) >= epsilon) <= (VV xi) / epsilon^2$ ] ] #proof[ Подставим в неравенство Маркова неотрицательную случайную величину $(xi - EE xi)^2$ и $a = epsilon^2$. ] == Закон больших чисел #definition[ События $A$ и $B$ называются *независимыми*, если $P(A B) = P(A)P(B)$ ] #definition[ События $A_1, ..., A_n$ называются *независимыми в совокупности*, если #eq[ $forall i_1, ..., i_k in overline("1, n") : space P(A_(i_1)...A_(i_k)) = P(A_(i_1))...P(A_(i_k))$ ] ] #definition[ $sigma$-алгебры $cal(F), cal(G)$ называются *независимыми в совокупности*, если независимы в совокупности любые их конечные наборы. ] #definition[ Случайные величины $xi, eta$ называются *независимыми*, если независимы $sigma$-алгебры, порождённые их распределениями. ] #proposition[ Если $xi, eta$ независимые случайные величины, то #eq[ $EE xi eta = EE xi EE eta$ ] Более того, их дисперсия линейна #eq[ $VV (xi + eta) = VV xi + VV eta$ ] ] #theorem[ Пусть $seq(xi)$ -- последовательность независимых одинаково распределённых случайных величин и $exists VV xi_1, a = EE xi$. Тогда #eq[ $forall epsilon > 0 : space P(abs((xi_1 + ... + xi_n) / n - a) > epsilon) ->_(n -> oo) 0$ ] ] #proof[ Подставим в неравенство Чебышева $xi = (xi_1 + ... + xi_n) / n$. Заметим, что, благодаря линейности, $EE xi = a$. Тогда #eq[ $P(abs(xi - EE xi) > epsilon) <= (VV xi) / epsilon^2 = (VV (xi_1 + ... + xi_n)) / (n^2 epsilon^2)$ ] Так как величины независимы, то дисперсия суммы равна сумме дисперсий. Получаем #eq[ $P(abs(xi - EE xi) > epsilon) <= (n VV xi_1) / (n^2 epsilon^2) ->_(n -> oo) 0$ ] ]
https://github.com/sora0116/unix_seminar
https://raw.githubusercontent.com/sora0116/unix_seminar/master/handout/gdb/main.typ
typst
#import "@preview/big-todo:0.2.0": * #set text(font: "<NAME>") #set heading(numbering: "1.1") #set page(numbering: "1") #show raw: it => { if (it.lang == "shell") { block(fill: rgb("#1d2433"), width: 100%, inset: 10pt, radius: 10pt)[ #text(fill: rgb("#f6f6f6"))[#it] ] } else { it } } #let gdb(cmd) = raw(" (gdb) "+cmd, block: true, lang: "shell") #let args(pre: [], name: "argument name", desc: "description", ..con) = { pre table( columns: (2fr, 3fr), align: (_, y) => if y==0 {center} else {left}, [#name], [#desc], ..con.pos().flatten() ) } #let sep(text) = table.cell(colspan: 2)[#align(center)[#text]] #let syn(text) = raw(" (gdb) "+text, block: true, lang: "shell") #align(center+horizon)[#text(size: 2em)[GDB]] #align(center)[Chapter 1] #pagebreak() = 概要 == GDBとは GDBはGnu Projectのデバッガです。 == コマンド GDBを起動すると先頭に`(gdb)`の表示が出て対話モードになります。 #gdb("<command> [<options>]") の形式でコマンドを実行し、様々の処理を行うことでデバッグを行います。 コマンド入力時はTABによる補完が可能です。また、曖昧さがない場合にはコマンドは先頭数文字だけの入力でも認識されます。 == ヘルプ コマンドのヘルプを`help`コマンドで確認できます。 #gdb("help [<class>|<command>|all]") #args( (`class`, [特定のクラスのコマンドのリストを表示]), (`command`, [特定のコマンドのヘルプを表示]), (`all`, [全てのコマンドのリストを表示]), ) `class`に指定できるもの: #args(name: "class name", (`aliases`, [他のコマンドのエイリアス]), (`breakpoints`, [特定の場所でプログラムを停止させる]), (`data`, [データを検査する]), (`files`, [ファイルを指定、検査する]), (`internals`, [メンテナンスコマンド]), (`obscure`, [ぼんやりした特徴]), (`running`, [プログラムを走らせる]), (`stack`, [スタックを検査する]), (`status`, [ステータスの検査]), (`support`, [サポート機能]), (`tracepoint`, [プログラムを停止せずにトレースする]), (`user-defined`, [ユーザー定義のコマンド]), ) この一覧は引数無しで`help`コマンドを実行することで閲覧できます。 = 基本操作 == GDBの起動 GDBを起動するには以下のコマンドをシェルで叩きます。 ```shell $ gdb [<options>] [<program> [<core-file>|<pid>]] $ gdb [<options>] --args <program> [<args>...] ``` #args(pre: [`options`に指定できるもの], name: "option name", sep("ファイル等の指定"), (`--args`, [実行ファイル以降の引数をプログラムに渡す]), (`--core <file>`, [ダンプされたコアファイルを検査]), (`--exec <file>`, [実行ファイルを検査]), (`--pid <pid>`, [プロセスIDを指定してアタッチ]), (`--directory <dir>`, [ソースファイル検索ディレクトリを指定]), (`--se <file>`, [シンボルファイルおよび実行ファイルを指定]), (`--symbol <file>`, [シンボルファイルを指定]), (`--readnow`, [全てのシンボルを最初のアクセス時に読み込む]), (`--readnever`, [シンボルファイルを読み込まない]), (`--write`, [実行ファイルとコアファイルに書き込みを行う]), sep("初期化コマンドとコマンドファイル"), (`-x, --command <file>`, [ファイルからコマンドを実行]), (`-ix, --init-command <file>`, [実行ファイル読み込み前に実行するコマンドファイル]), (`-ex, --eval-command <cmd>`, [コマンドを実行]), (`-iex, --init-eval-command <cmd>`, [実行ファイル読み込み前に実行するコマンド]), (`--nh`, [`~/.gdbinit`を読み込まない]), (`--nx`, [`.gdbinit`を全て読み込まない]), sep("出力とUI制御"), (`--fullname`, [emacs-GDBで使用される出力情報]), (`--interpreter <interpreter>`, [インタープリターを指定]), (`--tty <tty>`, [デバッグするプログラムの入出力TTYを指定]), (`-w`, [GUIを使用]), (`--nw`, [GUIを使用しない]), (`--tui`, [TUIを使用]), (`--dbx`, [DBX compatibilityモード]), (`-q, --quiet, --silent`, [GDB開始時のメッセージを表示しない]), sep("モード"), (`--batch`, [バッチモードで実行]), (`--batch-silent`, [バッチモードで実行し、出力を行わない]), (`--return-child-result`, [デバッグするプログラムの終了コードでGDBも終了する]), (`--configuration`, [GDBの詳細な設定を表示]), (`--help`, [GDB起動のヘルプを表示]), (`--version`, [バージョン情報を表示]), sep("リモートデバッグオプション"), (`-b <baudrate>`, [帯域幅を指定]), (`-l <timeout>`, [タイムアウト時間(秒)を指定]), sep("その他のオプション"), (`--cd <dir>`, [カレントディレクトリを変更]), (`-D, --data-directory <dir>`, [データディレクトリを変更]) ) == プログラムの読み込み デバッグするプログラムをGDBに読み込むには起動時の引数で指定するか、コマンドで指定することができます。 起動時には例えば ```shell $ gdb ./a.out ``` のように指定し、コマンドでは #gdb("file ./a.out") のように指定できます。 == プログラムの起動 プログラムを起動するには`run`コマンドまたは`start`コマンドを使用します。 `run`コマンドは設定した停止場所まで継続実行し、`start`ではエントリポイントで停止します。 `run`コマンドの文法: #syn("run <args>") #args((`args`, [プログラムにコマンドライン引数として渡す])) `start`コマンドの文法: #syn("start <args>") #args((`args`, [プログラムにコマンドライン引数として渡す])) == プログラムの終了 プログラムを終了するには`ctrl+c`を使用するか`kill`コマンドで終了できます。 == GDBの終了 GDBを終了するには`ctrl+d`を使用するか`quit`または`exit`コマンドで終了できます。 = プログラムの停止 デバッグ中のプログラムを停止させるにはあらかじめ停止場所や条件を設定しておく必要があります。停止箇所としてはブレークポイント、ウォッチポイント、キャッチポイントが設定できます。 なお、ブレークポイント、ウォッチポイント、キャッチポイントをまとめてブレークポイントと呼ぶこともあります。 == ブレークポイント プログラムが到達した際に停止する場所です。 === ブレークポイントの設置 ブレークポイントを設置するには`break`コマンドを使用します。 #syn("break [<location>] [thread <tnum>] [[-force-condition] if [<cond>]]") #args( (`location`, [設置場所を指定します。詳細は @locspec を参照]), (`thread <tnum>`, [特定のスレッドでのみ停止。スレッド番号は`info threads`で確認]), (`-force-condition`, [`cond`の式が現在の文脈で無効でも無視して設置]), (`cond`, [条件式を満たすときのみ停止]) ) ==== 位置指定 <locspec> 位置の指定方法はいくつかあります。代表的なものは - `[<file>:]<linenum>`: 行番号を指定 - `[<file>:]<funcname>`: 関数名を指定 - `<addr>`: アドレスを指定 詳細は https://sourceware.org/gdb/current/onlinedocs/gdb.html/Location-Specifications.html#Location-Specifications をご覧ください。 == ウォッチポイント 式の値を監視して変更があった際にプログラムを停止させます。 === ウォッチポイントの設置 ウォッチポイントを設置するには`watch`コマンドを使用します。 #syn("watch [-l <location>] <expr>") #args( (`location`, [`expr`が指すアドレスのメモリを監視]), (`expr`, [監視する式]) ) == キャッチポイント 例外やシステムコールなどの際に停止します。 === キャッチポイントの設置 キャッチポイントを設置するには`catch`コマンドを使用します。 #syn("catch <subcommand> [<args>]") #args(name: "subcommand name", (`catch`, [例外のキャッチ]), (`exec`, [`exec`の呼び出し]), (`fork`, [`fork`の呼び出し]), (`load`, [共有ライブラリロード]), (`rethrow`, [例外の再スロー]), (`signal`, [シグナルキャッチ]), (`syscall`, [システムコール発行]), (`throw`, [例外スロー]), (`unload`, [共有ライブラリアンロード]), (`vfork`, [`vfork`呼び出し]), ) == ブレークポイントの削除 ブレークポイントを削除するには`delete`コマンドを使用します。 #syn("delete [breakpoint-num]") #args((`breakpoint-num`, [削除するブレークポイントを指定。ブレークポイント番号は`info breakpoints`で確認])) == ブレークポイントの無効化 ブレークポイントを無効化するには`disable breakpoints`コマンドを使用します。 #syn("disable breakpoints [breakpoint-num]") #args((`breakpoint-num`, [無効化するブレークポイントを指定。ブレークポイント番号は`info breakpoints`で確認])) == ブレークポイントの有効化 ブレークポイントを有効化するには`enable breakpoints`コマンドを使用します。 #syn("enable breakpoints [breakpoint-num]") #args((`breakpoint-num`, [有効化するブレークポイントを指定。ブレークポイント番号は`info breakpoints`で確認])) == ブレークポイント到達時実行コマンド ブレークポイントに到達した際に実行するコマンドを`commands`コマンドで設定できます。 #syn("commands <command> [<breakpoint-num> ...]") #args( (`command`, [実行するコマンド]), (`breakpoint-num`, [設定するブレークポイントを指定。ブレークポイント番号は`info breakpoints`で確認。指定しない場合、一番最後のブレークポイントが指定される]) ) == ブレークポイントの保存 `save breakpoints`コマンドで現在設定されているブレークポイントをファイルに保存できます。 #syn("save breakpoints") == ブレークポイントの読み込み 保存したブレークポイントは`source`コマンドで読み込めます。 #syn("source <file>") = プログラムの再開 ブレークポイント等で停止したプログラムを様々な方法で再開できます。再開方法は主にステップ実行と継続実行に分かれ、ステップ実行では一定分だけ進んで停止し、継続実行では次のブレークポイントまで進みます。 === 継続実行 継続実行をするには`continue`コマンドを使用します。 #syn("continue [<count>]") #args((`count`, [ブレークポイントを無視する回数])) === 関数から返る 関数から返るまで実行するには`finish`コマンドを使用します。 現在選択中のフレームが帰るまで実行します。フレームの選択方法は @frame を参照してください。 #syn("finish") === ジャンプ 特定の位置まで継続実行をするには`jump`コマンドを使用します。 #syn("jump <loc>") #args(`loc`, [停止位置。行番号かアドレスで指定。]) === ソース行単位ステップオーバー ソースコード行単位でステップし、関数呼び出しで中に入らないような実行(ステップオーバー)は`next`コマンドを使用します。 #syn("next [<count>]") #args(`count`, [ステップ回数]) === 命令単位ステップオーバー 機械語命令単位でのステップオーバーは`nexti`コマンドを使用します。 #syn("nexti [<count>]") #args(`count`, [ステップ回数]) === ソース行単位ステップイン ソースコード行単位でステップし、関数呼び出しで中に入るような実行(ステップイン)は`next`コマンドを使用します。 #syn("step [<count>]") #args(`count`, [ステップ回数]) === 命令単位ステップイン 機械語命令単位でのステップインは`nexti`コマンドを使用します。 #syn("stepi [<count>]") #args(`count`, [ステップ回数]) === until ソース行の上で実際に現在の次の行まで、または指定の場所まで実行するには`until`コマンドを使用します。 #syn("until [<loc>]") #args(`loc`, [停止場所。指定方法は @locspec を参照。指定しない場合、現在の行の次の行が指定される]) = スタックフレーム == バックトレース <backtrace> コールスタックを表示するには`backtrace`コマンドを使用します。 #syn("backtrace [<options>] [<count>]") #args(name: "option name", (`-entry-values <v>`, [関数の引数の表示方法を設定]), (`-frame-arguments <v>`, [スカラ値でない引数の表示設定]), (`-raw-frame-argument on|off`, [rawフォームで引数を表示]), (`-frame-info <v>`, [フレーム情報の表示設定]), (`-past-main on|off`, [`main`関数以前のフレームを表示するか]), (`-past-entry on|off`, [エントリポイント以前のフレームを表示するか]), (`-full`, [局所変数を全て表示]), ) == フレームの選択 <frame> フレームを選択するには`frame`コマンドを使用します。 #syn("frame [<num>]") #args(`num`, [選択するフレーム番号。フレーム番号は`backtrace`で確認。@backtrace を参照]) = 変数の表示 == プリント 変数や式の値を確認するには`print`コマンドを使用します。 #syn("print [<options>...] [/<fmt>] [<expr>]") #args( (`options`, [オプションを指定]), (`fmt`, [フォーマットを指定]), (`expr`, [表示する式]), ) 指定できるオプションおよびフォーマットは`help print`で確認できます。 == ディスプレイ ブレークポイント等で停止した際に自動的に変数や式の値を表示するには`display`コマンドを使用します。 #syn("display[/<fmt>] <expr>") #args( (`fmt`, [フォーマットを指定]), (`expr`, [表示する式]), )
https://github.com/VisualFP/docs
https://raw.githubusercontent.com/VisualFP/docs/main/SA/project_documentation/content/personal_reports.typ
typst
#import "../../style.typ": include_section = Personal Reports #include_section("project_documentation/content/personal_report_lukas.typ", heading_increase: 1) #include_section("project_documentation/content/personal_report_jann.typ", heading_increase: 1)
https://github.com/PuntitOwO/template-informe-practica-fcfm
https://raw.githubusercontent.com/PuntitOwO/template-informe-practica-fcfm/main/conf.typ
typst
MIT License
#let logos = ( escudo: "imagenes/institucion/escudoU2014.svg", fcfm: "imagenes/institucion/fcfm.svg", dcc: "imagenes/institucion/dcc.svg", ) #let pronombre = ( el: (titulo: "O", guia: ""), ella: (titulo: "A", guia: "a"), elle: (titulo: "E", guia: "e"), ) #let guia(visible: true, body) = if visible [ #set rect(width: 100%, stroke: black) #set par(justify: true, first-line-indent: 0pt) #block(breakable: false)[#stack(dir: ttb, rect(fill: black, radius: (top: 5pt, bottom: 0pt), text(fill: white, "Guía (deshabilitar antes de entregar)")), rect(fill: luma(230), radius: (top: 0pt, bottom: 5pt), body) )]] else [] #let conf( titulo: none, // Título de la práctica autor: none, // diccionario con nombre y pronombre, (nombre: "", pronombre: pronombre.<el/ella/elle>) practica: 1, // puede ser práctica 1 o 2 codigo: "CC4901", // CC4901 para práctica I, CC5901 para práctica II ingenieria: "Ingeniería civil en Computación", // Nombre de la carrera correo: "<EMAIL>", // Correo de autor telefono: "+56 9 8765 4321", // Número de teléfono de autor periodo: "Enero - Febrero 2024", // Periodo en que se realizó la práctica empresa: "Empre S.A.", // Nombre de la empresa supervisor: none, // (nombre: "nombre apellido", pronombre: pronombre.<el/ella/elle>) correo-supervisor: "<EMAIL>", // Correo de supervisor telefono-supervisor: "+56 9 8765 4321", // Número de teléfono de supervisor fecha: none, // si no se especifica, se usa la fecha de hoy espaciado_titulo: 1fr, // espacio extra que rodea al título y al nombre en la portada, 1fr es lo mismo que el resto de espacios, 2fr es el doble, etc. doc, ) = { let header = [ #set text(size: 9pt) #stack(dir: ttb, stack(dir: ltr, spacing: 15pt, align(bottom+left, stack(dir: ttb, spacing: 5pt, text("UNIVERSIDAD DE CHILE"), text("FACULTAD DE CIENCIAS FÍSICAS Y MATEMÁTICAS"), text("DEPARTAMENTO DE CIENCIAS DE LA COMPUTACIÓN"), ), ), align(bottom+right, box(width: 5cm, image(logos.dcc))), ), 5pt, line(length: 100%) ) ] // Formato de página set page( paper: "us-letter", number-align: center, numbering: none, header: header, header-ascent: 10%, margin: (top: 3cm), ) // Formato de texto set text( lang: "es", font: "New Computer Modern", size: 12pt, ) // Formato de headings set heading(numbering: "1.") let _informe = [#set text(weight: "bold", size: 24pt) Informe de Práctica Profesional #numbering("I", practica)] let _ingenieria = text(size: 16pt, ingenieria) let _supervisor(gen: pronombre.el) = [Supervisor#gen.guia] let _fecha = if fecha != none [#fecha] else [ // Workaround para traducir meses #show "January": "Enero" #show "February": "Febrero" #show "March": "Marzo" #show "April": "Abril" #show "May": "Mayo" #show "June": "Junio" #show "July": "Julio" #show "August": "Agosto" #show "September": "Septiembre" #show "October": "Octubre" #show "November": "Noviembre" #show "December": "Diciembre" #datetime.today().display("[day] de [month repr:long] de [year]") ] let portada = align(center)[ #stack(dir: ttb, spacing: 1fr, espaciado_titulo, _informe, 0.2fr, text(size: 20pt, titulo), espaciado_titulo, text(size: 24pt, smallcaps(autor.nombre)), 0.2fr, _ingenieria, espaciado_titulo, [ #set terms(separator: ": ") / Correo: #correo / Teléfono: #telefono / Empresa: #empresa / Periodo de realización: #periodo \ \ / #_supervisor(gen: supervisor.pronombre): #supervisor.nombre / Correo: #correo-supervisor / Teléfono: #telefono-supervisor \ \ #codigo Práctica Profesional #numbering("I", practica) \ / Fecha de entrega: #_fecha ], ) ] // Portada portada // Comienza el pre-documento, en página i set page( numbering: "i", margin: (top: 3cm, rest: 2.5cm), ) // Activar numeración de páginas y márgenes set par( justify: true, first-line-indent: 15pt, ) // Formato de párrafos show par: set block(spacing: 2em) // Espacio entre párrafos set cite(style: "council-of-science-editors") // esto deja las citas contiguas como [1, 2] o [1-3] pagebreak(weak: true) // Salto de página counter(page).update(1) // Reestablecer el contador de páginas let numbering-indent = 2em let page-num-indent = 1.2em show bibliography: set heading(numbering: "1.") show selector(outline.entry): it => { let num = if it.body.has("children") [#it.body.children.first()] else [] box(width: numbering-indent, num) if it.body.has("children") [ #link(it.element.location())[#for i in it.body.children.slice(1) {i}] ] else [#link(it.element.location())[ #it.element.body]] box(width: 1fr, repeat[.]) box(width: page-num-indent, align(right, it.page)) } show selector(outline.entry.where(level: 1)): strong // Negrita para los títulos de nivel 1 [ \ ] outline( depth: 2, indent: none, ) show heading: it => { it par(text(size:0.35em, h(0.0em))) } // Workaround para que se aplique la indentación al primer párrafo luego de un heading set page(numbering: "1", margin: (top: 3cm, bottom: 2cm, rest: 2.5cm)) pagebreak(weak: true) // Salto de página counter(page).update(1) // Reestablecer el contador de páginas doc }
https://github.com/protohaven/printed_materials
https://raw.githubusercontent.com/protohaven/printed_materials/main/common-tools/belt_disc_sander.typ
typst
#import "../environment/env-protohaven-class_handouts.typ": * = Belt/Disc Sander The belt/disc sander is useful for refining outside edges of a workpiece. The abrasive surfaces can bring an edge down to a desired profile, as well as round over corners. == Notes === Safety - Keep fingers a minimum of three inches from moving abrasive surfaces - Do not sand on the up (right) side of the disk sander - Position the workpiece so that it will not kick back during sanding - Sand with the direction of the grain - Do not use to sand work that is too small to properly support or large work that is improperly supported - Thin stock may be pulled into the gap between the abrasive and the support table. Keep thin stock flat against the table, or perpendicular to the table. === Care - Allow abrasive to sand at it’s own pace. Don’t force it - Alert a staff member if the abrasive is overworn - Submit a maintenance request when needed // Make maintantence requests an inclusion? === Cleanup - Sweep the floor and vacuum debris - Recycle waste in the scrap bin - Empty scrap bin and dust collection when full == Parts of the Belt/Disc Sander === Abrasive Belt - spins down toward the table - belt itself is designed to be turned in a specific direction === Table - the workpiece should be supported by the table at all times === Table angle gauges - indicates the angle of the tables === Table angle locks - should always be lock the tables at the desired angle === Belt tensioning handle - should only be used by approved staff & must be locked during use - used to loosen the top guide roller for replacement of the belt === Belt tracking adjustment screws - adjusts the belt left or right on the rollers - should only be used by approved staff === Abrasive disc - spins counter clockwise - only use the left hand side of the disc - using the right hand side of the disc will result in kickback and potential injury == Resources // new abrasives?
https://github.com/jneug/typst-mantys
https://raw.githubusercontent.com/jneug/typst-mantys/main/docs/mantys-manual.typ
typst
MIT License
#import "../src/mantys.typ": * // Some fancy logos // credits go to discord user @adriandelgado #let TeX = style(styles => { set text(font: "New Computer Modern") let e = measure("E", styles) let T = "T" let E = text(1em, baseline: e.height * 0.31, "E") let X = "X" box(T + h(-0.15em) + E + h(-0.125em) + X) }) #let LaTeX = style(styles => { set text(font: "New Computer Modern") let a-size = 0.66em let l = measure("L", styles) let a = measure(text(a-size, "A"), styles) let L = "L" let A = box(scale(x: 110%, text(a-size, baseline: a.height - l.height, "A"))) box(L + h(-a.width * 0.67) + A + h(-a.width * 0.25) + TeX) }) #let cnltx = package("CNLTX") #let TIDY = package("Tidy") #let shell( title:"shell", sourcecode ) = { mty.frame( stroke-color: black, bg-color: luma(42), radius: 0pt, { set text(fill:rgb(0,255,36)) sourcecode } ) } #import "@preview/tidy:0.2.0" #let show-module(name, scope:(:)) = tidy-module( read("../src/" + name + ".typ"), name: name, include-examples-scope: true, tidy: tidy, extract-headings: 3 ) #show: mantys.with( ..toml("../typst.toml"), title: "The Mantys Package", subtitle: [#strong[MAN]uals for #strong[TY]p#strong[S]t], date: datetime.today(), abstract: [ #package[Mantys] is a Typst template to help package and template authors to write manuals. It provides functionality for consistent formatting of commands, variables, options and source code examples. The template automatically creates a table of contents and a command index for easy reference and navigation. For even easier manual creation, MANTYS works well with TIDY, the Typst docstring parser. The main idea and design was inspired by the #LaTeX package #cnltx by #mty.name[<NAME>]. ], examples-scope: ( mty: mty, ..api.__all__, example: api.example ) ) = About <about> // #state("@mty-dtypes").update((:)) // #state("@mty-dtypes").update(v => {v.insert("a", (name: "a")); v}) // #state("@mty-dtypes").update(v => if not is.dict(v) { ("a": (name: "a")) } else {v.insert("a", (name: "a")); v}) #add-type("queryable", target:label("about"), color:rgb("#dc322b")) #add-type("automaton") Mantys is a Typst package to help package and template authors to write consistently formatted manuals. The idea is that, as many Typst users are switching over from #TeX, they are used to the way packages provide a PDF manual for reference. Though in a modern ecosystem there are other ways to write documentation (like #mty.footlink("https://rust-lang.github.io/mdBook/")[mdBook] or #mty.footlink("https://asciidoc.org")[AsciiDoc]), having a manual in PDF format might still be beneficial, since many users of Typst will generate PDFs as their main output. The design and functionality of Mantys was inspired by the fantastic #LaTeX package #mty.footlink("https://ctan.org/pkg/cnltx")[#cnltx] by #mty.name[<NAME>]#footnote[#link("mailto:<EMAIL>", "<EMAIL>")]. This manual is supposed to be a complete reference of Mantys, but might be out of date for the most recent additions and changes. On the other hand, the source file of this document is a great example of the things Mantys can do. Other than that, refer to the README file in the GitHub repository and the source code for Mantys. #wbox[ Mantys is in active development and its functionality is subject to change. Until version 1.0.0 is reached, the command signatures and layout may change and break previous versions. Keep that in mind while using Mantys. Contributions to the package are very welcome! ] = Usage == Using Mantys Just import MANTYS inside your `typ` file: #codesnippet[```typ #import "@preview/mantys:0.1.4": * ```] === Initializing the template After importing MANTYS the template is initialized by applying a show rule with the #cmd[mantys] command passing the necessary options using `with`: #codesnippet[```typ #show: mantys.with( ... ) ```] #cmd-[mantys] takes a bunch of arguments to describe the package. These can also be loaded directly from the `typst.toml` file in the packages' root directory: #codesnippet[```typ #show: mantys.with( ..toml("typst.toml"), ... ) ```] #command("mantys", ..args(name: none, title: none, subtitle: none, info: none, authors: (), url: none, repository: none, license: none, version: none, date: none, abstract: content("[]"), titlepage: func(titlepage), examples-scope: (:), [body]), sarg[args])[ #argument("titlepage", default:func(titlepage))[ A function that renders a titlepage for the manual. Refer to #cmdref("titlepage") for details. ] #argument("examples-scope", default:(:))[ Default scope for code examples. ```typc examples-scope: ( cmd: mantys.cmd ) ``` For further details refer to #cmdref("example"). ] All other arguments will be passed to #cmd-[titlepage]. All uppercase occurrences of #arg[name] will be highlighted as a packagename. For example #text(hyphenate:false, "MAN\u{2060}TYS") will appear as Mantys. ] == Available commands #show-module("api") === Source code and examples <sourcecode-examples> Mantys provides several commands to handle source code snippets and show examples of functionality. The usual #doc("text/raw") command still works, but theses commands allow you to highlight code in different ways or add line numbers. Typst code examples can be set with the #cmd[example] command. Simply give it a fenced code block with the example code and Mantys will render the code as highlighted Typst code and show the result underneath. #example[```` #example[``` This will render as *content*. Use any #emph[Typst] code here. ```] ````] The result will be generated using #doc("foundations/eval") and thus run in a local scope without access to imported functions. To pass your functions or modules to #cmd-[example] either set the #opt[examples-scope] option in the intial #cmd[mantys] call or pass a #arg[scope] argument to #cmd-[example] directly. See #relref(cmd-label("example")) for how to use the #cmd-[example] command. #ibox[ To use fenced code blocks in your example, add an extra backtick to the example code: #example[````` #example[```` ```rust fn main() { println!(\"Hello World!\"); } ``` ````] `````] ] #command("example", ..args(side-by-side: false, imports:(:), mode:"code", [example-code], [result]))[ Sets #barg[example-code] as a #doc("text/raw") block with #arg(lang: "typ") and the result of the code beneath. #barg[example-code] need to be `raw` code itself. #example[```` #example[``` *Some lorem ipsum:*\ #lorem(40) ```] ````] #argument("example-code", types:"content")[ A block of #doc("text/raw") code representing the example Typst code. ] #argument("side-by-side", default:false)[ Usually, the #arg[example-code] is set above the #arg[result] separated by a line. Setting this to #value(true) will set the code on the left side and the result on the right. ] #argument("scope", default:(:))[ The scope to pass to #doc("foundations/eval"). Examples will always import the #opt[examples-scope] set in the initial #cmd-[mantys] call. Passing this argument to an #cmd-[example] call _additionally_ make those imports available in thsi example. If an example should explicitly run without imports, pass #arg(scope: none): #sourcecode[````typ #example[`I use #opt[examples-scope].`] #example(scope:none)[``` // This will fail: #opt[examples-scope] I can't use `#opt()`, because i don't use `examples-scope`. ```] ````] ] #argument("mode", default:"code", choices:("code","markup", "math"))[ The mode to evaluate the example in. See #doc("foundations/eval", name:"eval/mode", anchor:"parameters-mode") for more information. ] #argument("result", types:"content")[ The result of the example code. Usually the same code as #arg[example-code] but without the `raw` markup. See #relref(<example-result-example>) for an example of using #barg[result]. #wbox(width:100%)[#arg[result] is optional and will be omitted in most cases!] ] Setting #arg(side-by-side: true) will set the example on the left side and the result on the right and is useful for short code examples. The command #cmd-[side-by-side] exists as a shortcut. #example[```` #example(side-by-side: true)[``` *Some lorem ipsum:*\ #lorem(20) ```] ````] #barg[example-code] is passed to #tidyref("mty", "sourcecode") for processing. If the example-code needs to be different than the code generating the result (for example, because automatic imports do not work or access to the global scope is required), #cmd-[example] accepts an optional second positional argument #barg[result]. If provided, #barg[example-code] is not evaluated and #barg[result] is used instead. #example[```` #example[``` #value(range(4)) ```][ The value is: #value(range(4)) ] ````]<example-result-example> ] #command("side-by-side", ..args(scope: (:), mode: "code", [example-code], [result]) )[ Shortcut for #cmd("example", arg(side-by-side: true)). ] #command("sourcecode", ..args(title:none, file:none, [code]))[ If provided, the #arg("title") and #arg("file") argument are set as a titlebar above the content. #argument("code", types:dtype("content"))[ A #cmd[raw] block, that will be set inside a bordered block. The `raw` content is not modified and keeps its #arg("lang") attribute, if set. ] #argument("title", types:dtype("string"), default:none)[ A title to show above the code in a titlebar. ] #argument("file", types:dtype("string"), default:none)[ A filename to show above the code in a titlebar. ] #cmd-[sourcecode] will render a #doc("text/raw") block with linenumbers and proper tab indentions using #package[codelst] and put it inside a #tidyref("mty", "frame"). If provided, the #arg("title") and #arg("file") argument are set as a titlebar above the content. #example(raw("#sourcecode(title:\"Some Rust code\", file:\"world.r\")[```rust fn main() { println!(\"Hello World!\"); } ```]")) ] #command("codesnippet", barg[code])[ A short code snippet, that is shown without line numbers or title. #example[```` #codesnippet[```shell-unix-generic git clone https://github.com/jneug/typst-mantys.git mantys-0.0.3 ```] ````] ] #command("shortex", ..args(sep: symbol("sym.arrow.r"), [code]))[ Display a very short example to highlight the result of a single command. #arg[sep] changes the separator between code and result. #example[``` - #shortex(`#emph[emphasis]`) - #shortex(`#strong[strong emphasis]`, sep:"::") - #shortex(`#smallcaps[Small Capitals]`, sep:sym.arrow.r.double.long) ```][ - #shortex(`#emph[emphasis]`) - #shortex(`#strong[strong emphasis]`, sep:"::") - #shortex(`#smallcaps[Small Capitals]`, sep:sym.arrow.double.r) ] ] === Other commands #command("package")[ Shows a package name: - #shortex(`#package[tablex]`) - #shortex(`#mty.package[tablex]`) ] #command("module")[ Shows a module name: - #shortex(`#module[mty]`) - #shortex(`#mty.module[mty]`) ] #command("doc", ..args("target", name:none, fnote:false))[ Displays a link to the Typst reference documentation at #link("https://typst.app/docs"). The #arg[target] need to be a relative path to the reference url, like #value("text/raw"). #cmd-[doc] will create an appropriate link URL and cut everything before the last `/` from the link text. The text can be explicitly set with #arg[name]. For #(fnote: true) the documentation URL is displayed in an additional footnote. #example[``` Remember that #doc("meta/query") requires a #doc("meta/locate", name:"location") obtained by #doc("meta/locate", fnote:true) to work. ```] #wbox[ Footnote links are not yet reused if multiple links to the same reference URL are placed on the same page. ] ] #command("command-selector", arg[name])[ Creates a #doc("types/selector") for the specified command. #example[``` // Find the page of a command. #let cmd-page( name ) = locate(loc => { let res = query(cmd-selector(name), loc) if res == () { panic("No command " + name + " found.") } else { return res.last().location().page() } }) The #cmd-[mantys] command is documented on page #cmd-page("mantys"). ```] ] // #let pkg = mty.package // #let module = mty.module // #let idx = mty.idx // #let make-index = mty.make-index // #let doc( target, name:none, fnote:false ) = { === Using Tidy MANTYS can be used with the docstring parser #TIDY, to create a manual from the comments above each function. See the #TIDY manual for more information on this. MANTYS ships with a #TIDY template and a helper function to use it. #command("tidy-module", ..args("data", include-examples-scope: false, extract-headings: 2, tidy: none), sarg("args"))[ #cmd-[tidy-module] calls #cmd(module:"tidy")[parse-module] and #cmd(module:"tidy")[show-module] on the provided #arg[tidy] instance. If no instance is provided, the current #TIDY version from the preview repository is used. Setting #arg(include-examples-scope: true) will add the #opt[examples-scope] passed to #cmd-[mantys] to the evaluation of the module. To extract headings up to a certain level from function docstrings and showing them between function documentations, set #arg[extract-headings] to the highest heading level that should be extracted. #arg(extract-headings: none) disables this. This manual was compiled with #arg(extract-headings: 3) and thus the @describing-arguments heading was shown before the description of #tidyref("api", "meta"). ] === Templating and styling #command("titlepage", ..args("name", "title", "subtitle", "info", "authors", "urls", "version", "date", "abstract", "license"))[ The #cmd-[titlepage] command sets the default titlepage of a Mantys document. To implement a custom title page, create a function that takes the arguments shown above and pass it to #cmd[mantys] as #arg[titlepage]: #sourcecode[```typ #let my-custom-titlepage( ..args ) = [*My empty title*] #show: mantys.with( ..toml("typst.toml"), titlepage: my-custom-titlepage ) ```] A #arg[titlepage] function gets passed the package information supplied to #cmd-[mantys] with minimal preprocessing. The function has to check for #value(none) values for itself. The only argument with a guaranteed value is #arg[name]. ] === Utilities Most of MANTYS functionality is located in a module named #module[mty]. Only the main commands are exposed at a top level to keep the namespace pollution as minimal as possible to prevent name collisions with commands belonging to the package / module to be documented. The commands provide some helpful low-level functionality, that might be useful in some cases. #ibox[ Some of the utilities of previous versions are now covered by #package[tools4typst]. ] #module-commands("mty")[ #show-module("mty") ] // end module mty === Tidy template #module-commands("mty-tidy")[ #show-module("mty-tidy") ] // end module mty-tidy
https://github.com/cu1ch3n/caidan
https://raw.githubusercontent.com/cu1ch3n/caidan/main/README.md
markdown
MIT License
# Caidan Caidan (菜单 in Chinese, /cài dān/, meaning food menu) is a clean and minimal food menu template. See the [example.pdf] file to see how it looks. Additionally, [cu1ch3n/menu] serves as a practical example project utilizing this template. ## Usage Ensure that [WebOMints GD], [LXGW WenKai], and [Ysabeau Infant] fonts are installed first. The required fonts are provided in [fonts]. To use this template with typst.app, you may upload the required fonts manually (**Note**: [LXGW WenKai] may be too large to upload onto typst.app). ## Configuration This template includes the `caidan` function, which comes with several configurable named arguments: | Argument | Default Value | Type | Description | | --- | --- | --- | --- | | `title` | `none` | [content] | The title for your menu | | `cover_image` | `none` | [content] | The image on the menu's cover page | | `update_date` | `none` | [datetime] | This date will be displayed on the cover page in both Chinese and English | | `page_height` | `595.28pt` | [length] | Page height of your menu | | `page_width` | `841.89pt` | [length] | Page width of your menu | | `num_columns` | `3` | [int] | The number of columns per page | The function also accepts a single, positional argument for the body. ## Example ```typ #import "@preview/caidan:0.1.0": * #show: caidan.with( title: [#en_text(22pt, fill: nord0)[Chen's Private Cuisine]], cover_image: image("cover.png"), update_date: datetime.today(), num_columns: 3, ) #cuisine[鲁菜][Shandong Cuisine] - #item[葱烧海参][Braised Sea Cucumber w/ Scallions] - #item[葱爆牛肉][Scallion Beef Stir-Fry] - #item[醋溜白菜][Napa Cabbage Stir-Fry w/ Vinegar] #cuisine[川菜][Sichuan Cuisine] - #item[宫保鸡丁][Gong Bao Chicken] - #item[回锅肉][Twice-cooked pork] - #item[麻婆豆腐][Mapo Tofu] ``` [example.pdf]: https://github.com/cu1ch3n/caidan/blob/main/example.pdf [cu1ch3n/menu]: https://github.com/cu1ch3n/menu [fonts]: https://github.com/cu1ch3n/caidan/tree/main/fonts [content]: https://typst.app/docs/reference/foundations/content/ [datetime]: https://typst.app/docs/reference/foundations/datetime/ [length]: https://typst.app/docs/reference/layout/length/ [int]: https://typst.app/docs/reference/foundations/int/ [WebOMints GD]: http://www.galapagosdesign.com/original/webomints.htm [LXGW WenKai]: https://github.com/lxgw/LxgwWenKai [Ysabeau Infant]: https://fonts.google.com/specimen/Ysabeau+Infant
https://github.com/SillyFreak/typst-stack-pointer
https://raw.githubusercontent.com/SillyFreak/typst-stack-pointer/main/gallery/sum.typ
typst
MIT License
// make the PDF reproducible to ease version control #set document(date: none) // #import "../src/lib.typ" as stack-pointer #import "@preview/stack-pointer:0.1.0" #import "@preview/polylux:0.3.1": * #import themes.simple: * #show: simple-theme #{ import stack-pointer: * let code = ```java void main(String[] args) { int a = 2, b = 3, c = 4; int d = sum(a, b, c); System.out.println(d); } void sum(int x, int y, int z) { int result = add(x, y); result = add(result, z); return result; } void add(int x, int y) { int result = x + y; return result; } ``` // This is where the magic happens: we simulate the above Java code, generating an array of steps // with all the execution information at that point in time. let steps = execute({ // println returns nothing, so it's easy to define and use it's also not part of the shown code, // so the line numbers are `none` let println(x) = func("println", none, l => { // always begin with adding the parameter variables l(none, push("x", x)) l(none, call("...")); l(none, ret()) // there's no retval() here, so the result is a regular execution sequence }) // this is a function with return value. calling it needs some care let add(x, y) = func("add", 11, l => { l(0, push("x", x), push("y", y)) // int result = x + y; let result = x + y // first step to the line, then show its effect: push the new variable l(1); l(1, push("result", result)) // return result; // The return value will be first in the result of `add()`, i.e. the result is not just an // execution sequence. The return value needs to be removed by the caller. l(2); retval(result) }) let sum(x, y, z) = func("sum", 6, l => { l(0, push("x", x), push("y", y), push("z", z)) // int result = add(x, y); // Here we call a function with return value. We separate the return value from the steps. // The result is kept in a variable and inserted... let (result, ..steps) = add(x, y) l(1); steps; l(1, push("result", result)) // ^^^^^ ... here at the right position into the sequence // result = add(result, z); let (result, ..steps) = add(result, z) l(2); steps; l(2, assign("result", result)) // return result; l(3); retval(result) }) let main() = func("main", 1, l => { l(0, push("args", [_\<reference\>_])) // int a = 2, b = 3, c = 4; l(1) let a = 2 l(1, push("a", a)) let b = 3 l(1, push("b", b)) let c = 4 l(1, push("c", c)) // int d = sum(a, b, c); let (d, ..steps) = sum(a, b, c) l(2); steps; l(2, push("d", d)) // System.out.println(d); // Here we call a function without return value. We can just write it as-is. // the second `l(3)` shows the stack after returning from `println()` l(3); println(d); l(3) }) // call the main function, which returns all steps for generating the subslides // after the main() call, I also want to show the empty stack, so add a subslide on the final // line of main() main(); l(5) }) // for polylux subslides, we also need to have a "time" to know when to show what information let steps = steps.enumerate(start: 1) // when generating the slide in Polylux, it's crucial to specify the max-repetitions polylux-slide(max-repetitions: steps.len())[ == Program execution and the stack #set text(size: 0.8em) #grid(columns: (50%, 1fr), { for (when, step) in steps { let line = step.step.line // in some subslides, there are no lines to highlight if line == none { continue } // render the highlight only in the specific subslide: // place an arrow where the code will be rendered only(when, place( dx: -1em, // this is hard-coded for the specific font - could be more flexible dy: -0.0em + (line - 1) * 1.12em, sym.arrow )) } code }, { [Stack:] for (when, step) in steps { let stack = step.state.stack // make a list of all stack frames of the current state only(when, list( ..stack.map(frame => { frame.name if frame.vars.len() != 0 { [: ] frame.vars.pairs().map(((name, value)) => [#name~=~#value]).join[, ] } }) )) } }) ] }
https://github.com/FkHiroki/ex-D2
https://raw.githubusercontent.com/FkHiroki/ex-D2/main/sections/section2.typ
typst
MIT No Attribution
= 問2 重力と回転運動 == (1) 海抜$0$ mで体重$m$の人が感じる重力は、地球の質量$M$、地球の半径$R$、万有引力定数$G$を用いると、 $ m g_0 = G M m / R^2 $ で表される。次に、上空$100$ kmで感じる重力は、 $ m g_(100) = G M m / (R + 100)^2 $ で表される。このとき、$g_0$と$g_(100)$の相対誤差は、 $ (g_(100) - g_0) / g_0 &= (1/(R + 100)^2 - 1/R^2) / (1/R^2) \ &= (R^2 - (R + 100)^2) / (R + 100)^2 \ &= (6400^2 - 6500^2) / 6500^2 \ &= -0.03053 $ よって、$g_0$に対して$g_(100)$は$3.05$ %だけ小さい。 == (2) 問題で与えられた式(4)を用いると、 $ T_c ~ m / k_b (G M)/R &= (0.8 times 10^(-27))/ (1.38 times 10^(-23)) times (6.67 times 10^(-11) times 2 times 10^(30)) / (7.0 times 10^5 times 10^3) \ &= 1.104 times 10^7 = 1.10 times 10^7 "K " $ == (3) 太陽系の回転の半径$r$は、 $ r = 8.28 "kpc" = 8.28 times 10^3 "pc" &= 8.28 times 10^3 times 3.09 times 10^13 \ &= 2.559 times 10^17 "km" $ である。また、回転速度が$v = 240$ $"km s"^(-1)$であることから、太陽系の回転周期$T$は、 $ T = 2 pi r / v = (2 pi times 2.559 times 10^17)/ 240 = 6.70 times 10^15 "s" \ = 2.12 times 10^8 " 年" $
https://github.com/ay-learn/typst-plan
https://raw.githubusercontent.com/ay-learn/typst-plan/master/README.md
markdown
MIT License
# Typst Plan Suggestions A simple Plan (list) for [typst.app](https://typst.app). ## Showcases ### PDF [plan.pdf](plan.pdf) ### Plan ![Preview](plan.jpg)
https://github.com/cadojo/vita
https://raw.githubusercontent.com/cadojo/vita/main/README.md
markdown
MIT License
# 📝 `vita` _Professional résumé templates with Typst!_ ## Usage <details> <summary>Template</summary> ```typst #import "@preview/vita:0.1.0": * // // Assuming an icons directory exists, filled with SVG files, // you can use the `decorated` function like so! // // email: decorated("icons/mail.svg", link("mailto:<EMAIL>", `<EMAIL>`)), // // // Style // #show: modern.with( name: "<NAME>", title: "Technical Résumé", email: decorated("icons/mail.svg", link("mailto:<EMAIL>", `<EMAIL>`)), phone: decorated("icons/phone.svg", link("tel:+1234567898", `+1 (123) 456-7898`)), theme: rgb(200, 150, 180), body: stack(spacing: 3em, experiences(), degrees(), skills()), side: stack(spacing: 3em, projects(header: "Court Cases"), socials(header: "Personal Media"), ), ) // // Content // #experience( "Supreme Court", role: ("Associate Justice"), start: "October 2023", stop: "Present" )[ - Wrote $3$ opinions, co-signed 7 other opinions without ethics violations or appearances of impropriety - First to expand court wardrobe to pink & lavender robes ] #experience( "Federal Court", role: ("Federal Judge"), start: "September 2022", stop: "October 2023" )[ - Ruled on $159$ cases; was objectivelly just and fair every time - Wrote $98273$ pages of opinions; no spelling mistakes ] #experience( "Woods Legal", role: ("Partner & Founder"), start: "August 2020", stop: "September 2022" )[ - Undefeated court record with cases spanning real estate law, common law, criminal law, and more - Founded firm; $5$ stars on Yelp, no poor reviews ] #experience( "<NAME>", role: "Intern", start: "May 2019", stop: "May 2020", )[ - Successfully defended Sister wrongfully acused of murder; did so prior to earning degree - Exposed boss for the creep he was; ruined future chance at political office ] #degree( "J.D.", "Law", school: "Harvard", stop: "May 2020", )[ - Valedictorian of spring class of 2020 ] #degree( "B.S.", "Fashion Merchandising", school: "UCLA", stop: "May 2017", )[ - Funneled beer; earned 4.0 GPA - Sorority President ] #skill("Writing")[ - Can write briefs with eyes closed ] #skill("Fashion")[ - Good at fashion idk ] #project( `Case 1`, description: "Solved this case." ) #social( link("https://github.com/fake/ellewoods", `@elle`), icon: "icons/github.svg", ) #social( link("https://www.linkedin.com/in/fake/ellewoods/", `in/ellewoods`), icon: "icons/linkedin.svg", ) #social( link("https://elle.woods.fashionlaw", `elle.woods.fashionlaw`), icon: "icons/home.svg", ) ``` </details> ## Licenses All content in this repository is covered by the top-level [MIT License](/LICENSE), except for icons, which are not original content and are licensed by [ICONAIR](/icons/ICONOIR).
https://github.com/lucafluri/typst-templates
https://raw.githubusercontent.com/lucafluri/typst-templates/master/Project_Report_FHNW_MSE/main.typ
typst
#import "template.typ": * #import "soa.typ" // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( title: "Title", authors: ( (name: "XXX", email: "<EMAIL>", affiliation: "MSE Student, FHNW", role: "Author"), (name: "YYY", email: "<EMAIL>", affiliation: "Advisor, FHNW", role: "Advisor"), ), abstract: "", // date: "August 2023", date: datetime.today().display("[month repr:long] [day], [year]"), ) //Footnotes #let footnote(n) = { let s = state("footnotes", ()) s.update(arr => arr + (n,)) locate(loc => super(str(s.at(loc).len()))) } #let has_notes(loc) = { state("footnotes", ()).at(loc).len() > 0 } #let print_footnotes(loc) = { let s = state("footnotes", ()) enum(tight: true, ..s.at(loc).map(x => [#x])) s.update(()) } #let getPageNumber() = { } #set page(footer: locate(loc => { if has_notes(loc) { let notes = stack(dir: ttb, line(length: 100%), v(0.5em), print_footnotes(loc), ) set text(size: 0.8em) style(s => { v(-measure(notes, s).height) notes }) } // Show page number set align(center) set text(12pt) counter(page).display( "1", both: false, ) })) // Enumerations #set enum(indent: 1em) // References #set ref(supplement: none) //Highlighted Text #let highlight(text, color) = { box(rect(fill: color, radius: 0%, stroke: none, inset: 3pt, )[ // #set align(center+horizon) #text ]) // linebreak() } #let hl(text) = { highlight(text, rgb(255, 255, 0)) linebreak() } #let todo(t) = { highlight(text(t, fill: white, weight: "bold"), rgb(255, 0, 0)) linebreak() } #let textcolor(str, color) = { text(fill: color)[ #str ] } // #let urlfootnote(url) = { // footnote[#link(url, url)] // } // We generated the example code below so you can see how // your document will look. Go ahead and replace it with // your own content! // = Tests // #footnote[#link("https://www.google.com", "Google")] // #urlfootnote("https://www.google.com") // #hl[gugus] #counter(page).update(1) = Introduction <chapter_introduction> = Related Work <chapter_related_work> = Prototype <chapter_prototype> = User Experiment <chapter_user_experiment> == Experiment Design <section_user_experiment_design> == Participants <chapter_user_experiment_participants> = Results <chapter_results> = Discussion <chapter_discussion> = Conclusion <chapter_conclusion> == Outlook and Future Work <chapter_conclusion_outlook> #pagebreak() #soa // #pagebreak() // #appendix
https://github.com/fenjalien/metro
https://raw.githubusercontent.com/fenjalien/metro/main/tests/num/print-zero-integer/test.typ
typst
Apache License 2.0
#import "/src/lib.typ": num, metro-setup #set page(width: auto, height: auto) #num(0.123) #num(0.123, print-zero-integer: false)
https://github.com/jcbhmr/typst-docs
https://raw.githubusercontent.com/jcbhmr/typst-docs/main/index.md
markdown
MIT License
--- # https://vitepress.dev/reference/default-theme-home-page layout: home pageClass: my-index-page features: - title: English link: https://typst.app/docs target: _self - title: español link: /es/ - title: 简体中文 link: /zh/ --- <style> .my-index-page .VPContent { display: flex; align-items: center; justify-content: center; } .my-index-page .VPContent .VPLink .title { font-size: 1.5em; line-height: 1.46; min-width: fit-content; } .my-index-page .VPContent .VPLink .details { font-size: 1em; line-height: 1.46; color: inherit; } </style>
https://github.com/figarofuga/Typst-template
https://raw.githubusercontent.com/figarofuga/Typst-template/main/amyloidosis/amyloidosis.typ
typst
// Get Polylux from the official package repository #import "@preview/polylux:0.3.1": * #import "@preview/fletcher:0.5.1" as fletcher: diagram, node, edge #import fletcher.shapes: diamond // Make the paper dimensions fit for a presentation and the text larger #set page(paper: "presentation-16-9") #set text(font: "Noto Serif CJK JP", size: 20pt) #set footnote.entry(clearance: 0.1em, gap: 0.2em) #show heading:set align(start + top) #set align(horizon) // Use #polylux-slide to create a slide and style it using your favourite Typst functions #polylux-slide[ = Systemic amyloidosis? #align(horizon + center)[ 新美 望 2024/9/15 ] ] #polylux-slide[ == Amyloidとは? - 1854年にVirchowが発見したミスフォールド前駆体タンパク質に由来する 線維状物質 #align(right)[ #text(size: 12pt)[ Amyloid. 2020;27(4):217-222. DynaMed. Amyloidosis. EBSCO Information Services. Accessed September 16th, 2024] ] - 全身の臓器に沈着し、多くの臓器障害を起こす - 有病率はだいたい100万人あたり14人と推定されている - CMLとかと同じくらいの頻度 ] #polylux-slide[ == Amyloidosisの分類 - 遺伝性 vs. 後天性 / 全身性 vs. 局所 - 局所の代表例はCAAとか、Alzheimer型 → 今回は*全身性のアミロイドーシス*に焦点を当てる - Amyloidの種類によっても分類可能 - AA, AL, ATTR etcetc - Amyloidの種類での分類が最もわかりやすい ] #polylux-slide[ == どうして? - 全身性/局所性も遺伝性/後天性もAmyloidの種類である程度わかる - 障害される臓器PatternもAmyloidの種類でわかる事が多い - 何よりも、*治療法の有無*が決定される(後述) ] #polylux-slide[ == Amyloidの種類と特徴 #align(center)[ #text(size: 24pt, fill: red)[*最重要スライド!!*] ] #set text(size: 16pt) #table( columns: 5, [*種類*], [*前駆物質*], [*遺伝性/後天性*], [*障害臓器*], [*全身性/局所性*], [AL], [免疫グロブリン軽鎖],[両方], [全臓器、中枢神経は稀], [両方], [AA], [血清アミロイドA],[後天性], [中枢神経以外全て、通常腎臓], [全身性], [ATTR-wt], [トランスサイレチン],[後天性], [心臓、肺、腱], [全身性], [ATTR-v], [トランスサイレチン], [遺伝性], [末梢/自律神経、心臓、目、髄膜], [全身性] ) #align(right)[ #text(size: 12pt)[DynaMed. Amyloidosis. EBSCO Information Services. Accessed September 16th, 2024] ] #set text(size: 20pt) - 全部で30種類以上の前駆物質が判明している - 上記の4種類でだいたい全部のうち80%くらいは占めている ] #polylux-slide[ == Amyloidosisの疫学 - イギリスの国立センターの1990-2014年までの疫学研究 - AL: 60%, AA: 10.5%, ATTR-wt: 8%, ATTR-v: 10% #align(right)[ #text(size: 12pt)[Amyloid. 2017 Sep;24(3):162-166.] ] ] #polylux-slide[ == Amyloidosisの診断の難しさ - 症状は非特異的な事が多い - そのため、発症から診断までに時間がかかることが知られている - 診断までの中央値は7ヶ月 - 4割の患者が1年以上、10%以上の患者が3年以上経過して初めて診断される #align(right)[ #text(size: 12pt)[ Acta Haematol. 2020;143(4):304-311. ] ] ] #polylux-slide[ == どうやって診断する? - 代表的な症状は倦怠感、低栄養であり、そこから攻めるのは辛い - どちらかというと、#text(size: 24pt, fill: red)[*特定の臓器障害*]を見て疑った後にRed flagを探すのが現実的 ] #polylux-slide[ == Amyloidosisの診断 #diagram( node-stroke: 1pt, edge-stroke: 1pt, node((0, 0), [#text(size: 16pt)[Amyloidosisを疑う]], corner-radius: 2pt), edge("-|>"), node((1.0, 0), [#text(size: 16pt)[Clueとなる追加情報を集める]], corner-radius: 2pt), edge("-|>"), node((2.0, 0), [#text(size: 16pt)[AmyloidosisのTyping:\ 侵襲的検査]], corner-radius: 2pt) ) - Step by stepで考える - 特徴的な臓器障害と違和感を見逃さない ] #polylux-slide[ == 特徴的な臓器障害 - Amyloidが沈着しやすい臓器が決まっており、以下の時にSystemic amyloidosisを疑う + 非糖尿病患者のネフローゼ症候群 + HFpEF(特に、LVH) + 肝脾腫 + Gloves and stockings patternのPolyneuropathy + MGUS患者の妙な症状 #align(right)[ #text(size: 12pt)[ JAMA. 2020;324(1):79-89. ] ] ] #polylux-slide[ == 多すぎてようわからん! - 出来れば、AA, AL, ATTR-wtの3つはゲシュタルトを覚えておくと良い - 疑った時に問診・身体所見を追加 ] #polylux-slide[ == AA amyloidosisの特徴 - AA amyloidosis: 年齢の中央値は50-60歳 + 腎臓: 蛋白尿陽性 + 肝腫大: 10%程度 + その他: 倦怠感、体重減少、脾腫、下痢、甲状腺腫など + 心疾患は稀 ] #polylux-slide[ == AA amyloidosisの疾患シナリオ - 慢性炎症性疾患の背景がある患者の高度蛋白尿、全身浮腫 - TB, RA, IBD, SLE, FMF, Sarcoidosis, HIVなど - 蛋白尿が95%でNephrosis rangeは50%にもなる - 心不全や神経障害は非典型的 #align(right)[ #text(size: 12pt)[Rheum Dis Clin North Am. 2018;44(4):585-603.] ] ] #polylux-slide[ == AL amyloidosisの特徴 - AL amyloidosis: 診断時の年齢は50-70歳が殆ど + 巨舌: 10-17% + 眼窩周囲の紫斑: 15% + 心疾患: 60-75% + 腎疾患: 50-70% + 神経: 22% + 肝臓: 20% + 腸管: 10-17% #align(right)[ #text(size: 12pt)[DynaMed. Amyloidosis. EBSCO Information Services. Accessed September 16th, 2024] ] ] #polylux-slide[ == AL amyloidosisの疾患シナリオ① #side-by-side[ - 原因不明の心不全入院: HFpEFでTTEをした時の著名な心室壁肥厚 - 腎機能低下: 著名な蛋白尿 - 神経障害: 両手足のしびれ、両手の手根管症候群、起立性低血圧による失神・めまい - これらをみた時に患者を診察して、巨舌や眼窩周囲の紫斑を 見逃さないようにする ][ #figure(image("figures/al_amyloidosis_gestalt.png", height: 80%)) #align(right)[ #text(size: 12pt)[ N Engl J Med. 2024;390(24):2295-2307.] ] ] ] #polylux-slide[ == AL amyloidosisの疾患シナリオ② - 元々MGUSなどの基礎疾患がわかっている患者が、倦怠感や浮腫、体重減少などの非特異的な症状で来院 - 検査で心不全や腎機能低下、臓器腫大が判明 #align(right)[ #text(size: 12pt)[JAMA. 2020;324(1):79-89.] ] ] #polylux-slide[ == ATTR amyloidosisの特徴 - ATTR amyloidosis: 年齢の中央値は75歳, 90%は男性 + 心臓: 最も多い、進行性のHFpEFが多い + 神経: 手根管症候群が30-50%、脊柱管狭窄症、DSP + その他: 上腕二頭筋腱断裂やばね指, 末梢神経、肺、消化管、膀胱、前立腺など + 腎疾患は稀 ] #polylux-slide[ == ATTR amyloidosisの疾患シナリオ - 高齢者のHFpEFでエコーをしたら特徴的な所見 - 後壁の心室壁厚 > 15mm, Granular sparkiling pattern、ECGで低電位など - 高齢者の上腕二頭筋腱断裂, 両側手根管症候群のようなやや違和感があるStory #align(right)[ #text(size: 12pt)[Rheum Dis Clin North Am. 2018;44(4):585-603.] ] ] #polylux-slide[ == Amyloidosisの疾患シナリオ - 腎臓のNephrosis → AA, AL amyloidosis - 心Amyloidosis → AL, ATTR amyloidosis - Polyneuropathy → AL, ATTR amyloidosis - #text(size: 24pt, fill: red)[*最も重要なのは心Amyloidosis*] ] #polylux-slide[ == 心Amyloidosisの重要性 - 心不全は#text(size: 24pt, fill: red)[*最も重要な合併症かつ、予後規定因子*] - ある研究だと、日本人のHFpEF患者のうち14%がATTR-wのCardiac amyloidosisというのもある #align(right)[ #text(size: 12pt)[ESC Heart Fail. 2023;10(3):1896-1906.] ] - とはいえ、HFpEF全例で疑うのはやはり現実的ではない - 以下の特徴があったら疑うくらいでよいか + 強い心室の壁肥厚、特に後壁 > 15mm + 壁肥厚があるにもかかわらず、心電図が低電位 or QS pattern(偽梗塞) + 病歴で、Polyneuropathy、手根管症候群、Nephrosisの合併 - 個人的には、CMRとTTEが良い - CMRは基本は造影だが、Native T1 mappingという手法で単純MRIでも可能(当院はできないらしい...) ] #polylux-slide[ == 心Amyloidosisの診断 - AL, ATTR-wt amyloidosisの診断はかなり洗練されてきている - 基本的にはAL amyloidosisを否定してからATTR-wt amyloidosisを画像で検査 - Monoclonal蛋白検出: 血液・尿中免疫電気泳動/固定法、Free Light Chain これらが全て陰性の時の感度は約99% #align(right)[ #text(size: 12pt)[JAMA. 2024;331(9):778-791.] ] - ATTR: ピロリン酸骨(Tc99m)シンチを使う事で、非侵襲的に診断可能 - Monoclonal蛋白検出→PyPシンチ陽性 = ATTR-wt amyloidosis確定診断 - ATTRがwtかv(遺伝性か孤発性か)は家族歴を確認するが結局は遺伝子検査が必須 - 熊本と長野に集積あり - 浸透率の問題があるため ] #polylux-slide[ == Monoclonal蛋白が検出されたら? - この場合は、Amyloidの組織生検は必須 - MGUSは70歳以上で5%、ATTR-wtのCAのうち10-40%はAL amyloidosisの検査で異常が出る為 - 局所麻酔下での脂肪織の生検が非侵襲的でよい #align(right)[ #text(size: 12pt)[JAMA. 2024;331(9):778-791.] ] ] #polylux-slide[ == Cardiac amyloidosis(CA)診断のまとめ #figure(image("figures/ca_pathway.png", height: 80%)) #align(right)[ #text(size: 12pt)[Ann Intern Med. 2023;176(3):ITC33-ITC48. ] ] ] #polylux-slide[ == Amyloidosisの診断後 - 治療は専門科に任せる - AL amyloidosisは血液内科 - 慶應の循環器内科に紹介 - Tafosmideは慶應でやっている ] #polylux-slide[ == Take home message - 特徴的な臓器障害パターンからAmyloidosisを引っ掛けよう - 心アミロイドーシスが最も重要!探しに行く! - ALは採血・検尿、ATTR-wtはPypシンチで非侵襲的に診断を! - 最終的にはTissue is issue!ATTR-wtアミロイドーシス疑いの時は腹壁脂肪を生検する! ]
https://github.com/TJ-CSCCG/tongji-undergrad-thesis-typst
https://raw.githubusercontent.com/TJ-CSCCG/tongji-undergrad-thesis-typst/main/init-files/sections/03_reference.typ
typst
MIT License
#import "../../paddling-tongji-thesis/tongjithesis.typ": * = 引用 <reference> 在本节(@reference)中,我们将探讨如何在 Typst 中进行参考文献引用和交叉引用,以便于读者查阅文献和方便地引用文档中的其他部分。 == 参考文献的引用 在学术论文或科技报告中,通常需要引用相关文献以支持观点或论证。为了方便读者查阅,我们需要在论文中标注参考文献。在 Typst 中,可使用 ```typ @``` 命令引用参考文献。参考文献的外观应符合国标 GB/T 7714-2015 的要求。请注意,Typst对国标的支持仍处于实验阶段,存在不兼容的情况(如专利引用格式),请谨慎使用。 在正文中,可使用 ```typ @``` 命令引用参考文献。例如: #table(columns: (1fr, 1fr), [ #set align(center) #strong[代码] ], [ #set align(center) #strong[渲染结果] ], ```typ 这是一个引用示例 @book1。 ```, [ #h(2em)这是一个引用示例 @book1。 ]) 其中,`book1` 是参考文献的键值,即参考文献文件中每个条目的唯一标识符。引用命令会自动在文中插入相应文献序号,并在文末的参考文献列表中显示相应文献条目。 如果需要同时标注多个参考文献,可使用逗号分隔键值。例如: #table(columns: (1fr, 1fr), [ #set align(center) #strong[代码] ], [ #set align(center) #strong[渲染结果] ], ```typ 这是一个引用示例 @book1 @online1。 ```, [ #h(2em)这是一个引用示例 @book1 @online1。 ]) 请注意,本模板所用的所有文献均为ChatGPT生成的。我们不保证这些文献的真实性。 以下是使用 `@` 命令的引用示例: - 普通图书@book1 @book2 - 论文集、会议录@conf1 @conf2 - 科技报告@techreport1 @techreport2 - 学位论文@thesis1 @thesis2 @thesis3 - 专利文献@patent1 @patent2 - 专著中析出的文献@inbook1 @inbook2 - 期刊中析出的文献@qin2021 @article1 @article2 - 报纸中析出的文献@newspaper1 @newspaper2 - 电子文献@online1 @online2 @online3 另外,为了避免遗漏引用,有时候需要使用文献管理工具来管理参考文献,例如 Zotero 或 EndNote 等。这些工具可以帮助你轻松管理文献数据库,生成参考文献列表,甚至将参考文献直接插入到文档中。 无论使用何种方法,都应该注意文献的准确性和完整性。在引用文献时,应尽可能使用最新的版本,并注意对文献信息的正确引用和格式化。这样可以提高文献的可信度,也能为读者提供更多参考信息。 == 脚注 脚注是一种在文本底部添加注释或补充说明的方式。我们可以使用 `footnote` 命令添加脚注。 #table( columns: (1fr, 1fr), [ #set align(center) #strong[代码] ], [ #set align(center) #strong[渲染结果] ], ```typ 脚注是一种在文本底部添加注释或补充说明的方式#footnote[通常,我们在脚注里也写完整的句子。在文本中使用脚注时,应该遵循学术规范,尽可能引用可信的来源。]。 ```, [ #h(2em)脚注是一种在文本底部添加注释或补充说明的方式#footnote[通常,我们在脚注里也写完整的句子。在文本中使用脚注时,应该遵循学术规范,尽可能引用可信的来源。]。 ], ) 其中,中括号中的文本就是脚注的内容。编译文档后,脚注会出现在页面底部,并自动标上数字。 需要注意的是,在使用脚注时,应该尽量避免使用过多的脚注,以免影响文本的阅读体验。同时,脚注的内容应该尽可能简洁明了,突出重点,有助于读者理解和记忆文本内容。对于自己的观点和推断,应该明确标注为个人观点,以免误导读者。 == 交叉引用 在文档中,交叉引用是指引用文档中的某个标签或标记,例如章节、图表、公式或页码等。在 Typst 中,可以使用 ```typ <label>``` 命令为文档中的对象添加标签,使用 ```typ @``` 命令进行引用。 例如,我们可以在文档的其他位置使用 ```typ @``` 命令来引用@introduction: #table(columns: (1fr, 1fr), [ #set align(center) #strong[代码] ], [ #set align(center) #strong[渲染结果] ], ```typ 请参见@introduction。 ```, [ #h(2em)请参见@introduction。 ]) 交叉引用在文档中很常用,可以帮助读者快速定位到相关内容,提高文档的可读性。但是,需要注意标签的唯一性和正确性,以及引用命令的正确使用方式。 由于我们对 Typst 中的浮动体(图表等)和公式的计数器进行了特殊处理,因此在引用浮动体和公式时,需要一些额外的操作。请参见@floats。
https://github.com/piepert/logik-tutorium-wise2024-2025
https://raw.githubusercontent.com/piepert/logik-tutorium-wise2024-2025/main/src/pool/prädikatenlogik/s-problem-quantorenformalisierung.typ
typst
Creative Commons Zero v1.0 Universal
#import "@preview/grape-suite:1.0.0": slides, seminar-paper #import seminar-paper: blockquote #import slides: slide #show: slides.slides.with() #slide[ = Sokrates wird angeklagt #set text(size: 0.9em) #blockquote[ #set par(hanging-indent: 1.5em) S: [S]age uns doch, Meletos, auf welche Weise ich deiner Meinung nach die Jugend verderbe. [...] [Die Klageschrift] sagt, ich verderbe sie dadurch, daß ich sie lehre, nicht an die staatlich anerkannten Götter zu glauben sondern an ein neues Dämonentum anderer Art. [...] Meletos, [...] erkläre dich [...], denn ich vermag nicht klar zu sagen, was für eine Lehre du mir zuschreibst: lehre ich den Glauben an das Dasein von doch irgendwelchen Göttern [...] [so wäre ich] also kein völliger Atheist [...] oder erklärst du mich für völlig ungläubig [...]? M: Das letztere behaupte ich: du glaubst überhaupt an keine Götter. [...] ][Platon: Apologie, 26b -- 26d, übers. v. Otto Apelt] ] #slide[ #heading(outlined: false)[Sokrates wird angeklagt] #set text(size: 0.915em) #blockquote[ #set par(hanging-indent: 1.5em) S: Glaube ich aber an Dämonentum, dann muß ich unbedingt auch an Dämonen glauben. [...] Die Dämonen aber — halten wir sie nicht entweder für Götter oder für Sprößlinge der Götter? Gibst du es zu oder nicht? M: Gewiß. S: Wenn ich also, wie du zugibst, an Dämonen glaube, und die Dämonen eine Art Götter sind, so [sollte] [...] ich, der ich nach deiner Aussage an keine Götter glaube, soll doch anderseits wieder an Götter glauben. // [...] Das wäre ja doch gerade so ungereimt, als wollte jemand an Sprößlinge von Pferden und Eseln glauben, an Maulesel nämlich, nicht aber an das Dasein von Pferden und Eseln. ][Platon: Apologie, 27c -- 27d, übers. v. Otto Apelt] ] #slide[ = Existenz und Subalternation Daimonen sind Kinder von Göttern. --- Es gibt Daimonen, die Kinder von Göttern sind. $forall x (D x -> K x)$ --- $exists x (D x and K x)$ Ist der Schluss gültig? → Nein. Was müsste man machen, um ihn gültig zu machen? → Prämisse hinzufügen! Daimonen sind Kinder von Göttern. Es gibt Daimonen. --- Es gibt Daimonen, die Kinder von Göttern sind. $forall x (D x -> K x)$ $exists x (D x)$ --- $exists x (D x and K x)$ ]
https://github.com/cetz-package/cetz-venn
https://raw.githubusercontent.com/cetz-package/cetz-venn/master/manual.typ
typst
Apache License 2.0
#import "@preview/tidy:0.2.0" #import "/doc/example.typ": example #import "/doc/style.typ" as doc-style #import "/src/lib.typ" as cetz-venn // Usage: // ```example // /* canvas drawing code */ // ``` #show raw.where(lang: "example"): example #show raw.where(lang: "example-vertical"): example.with(vertical: true) #set terms(indent: 1em) #set par(justify: true) #set heading(numbering: (..num) => if num.pos().len() < 4 { numbering("1.1", ..num) }) #show link: set text(blue) #rect(width: 100%, fill: blue.darken(30%), table(columns: (1fr, 1fr), align: (left, right), stroke: none, text(white)[*CeTZ Venn*], text(white)[#cetz-venn.version])) // Outline #{ show heading: none columns(2, outline(indent: true, depth: 3)) pagebreak(weak: true) } #set page(numbering: "1/1", header: align(right)[CeTZ Venn]) = Introduction CeTZ Venn is a tiny package for drawing two- and three-set Venn diagrams using Typst and CeTZ. *CeTZ version $>=$ 0.2.2 is required!* = Examples A simple two set Venn diagram: ```example cetz.canvas({ cetz-venn.venn2( name: "venn", a-fill: gray, ab-fill: gray, ) import cetz.draw: * content("venn.ab", [AB]) }) ``` A three set diagram with arrows: ```example cetz.canvas({ cetz-venn.venn3( name: "venn", a-fill: gray, b-fill: gray, abc-fill: gray, ) import cetz.draw: * content("venn.c", [C]) line("venn.abc", (rel: (2.2,-2.5)), mark: (start: "o", fill: black), name: "arrow") content("arrow.end", [Here], anchor: "north", padding: .1) }) ``` = Styling All diagrams use the style root `venn` and accept the following style keys: #doc-style.show-parameter-block("fill", "fill", default: "white", [The default fill for all elements]) #doc-style.show-parameter-block("stroke", "stroke", default: auto, [The default stroke for all elements]) #doc-style.show-parameter-block("padding", ("number", "dictionary"), default: 2em, [ Padding of the outer (rect) element. Per side padding can be specified by passing a dicitonary with one or more of the following keys: `top`, `bottom`, `left`, `right` and `rest`, where `rest` acts as a fallback for unset values.]) = Functions #doc-style.parse-show-module("/src/venn.typ")
https://github.com/dhmemi/resume
https://raw.githubusercontent.com/dhmemi/resume/main/resume.typ
typst
MIT License
#import "chicv.typ": * #show: chicv = 邓辉 #fa[#envelope] <EMAIL> | #fa[#phone] \(+86\) 176-1148-0488 | #fa[#github] #link("https://github.com/dhmemi")[github.com/dhmemi] == 教育经历 #cventry( tl: [*西北工业大学*,西安,陕西], tr: "2014/09 - 2018/07", bl: "计算机科学与技术专业,本科", )[] == 工作经历 #cventry( tl: [*北京阿丘机器人科技有限公司*, 北京, 中国], tr: "2018/07 - 现在", bl: [], )[ *(深度学习算法应用系统研发) 系统工程师* - 负责项目系统及产品的需求拆解、功能定义、技术选型、架构设计、模块拆解、开发计划制定; - 负责前后端开发工程师的开发工作计划安排、人力资源调控、关键时间节点把控; - 负责系统核心架构和核心模块、功能的开发实现; - 负责组内人员的工作规划、任务安排、日常技术培训等。 *(图像处理算法研发及优化) 图像算法工程师* - 负责基于深度学习的图像处理算法的调研、实验及实现和持续优化效果; - 负责内部深度学习框架的功能开发、优化及维护; - 负责负责算法应用框架软件的架构设计、开发规划,以及带领团队进行开发和维护。 ] == 项目经历 #cventry( tl: [*算法应用框架软件开发*], tr: "2021/09 - 至今", bl: [系统架构师], )[ *工作内容:* - 通过总结公司检测产品的在各个项目中的具体落地使用场景及使用方法,以及调研竞品软件等方式,总结和梳理算法应用框架软件的核心需求; - 基于对各个场景需求的总结,进行算法应用框架软件的架构设计和模块设计,以及制定算法应用框架软件的开发计划; - 制定框架软件的开发流程、编码规范及相关技术调研和培训; - 复制应用算法框架的核心架构开发; - 组织团队进行开发,负责日常团队日常开发工作,包括需求分析、设计方案评审、Code Review 等; *工作成果:* - 梳理和总结了公司原有产品在各个项目中的落地场景和流程,完成算法应用框架软件的架构设计及各个模块的概要设计; - 完成算法应用框架核心核心功能开发,为公司其他各产品线的开发提供统一的底层算法应用框架,为公司端、边、云产品的协同打下了基础; - 基于公司原有开发流程及编码规范薄弱的问题,在本项目中引入 Bazel 进行 C++ 构建规则管理、引入 Clang-tidy结合 CI 流程进行静态代码检查,制定测试规范,借助一系列工具帮助,简化和规范开发流程,严控代码质量;在开发过程中对组内成员进行培训,提高人员素质,迭代开发流程和开发规范。 - 目前完成了初版算法应用框架的开发,通过提供完整的计算图流程分析、调度、关联数据管理等功能,支撑了公司核心产品的重大功能升级需求; - 通过良好的问题定义和产品抽象,为公司不同产品线之间的写作提供标准的基础平台,大幅简化了公司新产品的研发成本,提高了不同产品线和部门之间的协作效率; - 通过在该框架中规范在算法应用流程的表示,为整体算法流程的优化创造了空间和平台,使之前一些不太好实现的算法优化方法在该框架下能够比较方便的进行优化; - 在项目中通过引入多项新技术,如利用 jinja 和 python 的反射机制自动生成 C++ 代码,以及使用 Clang 分析C++ AST 自动为 C++ 程序生成 C、C\#、Python 等跨语言接口等技术,在研发资源有限的情况下,提高了项目的开发效率并有效保障了项目的质量。 ] #cventry( tl: [*某客户工厂面板生产线自动缺陷检测系统(ADC)*], tr: "2020/12 - 2021/08", bl: "项目研发负责人", )[ *工作内容:* - 参与调研和理解客户需求,负责根据客户需求设计检测系统整体系统架构,进行技术调研和选型,以及制定研发计划; - 负责与客户项目负责人及技术组接洽,对接系统各种接口协议,研发进度等事项; - 负责设计 ADC 系统整体系统架构及算法方案制定,根据项目特点及资源情况,系统方面采用 Django、MySQL及 TibcoRV 等工具开发后台系统用于管理客户的工程数据以及进行训练、推理任务的调度和管;算法方面采用Faster-RCNN 作为基础检测算法,实现客户对面板缺陷进行检测并分类的需求; - 带领团队进行系统开发,管控系统部分研发进度,参与算法方案修改、算法迭代及优化; - 调研、改进算法方案及参与部分实验,解决客户关注的异常类(Out of Distribution)缺陷检出的问题; *工作成果:* - 先后与团队一起完成 ADC 系统两个阶段的开发和上线;满足客户的功能需求和检测指标要求; - 系统已在客户工厂上线运行,支撑客户工厂 30 多个生产环节每日超过 200 万高清图像的缺陷识别需求。 ] #cventry( tl: [*深度学习框架支持 TensorRT 推理*], tr: "2020/08 - 2020/09", bl: "算法工程师", )[ *工作内容:* - 在深度学习框架中添加深度 TensorRT 库支持,允许推理时根据用户参数设置选择使用 TensorRT 进行推理 - 为 TensorRT 不支持的层实现自动插件派发机制,对于 TensorRT 不支持的层,自动通过插件适配器调用 Caffe 中 的层实现进行推理。 *工作成果:* - 算法框架支持所有模型自动转换到 TensorRT 模型并使用 TensorRT 进行推理;提高所有模型推理速度 20% 30%; ] #cventry( tl: [*深度学习框架添加图编译功能支持*], tr: "2020/03 - 2020/06", bl: "算法工程师", )[ *工作内容:* - 调研和学习其他深度学习框架的静态图编译机制及实现方法,基于原 Caffe 的框架接口,设计图编译的实现机制; - 在 Caffe 框架中引入图编译机制,通过在执行训练和推理前静态分析模型结构、模型中的参数、梯度和及激活值之间的依赖关系,实现智能分配显存和内存空间,通过合理合理复用不同 Tensor 的存储空间; - 在图编译阶段引入自动评估算子性能,根据不同算子实现在不同参数上的实际性能表现智能选择合适的算子实现,以提高训练效率; - 在 Caffe 中基于 NCCL 及 MPI 实现多卡和多机并行训练功能支持; - 在推理阶段添加算子融合的编译过程,自动合并如 Convolution、BatchNorm、Scale、Eltwise、ReLU 等算子,以提高推理效率。 *工作成果:* - 通过引入静态编译机制,使内部所有网络模型训练和推理占用显存均降低 30% 左右; - 通过引入算子选择功能,优化部分模型训练速度 20% 以上; - 推理阶段通过自动融合算子,提高各个模块推理速度 10% 左右; ] #cventry( tl: [*重构算法模块实现流程及应用接口*], tr: "2019/07 - 2019/11", bl: "算法工程师", )[ *工作内容:* - 梳理原产品中各个模块的实现方式,总结统一的数据集读取、数据集预处理、模型参数设置、加载网络模型、创建和设置 DataLoader、启动训练、保存模型等算法实现的整体流程;总结和归纳统一的算法实现流程; - 合理拆解和组合数据集管理、数据集预处理、网络模型参数设置、网络初始化及训练、模型保存等各个流程和模块的关系,设计统一的算法实现框架; - 按照新的算法实现框架、重构原来的各个算法模块,规范各个算法模块的实现结构,同时优化各个模块的实现细节; - 开发算法模块串联执行框架,使得无需对各个算法模块的逻辑做任何改造的情况下,即可将前一模块的检测结果区域输入到后一算法模块的做进一步的检测、并自动将检测结果映射回原图坐标系。 - 整理和规范该算法各个算法模块的对外接口,制定和实现统一的标注格式协议、参数接口协议,统一不同算法模块的调用逻辑,提高接口的易用性。 *工作成果:* - 优化和统一了原有的各个算法模块的实现逻辑,减少了后续修改和维护的成本; - 通过提供合理的框架支持,使得在该框架下实现新算法模块的时间由一个月减少到一周; - 通过规范各个模块的算法实现以及提供自动将不同算法模块串联执行的机制,简化我们的 SDK 接口,降低了用户基于我们的 SDK 进行开发的使用成本,提高了 SDK 的易用性; - 由于此项工作以及其他贡献,荣获公司年度优秀员工奖。 ] #cventry( tl: [*模型训练及推理速度优化*], tr: "2019/01 - 2019/04", bl: "算法工程师", )[ *工作内容:* - 梳理公司原来的各个深度学习算法模块的整体处理流程,分析训练和推理执行的性能瓶颈及原因; - 综合运用调整算法网络结构、对比 cuDNN 算子实现和自行开发的 CUDA 算子的自行速度并选择合适的执行策略、优化部分网络层的 CUDA 算子实现等方式,在保持原有算法模块指标的前提下提高模型训练及推理速度; - 针对原来的工程数据前处理、后处理流程复杂、计算量大的问题,从新设计数据集存储格式及标注格式、推动产品端修改产品实现,支持更易于处理、计算量更小的标注格式;并在算法框架中添加统一、规范的处理流程,减少计算量,以及修改 DataLoader 的数据加载机制,提高模型训练及推理速度。 - 在后续的工作中持续对各个算法模型的执行速度进行不断优化。 *工作成果:* - 不同网络模型训练时间分别优化 15% 50%,推理时间优化 10% 30%,极大提高公司相关产品算法的训练和推理速度。 ] == 其他工作 #cventry( tl: [*嵌入式产品算法支持及效率优化*], tr: "2020/04 - 2020/07", bl: "小组负责人", )[ *工作内容:* - 指导组员在嵌入式产品中完成深度学习算法移植; - 帮助组员分析嵌入式产品的算法瓶颈,梳理优化方向; ] #cventry( tl: [*深度学习云产品(AIDI-Cloud)的产品完善及部署落地*], tr: "2019/04 - 2020/06", bl: "系统架构师,小组负责人", )[ *工作内容:* - 完善分布式深度学习云训练产品的功能并部署落地到客户现场; - 根据在部署实施过程中遇到的实际问题及客户提出的需求,重新设计和重构云训练平台产品后端架构,并进行进行技术调研和方案设计; - 指导后台工程师完成重构功能开发,支持易扩展的分布式训练任务调度等功能,增强和完善用户管理、任务管理、数据标注等功能。 *工作成果:* - 完成公司深度学习云训练产品的分布式训练、任务管理等功能的开发,并配合前端工程师一起完善 Web 端标注功能,优化标注体验; - 完成云训练产品在客户现场的落地部署,完成产品逻辑验证; ] == 个人项目 #cventry( tl: [*conf-gen*], tr: "https://github.com/dhmemi/conf-gen", bl: "专为 C++ 开发打造的配置文件读写校验及参数调用接口生成器", )[ - 利用模板和宏开发了一套 C++ 参数结构生成器,只需简单的申明语句即可自动生成参数文件模板、参数文件读写和校验及参数存取接口代码,免却在开发中反复编写无聊的参数配置文件读写及校验之苦; - 提供统一、简洁的参数项协议(仅 8 项原始参数类型),并且用户可以在声明参数的同时非常方便的声明参数的名称及说明信息,可以基于此非常方便的开发与具体参数内容无关的参数显示编辑 UI 界面,将实际的参数内容与参数的界面开发工作解耦; - 在 8 项高度归纳的常用原始参数类型的基础上,支持组合、嵌套和引用等特性,支持用户根据实际需求声明高复杂度的参数; - 参数自动全局同步,避免在实际开发中在不同模块间来回传递和同步参数,同时,也能够通过复制参数方便的全局同步,提供灵活的使用方法。 ] == 技能 #cventry( tl: [], tr: "" )[ - *编程语言: 熟练使用 C/C++,Python, CUDA*,6 年 C++ 和 Python 开发经验,3 年 CUDA 开发经验,使用 C++ 和 Python 均独立开发/合作开发过大中型项目,对其语言特性、开发生态等较为了解;对 Java,C\#,JavaScript 等语言有一定了解。 - *算法框架: Caffe, Pytorch, TensorRT*, 熟悉 Pytorch 及 TensorRT 的使用,对包括 Pytorch, OneFlow, Megenine等多种深度学习框架的底层实现均有所了解和分析,熟悉 Caffe 的底层实现。 - *算法: 图像处理, 深度学习*,拥有较为丰富的图像相关算法经验,了解经典的深度学习算法,并有复现和改进优化经验,持续关注相关领域的研究进展。此外,也了解部分传统图像算法原理,能熟练使用 OpenCV 等工具。 - *软件架构设计: 3 年经验*,负责设计了公司内部算法应用框架,负责带领设计和开发了两套分布式深度学习训练和推理系统,并均完成了落地。 - *其他技能*: 熟悉 Django, MySQL, Docker, Redis 等后台开发技术栈相关工具和技术;熟悉 Qt 框架。 ] #align(right, text(fill: gray)[Last Updated on #today()])
https://github.com/barddust/Kuafu
https://raw.githubusercontent.com/barddust/Kuafu/main/src/Set-0/build.typ
typst
#{ import "/config.typ": * import "/mathenv.typ": * show: mathenv-init project( "夸父:集合论基础", "0.1", "Set-0", ( "intro.typ", "set.typ", ) ) }
https://github.com/lucannez64/Notes
https://raw.githubusercontent.com/lucannez64/Notes/master/Analyse_1_1.typ
typst
#import "@preview/bubble:0.1.0": * #import "@preview/fletcher:0.4.3" as fletcher: diagram, node, edge #import "@preview/cetz:0.2.2": canvas, draw, tree #import "@preview/cheq:0.1.0": checklist #import "@preview/typpuccino:0.1.0": macchiato #import "@preview/wordometer:0.1.1": * #import "@preview/tablem:0.1.0": tablem #show: bubble.with( title: "Analyse 1 Cours 1", subtitle: "11/10/2024", author: "<NAME>", affiliation: "EPFL", year: "2024/2025", class: "Génie Mécanique", logo: image("JOJO_magazine_Spring_2022_cover-min-modified.png"), ) #set page(footer: context [ #set text(8pt) #set align(center) #text("page "+ counter(page).display()) ] ) #set heading(numbering: "1.1") #show: checklist.with(fill: luma(95%), stroke: blue, radius: .2em) = Fonctions $f : A arrow B$#linebreak() $x arrow y = f(x) $ $y$ est l'image de $x$ et $x$ est une préimage de $y$ == Ensemble image === Définition $ I m(f) = {y in B | exists x in A |f(x) = y } $ === Surjection $f: A arrow B$ est surjective $arrow.l.r.double I m(f) = B arrow.l.r forall y in B space exists x in A | f(x) = y$ ==== Example - $ f : ZZ arrow ZZ $ $ x arrow y = f(x) = x+1 $ est surjective. Soit $y in ZZ$ et $x = y - 1 in ZZ$ car $ZZ$ est stable par addition. On a $f(x) = x+1 = y$. Ainsi $I m(f) = ZZ$. - Soit $A = "ensemble des élèves"$ , B = $NN$ $ f: A arrow B $ $ x arrow f(x) = "nombre de frères de soeurs de x" $ n'est pas surjective car $y = 676$ n'a pas de préimage. $ I m(f) = {0, 1 , 2, 3, 4, 5, 10} $ ==== Remarque Si $tilde(B) = I m(f)$, $ tilde(f): A arrow tilde(B) $ $ x arrow tilde(f)(x) = f(x) $ === Injection $f: A arrow B$ est injective $arrow.l.r.double.long forall (x,x') | x != x' arrow.long.double f(x) != f(x') arrow.l.r.double.long forall (x, x') in A^2 | f(x) = f(x') arrow.l.r.double x = x'$ ==== Example - $tilde(f)$ n'est pas injective, car $f("Marianne") = f("Pierre") = 2$ - $f: RR arrow RR space x arrow f(x) = x^2$ n'est pas surjective car $y=-4 in RR$ n'a pas de préimage et n'est pas injective car $x=-2 != x'=2 space f(x) = f(x')$ - $f: NN arrow QQ space x arrow f(x) = (x^2)/(x^2 +1)$ Quand $ f(x) = f(x') $ $ x^2/(x^2+1) = x'^2/(x'^2+1) $ $ x^2-x'^2 = 0 $ $ (x-x')(x+x')=0 $ $ x = x' " ou " x = x' = 0 $ $ x = x' $ Donc f est injective === Bijection $ f: A arrow B " est bijective " arrow.l.r.double.long " f est surjective et injective "$ - $forall y in B space exists x_* in A | f(x_*) = y$ - $"Il existe au plus une préimage pour " y$ $arrow.l.r.double.long exists! x_* in A | f(x_*) = y$ ==== Fonction Réciproque Ainsi il existe une fonction, appelé réciproque de f $f^(-1) : B arrow A space y arrow f^(-1)(y) = x_*$ - $f^(-1)(f(x)) = x$ - $f(f^(-1)(y)) = y$ ==== Fonctions réelles $A, B subset.eq RR$ === Graphiquement $ f : A arrow B$ est surjective si $forall y in B$ , la droite horizontale à hauteur y coupe le graphe de f en au moins un point. $ f : A arrow B$ est injective si $forall y in B$ , la droite horizontale à hauteur y coupe le graphe de f en au plus un point. === Example $ f: RR arrow RR space x arrow f(x) = (x-5)/3$ $ forall (x,x') in RR^2 arrow.double.l.r.long (x-5)/3 = (x'-5)/3 arrow.double.l.r.long x = x' $ Ainsi f est injective $ forall y in RR space f(x) = y arrow.double.l.r.long (x-5)/3 = y arrow.double.l.r.long x = (3y+5) in RR $ Ainsi f est surjective. $ arrow.double.long f$ bijective et sa réciproque est $ f^(-1) : RR arrow RR space y arrow f^(-1)(y) = 3y+5$ = Preuve par récurrence $forall n >= 0 cal(P)(n)$ + Montrer que $cal(P)(0)$ est vraie + Montrer que si $cal(P)(n)$ est vraie alors $cal(P)(n+1)$ est vraie aussi $ arrow.double.long cal(P)(n) "est vraie" forall n >= 0 $ == Example Montrons que $forall n>= 1 space sum_(k=1)^n(n) = n(n+1)/2$ $ a_n = sum_(k=1)^n(n) $ $ b_n = n(n+1)/2 $ + $a_1 = 1$ et $b_1 = 1 space a_1=b_1 arrow.double.long cal(P)(1) "est vraie"$ + Supposons que $cal(P)(n) "est vraie" a_n = b_n$ $a_(n+1) = a_n + n+1 = b_n + n+1 = n(n+1)/2 + n+1 = (n^2+3n+2)/2 = (n+1)(n+2)/2 = b_(n+1)$ $ arrow.double.long cal(P)(n) "vraie" forall n >= 1 $
https://github.com/TechnoElf/mqt-qcec-diff-thesis
https://raw.githubusercontent.com/TechnoElf/mqt-qcec-diff-thesis/main/glossary.typ
typst
#import "@preview/glossarium:0.4.1": print-glossary #counter(heading).update(0) #heading(numbering: none)[Glossary] #print-glossary(( (key: "bdd", short: "BDD", plural: "BDDs", long: "binary decision diagram", longplural: "binary decision diagrams"), (key: "dag", short: "DAG", long: "directed acyclic graph"), (key: "dd", short: "DD", plural: "DDs", long: "decision diagram", longplural: "decision diagrams"), (key: "gui", short: "GUI", long: "graphical user interface"), (key: "lcs", short: "LCS", long: "longest common subsequence"), (key: "mqt", short: "MQT", long: "Munich Quantum Toolkit"), (key: "qcec", short: "QCEC", long: "Quantum Circuit Equivalence Checker"), (key: "qpu", short: "QPU", long: "quantum processing unit"), (key: "spsp", short: "SPSP", long: "single-pair shortest path"), (key: "sssp", short: "SSSP", long: "single-source shortest path"), (key: "vqe", short: "VQE", long: "variational quantum eigensolver") ))
https://github.com/J3m3/poolc-fp
https://raw.githubusercontent.com/J3m3/poolc-fp/main/lib/index.typ
typst
MIT License
#import "@preview/polylux:0.3.1": * #import "style.typ": * #let footer_descent_ratio = .9 #let footer_descent_amount = 1em * footer_descent_ratio #let conf(doc) = { show heading.where(level: 1): set text(weight: "semibold") show heading.where(level: 2): set text(weight: "medium") show emph: it => text(fill: color_dark)[*#it.body*] set page( paper: "presentation-16-9", margin: (x: margin_x, y: margin_y), header-ascent: -.5em, footer: [ #set align(center) #set text(size: fontsize_copyright) #copyright() ], footer-descent: footer_descent_amount ) set text(size: fontsize_medium, font: (default_font), lang: "ko", weight: "light") doc } #let vtext(txt) = stack( dir: ttb, ..txt.clusters().map(c => rotate(90deg)[#c]) ) #let vhcenter_content(content) = align(center + horizon)[#content] #let vcenter_content(content) = align(center)[#content] #let tbc(title: none, items) = { if title != none [== #title \ ] for (top, ..rest) in items [ + #align(start)[#top] #set list(marker: [-]) #set text(size: fontsize_extrasmall) #for bottom in rest { align(start)[- #bottom] } ] } #let lined_title(title: none, line_color: color_medium) = [ = #title #v(-.1em) #line(length: 65%, stroke: 2pt + line_color) ] #let title-slide(title: none, content) = polylux-slide[ #vhcenter_content[ #if title != none [= #title] #content ] ] #let slide(title: none, header: none, content) = { set page(header: [ #set align(end) #set text(size: fontsize_extrasmall, weight: "regular", fill: rgb(0, 0, 0, 50%)) #header ]) if header != none polylux-slide[ #if title != none { lined_title(title: title) } #content ] } #let relative-center-slide(title: none, header: none, content) = { let footer_size = fontsize_copyright * (1 + footer_descent_ratio) slide(title: title, header: header)[ #v(-footer_size) #vhcenter_content[#content] ] } #let absolute-center-slide(title: none, header: none, content) = { slide(title: title, header: header)[ #locate(loc => { // maybe inefficient, but who cares? let current_heading = query(heading.where(level: 1), loc).find(h => { loc.page() == h.location().page() }) v(-current_heading.location().position().y) }) #vhcenter_content[#content] ] } #let relative-top-center-slide(title: none, header: none, content) = { slide(title: title, header: header)[ #vcenter_content[#content] ] } #let top-left-slide(title: none, header: none, content) = { slide(title: title, header: header)[ #move(dx: 1em, dy: .5em, content) ] }
https://github.com/donabe8898/typst-slide
https://raw.githubusercontent.com/donabe8898/typst-slide/main/opc/RustProgramming/01.typ
typst
MIT License
#import "@preview/polylux:0.3.1": * #import themes.metropolis: * #import emoji: crab #import emoji: magnify #show: metropolis-theme.with( aspect-ratio: "16-9", footer: "The Rust programming." // short-title: "The Rust programming.", // short-author: "donabe8898", // short-date: none, // color-a: rgb("#2196f3"), // color-b:rgb("#FF4A00"), // color-c:rgb("#FBFEF9"), // progress-bar: true ) #show link: set text(blue) #set text(font: "Noto Sans CJK JP",weight: "light", size: 18pt) #show heading: set text(font: "Hack") #show raw: set text(font: "Hack") #show raw.where(block: true): block.with( fill: luma(240), inset: 10pt, radius: 4pt ) // タイトル #title-slide( title:"プログラミング Rust", subtitle: "環境構築 / 変数とif", author: "<NAME>", date: "2024-hoge-hoge", extra: "OECU Programming Circle " ) // この講義の目的 #slide(title:"この講義の目的")[ #v(1em) + Rustのプログラミング環境を構築できる #v(5em) = 備考 #v(1em) - #crab: 実践項目 - プログラミング, ターミナルでの作業など - #magnify.r :検索したりして是非調べてほしいもの ] // What is Rust language? #new-section-slide("Rustとは?") #slide(title: "What is Rust language?")[ - Mozillaが開発しているプログラミング言語 - オープンソースのコミュニティベースで絶賛開発中 - 2015年にversion 1.0がリリース - Golang v1.0: 2012年, Kotlin v2.0: 2012年 - 2016以降, 毎年StackOverflowにて「#text(fill:red)[プログラマーが最も愛する言語]」#text(fill:red)[1位]を獲得し続けている - Rust = 錆 == 使いみち - Webアプリのバックエンド部 / Linux kernel / Windows NT kernel/ Android SDK / 組み込みシステム ] // 特徴 #slide(title: "特徴")[ + *メモリ安全* #v(0.5em) - メモリ(RAM)系のバグやセキュリティーホールから守る - Java, Go, Python - 変数の所有権, 借用チェッカー, 参照, 超強力な型システム #v(0.5em) + *実行速度が爆速* #v(0.5em) - コンパイラ基盤`llvm`を使用 - ガベージコレクションが無い - メモリ安全な言語でGCが無いのはこいつだけ - 理論上, C言語と同等速度 #v(0.5em) + *IDEレスで開発可能* #v(0.5em) - `rustup`, `cargo`などの有能ソフトウェアが標準で付属 ] // section 環境構築 #new-section-slide("環境構築") #slide(title: "何をインストールするの?")[ + *rustup*: Rustのコンパイラやツール群をインストールするためのマネージャ - cargo: デバッグ、ビルド、ドキュメント生成、テストなど様々なことができる万能ツール - clippy: リンター - rust-analyzer: LSP. テキストエディタで自動補完やセーブ時にフォーマットできたりする - rust-docs: 公式ドキュメントのコピー - rustfmt: フォーマッタ ] #slide(title: "UNIX likeを使っている人")[ == macOS, ※GNU/Linux, xBSD, Solaris #v(1em) + #crab webサイトにこれが載ってる ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` - rustupから必要なツールチェインのインストールもやってくれます ] #slide(title:"ローリング・リリースのLinux")[ #v(0.5em) + Arch GNU/Linuxユーザーはパッケージマネージャから入れるのがオススメ ```sh sudo pacman -S rustup ``` + rustupからツールチェインをインストール ```sh rustup default stable ``` - toolchainのstable版(一番安定しているやつ)をインストール - よく使うのはstable版, nightly版 ] #slide(title:"窓ユーザーはすこしめどい")[ == Windows10, 11 #v(0.5em) #crab #magnify.r Windows で Rust 用の開発環境を設定する - Microsoft learn #link("https://learn.microsoft.com/ja-jp/windows/dev-environment/rust/setup") - Visual Studioのインストールが必須 #v(2em) == オンラインエディタ #v(0.5em) Rust Playground #link("https://play.rust-lang.org/?version=stable&mode=debug&edition=2021") ] #new-section-slide("インストールできた方は反応ください") //Hello,world #new-section-slide("プロジェクトの作成") #slide(title: "Hello,World")[ = 作成方法 #v(0.5em) + プロジェクトを作成したいディレクトリで #crab ```sh cargo new hogehoge ``` + 既にあるディレクトリをプロジェクトディレクトリにする #crab ```sh cargo init ``` ] #slide(title: "Hello, world")[ = 実行方法 ```sh # 実行 cargo run # 最適化をかけて実行 cargo run --release # ビルド(プログラムは実行されない) cargo build # 最適化をかけてビルド(プログラムは実行されない) cargo build --release ``` コードは`fn main(){}`に書く - Cでの`int main(void){}`と同じ 実行すると`Hello, World`と表示される #crab - まさかのHello,worldを書かなくてもおk✨ ] // コンパイル // typst compile 01.typ /home/yugo/git/donabe/typst-slide/opc/RustProgramming/01/{n} --format png
https://github.com/gongke6642/tuling
https://raw.githubusercontent.com/gongke6642/tuling/main/Math/styles.typ
typst
#set text( size:10pt, ) #set page( paper:"a5", margin:(x:1.8cm,y:1.5cm), ) #set par( justify: true, leading: 0.52em, ) = 风格 公式中的替代字母形式。 这些函数与文本函数不同,因为数学字体包含每个字母的多个变体。 = 功能 = 直立 数学中的直立(非斜体)字体样式。 #image("46.png") = 内容 要设置样式的内容。 = 斜体 数学中的斜体字体样式。 对于罗马字母和希腊小写字母,这已经是默认值。 #image("47.png") = 内容 要设置样式的内容。 = 粗体 数学中的粗体字体样式。 #image("48.png") = 内容 要设置样式的内容。
https://github.com/CreakZ/mirea-algorithms
https://raw.githubusercontent.com/CreakZ/mirea-algorithms/master/reports/work_3/work_3.typ
typst
#import "../title_page_template.typ": title_page #import "../layouts.typ": indent #set text(size: 14pt, font: "New Computer Modern") #set heading(numbering: "1.1.1.") #set page( paper: "a4", margin: (left: 2cm, right: 2cm, top: 2cm, bottom: 2cm) ) #title_page(3, [Абстрактный тип данных и его реализация на одномерном динамическом массиве и векторе]) #align( text("Оглавление", size: 14pt), center ) #outline( title: none, ) #pagebreak() #set page(numbering: "1") #align( center, text([= Отчет по заданию 1]) ) #align( center, text([== Условие задачи]) ) #par( first-line-indent: 1.25cm, justify: true, [ #indent Реализовать АТД задачи, разработанное в практической работе 1, используя для представления значений множества динамический массив. Выполнить реализацию АТД задачи на динамическом массиве. Для управления динамической памятью использовать функции файла заголовка stdlib.h: malloc, free, realloc. ]) #align( center, text([== АТД задачи]) ) #text([ #indent Сформировать новый массив из чисел исходного, которые делятся на каждую цифру числа. ]) #align( center, text([== Текст АТД с операциями варианта ]) ) #text([ АТД #raw("myDynArray") \ { \ _Данные_ (описание свойств структуры данных задачи): \ n - количество элементов массива \ m - количество элементов массива для дополнительного задания \ arr - список элементов массива \ _Операции_ (объявления операций): \ - Метод, осуществляющий вывод текущих значений множества \ Предусловие: нет \ Постусловие: выведенные через пробел элементы множества \ Заголовок: #raw("printElements()") \ - Метод, осуществляющий заполнение массива вручную – с клавиатуры \ Предусловие: нет \ Постусловие: массив, заполненный значениями, введенными с клавиатуры \ Заголовок: #raw("fillManually()") \ - Метод, осуществляющий заполнение массива случайными значениями \ Предусловие: нет \ Постусловие: массив, заполненный случайными значениями \ Заголовок: #raw("fillRandomly()") \ - Метод, возвращающий индекс первого элемента, делящегося на каждую из своих цифр. В случае отсутствия такового элемента возвращается -1 \ Предусловие: нет \ Постусловие: число – индекс первого элемента, нацело делящегося на каждую из своих цифр \ Заголовок: #raw("getIndex()") - Метод осуществляющий вставку элемента newElem на позицию с индексом pos \ Предусловие: pos – индекс элемента, на место которого требуется вставить новый элемент, newElem – значение нового элемента \ Постусловие: массив arr длиной n+1 со вставленным элементом newElem на позиции pos \ Заголовок: #raw("insert(int pos, int newElem)") \ - Метод, осуществляющий вставку нового элемента newElem после элемента с индексом getIndex(). Если getIndex() = -1, вставка производится в начало массива \ Предусловие: newElem – значение нового элемента \ Постусловие: массив arr длиной n+1 со вставленным элементом newElem на позиции getIndex() + 1 \ Заголовок: #raw("getIndexInsert(int newElem)") - Метод, осуществляющий удаление из массива всех элементов, нацело делящихся на 3 \ Предусловие: нет \ Постусловие: измененный массив arr, содержащий элементы, не делящихся нацело на 3 \ Заголовок: #raw("deleteMultiplesOfThree()") \ _Дополнительные операции:_ - Метод, формирующий новый массив из чисел исходного, которые делятся на каждую цифру числа \ Предусловие: нет \ Постусловие: новый массив, содержащий только числа исходного массива, нацело делящиеся на каждую из своих цифр \ Заголовок: #raw("newArray()") \ } ]) #pagebreak() #align( center, [ #text([== Разработка программы]) ] ) #text([=== Реализация данных АТД]) ==== Код файла #raw("myArray.h") #let dynArrH = read("../../src/work_3/dynamic_array/headers/my_dynamic_array.h") #raw(dynArrH, lang: "cpp") ==== Код файла #raw("myArray.cpp") #let dynArrCPP = read("../../src/work_3/dynamic_array/source/my_dynamic_array.cpp") #raw(dynArrCPP, lang: "cpp") ==== Код файла #raw("main.cpp") #par([_Комментарий: в данном файле показан пример работы программы для теста №1_]) #let dynArrMain = read("../../src/work_3/dynamic_array/main.cpp") #raw(dynArrMain, lang: "cpp") #text([=== Алгоритм дополнительной операции варианта]) #par([ 1. Вспомогательная функция, возвращающая #raw("true") в случае, если переданное в нее в качестве параметра число #raw("num") нацело делится на каждую из своих цифр, иначе #raw("false"). Предусловие: целочисленная переменная #raw("num") \ Постусловие: #raw("true/false") \ Заголовок: #raw("dividesByAllDigits(int num)") ]) #text([ Таблица 1 -- Алгоритм вспомогательной функции #raw("dividesByAllDigits(int num)") ]) #align( center, [ #let tab = h(0.5cm) #table( columns: 2, align: (center, left), table.header( [Номер], [Инструкция] ), [1], [if num = 0 then], [2], [#tab return false], [3], [endIf], [4], [temp $<-$ num], [5], [while temp > 0 do], [6], [#tab digit $<-$ temp $mod$ 10], [7], [#tab if digit = 0 $or$ num $mod$ digit $eq.not$ 0], [8], [#(tab * 2)return false], [9], [#tab endIf], [10], [#tab temp $<-$ temp $mod$ 10], [11], [od], [12], [return true] ) ] ) #text([ 2. Основной метод \ Таблица 2 -- Алгоритм метода #raw("newArray()") ]) #align( center, [ #let tab = h(0.5cm) #table( columns: 2, align: (center, left), table.header( [Номер], [Инструкция] ), [1], [newArray $<-$ #raw("[]")], [2], [size $<-$ 0], [3], [for i $<-$ 0 to $n - 1$ do], [4], [#tab if dividesByAllDigits(arr[$i$])], [5], [#(tab * 2) \// TODO], [6], [#(tab * 2) newArray[$"size" - 1$] $<-$ arr[$i$]], [7], [#tab endIf], [8], [od], [9], [n $<-$ size], [10], [arr $<-$ newArray] ) ] ) #text([=== Таблицы тестов тестирования дополнительной операции варианта]) #text([ Таблица 3 -- Таблица тестов для тестирования дополнительной операции варианта ]) #align( center, [ #table( columns: 3, align: (center, left, left), table.header( [Номер], [Входные данные], [Результат работы] ), [1], [ n = 6 \ arr = {12, 43, 11, 99, 0, 7} ], [ n = 4 \ arr = {12, 11, 99, 7} ], [2], [ n = 4 \ arr = {13, 17, 23, 29} ], [ n = 0 \ Ошибка: массив пуст! ] ) ] ) #text([=== Скрины результатов тестирования]) #align( left, [ #text([ Тест 1. ]) #image("images/test_1_1.png", width: 80%) #pagebreak() #text([ Тест 2. ]) #image("images/test_1_2.png", width: 80%) ] ) #align( center, text([= Отчет по заданию 2]) ) #align( center, text([== Коды функций операций вставки, удаления, формирования нового множества заданий 1 и 2, представленные в таблице]) ) #table( columns: 3, align: horizon, table.header( [Операция], [Коды функций задания 1], [Коды функций задания 2] ), [Вставить элемент], [ #set text(size: 10pt) #let insert = read("data/insert_1.txt") #raw(insert, lang: "cpp") ], table.cell( align: top, [ #set text(size: 10pt) #let insert = read("data/insert_2.txt") #raw(insert, lang: "cpp") ] ), [Удалить элемент], table.cell( align: top, [ #set text(size: 10pt) #let erase = read("data/erase_1.txt") #raw(erase, lang: "cpp") ] ), table.cell( align: top, [ #set text(size: 10pt) #let erase = read("data/erase_2.txt") #raw(erase, lang: "cpp") ] ), [Формирование нового множества], table.cell( align: top, [ #set text(size: 10pt) #let newArr = read("data/newArray_1.txt") #raw(newArr, lang: "cpp") ] ), table.cell( align: top, [ #set text(size: 10pt) #let newArr = read("data/newArray_2.txt") #raw(newArr, lang: "cpp") ] ) ) #align( center, [ #text([== Код проекта]) ] ) #text([=== Код файла #raw("myArray.h")]) #let vector = read("../../src/work_3/vector/headers/my_vector.h") #raw(vector, lang: "cpp") #text([=== Код файла #raw("myArray.cpp")]) #let methods = read("../../src/work_3/vector/source/my_vector.cpp") #raw(methods, lang: "cpp") #text([=== Код файла #raw("main.cpp")]) #text([ _Комментарий: в данном файле показан пример работы программы для теста №1_ \ ]) #let methods = read("../../src/work_3/vector/main.cpp") #raw(methods, lang: "cpp") #align( center, text([== Скриншоты результатов тестирования]) ) #align( left, [ #text([ Тест 1. ]) #image("images/test_2_1.png", width: 80%) #text([ Тест 2. ]) #image("images/test_2_2.png", width: 80%) ] )
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/touying/0.2.0/examples/example.typ
typst
Apache License 2.0
#import "../lib.typ": s, pause, meanwhile, touying-equation, utils, states, pdfpc, themes // You can comment out the theme registration below and it can still work normally #let s = themes.metropolis.register(s, aspect-ratio: "16-9", footer: self => self.info.institution) #let s = (s.methods.info)( self: s, title: [Title], subtitle: [Subtitle], author: [Authors], date: datetime.today(), institution: [Institution], ) #let s = (s.methods.enable-transparent-cover)(self: s) #let s = (s.methods.append-preamble)(self: s, pdfpc.config( duration-minutes: 30, start-time: datetime(hour: 14, minute: 10, second: 0), end-time: datetime(hour: 14, minute: 40, second: 0), last-minutes: 5, note-font-size: 12, disable-markdown: false, default-transition: ( type: "push", duration-seconds: 2, angle: ltr, alignment: "vertical", direction: "inward", ), )) // #let s = (s.methods.enable-handout-mode)(self: s) #let (init, slide, touying-outline, alert) = utils.methods(s) #show: init #show strong: alert // simple animations #slide[ a simple #pause *dynamic* #pause slide. #meanwhile meanwhile #pause with pause. ][ second #pause pause. ] // complex animations #slide(setting: body => { set text(fill: blue) body }, repeat: 3, self => [ #let (uncover, only, alternatives) = utils.methods(self) in subslide #self.subslide test #uncover("2-")[uncover] function test #only("2-")[only] function #pause and paused text. ]) // math equations #slide[ Touying equation with pause: #touying-equation(` f(x) &= pause x^2 + 2x + 1 \ &= pause (x + 1)^2 \ `) #meanwhile Touying equation is very simple. ] // multiple pages for one slide #slide[ #lorem(200) test multiple pages ] // appendix by freezing last-slide-number #let s = (s.methods.appendix)(self: s) #let (slide,) = utils.methods(s) #slide[ appendix ]
https://github.com/Complex2-Liu/macmo
https://raw.githubusercontent.com/Complex2-Liu/macmo/main/contests/2023/content/problem-08.typ
typst
#import "../lib/math.typ": problem, proof, note, ans #problem[ 设 $S$ 为全体形如 $a^3 + b^3 + c^3 - 3a b c$ 的整数所组成的集合, 其中 $a, b, c$ 为任意的整数. 求证: 若 $x, y in S$, 则 $x y in S$. ] #proof[ 因为 $a^3 + b^3 + c^3 - 3a b c$ 是矩阵 $mat(a, b, c; c, a, b; b, c, a)$ 的行列式. 容易验证形如这样的矩阵关于乘法封闭, 最后再利用 $det(A B) = det(A) det(B)$. ] #note[ 形如那样的矩阵构成 $3$ 阶矩阵代数的子代数, 不知道关于这个子代数是不是有什么背景, 是不是有相关的一些研究, anyone care to enlighten me? ] /* vim: set ft=typst: */
https://github.com/rabotaem-incorporated/probability-theory-notes
https://raw.githubusercontent.com/rabotaem-incorporated/probability-theory-notes/master/sections/04-discrete-random-processes/01-conditional-expected-values.typ
typst
#import "../../utils/core.typ": * == Условные математические ожидания #def[ Пусть $(Omega, Ff, P)$ --- вероятностное пространство, $A in Ff$ --- случайное событие, $xi$ --- случайная величина. _Условным математическим ожиданием случайной величины $xi$ при условии $A$_ называется $ E(xi | A) := E(xi bb(1)_A)/P(A). $ ] #notice[ Если событие $A$ и ${xi <= c}$ независимы для любого $c in RR$ (то есть $bb(1)_A$ и $xi$ независимы), то $ E(xi | A) = E(xi bb(1)_A)/P(A) = (E(xi) E bb(1)_A)/P(A) = E(xi). $ ] #props[ 1. $xi >= eta ==> E (xi | A) >= E(eta | A)$. 2. Линейность. 3. $abs(E(xi | A)) <= E (abs(xi) | A)$. ] #def[ Пусть $Omega = usb A_n$ --- разбиение $Pi$, $P(A_n) > 0$. _Условным матожиданием относительно разбиения_ называется $ E(xi | Pi) := sum E(xi | A_n) bb(1)_(A_n) = sum E(xi bb(1)_(A_n))/P(A_n) bb(1)_(A_n). $ В отличие от условного матожидания при условии, это случайная величина. ] #prop[ $E(E(xi | Pi)) = E xi$. ] #proof[ $ E(E(xi | Pi)) = E(sum (E(xi bb(1)_(A_n)))/(P(A_n)) bb(1)_(A_n)) = sum E ((E (xi bb(1)_(A_n)))/P(A_n) bb(1)_(A_n)) newline(=) sum E(xi bb(1)_(A_n))/P(A_n) E bb(1)_(A_n) = E sum(xi bb(1)_(A_n)) = E xi. $ ] #def[ Пусть $eta$ --- дискретная случайная величина со значениями $y_1, y_2, ..., y_n$. $P(eta = y_k) > 0$. Тогда есть разбиение $Omega = usb {eta = y_k}$. $ E(xi | eta) := E(xi | "разбиение выше") = sum E(xi | eta = y_k) bb(1)_{eta = y_k}. $ ] #props[ 1. $E(E(xi | eta)) = E xi$. 2. $E(xi | xi) = xi$. ] #example[ Пусть $xi = Geom(p)$, $eta$ --- результат первого подбрасывания. Тогда $ E(xi | eta) = underbrace(E(xi | eta = 0), 1 + E xi) bb(1)_{eta = 0} + underbrace(E(xi | eta = 1), 1) bb(1)_{eta = 1}. $ Отсюда $ E(E(xi | eta)) = (1 + E xi) (1 - p) + 1 dot p = (1 - p) E xi + 1 ==> E xi = 1/p. $ ] #exercise[ Пусть $xi_n$ --- количество испытаний в схеме Бернулли до достижения $n$ последовательных успехов. Найти $E xi_n$. Указание: найти $E(xi_n | xi_(n - 1))$. ] #example[ $N$, $xi_1$, $xi_2$, ... независимые случайные величины, $N$ --- имеет натуральное значение, а $xi_k$ одинаково распределены, и $a := E xi_k$. Найдем $E S$, где $S := xi_1 + xi_2 + ... + xi_N$. Знаем $ E S = E(E(S|N)). $ Поэтому достаточно найти $E (S | N)$: $ E(S|N) =& sum_(n = 1)^oo E(S | N = n) dot bb(1)_{N=n},\ E(S|N = n) =& E(S bb(1)_{N=n})/P(N=n) = E((xi_1 + xi_2 + ... + xi_n) bb(1)_{N = n})/P(N=n) newline(=^"независимость")& (E(xi_1 + xi_2 + ... + xi_n) cancel(E bb(1)_{N=n}))/(cancel(P(N = n))) = E(xi_1 + ... + xi_n) = n a. $ Значит $ E(S|N) = E sum(n a bb(1)_{N=n}) = a underbrace(sum_(n=1)^oo n E bb(1)_{N=n}, E N) = a E N. $ ] #exercise[ Найти $D S$, если известны $E xi$, $D xi$, $E N$, $D N$. ] #example[ $N$, $xi_1$, $xi_2$, ... --- независимые случайные величины с неотрицательными целыми значениями. $xi_1$, $xi_2$, ... --- одинаково распределены, и $F$ --- их производящая функция. $G$ --- производящая функция для $N$. Найти производящую функцию $G_S$ для $S := xi_1 + xi_2 + ... + xi_N$. Напомню, производящая функция для дискретной случайной величины $xi$ --- это $ G_xi = sum_(k = 0)^oo P(xi = k) t^k = E t^xi. $ Тогда надо найти $E t^S$: $ E t^S = E(E(t^S | N)). $ Считаем: $ E(t^S | N) = sum_(n = 0)^oo E(t^S | N = n) bb(1)_{N = n}. $ И еще раз считаем: $ E(t^S | N = n) = (E(t^S bb(1)_{N = n}))/P(N = n) = (E(t^(xi_1 + xi_2 + ... + xi_n)) bb(1)_{N = n})/P(N = n) newline(=) (E t^(xi_1) ... E t^(xi_n) cancel(E bb(1)_{N = n}))/cancel(P(N = n)) = (E t^(xi_1))^n = (F(t))^n. $ Подставляем: $ G_S (t) = E t^S = E(E(t^S | N)) = E (sum_(n = 0)^oo (F(t))^n bb(1)_{N = n}) newline(=) sum_(n = 0)^oo (F(t))^n E bb(1)_{N = n} = sum_(n = 0)^oo (F(t))^n P(N = n) = G(F(t)). $ ]
https://github.com/XcantloadX/TypstMomoTalk
https://raw.githubusercontent.com/XcantloadX/TypstMomoTalk/main/docs/tutorial-for-dev.md
markdown
# 教程(开发者) ## 环境搭建 ### Web App 参见[教程(小白)](tutorial-for-dummies.md)。 ### 本地 [安装 Typst](https://github.com/typst/typst?tab=readme-ov-file#installation) 并加入 `PATH` 环境变量。 然后你需要一个编辑器,**建议使用 VSCode,并安装“Typst LSP”和“”扩展。** ## Typst 光速入门 一个 Typst 文件由两种部分组成:“内容部分”和“脚本部分”。 ```typst { } ```
https://github.com/heychhavi/resume-template
https://raw.githubusercontent.com/heychhavi/resume-template/main/sample-resume.typ
typst
#import "template.typ": * #show: resume.with( author: ( name: "<NAME>", email: "<EMAIL>", phone: "(123) 456-7890", linkedin: "granthamtaylor", )) #section("Education") #organization("Fancy University, Some School of Business") #role("Master of Science in Quantitative Management", "2010 - 2014") #organization("Some University, An Undergraduate College") #role("Bachelor of Business Administration", "2000 - 2004") #section("Experience") #organization("Big Corporation, Inc") #role("Principal Associate - Research Scientist", "June 2023 - Present") #content[ - #lorem(30): - #lorem(30). - #lorem(30). - #lorem(30). - #lorem(30). - #lorem(30). - #lorem(30). - #lorem(30): - #lorem(30). - #lorem(30): - #lorem(30). - #lorem(30). ] #role("Senior Associate - Data Science", "May 2021 - June 2023") #content[ - #lorem(30): - #lorem(30). - #lorem(30): ] #organization("Another Organization, LLC") #role("Associate - Data Science", "February 2020 - May 2021") #role("Senior Consultant - Data Science", "May 2019 - February 2020") #section("Technical Skills") #skills("Engineering", (`git`, `kubernetes`, `python`, `julia`, `rust`, `javascript`, `scala`)) #skills("Modeling", (`pytorch`, `lightning`, `optuna`, `katib`, `hydra`, `ray`)) #skills("Orchestration", (`kubeflow`, `flyte`, `dvc`, `argo`, `metaflow`)) #skills("Data", (`spark`, `sql`, `polars`, `torchdata`, `bytewax`, `kafka`)) #skills("Documentation", (`justfile`, `draw.io`, `mermaid`, `markdown`, `typst`))
https://github.com/CCNU-CSIT883-Group2/Documents
https://raw.githubusercontent.com/CCNU-CSIT883-Group2/Documents/master/Proposal/main.typ
typst
#import "../Templates/template.typ": * #show: group_work.with("Proposal") // Group Members #let Lzt = "<NAME>" #let Cyx = "<NAME>" #let Cxy = "<NAME>" #let Wtl = "<NAME>" #let Cx = "<NAME>" #let Zzh = "<NAME>" #let Ybj = "<NAME>" #let Hs = "<NAME>" // Content = Introduction Our team is developing an intelligent question-and-answer software aimed at enhancing the learning experience for university students and instructors. This platform will enable personalized study for students and provide tools for teachers to easily create and manage quizzes. The software will leverage the powerful text-generation capabilities of Generative Artificial Intelligence (GAI) to support this functionality. Additionally, our application is web-based, allowing users to access our service anytime, anywhere. == Inspiration The rapid advancements in Generative AI technology have demonstrated its potential in the fields of education and learning. We believe we can harness its strengths to create a tool that simplifies and enhances the educational process, making AI resources more accessible and effective for both students and educators. == Innovation Our initial research suggests that there are currently few, if any, applications that offer the kind of functionality we propose. While many tools guide users on how to write effective prompts for learning through AI, the content generated by GAI is often poorly managed. Students and teachers must organize and handle this content manually, which is both inefficient and time-consuming. Our software aims to solve this problem by offering a solution that not only generates answers but also organizes, stores, and visualizes the results in an intuitive and user-friendly way. In doing so, it also supports personalized learning for students and simplifies quiz creation and management for teachers. = Functions and Subsystems Our application is designed with two primary user groups in mind—students and teachers. Both will have access to shared functions that enhance their learning and teaching experience, while each group will also enjoy features tailored to their specific needs. == Shared === Personalized Questions Creation Both students and teachers can create personalized questions based on course material. Students can tailor questions to their study needs, while teachers can generate custom quizzes, ensuring a more targeted and effective learning experience. === Questions Storage and Delete The software will offer centralized management of all questions. Users can categorize, store, and retrieve questions efficiently. This feature helps both students and teachers organize their study or teaching materials, reducing the manual effort required to manage generated content. === Account System The application will feature a robust account management system for both students and teachers. Users will be able to create personal accounts with role-based access (student or teacher). The account system will offer: ==== Profile Management Users can update personal details, set preferences for notifications, and manage their security settings (e.g., password updates). ==== Progress Tracking For students, the account system will store their quiz history, performance data, and track their overall progress across sessions. ==== User Authentication Secure login methods will be in place, such as email/password combinations or OAuth integrations, ensuring privacy and protection of personal data. == Student Side === Answers and Analysis Students can answer the questions generated by GAI and receive AI-generated answers based on course material and keywords. The platform will also provide analysis of the answers, offering additional explanations or highlighting key concepts to enhance understanding. === Results Visualization Students will be able to visualize their performance through intuitive charts and graphs, showing progress over time. This feature helps students track their strengths and weaknesses, making it easier to focus on areas that need improvement. === Mistake Bank The software will automatically store incorrect answers in a personalized "Mistake Bank". This allows students to revisit their mistakes, review correct solutions, and reinforce learning by focusing on areas where they have struggled. == Teacher Side === Questions Import and Export Teachers can easily import and export questions in various formats. This function allows educators to streamline quiz creation by uploading existing questions or exporting quiz data for external use or archiving. == Subsystems Based on the functions outlined above, our application can be divided into three core subsystems, each responsible for handling specific functionalities: === Questions Management System This subsystem will be responsible for all question-related operations, ensuring seamless interaction for both students and teachers. === Account System This subsystem will manage all account-related functionalities for both students and teachers. === Evaluation System This subsystem handles the analysis and visualization of results for students and teachers, providing valuable insights into performance. = Job Distribution Our application is built on modern web technologies and is divided into four key subsystems: Frontend, Backend, Database, and a General Library to interact with Generative Artificial Intelligence (GAI). Each subsystem will have its dedicated responsibilities to ensure smooth development and seamless integration. == Frontend The frontend subsystem will focus on building an intuitive and responsive user interface for both students and teachers. *Members:* - #Cxy - #Wtl - #Zzh == Backend The backend subsystem will be responsible for interacting with frontend and database, and leverage the GAI Library to fullfil the functionality of the application. *Members:* - #Cyx - #Cx == Database The database subsystem will handle the data architecture and management. *Members:* - #Ybj - #Hs == General Library to Interact with GAI This subsystem will be in charge of developing the general module that interacts with Generative AI, but this library will only serve for our specific function. *Members:* - #Lzt = Role of Members #let role_dev = "Developer" #let role_leader = "Leader" #align(center, [ #figure( table( stroke: none, align: left, inset: (x: 20pt, y: 8pt), columns: 2, table.hline(stroke: 1.5pt), [*Name*], [*Role*], table.hline(stroke: 0.75pt), [#Lzt], [#role_leader, #role_dev], [#Cyx], [#role_dev, Backend Manager], [#Cxy], [#role_dev, Frontend Manager], [#Hs], [#role_dev, Database Manager], [#Wtl], [#role_dev], [#Cx], [#role_dev], [#Zzh], [#role_dev], [#Ybj], [#role_dev], table.hline(stroke: 1.5pt), ), caption: [the Role of Each Team Member], ) ])
https://github.com/storopoli/invoice
https://raw.githubusercontent.com/storopoli/invoice/main/README.md
markdown
MIT License
# Automated Invoice System This is a simple script to generate invoices and send them via email. All you need to do is change the `invoice.toml` file to suit your needs. ## Technical Notes Dependencies: - `typst` or `docker` - `sendmail` - `sendmail-cf` Follow the steps [here](https://web.archive.org/web/20240206023834/https://tecadmin.net/configuring-sendmail-through-the-external-smtp-relay/) to configure `sendmail` to use an external SMTP relay. Then create a `crontab` entry to run the script at a desired interval. ```bash 0 0 * * * /path/to/automated-invoice-system.sh && ./run.sh ``` The template is based on Typst's [`invoice-maker`](https://typst.app/universe/package/invoice-maker/) but with some modifications to suit my needs.
https://github.com/lucannez64/Notes
https://raw.githubusercontent.com/lucannez64/Notes/master/Maths_Exercices.typ
typst
#import "template.typ": * // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( title: "Maths Exercices", authors: ( "<NAME>", ), date: "10 Août, 2024", ) #set heading(numbering: "1.1.") #link("Maths.pdf") #link("Maths_Exercices_10_10_2023.pdf") #link("Maths_Exercices_11_09_2023.pdf") #link("Maths.pdf")[Maths]
https://github.com/FrightenedFoxCN/typst-langpack
https://raw.githubusercontent.com/FrightenedFoxCN/typst-langpack/main/test-bilin.typ
typst
#import "bilingural.typ": * #show: doc => bilingural(doc) This is a test for a bilingural document. First we write English in {the first} paragraph, {and then} we write Chinese in {the second} paragraph. In this way we can have referenced reading material. 这 是 一个 测试 为了 一个 双语 文档。 首先 我们 写 英文 在 第一 段, 然后 我们 写 中文 在 第二 段。 用 这种 方式 我们 可以 有 对照的 阅读 材料。 In {the same} manner we can {go on} for {the third} and {the fourth} paragraph, one in English and {the other} in Chinese. 用 同样的 方法 我们 可以 继续 为了 第三 和 第四 段, 一段 用 英文 - 另一段 用 中文。
https://github.com/Joelius300/hslu-typst-template
https://raw.githubusercontent.com/Joelius300/hslu-typst-template/main/chapters/99_appendix.typ
typst
MIT License
= Appendix eins #lorem(50) == reeeeeee #lorem(20) = Appendix due #lorem(1)
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/004%20-%20Dragon's%20Maze/004_Expectations.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Expectations", set_name: "Dragon's Maze", story_date: datetime(day: 24, month: 04, year: 2013), author: "<NAME>", doc ) Oana clutched an armful of scrolls as she sprinted down the echoing halls of New Prahv. She was late. That was almost a given. Her busiest days were scheduled out down to the minute, but never accounted for time to make it from one appointment to the next. By the time the sun had crested the skyline, she had already begun her daily descent, falling further and further behind the relentless march of hours. #figure(image("004_Expectations/02.jpg", width: 100%), caption: [Azorius Guildgate | Art by Drew Baker], supplement: none, numbering: none) #emph[This is your reward] , she thought, a complicated and useless mix of emotions accompanying the words as they passed through her mind. Oana had been "promoted" out of the Sova Column research teams for her treatises on inheritance law, but her new position had proved no prize. She was now a defender, tasked with helping the accused through the impenetrable passages of Azorius law, and ensuring that their rights were honored and upheld. She burst into the courtroom at last, her well-rehearsed apologies ready to be offered once more. From high on his dais, Arbiter Johvann III droned on, oblivious to Oana’s late arrival, or apparently, her prior absence. She sat down next to her client, a nervous vegetable merchant who had been arrested two weeks before. Oana spread a few scrolls out on her table and tried to figure out how much she had missed. She was only a few minutes late and, thankfully, the official preamble to a trial could last for quite some time. Arbiter Johvann’s ceaseless monotone conveyed his absolute disinterest. "…previously established by precedent, the role of those who engage in mercantile efforts is augmented by law to promote exchanges in which both the buyer and the seller, at all times, maintain an equity of information and understanding. While a party’s theoretical knowledge or ignorance cannot be ascertained (save for magical means which are governed under statutes relating to magical divination of the presence or absence of knowledge), it is forbidden for any party to a transaction to engage in verbal or material efforts to misrepresent the true and factual nature and value of the goods, services, or promise of future goods or services at hand." Johvann paused to stare at the vegetable merchant, his drooping face devoid of emotion. "<NAME>, please recount the testimony that you encoded regarding the incident which led to the detention of the accused." #figure(image("004_Expectations/04.jpg", width: 100%), caption: [Council of the Absolute | Art by Zoltan Boros], supplement: none, numbering: none) A young Lyev soldier rose. "Seventeen days ago, in the west end of the Rowan Lane market, the accused made the following public announcement from his vegetable stand, and I quote: ‘Fresh vegetables for sale.'" The soldier sat back down. Johvann began to rub his chin in consideration. Oana, utterly confused, stood to object. "Arbiter, my client’s records conclusively show that all of his goods met the threshold of ‘fresh,’ in that they had been harvested no more than nine days before, and in every case, my client was willing to sell or barter for each and every item on display. I don’t see anything in my client’s conduct or declaration that could be considered remotely criminal." Johvann turned his tired, empty gaze on Oana, and waved his hand. Glowing runes began to scroll across the air front of his dais. "Pursuant to the recent proclamation regarding the Legal Uses, Designations, and Exchanges of Therapeutic Materials, a number of species of plants had their official mercantile designation changed from ‘vegetable’ to ‘medicinal supply,’ including several of the comestibles that your client offered for sale. Your client does not have the proper permits to sell medicinal supplies. Offering these medicines for sale under the label of ‘vegetable’ is both misleading and potentially damaging to public health." "But I’ve been selling these same vegetables for years!" The merchant looked to Oana, his face pleading and filled with fear. "Incorrect. For the last fifty-seven days, you have been selling #emph[medicinal supplies] . Here follows my summary judgment: You are found guilty of selling medicinal supplies without a license. Your stock will be seized and destroyed, and all of your market permits are summarily revoked. You will be barred from seeking further market permits for a period of one year, and no permit for the sale of medical supplies shall be granted for a period of no less than three years. After this time, you may apply to have the prohibition on permits revoked, and should the revocation be granted, you may then apply for a new provisional vegetable sales permit." Johvann’s runed gavel slammed down and Oana’s client was led away. Oana slammed her fist on the bar, rattling her mostly empty glass. The vedalken behind the bar raised a polite eyebrow. "And I just sat there, like an imbecile! If I had had more time to prepare, I would have been ready to argue the classification change!" Oana was ranting to nobody in particular. The bartender was making a show of attention and the other patrons granted her wide berth. "There’s ample precedent to allow for a retroactive permit change, or even a public health exemption! But I wasn’t ready. It’s not the system that’s broken. The system works. #emph[I’m broken] . I can’t keep up, and a decent man lost his business because of me." As Oana finished her drink, an identical one slid across the bar, clinking against her empty glass. She looked over to see a young man wearing mildly extravagant clothing. His eyes and grin were sharp and bright. "You did your best, yes? Surely that counts for something." There was something about the man’s voice that at once calmed and worried her. Her shoulders tensed, but she turned to face him. "You did what you could with the time and tools at your disposal. That’s all we can ever do." The young man extended a black-gloved hand. "My name is Tarem. I have a proposal for you." Oana paused. Something in her wanted to flee from this place as fast as she was able, but she could think of no rational reason to not hear the man out. She shook his hand. "Oana." Tarem nodded. "<NAME>, granddaughter of the famous arbiter, <NAME>ellius II. They say that you share his passion and ability." Oana frowned. "His passion, maybe. But not his skill. He never would have botched such an easy case." Again, her instincts flared. He had set a verbal trap, and she had walked right into it. "Not his skill? Well, I have good news for you. An associate of mine is able to perform a very specialized type of magic. It can transfer the memories and training from the dead to the living. The more the donor has in common with the recipient, the more successful the procedure tends to be. In the case of a grandfather and a granddaughter with a shared profession, I imagine it would have a remarkable effect." #figure(image("004_Expectations/06.jpg", width: 100%), caption: [Trait Doctoring | Art by Clint Cearley], supplement: none, numbering: none) Oana was suddenly very conscious of her own heartbeat. She knew what she was hearing was wrong, but she #emph[wanted] it. She closed her eyes for a long moment. "Dimir." All the pieces fell into place and she spat out the word with as much disgust as she could manage. "How dare you even suggest the defiling of such a great man? He spent his life dedicated to ensuring that your kind met the punishment you deserve! You come here, offering me this poisoned gift to bring me down? Let me be very clear. I will continue his work, and I will #emph[earn] the right to destroy you. If I ever see you again, you will spend the rest of your days in chains!" Tarem’s smile never wavered. "A thousand apologies, Defender. I wish you all the good fortune you deserve." The Dimir agent bowed politely and made an unhurried exit. In the pit of her stomach, she knew something was wrong. But she pushed it aside, settled her tab, and went home. That night, Oana slept better than she had in years. The following day, spurred on by her newfound drive, she earned four acquittals, and argued a fifth client’s sentence down to probation and a trivial fine. Five trials, three client meetings, and two pretrial hearings in all. And she wasn’t late for a single one. Arbiter <NAME> I tucked her graying hair into her traditional judge’s cowl and smiled at her reflection. She was proud of what she saw. Her chambers were decorated with the memorabilia of thirty years of service to the Azorius—guild awards for diligence as a defender, the documents detailing her confirmation as an arbiter, and various other awards and commendations. But more important to her were the framed letters and mementos from former clients, and from defenders she had mentored over the years. Her chambers were adjacent to her court, and she could hear people filing into their seats. It was common knowledge she always started her trials fifteen minutes after they were scheduled to begin. She felt a little bit guilty and rebellious every time, but the thankful looks of the harried defenders who barely made it through her doors in time were worth it. She enjoyed a few bites of the standard Arbiter’s breakfast—a plate of fresh fruit. The fruit was provided to New Prahv (bypassing the market) at a fair rate by a former client of hers, and it tasted sweet every single day. After her last case of the first day of each month, Oana made a pilgrimage to her grandfather’s crypt. She would tell him all about the issues that she had resolved since her last visit, and about the latest decrees from the senate. Oana was never quite comfortable here. She spoke too fast, she stumbled over her stories—under the stern gaze of the statue of Otho Vitellius II she felt like an unworthy child, even now as she approached sixty and her achievements had nearly matched his own. Tonight, she spent most of her visit sitting in silence. When she left for home, the streets were nearly empty. Oana opened the door to her home and breathed in the familiar air. Her home was modest, considering her station. She had never been motivated by wealth or comfort. Every furnishing was made to last, and every object was in its proper place. It was a place of quiet and calm, but tonight, something was wrong. There was someone else there. With a quick gesture, she illuminated her sitting room. There, in her favorite chair, sat a man whose face she had not seen in forty years. Tarem. He hadn’t aged a day. Anger flared. "Do you remember my promise, Dimir? Because I certainly do. I’ll see you given to the Æther for this!" The vampire bowed his head in mock apology. "I do recall your promise, Arbiter, in great detail. And I am here to collect. Tomorrow, you will hear a case involving a theft from the Izzet League. The accused is a man of no importance to you, and you will find him innocent of all charges. This will mark the end of our transaction." #figure(image("004_Expectations/08.jpg", width: 100%), caption: [Keymaster Rogue | Art by <NAME>], supplement: none, numbering: none) A cold, sharp sensation travelled down Oana’s spine. Something was very wrong. "You speak nonsense. By the authority of the Azorius Senate, I place you under arrest for breaking and entering, and for attempting to coerce an arbiter!" Tarem stood, offering his wrists meekly to her. "Of course, Arbiter. But will you honor me with the answer to a question first?" His grin was sharper than ever. "#emph[When was the last time you saw your granddaughter?] " The illogic of the question gave Oana a brief pause. She had never married, and had no children, let alone grandchildren. It didn’t make any sense… and then an image swam uncalled into her memory. She was looking down at a young girl, no more than seven. The eyes were familiar. #emph[Her eyes] . She was looking at herself as a child, which meant… Oana felt as if a great hand had seized her skull, and lifted her into frigid darkness. Oana frowned. "His passion, maybe. But not his skill. He never would have botched such an easy case." Again, her instincts flared. He had set a verbal trap, and she had walked right into it. "Not his skill? Well, I have good news for you. An associate of mine is able to perform a very specialized type of magic. It can transfer the memories and training from the dead to the living. The more the donor has in common with the recipient, the more successful the procedure tends to be. In the case of a grandfather and a granddaughter with a shared profession, I imagine it would have a remarkable effect." Oana was suddenly very conscious of her own heartbeat. She knew what she was hearing was wrong, but she #emph[wanted] it. She closed her eyes for a long moment. "There is no precise legal precedent for something like this. But, inheritance law is defined extremely broadly." Oana’s mind was racing, and she spoke rapidly, mainly to herself. "While magics relating to the modification of memory are tightly regulated, there would be no injured party in such a transaction. Vitellius is dead already. I could make the argument that such experiences are nonphysical transactable commodities, and would rightly fall to me as his heir. Distasteful, certainly. But legal. I believe it would be legal." Tarem’s grin broadened. "I suspected you might be amenable. If you so choose, we can perform the spell tonight. Be aware that we will need to make minor modifications to your recollection in order to ensure that the new memories are integrated smoothly. And then there is the matter of payment." #figure(image("004_Expectations/10.jpg", width: 100%), caption: [Notion Thief | Art by <NAME>], supplement: none, numbering: none) The world swam, and the sight of her sitting room returned. Oana had collapsed on her floor. Her face was wet with tears. "One favor to be named later. And I agreed." "Yes. Yes, you did. Goodnight, Arbiter. I’ll show myself out." It didn’t take long to come to a decision. It’s what her grandfather would have done, after all. Oana spent the next morning writing her letter of resignation and her official statement of confession. She filed the paperwork to recuse herself from all of her upcoming cases due to conflicts of interest, and then paid a visit to one of the young defenders she had mentored for years. It would take a long time for her to decide what she could believe now, and whether she had been right or wrong. But either way, she was going to need a good lawyer.
https://github.com/TypstApp-team/typst
https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/layout/align.typ
typst
Apache License 2.0
// Test alignment. --- #set page(height: 100pt) #stack(dir: ltr, align(left, square(size: 15pt, fill: eastern)), align(center, square(size: 20pt, fill: eastern)), align(right, square(size: 15pt, fill: eastern)), ) #align(center + horizon, rect(fill: eastern, height: 10pt)) #align(bottom, stack( align(center, rect(fill: conifer, height: 10pt)), rect(fill: forest, height: 10pt, width: 100%), )) --- // Test that multiple paragraphs in subflow also respect alignment. #align(center)[ Lorem Ipsum Dolor ] --- // Test start and end alignment. #rotate(-30deg, origin: end + horizon)[Hello] #set text(lang: "de") #align(start)[Start] #align(end)[Ende] #set text(lang: "ar") #align(start)[يبدأ] #align(end)[نهاية] --- // Ref: false #test(type(center), alignment) #test(type(horizon), alignment) #test(type(center + horizon), alignment) --- // Error: 8-22 cannot add two horizontal alignments #align(center + right, [A]) --- // Error: 8-20 cannot add two vertical alignments #align(top + bottom, [A]) --- // Error: 8-30 cannot add a vertical and a 2D alignment #align(top + (bottom + right), [A])
https://github.com/kdog3682/2024-typst
https://raw.githubusercontent.com/kdog3682/2024-typst/main/src/designer.typ
typst
#import "base-utils.typ": * #import "styles.typ" #let line(stroke: "hard", margin: none, length: 100%) = { let line-attrs = ( stroke: resolve-dict(styles.strokes, stroke), length: length, ) if margin != none { v(margin) } typst-line(..line-attrs) if margin != none { v(margin) } }
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/028%20-%20Kaladesh/007_Release.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Release", set_name: "Kaladesh", story_date: datetime(day: 05, month: 10, year: 2016), author: "<NAME>", doc ) #emph[Twelve years after she watched her parents die, <NAME> returned home to Kaladesh. She found her mother had survived...but <NAME>, now a leader of the renegade movement, was arrested by the ruling Consulate at the command of the Planeswalker Tezzeret. Chandra tracked her mother with the aid of <NAME> and <NAME>, but all three found themselves trapped by the cruel Baral.] #emph[Sealed in a magic-proof chamber filling with poison, the only possible escape is to planeswalk. But Chandra will not leave Mrs. Pashiri...and Nissa finds she cannot leave Chandra.] #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) He was still getting used to the hands. That's why he almost fell off the final roof. The mechanical fingers Grandmother had provided were strong, and surprisingly responsive. Nearly like wearing gloves. But like a hand in a glove, their grip was different. He had to consciously remember to use less pressure while holding a glass, and more when jumping across alley roofs. After the wind of his passage had fallen silent, after his feet had silently bounced him to a stop against the faded dust of the bricks, he felt his weight shifting badly. The ledge was sliding away. His fingers—the real ones—clenched within the encasing gauntlets. With silent efficiency, the mechanical fingers tensed, digging into masonry. He felt the balance steady, and swung his legs up over the lip of the roof with a rustle of wind-snapped cloth. Azure sky and towering chiaroscuro afternoon clouds wheeled past his vision. It had taken only a breath. He paused, listening, smelling the wind. A dozen aromatic spices he'd had no names for five months ago wafted from the kitchens below. He now knew them as cardamom, turmeric, cloves, cumin, and others. Most people would scent no more than those, overpowering as they were. Beneath them, he caught sun-hot stone and brass, the musty scent of old oil, and the sweat of a dozen Consulate inspectors. The hummingbird buzz of surveillance thopter wings throbbed down from overhead. A trickle of gravel tumbled from the holes his metal fingers had left, clattering across the alley floor. A rustle of fabric. "This place is falling apart." One of the inspectors, her voice echoing off brick walls and cobble pavement. "The Consuls should knock it down and build over." Another voice, male: "Maybe they will. I heard urban funds were tied up building venues for the Fair..." Satisfied they found nothing amiss, he padded silently to the far side of the roof and scanned the wall below. Balcony, balcony, rain spout, awning—would that support his weight? Maybe the street lamp instead. Then the wall, finally the street. He was on the ground in a few breaths, metal-clad fingers pulling the borrowed cloak closed. He looked down at the glittering brass gauntlets. Only the hands were visible from the flowing sleeves of his cloak, but they extended up past his elbows. They'd been crafted by the Glint-Sleeves, a group that specialized in such bodily attachments. Grandmother had them made for him. They would not be questioned here. The cloak she'd made herself, using cunning devices that spun and ticked. "That one you wear is such a bore! That makes you stand out in a crowd even more, you know." He'd held the bolts of silk for her, answering questions of color and pattern with respectful disinterest. He settled his shoulders, hunched over, and slid into the muttering crowd, listening, ignoring the heavy reek of nervous sweat. "...what are they doing...?" "...been in there a long time..." "...said the renegades have been setting traps..." "...papa, when can we go back...?" "...never seen so many..." From the shadows of his cloak, he observed the clockwork patterns of the orbiting thopters and the irregular pacing of humans and vedalken in Consulate inspectors' uniforms. Grandmother's building was surrounded. He slipped into another alley, and ascended back to the rooftops. He rested against a shack packed with gardening tools to review the memory. The gold one passed around the back every twenty-second breath, the orange passed behind the building to sunset every fortieth...The scents of the residents' spice garden crowded his nostrils. It could be done. He waited, listening to the heartbeats of the thopters cascading from overhead. #emph[Now] . He rolled, threw himself across the roof, pushed off. The landing pressed the air from his lungs. Sprinting now, zagging around a skylight, zigging around a chimney. The pulsing of wings thundered off the brickwork, echoes scattering. Moments left. Grandmother's building was the tallest on the block. He leapt upwards, extending the metal gauntlets over his head, the bright blue and gold of his cloak snapping behind him... His brass fingers locked over the lip at the roof's edge. His oversize boots touched softly against the brick. He grunted—so loud!—as he pulled himself up and over. He lay there for heartbeats, breathing through his mouth, forcing the air to pass slow and quiet, listening for a change in the thopters' patterns, or a cry from the street. Nothing. Grandmother had a terrace on the far side of the building, facing the Consulate's towering Aether Spire. She had her own names for the edifice, the kindest of which was "eyesore," and the rudest of which involved an escalating series of shockingly specific scatological references. He sniffed over the edge. Only her orchids; nothing that suggested the immediate presence of inspectors. He dropped silently among the plants and slid into her home. #emph[Forgive this trespass] . He crouched, listening, as the wind folded her faded linen curtains around him. Two voices. No...three. One with a tone of crisp command. All down the hall, in her sleeping chamber. The apartment had been rudely searched, the contents of the old wooden drawers tossed across the painted tile floor, the couch pillows disemboweled. He moved silently across the tile, careful to avoid stirring the contents of the spilled drawers, listening to the conversation in the other room. A woman, her voice deep and serious: "You checked that closet?" A young man, querulous: "Of #emph[course] I checked the closet. Nothing." The third voice, male and sharp: "There has to be #emph[something] . Some #emph[proof] . She's stood beside the heart of the movement for over a decade. She couldn't keep #emph[all] those secrets in her head. Why don't you two...I don't know. Go search the parlor again." Footsteps in the hall. "You hear that Rashmi made it into the next round?" the young man said. The cracked-metal scent of aether-charged air wafted in their wake. Armed, of course. His voice pitched downwards with doubt; "Doesn't seem to be much use for a vase teleporter." "You have to think of the long-term implications," the woman replied, carelessly. Glass burst and scampered from under her boot, and she swore under her breath. "Today vases, tomorrow gearhulks..." He placed his feet precisely, rolling them to avoid any sound, gliding down the hall and into the parlor. The inspectors stood beside each other, surveying the mess they'd made in matching red-and-orange uniforms. Hissing black metal artifacts hung from their belts. "Did you see her pet?" the young man asked. "Doesn't have one," the woman answered. "She's a lifecrafter. Makes her own." Her scarred hands described bird-shapes in the air. He moved swift and silent across the tile, extending his arms as if to embrace the intruders, the wind gathering under the hood of his cloak. The boy started to turn, brows furrowed. "...But there's white fur all over the couch." The shadow of him fell across the boy's face. He twitched, hands moving to his scabbard, eyes widening as they focused. His metal-shrouded hands caught and knocked their heads together. He winced at the impact of bone on bone as the inspectors collapsed in a pile of breath and limbs. #emph[The headache you will share is not to be envied.] Their supervisor's voice floated down the hall. "Basani? What was that?" He slid to a position near the door. "Basani?" Footsteps thundered down the hall. Red and orange silks. Golden metal. Ivory linen. Before he'd even assembled the blur of colors into #emph[man] , the brass fingers had closed on his neck and lifted him off the floor. Old instincts. The man wheezed, fingers flailing at the instruments on his belt. He slapped the artifacts away with his free hand, wheeled the man around, slammed his back against the nearest wall. "Good afternoon." The man clawed at his throat, mouth working silently. "Apologies," he said, loosening his grip slightly. "These are not my usual hands." The man wheezed a moment, the stink of him increasing. "You smell of fear," he continued, cocking his head to the side. "Scared?" "Yes," the supervisor gasped, wide eyes searching the shadows of his hood. "Good," he rumbled. He let the man sweat for two breaths before asking, "Where is <NAME>?" "Custody. By now," he gawped like a fish pulled into the unbearable desert above its world. "Trap. She's renegade." He'd hoped she'd escaped, that they'd come here searching for her. But no; they had her, and came seeking something to justify it. "What manner of snare?" he said. "Was looking. For someone. Set word. We had. Them." Evasive. He lifted the supervisor another fist off the floor. "#emph[Who?] " "Renegade. Prime." The man shuddered in his grip, gagging, the thwarted need to cough overtaking him. Grandmother often spoke of Renegade Prime, but only by the false-name she affected. He'd met her but once. A woman of noble mien, with distant eyes and a spine made of such iron that it nearly hid the weights bending her shoulders. "Where is this trap?" The supervisor jerked his head side to side. "Don't—don't know!" "Too bad." His eyes widened, pupils swelling like black pits. "Going to. Kill me?" "I don't kill." He cuffed the man across the head with his free hand, knocking him insensate, and let him drop to the tiles. "Not anymore." He returned to Grandmother's terrace and carefully slid the potted orchids aside. If they sought to lure her, she'd have left the building of her own free will. That was something he could use. He closed his eyes and breathed. The air was a cacophony. He concentrated, tuning out the spices, the metals, the worried crowds, the omnipresent lightning-crack scent of aether-fumes that swirled through the city. There. Just a whisper from the street below; summer fruits, roses, hyacinth, and honey. The distinctive attar Grandmother wore. Nearly impossible to find anymore, she'd told him, with stubborn pride. Even fainter, the machine oil and hot brass of the mechanical bird that perched on her shoulder piece to sing coded messages. The back alley was clear, for the moment. No telling how long it would stay that way. He vaulted the rail, letting the air catch in Grandmother's cloak, and rolled the landing. The whisper-scent led toward the lowering sun. He moved quickly along the winding streets, nostrils flaring at every breath, doves and tailorbirds fluttering at his passage. It was a different kind of jungle, but he was a tracker. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #strong[Six Months Ago] The boy squeezed his eyes closed, placed his hands over his face, and counted. "Ichi, ni..." Giggles all around, and the floor bounced from the pounding of bodies scattering in all directions. He focused on the sounds, listening to the fall of bare feet on wood and reed. His ears were better than most. "...san, shi..." He was bad at the game. The littlest and slowest. But he only had to catch one. Just one, and that would be enough. Just one, and the others would laugh at #emph[them] instead. "...go, roku..." A splash? Sounded like someone was in the pond. That was #emph[cheating] . He couldn't go in the garden. Not like the others. When the rest spilled out to laugh in the sun, he had to sit on the porch and watch, dangling his heavy feet in the cool spring mists. "...shichi, hachi..." They had to make the rule just for him, when he was it. But he was the littlest and slowest. He was it an awful lot. "...kyu, #emph[ju!] " He opened his eyes to the bright library, sun shining warm and gold through the paper screens, falling on stacks of books and rustling piles of scrolls. "Ready or not, here's I come!" he hollered. The first thing he did was step through the sliding door to the porch, looking to the cheaty pond and squinting against the light. #figure(image("007_Release/01.jpg", width: 100%), caption: [Oboro, Palace in the Clouds | Art by <NAME>], supplement: none, numbering: none) Just a passing crane, raising its head from the water to gaze at his noise. The mist of the garden stirred and rolled in the wind. Wooden wind chimes tinkled and clicked from the roof, big-headed rain charms swaying. Pink blossom petals swirled around his toes. He turned and padded back into the house, scratching his side, trying to think about the foot noises. He was in the Sixth Library. It sounded like cousin Umeyo went to the #emph[Third] Library, but Ume was nice. She let him take tooth-stinging bites of her shaved ices, and rubbed his head before she went to bed. So she could have the Third Library, and he'd go anywhere else. Like maybe the Tenth Library, where big brother Hiroku usually went, because that was where his favoritest book was, the one about the field mices and the crows, and Hiro didn't care much about hide and seek anyways. He padded down the hall through slanting rays of gold, trying to be the quietest version of himself. A blast of wind flooded from the right, snapping the paper walls taut. The entry room! Someone must have opened the outside door. He spun and threw the sliding door open. "I #emph[gots] ya!" he yelled. The outside door was still closed. A pale giant stared down at him. One blue eye blinked. "You certainly do, small hunter," he rumbled. He should say hello now. They told him he should bow and say "Welcome to our house." What's your name. Can I announce you. Have you traveled far. Do you need slippers. The giant's feet were bigger than his whole entire head, and ended with claws the size of fingers. The giant crouched before him, and was still twice his height. He smelled of summer grass and strange trees. His blue eye was rimmed with red, like Hiroku's when he stayed up too late reading. Where the other eye should be was just a scar. "I don't think we've met," he said. His tooths were real pointy, and there were way too many of them. There were footsteps behind him, making the planks of the hall squeak, but he didn't take his eyes off the giant, because what if he turned back and the tooths had come closer? The giant's sky-colored eye looked him up and down. "You're shaking." "#emph[MISTER CAT!] " They both jumped at the yell from behind his ear. Big sister Rumiyo's voice. Feet pounded away down the hall. "Ma-#emph[maaaaa!] Mister Cat is back!" The giant smiled past his shoulder. "Rumi is as loud as ever." He pushed back a step and sat cross-legged, resting his wrists on his knees. He bowed his head. "No harm will come to you from these hands." He took a step back anyway. "Nashi?" He hadn't heard footsteps, because she was big and didn't touch the ground anymore, unless she wanted to. But he could feel the fall of her shadow in the hall, and darted behind her legs. "What is—ah. Welcome back to Kamigawa, my friend," she said. He poked his nose around the turquoise silk of her robe. The pale giant had uncurled from his sitting position and bowed with great respect. "It is good to see you again, Tamiyo." She turned from the giant to smile down at him, tucking one long ear over her shoulder. "This is Ajani. He's part of our story-circle." Her voice was like one of the porcelain vases, cool and shining. "Like Narset? He can walk behind the air too." Narset told stories that moved in long, rambling circles, and would sprawl on the roof to watch the clouds with him. She laughed at all of his jokes, and none of his words. Narset liked stories about dragons the best. Tamiyo laid a hand on his head. "Ajani, this is Nashi. He's part of our family now." The giant—Ajani—bowed again. "Honor to you." He stayed behind Tamiyo's legs, but bowed back, the way she'd taught him to. "And to y—" "#emph[MISTER CAT!] " an ivory blur whizzed past his nose. Ajani snapped around and #emph[just] managed to catch it in his massive arms. "Oof! Hello, Rumi." Her gap-toothed grin lit the room. "You been gone too long." Behind him, the planks of the hall thundered as siblings and cousins came running, jumping, skipping, and occasionally floating. Rumi reached up to ruffle Ajani's fur. "I bet you got #emph[stupendulous] stories!" "Ajani's back!" "Tell us about the dragon again!" "I want to hear about the hole in the world!" Moonfolk children swarmed around Ajani's legs, touching his pale fur, his vast and gleaming axe, the long white cloak he wore. Hiroku was the tallest, but only came up to the giant's chest. Rumi, still perched on his arm, looked down and scolded the others. Tamiyo clapped her hands twice. "Enough!" "...and #emph[that's] why you all gotta listen to me!—oh." Rumi's voice surfaced as the clamor died. "Ajani is a guest. It is impolite to make demands of him." Tamiyo clasped her hands at her stomach as he lowered Rumi to the floor. "He has travelled far to visit us. Rumi, tell your father to prepare a welcoming meal. The rest of you may help." "Well he can't leave before stories," Rumi said. She crossed her arms and stuck out her chin. "That's an #emph[ironclad rule] , mama. If you get to go have adventures, you gotta tell 'em when you get back." Tamiyo looked to Ajani, lips pressed into a stern line, eyes smiling. "She takes after her father." "Of course," the giant said, politely. He looked down at the crowd and placed a hand over his chest. "There will be no departure without a story." Everyone still grumbled as they trickled out. "Come on, Nashi." <NAME> took his hand in hers, lavender eyes huge and excited. "You can roll rice balls with me." "All right," he said, and let her pull him along. He took a last look over his shoulder as they pelted down the hall together. Tamiyo placed her hand on Ajani's arm. She wore a face he'd only ever seen her show Genku, late at night, when everyone was supposed to be asleep. "You've been away for months," she said, nearly below hearing. "Where is Elspeth?" The giant's neck bent like a willow in the rain. The brightness of his eye closed. "She's...not coming." Ume pulled him around the corner. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) The scent had led Ajani to still more inspectors. He perched on the edge of a gleaming brass tower as they milled below, carefully disassembling every piece of machinery they could find. Like ants, they swarmed at the edges of things far larger than themselves, carefully snipping off minute portions to carry off and place somewhere no one would ever look at them again. The miasma of a battle still floated up; the ever-present lightning-scent of aether and the grit of burnt metal. A slight pressure settled against the back of his cloak, just hard enough for him to know it as the point of a blade. "You lost, then?" A musical female voice, faintly amused. Remarkable. He hadn't heard or smelled a thing. Whoever she was, she was no amateur stalker. He shifted his weight, slowly, slightly— "Planning to jump?" The blade tip poke-poked him playfully. "Easier ways to die, you want my thoughts on it. If you dance among the aether-streams, you'll only curl your hair." He relaxed. It was a phrase Grandmother's friends used to identify each other, a veiled reference to the heraldry used by the Consuls. She'd told him the proper response. "Better to kick off your shoes," he rumbled, "and let it curl your toes." A reference to the renegade's inversion of the symbol. "Ah, excellent!" the blade pulled away. "Begging your pardon, friend. You can see we've had a poor day of it." He was about to turn when an elf plopped down beside him, dangling her legs over the edge of the roof. She looked to be in her late teens, but an elf could have such an appearance and still be far older than him. Her garb was a haze of dark violets and greys, adorned with a tremendously excessive number of pouches and belts. Dark metal bands contained a cascade of sable braids that probably fell to her waist when unbound. She smelled of almonds, strong black chai, and sweat. "Quite the show, isn't it?" she peered down at the Inspectors, kicking her feet back and forth like a restless child. A half-dozen tiny metal insects clung to the shoulders of her cloak; brass butterflies fanning silk wings in a cunning imitation of life; spiders of dark-tempered steel that sat perfectly still save for their restless eyes. Living blooms, violet and indigo, pushed out from between their metal ribs. "What do they seek?" he asked. "Who's to say?" the elf said, carelessly. "Booby traps, mayhaps?" She trilled a songbird laugh. "#emph[That] would be a lark, wouldn't it just? All this time, looking for something not a one of us would ever use?" She turned merry silver-gray eyes to him. "You can call me 'Shadowblade,' by the by. With a Y in the 'blade.'" "#emph[Shadowblayde?] " he echoed, incredulously. She beamed. "Isn't it just a marvelous codename?" "I...can see you like it," he said, diplomatically. Grandmother had mentioned a talented young lifecrafter, one of the city-dwelling Vahadar elves. A prodigy, she said, whose mechanical insects snared and dismantled the Consuls' surveillance thopters. But when he'd asked the prodigy's name, Grandmother had only rolled her eyes. "Came up with it myself, don't you know. I think it sounds #emph[terribly] dashing." She peered into the shadows of his cloak, and he quickly turned away, tugging the cowl down with his brass hands. "Ah, a man of mystery, eh?" she nudged her elbow into his side. "Brilliant gimmick." He cleared his throat. "Where is Grandmother?" Her smile faded. After a moment, she spoke again, and her voice was quieter—#emph[older] . "Can't say as I know. I came here looking for Renegade Prime. She was overdue." One hand went to her mouth, and she nibbled an already quick-bitten nail. "If she was here, I think...the Consuls may have snatched them." "You're right. I asked an inspector occupying her home." One of her eyebrows floated skyward. "You #emph[asked] ?" "Persuasion was needed," he said, pulling one of the metal gauntlets into a fist. "I was hoping to see where Grandmother had been taken from here. The inspectors have confused the trail." "Hum, hum, hum," Shadowblayde said, thoughtfully. He blinked. She'd actually #emph[said] the words? "There's a renegade safe house nearabouts. Anyone who made it out of this afternoon's mess were probably bundled away there. Let's go ask around." He inclined his head. "I would be grateful." She jumped to her feet and brushed off the back of her pants. "Can you keep up if I jump along rooftops and suchlike?" Her voice had brightened again, her worry a high cloud swiftly passing the face of the sun. Under the hood, he smiled. "Try me." "Brilliant." She turned to one of the mechanical butterflies on her shoulder, and whistled six notes. To another ear, it might have sounded like a bird call. The metal insect fluttered off and away, following a looping and erratic course over the milling Inspectors. "Just to keep an eye on things here," she winked. "Let's go." And she bolted like an elk, leaping gracefully to the next roof. By the time he was on his feet, she'd bounced two buildings away and was unsuccessfully stifling giggles. He squinted at the gaps, carefully. With one eye, judging long distances was a matter of intuition, inference, and experience. He got a running start, pushed off, and landed beside her. Her moonlight eyes curved upward in a smile. "Strong legs, I see." She led him across sun-scalded rooftops, under lines of drying linen, around chimneys, up piles of debris and crumbling stairs, and over streets choked with a thousand milling lives. It was a roundabout path, spiraling outward and back again. Good. That meant she didn't fully trust him; anyone without his memory and sense of place wouldn't have been able to find their destination again. They descended into the shadows of an apartment complex, its roof a splinted hole, its top story a shimmering lake of shallow, brackish water. The walls downstairs were stained with black and green columns of slowly consuming life. The aether-lights along the stairwells were dark and cold. His eye had no trouble with the gloom, but Shadowblayde produced a glowing blue stick from one of her many pockets. "I didn't know such places existed," he murmured into the funeral silence. "From above, all of Ghirapur seems to shine." "Harrumph," she said, grumpily. She'd actually said #emph[harrumph] . "Do you read a great deal?" he asked. She glanced at him in puzzlement. "Bit too much, my mum used to say. Why?" "No reason." Their path was blocked by a door, held shut by a complicated, humming artifact. "Six months ago, this whole block still had power." Shadowblayde paused, eyes fluttering closed, and rapidly mimed a series of motions in midair before applying them to the mechanism's controls. The hum quieted and the door sagged open. "Then the Consulate decided it was an 'under-utilized neighborhood.' They cut off the aether to power Inventor's Fair construction." Her mouth twisted as she closed the door behind them. "Funny how all the 'under-utilized neighborhoods' just #emph[happen] to be the ones renegades live in. But they #emph[swear] they'll pipe it back down at the end of the month," she rolled her eyes. He smelled the fear and stress before he heard the murmur of conversation. When they passed around the corner, the sound stilled. "Just me," Shadowblayde waved. "Anyone seen <NAME> today? We think she was with Renegade Prime." An vedalken boy appeared from nowhere and attached himself to Shadowblayde's arm. "Va—!" he began. "#emph[Shadowblayde!] " the elf hissed. The vedalken backed up a step, eyes flickering between the elf and her cloaked companion. "Um, yes. <NAME>. I mean, Shadow. #emph[Ma'am] . I'm...glad you're all right." His young eyes glistened with dewy admiration. The elf puffed up, and balled her fists on her hips. "No bumble-thumb Consulate inspector could nick the wily Shadowblayde!" she declared. "Excuse me?" a human woman in a singed gold and azure robe stood, wincing when she put weight on her left leg. She had a magnificent mane or hair—not flat and trailing, not tied up in knots. It rose tall and proud. "I was with Renegade Prime. We separated, but I was on my way to meet her when..." She trailed off, agitated, smelling of bitter exhaustion and acrid fear. He stepped toward her, lowering his shoulders and stooping. "Please. Can you tell me what you saw, Miss..?" "Tamni," she said. "I, uh...when I got there, the Consulate had her surrounded. One of them had her by the arm. He had a false limb. Not an attachment, a replacement." She frowned, eyes looking into the distance of memory. "Only three fingers. Dark metal. Lit violet instead of aetherblue. It looked...primitive." In the shadows of his hood, where none could see, his jaw tightened. "And <NAME>?" Tamni swallowed. "She was there too, off to one side. And three other women I don't know. One had red hair, one dressed in black, another in green. The inspectors took Pia—took Renegade Prime away. The strangers argued for a minute, then the one in black left. Pashiri led the other two away. Toward Kujar." Kujar. A wealthy neighborhood, wide and green, home to many of the Consuls themselves. Difficult to enter, heavily patrolled. His presence would be questioned. Tamni's eyes spilled. "I just...I just #emph[watched] ." She spat the words on her own feet. "Are you a warrior?" he asked. "A war—no! No, I...I just build things." She stared at her singed and shopworn fingers. He considered laying a hand on her shoulder, in support. But no—he did not know her well enough to presume such familiarity. "To charge rashly into battle, unprepared, is not courage. It is foolishness. It yields only greater death." He kept his voice low, but firm. "This is knowledge hard-earned. Please trust it." "I should have done...#emph[something] ," she whispered, wiping her eyes with the back of a hand. "You witnessed. You told her story. Now others know what they must do." He bowed to her. "Thank you for this." Tamni said nothing, and turned swiftly away to the shadows. "That's a bother, isn't it?" Shadowblayde said. "Kujar's all spread-out, like. Big lawns and trees and such. Lots of walls and guards. And you stick out, friend, even though you slouch all the time." She turned to the vedalken boy. "Dayal! Gather the troops." His grin was blinding. "Right away, <NAME>!" "What are you doing?" he asked. "I'm the best lifecrafter you'll ever meet," she said, cheerfully. "But I'm not the #emph[only] lifecrafter." Dayal scurried through the room, picking out people with mechanical beasts perched on them, or sitting close at hand. "I've got my insects. Others have birds, rats, cats, snakes, frogs, and even some little yap-yap dogs. There's only one giant you. But there's thousands of little creations like ours in Ghirapur." He'd not planned to bring anyone else into these troubles. "I can follow her trail myself." The elf laughed. "No doubt. But #emph[we] can find her faster. What's the saying? Many eyes make quick search, or some such? And don't worry," she chirped, wrapping her arm around his, "I shall venture beside you. Steer you clear of trouble, like. Er..." she paused, and squeezed his bicep. "If we have to punch down any doors, I suppose I'll leave that to you, then." The space before them filled with young people bearing brass and greenwood marvels that strutted and ticked. None of her friends seemed to be over twenty. "How do you know <NAME>, anyway?" Shadowblayde asked. He considered. How much to say? "She's helping me find a man. Dangerous on his own. Possibly working with someone even more dangerous." "Man of mysteriouser!" she laughed. "Let's be off, then." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #strong[Six Months Ago] Nashi wriggled under the planks, hips scraping floor joists. He'd found a gap in the wall in his bedroom, hidden behind the trunk they stored his clothes in. His siblings and cousins couldn't fit, and if Tamiyo and Genku knew of it, they said nothing. From there, he could scrabble quietly between the lower floors of the great library, peering out through knotholes, breathing and listening, feeling wood press close and safe on all sides. No one could see him in this personal darkness. Sometimes he'd spend hours in there, bringing toys and books in with him, listening as the other children pounded around searching for him. Sometimes it was all right to be the littlest and slowest. He slithered toward the dining room, where Tamiyo and Genku sat with the giant. The smells of the food were weird. Not just the dry browns and sharp greens they normally ate. There were also greasy reds, with dust-black traces. It curdled in his chest, made the back of his throat jump forward, though he couldn't guess why. He pinched his nose, breathed through his mouth, and moved on. There was a knothole in the corner that let him look down across the whole entire room. Tamiyo sat on her usual cushion at the head of the low table, with Genku at her right hand. The giant—Ajani—loomed over the far end, picking politely at a plate covered with marbled brown cubes. #emph[Meat] . He remembered meat. It made him sick now. Genku rose and bowed to Ajani. "There are matters I must attend to. If you will excuse me?" The giant blinked. "Oh. Of course. Please." Genku leaned to kiss Tamiyo on the forehead. She smiled and closed her eyes, laying her head briefly against his chest, their arms and fingers twining like ivy. "Take care of your business," he said. "I'll keep the children busy." "Thank you," she said. "I'm sure they've already tired my parents." Genku gathered their plates and left, sliding the door closed with a foot. The giant sat uncomfortably. The wind chimes toned and clinked. In the corner of the room nearest him, the ceramic charcoal stove still smoldered. But when Nashi looked at it, his heart beat too fast and his fingers dug into the wood, so he watched Tamiyo watching Ajani instead. The violet sigils on her forehead were tight-coiled with worry. When Genku's footsteps had faded, she spoke. "You went to Theros seeking Elspeth. Did you find her?" "Yes." Ajani looked like would say more, but then didn't. Instead he looked around the room, and gestured toward a pile of luggage with a thick journal on top. "Have I come at a bad time? It seems you're preparing for a journey." "Do you know the plane of Innistrad?" she asked. The giant shook his head. "I spent some months there last year, studying the moon. It's #emph[fascinating] ." She leaned forward, eyes wide and shining. "All the magic of the plane bends toward it, is patterned by its cycles. Even many of the native creatures..." She paused and fiddled with the cuff of her sleeve. "The last time I checked in with Jenrik—a local I work with—he reported anomalous observations. Changes in the patterns of mana, the run of tides. I'd like to observe the effects on the native life." "I see." He laid his massive hands on the table and stared at them. "Ajani," she said, "if you will not speak to me, why have you come?" The giant breathed slowly, massive weights moving behind his face. "I... I did not see Nashi last time I visited. He's not like his siblings." Tamiyo sighed, the way she did when she and Genku were arguing, and he tried to leave her to her books. "Nashi is a nezumi. One of the rat-folk of the swamps." Nashi squirmed in ceiling, wanting to listen, dreading to hear. Tamiyo said, "Some years ago his village was burned by Planeswalkers." The breath stopped in his throat. "Burned? But why?" The charcoal stove breathed beside the giant, monstrously. "I don't know. Not precisely. It was at the behest of a planeswalking criminal named Tezzeret. He wanted them to bend their necks. To serve his consortium." The glowing charcoal spit red-gold light across the floor, dancing and flaring and eating and growing and darkening everything that wasn't it. He scratched at the spot on his side where the fur came in patchy. Where the skin stayed red and jagged. He had to go. "Tezzeret? I've heard of this man. Elspeth...she met him on Mirrodin." He had to go #emph[now] . He closed his eyes. Pushed away from the knothole. Shuffled backward in the dark. He rolled on his side, certain the hammering of his heart on the ceiling would be heard.#emph[ Bang, bang, bang, bang—] "He worked with her enemies. That was...two years ago?" #emph[Night and stars. Heat and pain in rolling waves. The roof's on fire! Take the boy! Get out!] #emph[The huts are ablaze. Everything is hot and bright, a yellow like sick. Mama lifts him. Runs. Where's papa? Stop, where's papa? Can't leave papa!] #emph[A crash. Mama stomps to a halt. He peers over her arms. The huts have collapsed. The way out is blocked. There's fire behind them. It rises up on two legs, bellowing at the stars. Roofs burst into flame as it stalks through the lane, trailing sparks.] #figure(image("007_Release/02.jpg", width: 100%), caption: [Fire Elemental | Art by Slawomir Maniak], supplement: none, numbering: none) "Two years? Impossible, Ajani. Tezzeret died...three years ago, I think? Betrayed by his comrades. Nashi's village, those that survived, they killed him. A dragon bargained for the corpse." "...a #emph[dragon?] " #emph[You're going to run and not look back. Mama's fur smokes around the words. No matter what you hear, you run.] #emph[She wraps her arms around him and leaps through the flames. Pushes him on. Staggers. Go! Run!] #emph[He runs. His skin cracks at every painful step. He wants to lie down, dig into the earth. Mud is cool. It will be all right if he can bury himself.] #emph[A scream. He looks back--] #emph[Mama's on fire, held aloft by a man of living flame. She's shrieking, twisting in the air--] #emph[She smells like burning meat.] He sobbed. Just once. He couldn't help it. The conversation fell silent. He put his hands over his eyes and curled in on himself, shuddering in the secret dark. A shuffling of silk below. Tamiyo's quiet voice, just outside his hidey spot; "Please come out, Nashi." She pushed up on a panel of the tiled ceiling, opening a space for him. He should run. Hide. Go to the smallest, farthest corner of the tunnels until he wasn't the littlest and the slowest anymore, and no one would make him be it for hide and seek, and no one would laugh, and no one would poke at his patchy fur and lumpy skin, and say he was just a mangy freak. The moonfolk lady murmured into the tunnel, a voice just for him. "Do you remember what I told you? You can come sit with me if you want." He tumbled into her arms and buried his face against her chest. The world swayed as she moved and sat, settling him into her lap. Warm arms wrapped around him. He bit his lip and tried to keep still. The giant was out there. He was tall and strong and had big tooths and probably never had to— She tucked her chin over his head and began to rock him. "It's all right to let it out now. I have you." The tears came hot and fast, and they wouldn't stop. "Actions have consequences," Tamiyo told Ajani. "Sometimes people like us...forget how big our feet are." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) A mechanical tailorbird, an uncanny simulation of life, swayed down on the greasy smoke from a food cart. The core of it was mossy wood, dotted with flowers; the frame white-gold metal; the wings brightly-dyed silk. It fluttered, extended cunning brass legs, and delicately alighted on Ajani's broad shoulder. He looked at the little round creature in puzzlement as it peeped up at him in regular, staccato rhythms, as Grandmother's brass bird did. "Is this...speech?" "Mm?" Shadowblayde's moonlight eyes turned up to him, her cheeks bulging with roasted poultry. "#emph[MM! MMF!] " she pointed at the bird with her stripped kebob stick and swallowed some of what she was chewing. "Mihir!" she said around the rest. She swallowed again with effort, pounded her chest, and dropped the stick into a bucket of other empties by the cart she'd bought it from. Although "bought" might be stretching the definition of the word. The owner of the cart, a venerable and inscrutable elf, had watched with a twinkle in his eye as one of Shadowblayde's mechanical spiders fished a coin from the purse of a passing Consulate inspector, and deposited it in his hand with a stiff and ticking bow. They were on the edges of Kujar, in a bustling marketplace that divided it from a less attractive neighborhood. A place, Shadowblayde said, where people came to slum or to hobnob, depending on what side they entered from. She seemed endlessly fascinated by the passing crowds, pointing out people she knew and telling him a hundred charming and forgettable stories about the history of the street. He had a pounding headache. The musical device installed on the opposite side of the square had been piping and blapping madly since they arrived, its lights throwing lurid colors across the cobblestone. The tinny high notes and gut-quivering bass hurt his ears. #figure(image("007_Release/03.jpg", width: 100%), caption: [Panharmonicon | Art by Volkan Baga], supplement: none, numbering: none) "That's one of Mihir's birds. The codes we all came up with together. Brilliant, yes?" Shadowblayde grinned, teeth bright against her dark skin. "Pashiri was spotted twenty minutes ago. The #emph[Dhund.] " "Good," he said, trying not to yell over the din. "What's the Dhund?" "You know Gonti's night market?" He nodded. An open secret; a sprawling illegal exchange, run in the shell of an old energy plant—a relic of the time before aether. Inventions of questionable safety and dubious morality could be had there, for the right price or the proper favors. "The Dhund is a headquarters the Consuls built under and through Gonti's market. A maze of tunnels and rooms pieced together. Ducts and sewers and suchlike. They run their spies out of it, and keep important prisoners there. All terribly #emph[secret] , you understand," she winked. A guild of law operating in sewers, hidden under the feet of disrespectable citizens. Everything in this world was upside down. He looked toward the sunset. "I know how to get to the night market from here. How can I find a way into the Dhund?" Shadowblayde looked offended. "I show you to a door. We know a few of them. Won't be a problem." He shook his head. "You're not coming." Her mouth collapsed in a flat line, brows collapsing. "You are #emph[not] going to—!" "#emph[Shadowblayde] ," he interrupted, "this was a trap set for Grandmother. It will be harder to get out than in. Help from the outside will be needed. Can you find us a means of escape? Something fast. Secret." She inhaled sharply, eyes darting over the bricks of the wall nearby, not truly seeing them. "Thopter," she said, looking up. "The Consulate's are all mass produced. Same strengths, but the same weaknesses. Renegade Prime showed me how to steal one." He regarded her critically. "Did she teach you to #emph[fly] one?" "Let's say mostly?" "Mostly will do." "Here," she said, and poked the mechanical bird on his shoulder. She whistled and chirped a long series of notes that sounded like two birds arguing. It flapped its wings and returned a cheerful peep. "He's yours now. When you're close to a Dhund entrance, he'll fly to it." "Thank you." He turned to go, but her hand fell on his shoulder. "You're a friend of <NAME>. She wouldn't have told you our code words if you weren't. Now you're stepping into the Consuls' jaws for her." She put her chin in the air, and one fist on her hip. "I say you're a renegade now. Anyone who says otherwise has to quicksmith me. But you never told me your code name. Terribly rude, you ask me." She folded her arms across her chest and tapped her foot crossly. He blinked at her, at a loss. "I don't have...Some have called me 'White Cat?'" Shadowblayde gave him a critical look. "That's not even a #emph[bit] dashing. Why'd they call you that?" He paused. The idea was foolish. But the elf had helped him, trusted him, and never asked a thing in turn. He pulled back his hood. Her moonlight eyes grew wide as saucers. He could see his every feature reflected in them; the white fur, the blue eye and the lost one, the whiskers and broad nose. Then she smiled. "A pity to keep such a noble face hidden." He bowed to her; not as they did in Kaladesh, but as they did in the Naya of his youth. These people were kind, but so very strange. "I place myself in your hands, Shadowblayde." He pulled the hood back over his head. "Vatti." He turned back to her. "Pardon?" She gave him a lopsided grin. "That's my #emph[mundane] name. Vatti. You gave #emph[me] a secret. Only fair. Now keep that bird in one piece. Mihir will be expecting it back, and I shouldn't want to owe him." She turned and scurried up a drain pipe. He turned and inspected the nearest wall, flexing his hands within the brass gauntlets. Window sill. Loose bricks. Rain gutter. Across the dim blue aether tube connecting to the next building. The path was clear to his eye, as clear as a snapped fern, as a riverbank footprint. He hurled himself upward, springing on the tips of his feet, sure metal fingers clamping into brick-gaps, locking around wrought iron. The mechanical bird uttered a soft #emph[squark] and took a tighter hold of his shoulder. He raced across the aether tube, the smoke of the old elf's kebobs curling and churning from his passage. Then there was wind. The scents of the city pressed into his nose. Shadow-cools and daystruck-heats flickered over and past. His motion became thoughtless, instinctual. He dodged around a chimney, or perhaps a tree. The spaces he passed through were a blur of brass and white marble. He didn't know them. He didn't have to. He leapt across an alley, or perhaps a chasm. He knew how to run. The heat in his legs, the sharpness in his lungs, the sun on his shoulders—these were old friends. A long youth of racing across plain and through jungle, swift and silent as heat lightning. He slammed on to the back of a great bird—or perhaps a thopter—and used it to leap up to a higher cliff, or perhaps a roof. The mechanical bird uttered a short, soft #emph[perp] . He jogged to a halt, breathing deep and even. "Where?" he asked on the exhale. It spread silk wings and fluttered away. They had come to the edge of the night market, the smells of the city fading to grease, aether, rust, and papers too long idle in a basement. Beyond the nearest row of buildings, the jumbled, muggy roar of a crowd resounded. The bird perched on a pile of splintered, oil-stained timbers, turning its head this way and that. It #emph[perp] ed again. Behind the lumber, a door. It was sealed with a locking device, not dissimilar to the one on the renegade haven. He leapt down, sending up a cloud of sun-parched dirt. The mechanical creature peeped to him—not like a bird, but in the code-speech it had used before. It fluttered before the lock, tiny wings blurred and snapping, and used its slim beak to press a series of blocks on its surface. The faint hum of aether charge faded, and the door sagged open. "Thank you," he murmured to the bird. It peeped again, and darted away. He pushed into the cool shadows. A figure in crimson slid away from the wall, sunlight shining white on the edge of a blade. "Where do you think—" Within the gauntlets, his hands curled into paws. He backhanded the guard into the wall and winced at the sudden scent of blood. "Sorry," he muttered to the unconscious body. He pressed deeper into the blue-lit tunnels, away from the guard, nose flaring. He pulled back the hood of Grandmother's cloak and let his ears turn this way and that, listening for footsteps. The Dhund was filled with unpleasant scents. Heavy old sweat, cloying urine, too many people confined in too small a space. It reeked of despair and the disappeared. Of teeth in the dark. There. Faintly, from a tunnel to the left. Summer fruits, roses, hyacinth, and honey. He hurtled through the tunnels, chasing the scent of her sun-drenched parlor, slipping around pockets of footsteps and muttering. An open space ahead. The blue-white light of afternoon sun. He glided to a halt, listening, tasting the air. Murmurs, bent and shattered by too many echoes to be understood. The deep keening of metal and an unfamiliar hiss. Boots on stone. A muffled pounding. He moved in cautiously. The room was made of circles. Brass rings stretched from floor to vaulted ceiling, connected by sweeping arcs of catwalks. Oval windows just under the eaves let light in from high overhead. The room smelled of Grandmother, but she wasn't there. Near the center of the room, two guards in crimson and gold scrupulously ignored some manner of...box. Squat dark metal, huffing and whispering unpleasantly to itself. There was a scent he didn't recognize, a bilious sweetness that coated the back of his tongue. He could see a door on one end, with a small inset window. A fist struck the glass. Then a hand, weakly. He couldn't see the faces from here. He didn't need to. The hand slid downward. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) #strong[Five Months Ago] They'd closed most of the doors. The clouds were towering and gray, a pile of soaked cotton bearing the scent of rain. Ajani had laid his possessions out on the floor. White cloak, bronze armor, his enormous weapon. Nashi peered at it all from the doorway as the giant carefully rolled his futon for the third time. Every day it took him several tries; his hands were too large, the movements still strange to him. Ume and Hiro had offered to help. Rumi had thrown up her hands and skipped out into the back garden. She was cartwheeling through the mist in exactly the way Tamiyo had told her not to, her robe a sodden mess, pearls of water dripping from her nose and ears as she laughed. Tamiyo had left last week, telling them to take care of Ajani while she watched somebody else's moon. Still the giant knelt, patiently folding, tying, rolling. "You can come in if you wish, Nashi," he said. He slid across the room, toward the giant's axe. It was strange, dark on one end and light on the other. He wondered if that meant something. Gingerly, he pressed one finger against the edge of the shining blade. It seemed thick. Harmless. The giant looked up. "Shouldn't it be sharper?" Nashi asked. "It doesn't need to be. #emph[Speed] makes it cut. #emph[Weight] ." He pressed harder. "Be careful. It's not #emph[completely] dull." The giant picked up the rolled futon and put it in the closet. He sat back and looked at the face carved into the flat of the blade, a cat-face with bared teeths and a long thin beard. "You're leaving, aren't ya?" "Yes," he said. "Where ya going?" The giant studied him. "To find the man who killed your family. Our friends found him in a place called Kaladesh. Someone's given him money and secrets. He used them to buy his way into power." Nashi scratched his side, where the fur grew funny. "I seen him, you know. When the shamans kilt him? We was all in the woods. Watching." The giant sighed. "They shouldn't have made you watch." He blinked. "They said it was impro-tent." "Important?" Ajani began strapping on the plates of his armor. "Yeah. Because he done wrong by us. We hadda see it done right. It was about honor, so we hadda see. Thass what they said." The sky rumbled. He rubbed his nose. "He had a weird arm. Another man cut it off. When that man talked, it didn't make sense, and my head hurt." The giant hefted his weapon, and slid it into the straps across his back. The edge of the dark blade glittered coldly. "Are you gonna kill him?" Nashi said. The wind kicked up, making the porch chimes clatter and clack. "I...don't know." The giant looked out to the terrace, his hand falling on the white cloak. The whole world smelled of suspended water, aching to fall. "Maybe that's the right path after all. There are too many who don't watch where they walk." Ajani picked up the white cloak in both hands. There were faded patches on it, off color, pink like cherry blossom petals. He pulled it to his face and breathed in, deeply. #figure(image("007_Release/04.jpg", width: 100%), caption: [Art by Volta Creation], supplement: none, numbering: none) "Does that make you sad?" Nashi asked. "What? No." The giant blinked and straightened, brushing under his eye with a thumb. "This belonged to a friend. Elspeth. It's a reminder of her." "Where is she?" "She's..." the giant ran his hand over the fabric. His eye was like the sky, Nashi noticed. The blue had gone gray, clouded over. "...I lost her." Oh. "Like I lost my parents, you mean." The giant closed his one great, bright eye. "Yes." Nashi swallowed and looked out at the towering clouds. "She's dead." A tremor went through the giant. "Yes," he said, softly. Hot glass wound away from his scar. "Elspeth is dead." The sky rumbled. Rumi was yelling about something in the back garden. He tried to remember what the shamans told him when mama and papa died, but couldn't remember much. Everything had felt like the garden fog back then, numb and cold and close. He'd watched the man who'd done it coughing up blood and silt, and felt nothing. Sick, maybe. He'd felt nothing for a long time. Mad, sometimes. Like when people said he had to call them mom or dad. There were a lot of people like that. He didn't remember much of them. Until the moonfolk lady had come from the library, to ask for his story and tell her own in trade. "Call me Tamiyo," she'd said. "Nothing more." The wind swirled the flower petals on the porch. He stuck out his foot and pinned one under his toe. "Tamiyo says when you lose someone, it's like getting hurt. I mean, like when you fall down and get hurt? When you scrape your knee, it's gotta bleed ta get better. And she said that tears are how your heart bleeds. You gotta let them out so's ya get better." The giant's jaw rippled. "Tamiyo is wise." "When I get sad, she sits with me. Maybe I can sit with you?" "I think I would like that." The giant curled his legs under him at the edge of the porch, where the library ended and the sky began. He laid his axe on the wood beside him. Nashi sat on the other side, dangling his feet in the clouds. The blue of the sky was almost all gone now. The distance muttered. He rested his head against Ajani's shoulder. His arms were as big as tree trunks. "You wanna maybe tell me about your friend?" The giant said nothing. "You don't have to." The rainclouds flashed and grumbled. He spread his whiskers into the wind. "She was born in a place of darkness," the giant said. "She never spoke of it much. A land devoured by evil, ruled by monstrous creatures. The kind that #emph[don't] kill. The kind that make you their own. They hurt her until she was part of the way they hurt others. She held on, cried, and dreamed. Until the day they came for her. She was in their claws when she wished herself away." "She could walk behind the air," Nashi said. "Like you and Tamiyo." The giant nodded. "She woke in a different land. It was brighter, with a sky full of stars that scampered and twirled with color. But she was very young, and that world is...not as kind as it could be to the different. She walked on, until she came to a place where the sun was warm gold and the people were kind. They gave her bread, wrapped her in blankets, and held her until the shaking passed. She stayed there many years. They taught her to protect herself, then to protect others, and then to heal those who hadn't been protected." A pale hand laid itself on the giant's other arm. Hiroku had entered silently, as was his way, and looked out at the piling clouds. "I met her then, for the first time, as the world was changing. She saved my life. It was my world too, in a way, and we fought together to save it. But the land that had become her home was scarred and sickened by the battle, and all she could see was what had been. She walked on, until she'd forgotten the best version of herself..." The giant trailed off, his one eye searching for the horizon. The distance had gone away into mist, gray and formless. "She was sought out. By me and by others. The monsters of her childhood had returned. They had left their own bleak realm. Another world was being turned, a place shining clean, cool, and fine. She went to fight them." Ajani paused. He looked to the axe lying beside him on the wood. "I can't imagine," he said, "facing the nightmares of your childhood. Seeing them with eyes grown and knowing they're real after all. Real, and hungry. She walked into their teeth with a trembling heart and steady hands. She fought until there was nothing left to give, no reason left to fight, for everything in that shining land had been stained black. The monsters won. And she ran from them again." <NAME> knelt gracefully, in a rustle of silk, folding herself like an origami swan. She laid a hand on the giant's knee, lavender eyes bright with sympathetic stars. "She returned to the land of colored skies. That was where we met again. In that land, she'd become a renowned hero and an infamous villain, bearer of a weapon crafted by—by those who hold themselves our betters." A shadow crossed the giant's brow, there and gone. "Something had happened. Something had broken within her. She never spoke of it, but you could see it pull at her heels. She walked as if into a wind, shoulders bent, eyes never entirely forward. "That land was nearing an end. For its so-called masters, we journeyed to the end of the world, and stepped among the stars. We fought a monster, and won. And as thanks—" he clenched his hands on his knees, the great black claws digging in. "As thanks, another monster struck her down. Right—right in front of me. And I could do nothing. #emph[Nothing] ." Behind them, Rumi sniffled. She stood in her garden-soaked robe, looking embarrassed, fiddling with one of her ears. She swayed on the sides of her feet, looking at the door, and escape. "Dummy," she breathed at herself, or maybe he imaged it, and abruptly draped herself over the giant's broad shoulders, squeezing his neck tight, burying her nose in his pale fur. Ajani did not look up, but laid one of his great hands over her small and slender ones. "I went among the people," he said. "I told them her story, as I'd witnessed it. They had to know. They had to remember. It had to #emph[matter] . I walked and spoke, and did not rest until the words had taken root, and were growing on their own. It was important. And it meant...I didn't have to think." They were all around him now, listening to the story in silence. <NAME>. Big brother Hiro, big sister Rumi. The sky flashed and quartered, cracked. "In the stories my people tell—the #emph[old] ones, the ones that #emph[matter] —the hero loses her mentor. She lives, grieves, and moves on to save the world." The clouds rumbled. Poofy-headed rain charms spun and danced on their strings. Nashi didn't know what Tamiyo would say, so he said nothing. Sometimes Tamiyo said nothing, and that was the right thing. At last, Ajani whispered, "It should have been me. Not her." His big hands were shaking. The sharp hidden claws, the long tooths, the arms like tree trunks. "My hero is dead," said, hoarsely. "And all she wanted, all she fought so hard for...was just a #emph[home] . The simplest thing. The #emph[smallest] ." Nashi put his arms around the giant, but couldn't reach even halfway. "It's all right to let it out," he said. "We all got you." Ajani's shoulders bent and shuddered. He covered his eyes with one hand. The rain began to fall. The children sat with him, around him, a forest of hands on his shoulders and arms and back and knees. Saying nothing. Just breathing. It rained for a very long time. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) A fist stuck the glass. Then a hand, weakly. He couldn't see the faces from here. He didn't need to. The hand slid downward. They were #emph[killing] them. #emph[How] Doing it #emph[slowly] . #emph[Dare] Letting them #emph[suffer] . #emph[They] Ajani vaulted over the rail, teeth bared. Grandmother's gift-cloak slid from his shoulders in flight, revealing the white beneath. He flicked controls within the false hands. They unclasped and fell away. He slid through the air like summer lightning, bright and silent. It was like the axe had never left his paws. He ran on the balls of his feet, an endless fall forward. Somewhere behind him, the gauntlets clattered to the floor. A man stared up at him in horror. Dark hair. Thin moustache. Brown eyes. A wave of stinking, soaking fear rolled off him. Ajani swung for the throat. #emph[Sometimes people like us...forget how big our feet are.] Old magic welled up, streaking along his spine. As it had with Tenoch, so many moons ago; in a life so far removed, it now seemed like the tale of another man. The guard's eyes gaped, black pits of fear, and Ajani vaulted through them, seeking the titanic light that lay beyond. For an endless instant, he held the shining palace of the man's soul in the palm of a hand, and took its measure. #emph[A youth spent feeling out of place, seeing gray where others saw brilliant color. The sighs of a disappointed father; "Just not an inventor, I suppose." A life of standing in the background for others, waiting for something to happen. Love for a wife with a long braid and fingers perpetually lightning-burnt. An infant that peals with laughter when he makes faces. Mornings off, waking with the sun, he fills a cramped kitchen with the scents of bread and spice.] A snowflake with a billion glittering facets. Here and there, buried in shame-deep crevasses, there were twisted shapes, yes, dark moments...slicknesses that wouldn't wash away with a lifetime of scrubbing. But far fewer than Ajani's own soul. Not a Planeswalker. Not a villain. Just a man. Ajani slid his foot, changing the angle of his axe-blade's fall. It smashed across the guard's chestplate, scattering twisted metal shards across the marble floor. He tumbled to the ground, spinning from the force of the blow. #figure(image("007_Release/05.jpg", width: 100%), caption: [Impeccable Timing | Art by <NAME>], supplement: none, numbering: none) No blood. The other guard stumbled back, nervous fingers rattling his sword free of the scabbard. Whirling around, Ajani gave him a long, one-eyed glare, letting his axe's dark blade come to rest on the marble with a modest #emph[clink] . The man dropped his sword and scrambled for the door. He'd sound the alarm. There wasn't much time. Ajani glanced at the controls for the container. Levers and dials, spinny bits and blinking lights. It made no sense to him. No matter. He slammed the bright blade of his axe into the gap between the door and the container. With a grunt, he leaned into it, and #emph[pressed] . Breath by breath, step by step, arms and legs rigid and quivering with effort, he peeled the screeching machine open. The door fell off its hinges with a reverberating crash, a rush of green smoke rolling skyward. An emerald-eyed elf sat cross-legged before him, cradling an unconscious red-haired girl across her lap. "<NAME>?" he asked her. The elf nodded over her shoulder, "There." She lifted the red-haired girl like she weighed nothing, and stood aside to let him enter. Her eyes slid away from his. "I...did what I could." Grandmother lay eyes closed and barely breathing. But her expression was peaceful, her hands clasped at her stomach. Like any other afternoon he'd found her napping on the parlor couch. The rest of a life well-lived. When he ducked out of the chamber with her, the red-haired girl was stirring in the elf's arms. She coughed weakly and blinked. "Nissa," she croaked. "Lemme down?" He laid <NAME> carefully on the marble floor, silver braids spilling around her. He laid one hand on her stomach, and closed his eyes. Brackish poison had settled in her lungs and veins, clotting the blood, drying it to ash. He sent brilliant threads of magic through her, burning away the black, filling her blood with clean air. Her eyelids fluttered, and she coughed. He helped her sit up. "Are you well?" he said, quietly. "Ajani," she smiled. Then she squinted and put on her best disapproving face. "You look thin." She patted his cheek. "Have you been eating properly?" He rumbled in the back of his throat, in spite of himself. "Yes, Grandmother." "Hell," the red-haired girl gasped, and coughed again, dry and hacking. He looked up to see her grab on to the elf's arm as her knees buckled, the coughs building in intensity until she was folded nearly in two. A drop of blood trembled on the edge of her lip. Nissa inhaled sharply at the sight of it, and rubbed her back. "You should sit," she said, her strange eyes bent with worry. "Please, Chandra." "Just a dry throat," the red-haired girl rasped. "Be fine in a—" She exploded into coughing again, spattering the floor with red. "Oh. #emph[That's] not good..." Ajani carefully lifted <NAME> to her feet. "Excuse me," he told her, and turned to the two other women. "Hold her up." The elf nodded and pulled Chandra upright. "Whoa, big kitty," Chandra wheezed. Her breath smelled of hot copper. "Got arms like Gids." He wondered what gids were. He laid a hand on her shoulder and closed his eyes. The thunder of her heart was deafening. Strong, urgent. No wonder the poison had burned through her blood so swiftly. Silver tendrils of healing magic raced through her, cleansing the impurities, soothing a thousand tiny burstings. Her breathing quieted and slowed. He opened his eyes. "You'll need to take it easy for a time," he said. "I've cleaned out the poison, but your lungs—" "...Will be fine," she said, ducking her shoulder out from under his hand. She forced a smile, and wiped the blood off her lips with the back of a hand. "Thanks. I mean it." Nissa said nothing, but nodded to him with fragile gratitude. She hadn't taken her hand off Chandra's back. There were shouts echoing from the hallway. The guards were assembling. "You next," he told the elf, though she didn't seem much affected by the poison. But she shook her head, glancing toward the thunder of oncoming boots. "I'm fine for now. You know a way out?" The air in his ears vibrated with the stuttering pulse of oncoming thopter wings. In the far corner of the room, one of the windows smashed and fell in a wind-chime cascade of broken glass. The brass tailorbird fluttered across the room, #emph[perp] ing urgently, and alighted on his shoulder. Nissa looked at the mechanical creature in perplexity, perhaps uncertain whether to judge it a miracle or a horror. "We have a ride," Ajani told her as a coil of rope slid down from the window. "Ajani, were you just going to leave these here?" Grandmother scolded from across the room, stooping to pick up his dropped gauntlets. "<NAME> spent weeks on them." He'd... explain later. The guard he'd struck groaned at his feet, and rolled on to his hands and knees. He froze at the sight of boots, and slowly, by reluctant fits and starts, looked up. "Go home to your family," Ajani told him. The man gazed up at him with terror and wonder. "You're not going to kill me?" "I don't kill," Ajani said. "Not anymore."
https://github.com/Myriad-Dreamin/tinymist
https://raw.githubusercontent.com/Myriad-Dreamin/tinymist/main/crates/tinymist-query/src/fixtures/type_check/op_contains_str.typ
typst
Apache License 2.0
#let f(x) = { assert(x in "abc") };
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/call_00.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page $ pi(a) $ $ pi(a,) $ $ pi(a,b) $ $ pi(a,b,) $
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/190.%20wtax.html.typ
typst
wtax.html Modeling a Wealth Tax August 2020Some politicians are proposing to introduce wealth taxes in addition to income and capital gains taxes. Let's try modeling the effects of various levels of wealth tax to see what they would mean in practice for a startup founder.Suppose you start a successful startup in your twenties, and then live for another 60 years. How much of your stock will a wealth tax consume?If the wealth tax applies to all your assets, it's easy to calculate its effect. A wealth tax of 1% means you get to keep 99% of your stock each year. After 60 years the proportion of stock you'll have left will be .99^60, or .547. So a straight 1% wealth tax means the government will over the course of your life take 45% of your stock.(Losing shares does not, obviously, mean becoming net poorer unless the value per share is increasing by less than the wealth tax rate.)Here's how much stock the government would take over 60 years at various levels of wealth tax: wealth taxgovernment takes 0.1%6%0.5%26% 1.0%45% 2.0%70% 3.0%84% 4.0%91%5.0%95% A wealth tax will usually have a threshold at which it starts. How much difference would a high threshold make? To model that, we need to make some assumptions about the initial value of your stock and the growth rate.Suppose your stock is initially worth $2 million, and the company's trajectory is as follows: the value of your stock grows 3x for 2 years, then 2x for 2 years, then 50% for 2 years, after which you just get a typical public company growth rate, which we'll call 8%. [1] Suppose the wealth tax threshold is $50 million. How much stock does the government take now? wealth taxgovernment takes 0.1%5%0.5%23% 1.0%41% 2.0%65% 3.0%79% 4.0%88%5.0%93% It may at first seem surprising that such apparently small tax rates produce such dramatic effects. A 2% wealth tax with a $50 million threshold takes about two thirds of a successful founder's stock.The reason wealth taxes have such dramatic effects is that they're applied over and over to the same money. Income tax happens every year, but only to that year's income. Whereas if you live for 60 years after acquiring some asset, a wealth tax will tax that same asset 60 times. A wealth tax compounds.Note[1] In practice, eventually some of this 8% would come in the form of dividends, which are taxed as income at issue, so this model actually represents the most optimistic case for the founder.
https://github.com/Qi-Zhan/abstract_algebra
https://raw.githubusercontent.com/Qi-Zhan/abstract_algebra/main/theorems.typ
typst
// Store theorem environment numbering #let thm-counters = state("thm-counters", ( "counters": ("heading": ()), "latest": () ) ) /// State containing theorem environment data, as an array of `thm` dictionaries. /// See @@thm-display() for details on the structure of each `thm`. #let thm-stored = state("thm-stored", ()) () #let heading-counter = counter(heading) /// Creates a theorem environment, which is a function of the form /// ``` /// ( /// ..thm-args, /// body, /// number: auto, /// numbering: "1.1", /// base: base, /// base-level: base-level, /// restate: false, /// defer: false, /// restate-keys: (counter, ), /// supplement: counter, /// ref-fmt: (supplement, thm) => { /// if supplement != none { supplement = [#supplement~] } /// link(thm.loc, [#supplement#(thm.number)]) /// }, /// ) -> content /// ``` /// /// The `body` contains the content of the theorem environment, and `thm-args` /// get passed to the formatting function `fmt`. /// The first positional argument from `thm-args` is interpreted as the `name` of the theorem environment. /// /// The `numbering` option specifies the numbering used for the theorem environment (set to `none` for turning numbering off). /// Setting the `number` option lets you override the automatic numbering with content. /// /// The `base` and `base-level` options are inherited from the `thm-env` call; see the list of parameters below. /// /// The `supplement` determines the default supplement used when a labeled theorem environment is referenced. /// The `ref-fmt` lets you specify custom formatting for references; see @@thm-display() for more details on the `thm` dictionary. /// /// See @@thm-restate() for more information about the `restate`, `defer`, and `restate-keys` options. /// /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// #let theorem = thm-env( /// "Theorem", /// (name, number, body, color: black) => { /// if name != none { name = [~(#name)] } /// text(color)[ /// *Theorem~#number*#name:~#body\ /// ] /// }, /// base: "heading" /// ) /// /// = First heading /// #theorem[#lorem(5)] /// #theorem("Named")[#lorem(7)] /// /// Refer to @thm. /// /// == First Subheading /// #theorem[#lorem(3)] /// #theorem[#lorem(4)] /// /// == Second Subheading /// #theorem[#lorem(6)] /// #theorem(color: red)[#lorem(2)] <thm> /// /// = Second heading /// #theorem[#lorem(4)] /// #theorem(number: $dagger$)[#lorem(9)] /// #theorem[#lorem(7)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) /// /// - counter (string): Environment counter name. /// - fmt (function): Formatting function, of the form /// `(name, number, body, ..fmt-args) -> content`. /// When a theorem environment is called, the named arguments /// from `thm-args` are passed into `fmt-args`. /// - base (string): Base counter name, whose numbering prefixes the theorem /// environment numbering. /// If `none`, the theorem environment maintains a global count /// with no prefix. /// - base-level (integer): Base level, determining the number of levels of /// the `base` numbering to use during the theorem environment /// numbering. /// If `none`, all levels from the `base` numbering are used. /// -> function #let thm-env( counter, fmt, base: none, base-level: none, ) = { let global_numbering = numbering return ( ..args, body, number: auto, numbering: "1.1", supplement: counter, base: base, base-level: base-level, restate: false, defer: false, restate-keys: (counter, ), ref-fmt: (supplement, thm) => { if supplement != none { supplement = [#supplement~] } link(thm.loc, [#supplement#(thm.number)]) }, ) => { let name = none if args != none and args.pos().len() > 0 { name = args.pos().first() } let result = none if number == auto and numbering == none { number = none } let number_ = number if number == auto and numbering != none { result = context { let loc = here() return thm-counters.update(thmpair => { let counters = thmpair.at("counters") // Manually update heading counter counters.at("heading") = heading-counter.at(loc) if not counter in counters.keys() { counters.insert(counter, (0, )) } let tc = counters.at(counter) if base != none { let bc = counters.at(base) // Pad or chop the base count if base-level != none { if bc.len() < base-level { bc = bc + (0,) * (base-level - bc.len()) } else if bc.len() > base-level{ bc = bc.slice(0, base-level) } } // Reset counter if the base counter has updated if tc.slice(0, -1) == bc { counters.at(counter) = (..bc, tc.last() + 1) } else { counters.at(counter) = (..bc, 1) } } else { // If we have no base counter, just count one level counters.at(counter) = (tc.last() + 1,) let latest = counters.at(counter) } let latest = counters.at(counter) return ( "counters": counters, "latest": latest ) }) } number = context global_numbering(numbering, ..thm-counters.get().latest) } result = result + context { let loc = here() let number__ = number_ if number__ == auto and numbering != none { number__ = thm-counters.at(loc).latest number__ = global_numbering(numbering, ..number__) } thm-stored.update(x => { let thm = ( args: args, name: name, body: body, supplement: supplement, fmt: fmt, number: number__, numbering: numbering, restate: restate, defer: defer, restate-keys: restate-keys, ref-fmt: ref-fmt, loc: loc, counter: counter, base: base, base-level: base-level ) if x == none { return (thm, ) } else { return x + (thm, ) } }) } if defer { return result } return figure( result + // hacky! fmt(name, number, body, ..args.named()) + [#metadata(counter) <meta:thm-env-counter>], kind: "thm-env", outlined: false, caption: name, supplement: supplement, numbering: numbering, ) } } /// Displays all theorem environments, can be filtered. /// A `thm` is a dictionary storing information about a theorem environment, with keys /// ``` /// ( /// args, /// name, /// body, /// supplement, /// fmt, /// number, /// numbering, /// restate, /// defer, /// restate-keys, /// ref-fmt, /// loc, /// counter, /// base, /// base-level /// ) /// ``` /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// #let theorem = thm-plain("Theorem") /// #let lemma = thm-plain( /// "Lemma", /// counter: "Theorem", /// ) /// #let definition = thm-def("Definition") /// #let proof = thm-proof("Proof") /// /// = Heading <h1> /// /// #theorem("Name")[#lorem(7)] /// #proof[ /// #lorem(7) /// ] /// /// = New heading <h2> /// /// #lemma[#lorem(8)] /// #definition("Thing")[#lorem(2)] /// #lemma[#lorem(4)] /// /// = Display all /// /// #thm-display() /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1, thm-display: thm-display-1) /// ) /// /// The key `loc` gives the location of the theorem environment in the document. /// The `number` gives the (calculated and formatted) number of the theorem environment. /// The remaining keys contain information as detailed in @@thm-env(). /// - ..filters (function): Filtering functions. Each `f` in `filters` is a function `thm -> boolean`. /// A `thm` is displayed if it passes _any_ of the filters. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// = Display only theorems/proofs /// /// #thm-display( /// thm => thm.supplement == "Theorem", /// thm => thm.supplement == "Proof", /// ) /// /// = Display if `name` is present /// /// #thm-display( /// thm => thm.name != none /// ) /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-2, thm-display: thm-display-1) /// ) /// - fmt (function): Formatting function of the form `thm -> content`. /// The default `auto` uses the same `fmt` originally supplied to the `thm-env`. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// = List of things /// /// #thm-display( /// thm => thm.supplement != "Proof", /// final: true, /// fmt: thm => { /// let head = [*#thm.supplement~#thm.number*] /// if thm.name != none { /// head = head + [~(#thm.name)] /// } /// let page = thm.loc.position().page /// let page = link(thm.loc, [#page]) /// [#head~#box(width: 1fr, repeat[.])~#page\ ] /// } /// ) /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-2, thm-display: (..args) => thm-display-1(..args, ..args.named(), final: false)) /// ) /// The `final: true` ensures that even if this `thm-display` call is /// placed at the beginning of the document, all theorem environments /// are listed. /// - at (label, selector, location, function): Location up to which theorem environments will be displayed. /// The default `auto` uses the location where `thm-display` was called. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// = Display up to `<h2>` /// /// #thm-display(at: <h2>) /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-2, thm-display: thm-display-1) /// ) /// - final (boolean): If `true`, display all theorem environments up to the end of the document. /// Useful for creating lists of theorems in the beginning of documents, before they've been stated. /// Overrides `at`. /// -> content #let thm-display(..filters, fmt: auto, at: auto, final: false) = { context { let thms = thm-stored.get() if at != auto { thms = thm-stored.at(at) } if final { thms = thm-stored.final() } if filters.pos().len() > 0 { // Use arg_1 or ... or arg_n style filter thms = thms.filter(thm => filters.pos().any(x => x(thm)) ) } for thm in thms { if fmt == auto { (thm.fmt)(thm.name, thm.number, thm.body, ..thm.args.named()) } else { fmt(thm) } } } } /// Displays theorem environments which have been marked to be restated or deferred, can be filtered. /// Useful for pushing content to the appendix. /// See @@thm-display() for the structure of a `thm`. /// /// The following example illustrates the basic usage of /// `thm-restate`, combined with the `restate` and `defer` flags for theorem environments. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// #let theorem = thm-plain("Theorem") /// #let lemma = thm-plain( /// "Lemma", /// counter: "Theorem", /// ) /// #let definition = thm-def("Definition") /// #let proof = thm-proof("Proof") /// /// = Heading /// /// #definition[#lorem(2)] /// #lemma[#lorem(8)] /// /// #theorem("Name", restate: true)[#lorem(7)] /// #proof(defer: true)[ /// #lorem(7) /// ] /// /// #lemma[#lorem(4)] /// /// = Appendix /// /// #thm-restate() /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1, thm-display: thm-display-1) /// ) /// - ..keys (string, array, function): String keys, array of keys, or functions used to filter theorem environments. /// A `thm` is displayed if it passes _any_ of the filters. /// /// If `k` in `keys` is a `string`, theorem environments containing `k` in its array of `restate-keys` will be matched. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// #let theorem = thm-plain("Theorem") /// #let lemma = thm-plain( /// "Lemma", /// counter: "Theorem", /// ) /// #let proof = thm-proof("Proof") /// /// = Heading /// /// #theorem(restate: true)[#lorem(6)] /// #lemma(restate: true)[#lorem(4)] /// #proof(defer: true)[#lorem(7)] /// #lemma(restate: true)[#lorem(3)] /// /// = Restate lemmas/proofs /// #thm-restate("Lemma", "Proof") /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-1), /// ) /// /// If `k` in `keys` is an array of `string`s, theorem environments containing _all_ keys from `k` in its array of `restate-keys` will be matched. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// = Heading /// /// #theorem( /// "Result A", /// restate: true, /// restate-keys: ("Theorem", "Result A") /// )[#lorem(6)] /// #proof( /// defer: true, /// restate-keys: ("Proof", "Result A") /// )[#lorem(7)] /// #theorem(restate: true)[#lorem(6)] /// #theorem( /// "Result B", /// restate: true, /// restate-keys: ("Theorem", "Result B") /// )[#lorem(6)] /// #proof( /// defer: true, /// restate-keys: ("Proof", "Result B") /// )[#lorem(7)] /// /// = Restate Result A /// #thm-restate("Result A") /// /// = Restate theorems tagged Result B /// #thm-restate(("Theorem", "Result B")) /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-2, theorem: thm-plain("Theorem"), lemma: thm-plain("Lemma", counter: "Theorem"), proof: thm-proof("Proof")) /// ) /// /// If `k` in `keys` is a `function`, it must be of the form `restate-keys -> boolean`. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// = Heading /// /// #theorem( /// restate: true, /// restate-keys: ( /// "Theorem", "Unproven claim" /// ) /// )[#lorem(6)] /// #theorem(restate: true)[#lorem(6)] /// #lemma( /// "Claim D", /// restate: true, /// restate-keys: ("Lemma", "Claim D") /// )[#lorem(6)] /// /// = Restate claims /// #thm-restate( /// keys => keys.any( /// k => lower(k).contains("claim") /// ) /// ) /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-2, theorem: thm-plain("Theorem"), lemma: thm-plain("Lemma", counter: "Theorem"), proof: thm-proof("Proof")) /// ) /// /// - fmt (function): Formatting function of the form `thm -> content`. /// The default `auto` uses the same `fmt` originally supplied to the `thm-env`. /// See corresponding option in @@thm-display(). /// - at (label, selector, location, function): Location up to which theorem environments will be displayed. /// The default `auto` uses the location where `thm-restate` was called. /// See corresponding option in @@thm-display(). /// - final (boolean): If `true`, display environments up to the end of the document. /// See corresponding option in @@thm-display(). /// -> content #let thm-restate(..keys, fmt: auto, at: auto, final: false) = { context { let thms = thm-stored.get() if at != auto { thms = thm-stored.at(at) } if final { thms = thm-stored.final() } thms = thms.filter(thm => (thm.restate or thm.defer)) if keys.pos().len() > 0 { // Use arg_1 or ... or arg_n style filter thms = thms.filter(thm => keys.pos().any(x => { if type(x) == str { // keys contains x return thm.restate-keys.contains(x) } else if type(x) == array { // keys contain x_1 and ... and x_n return x.all(key => thm.restate-keys.contains(key)) } else if type(x) == function { // keys passes filter x return x(thm.restate-keys) } }) ) } for thm in thms { if fmt == auto { (thm.fmt)(thm.name, thm.number, thm.body, ..thm.args.named()) } else { fmt(thm) } } } } /// Creates a theorem environment wrapped in a padded block, with sensible /// default styling. The block has `width: 100%` applied by default. /// The `fmt` function is of the form `(name, number, body, title: auto, ..fmt-args) -> content`. /// All named arguments from `args`, followed by all named `fmt-args`, are /// passed to the `block` call. /// /// #example(``` /// #show: thm-rules /// /// #let notation = thm-box( /// "Notation", /// base: none, /// numbering: "I", /// title-fmt: t => smallcaps(strong(t)), /// body-fmt: emph, /// outset: 0.7em, /// padding: (y: 0.5em), /// radius: 2pt, /// fill: rgb("#d4e2fe"), /// ) /// /// #lorem(5) /// #notation[#lorem(3)] /// #notation[#lorem(7)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) /// /// - head (content): Environment heading. /// - counter (string): Environment counter name. If `auto`, set to `head`. /// - numbering (string, function): Environment numbering style. /// - supplement (string): Supplement for references. If `auto`, set to `head`. /// - padding (dictionary): Padding around the block. /// - name-fmt (function): Formatting for the environment name. /// - title-fmt (function): Formatting for the environment title (head and number). /// - body-fmt (function): Formatting for the environment body. /// - separator (content): Separator between title and body. /// - base (string): Base counter name. /// - base-level (integer): Base level. /// -> function #let thm-box( head, counter: auto, ..args, numbering: "1.1", supplement: auto, padding: (y: 0.1em), name-fmt: x => [(#x)], title-fmt: x => x, body-fmt: x => x, separator: [.#h(0.2em)], base: "heading", base-level: none, ) = { if counter == auto { counter = head } if supplement == auto { supplement = head } let fmt( name, number, body, title: auto, padding: padding, ..args_individual ) = { if not name == none { name = [ #name-fmt(name)] } else { name = [] } if title == auto { title = head } if not number == none { title += " " + number } title = title-fmt(title) body = body-fmt(body) pad( ..padding, block( width: 100%, ..args.named(), ..args_individual.named(), [#title#name#separator#body] ) ) } return thm-env( counter, fmt, base: base, base-level: base-level, ).with( numbering: numbering, supplement: supplement, restate-keys: (head, ) ) } /// Creates a plain theorem environment. /// Identical to @@thm-box(), with different defaults. /// #example(``` /// #show: thm-rules /// /// #let theorem = thm-plain( /// "Theorem", /// base: none /// ) /// /// #let lemma = thm-plain( /// "Lemma", /// counter: "Theorem", /// base: none /// ) /// /// #let corollary = thm-plain( /// "Corollary", /// base: "Theorem" /// ) /// /// #lemma[#lorem(3)] /// #theorem("Named")[#lorem(4)] /// #corollary[#lorem(7)] /// #theorem[#lorem(7)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) #let thm-plain = thm-box.with( title-fmt: strong, body-fmt: emph, separator: [*.*#h(0.2em)], ) /// Creates a theorem environment, suitable for definitions. /// Identical to @@thm-box(), with different defaults. /// #example(``` /// #show: thm-rules /// /// #let definition = thm-def( /// "Definition", /// base: none /// ) /// /// #definition[#lorem(7)] /// #definition[#lorem(4)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) #let thm-def = thm-box.with( title-fmt: strong, separator: [*.*#h(0.2em)], ) /// Creates a theorem environment, suitable for remarks. /// Identical to @@thm-box(), with different defaults. /// #example(``` /// #show: thm-rules /// /// #let remark = thm-rem( /// "Remark", /// base: none /// ) /// /// #remark[#lorem(3)] /// #remark[#lorem(6)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) #let thm-rem = thm-box.with( padding: (y: 0em), name-fmt: name => emph([(#name)]), title-fmt: emph, separator: [.#h(0.2em)], numbering: none ) // Track whether the qed symbol has already been placed in a proof #let thm-qed-done = state("thm-qed-done", ()) // Show the qed symbol, update state #let thm-qed-show = { metadata("thm-qed-symbol") thm-qed-done.update(stack => { stack.slice(0, -1) + (true, ) }) } /// If placed in a block equation/enum/list within a proof, place a qed symbol /// to its right. /// /// #example(``` /// #show: thm-rules /// /// #let proof = thm-proof("Proof") /// /// #proof[ /// #lorem(3) /// $ x^2 + y^2 = z^2. #qedhere $ /// ] /// /// #proof[ /// + #lorem(4) /// + #lorem(5) #qedhere /// ] /// /// #proof[ /// $ /// (a + b)^2 &= (a + b)(a + b) \ /// &= a^2 + 2 a b + b^2. #qedhere /// $ /// ] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) #let qedhere = metadata("thm-qedhere") // Checks if content x contains the qedhere tag #let thm-has-qedhere(x) = { if x == qedhere { return true } if type(x) == content { for (f, c) in x.fields() { if thm-has-qedhere(c) { return true } } } if type(x) == array { for c in x { if thm-has-qedhere(c) { return true } } } return false } /// Used as the `body-fmt` in @@thm-proof, for properly styling proofs /// by inserting a `qed` symbol at the end of the body. /// Also see @@qedhere. /// #example(``` /// #show: thm-rules.with(qed-symbol: "Q.E.D.") /// /// #proof-body-fmt[#lorem(3)] /// #v(2em) /// /// #proof-body-fmt[ /// $ /// phi.alt(x) = 1/sqrt(2 pi) e^(-x^2\/2) #qedhere /// $ /// ] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) /// - body (content): Proof body. /// -> content #let proof-body-fmt(body) = { thm-qed-done.update(stack => { stack + (false, ) }) body context { if thm-qed-done.get().last() == false { h(1fr) thm-qed-show } } thm-qed-done.update(stack => { stack.slice(0, -1) }) } /// Creates a proof environment /// Identical to @@thm-rem, with different defaults. /// #example(``` /// #show: thm-rules /// /// #let theorem = thm-plain( /// "Theorem", /// base: none /// ) /// #let proof = thm-proof("Proof") /// /// #theorem[#lorem(6)] /// #proof[#lorem(3)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) #let thm-proof = thm-rem.with( name-fmt: emph, body-fmt: proof-body-fmt, ) /// Rules for styling theorem environments, references, proofs, etc. /// Must appear at the beginning of the document. /// #example(``` /// #show: thm-rules /// #set heading(numbering: "1.1") /// /// #let theorem = thm-plain("Theorem") /// #let lemma = thm-plain( /// "Lemma", /// counter: "Theorem", /// ) /// #let corollary = thm-plain( /// "Corollary", /// base: "Theorem" /// ) /// #let definition = thm-def("Definition") /// #let remark = thm-rem("Remark") /// #let proof = thm-proof("Proof") /// /// = Heading /// /// #theorem[#lorem(7)] <mythm> /// #definition("Thing")[#lorem(2)] /// #lemma[#lorem(4)] /// #proof[ /// #lorem(7) /// ] /// #lorem(10) /// #proof([of @mythm])[ /// $ /// 1/n sum_(i = 1)^n X_i -->^p EE[X_1] #qedhere /// $ /// ] /// /// = More theorems /// /// #let theorem-standout = theorem.with( /// stroke: 1pt, /// outset: 0.7em, /// padding: (y: 1em) /// ) /// #theorem-standout("Important")[#lorem(6)] /// #lorem(8) /// #remark[#lorem(4)] /// #corollary[#lorem(2)] /// #corollary[#lorem(4)] /// ```, /// mode: "markup", /// scale-preview: 95%, /// scope: (thm-rules: thm-rules-1) /// ) /// - qed-symbol (content): Symbol displayed at the end of proofs. /// See @@thm-proof, @@qedhere, @@proof-body-fmt(). /// Use as /// #example(``` /// #show: thm-rules.with( /// qed-symbol: $square$ /// ) /// /// #let proof = thm-proof("Proof") /// /// #proof[#lorem(3)] /// #proof[ /// #lorem(5) /// $ integral_0^oo sin(x)/x = pi/2. #qedhere $ /// ] /// /// ```, /// mode: "markup", /// scale-preview: 95%, /// ratio: 0.95, /// scope: (thm-rules: thm-rules-1) /// ) #let thm-rules( qed-symbol: $qed$, doc ) = { show figure.where(kind: "thm-env"): it => it.body show ref: it => { if it.element == none { return it } if it.element.func() != figure { return it } if it.element.kind != "thm-env" { return it } let supplement = it.element.supplement if it.citation.supplement != none { supplement = it.citation.supplement } if (supplement == [] or (supplement.has("text") and supplement.text == "")) { supplement == none } let loc = it.element.location() let thms = query(selector(<meta:thm-env-counter>).after(loc)) let thmloc = thms.first().location() let thm = thm-stored.at(thmloc).last() return (thm.ref-fmt)(supplement, thm) } show math.equation: eq => { if eq.numbering == none and thm-has-qedhere(eq) and thm-qed-done.at(eq.location()).last() == false { math.equation( block: eq.block, numbering: x => { context { let pos-qedhere = query(metadata.where(value: "thm-qedhere").after(eq.location())).first().location().position() let pos-here = here().position() let height = measure(qed-symbol).height move(dy: -pos-here.y + pos-qedhere.y - height/2, thm-qed-show) } }, number-align: eq.number-align, supplement: eq.supplement, eq.body ) } else { eq } } show enum.item: it => { show metadata.where(value: "thm-qedhere"): { h(1fr) thm-qed-show } it } show list.item: it => { show metadata.where(value: "thm-qedhere"): { h(1fr) thm-qed-show } it } show metadata.where(value: "thm-qed-symbol"): qed-symbol doc }
https://github.com/lublak/typst-echarm-package
https://raw.githubusercontent.com/lublak/typst-echarm-package/main/examples/candlestick.typ
typst
MIT License
#set page(width: 200mm, height: 150mm, margin: 0mm) #import "../typst-package/lib.typ" as echarm #echarm.render(width: 100%, height: 100%, options: ( xAxis: ( data: ("2017-10-24", "2017-10-25", "2017-10-26", "2017-10-27") ), yAxis: (:), series: ( ( type: "candlestick", data: ( (20, 34, 10, 38), (40, 35, 30, 50), (31, 38, 33, 44), (38, 15, 5, 42), ) ) ) ))
https://github.com/Error-418-SWE/Documenti
https://raw.githubusercontent.com/Error-418-SWE/Documenti/src/2%20-%20RTB/Documentazione%20interna/Verbali/23-12-03/23-12-03.typ
typst
#import "/template.typ":* #show: project.with( date: "03/12/23", subTitle: "Meeting di retrospettiva e pianificazione", docType: "verbale", authors: ( "<NAME>", ), reviewers: ( "<NAME>", ), missingMembers: ( "<NAME>", "<NAME>", ), timeStart: "15:00", timeEnd: "17:00", ); = Ordine del giorno - Rotazione dei ruoli; - Programmazione appuntamento con il Referente aziendale; - Retrospettiva sprint 4; - Presentazione dei dimostratori tecnologici realizzati; - Pianificazione sprint 5. == Rotazione dei ruoli Il gruppo attua la rotazione dei ruoli secondo la programmazione stabilita nel Piano di Progetto. == Meeting esterno con il Proponente È stato proposto un meeting al Proponente per il giorno 06/12/2023 alle ore 16:00. Attualmente il meeting è in attesa di conferma. Il meeting verterà sulle tecnologie, sui dimostratori tecnologici realizzati e sull'individuazione di requisiti non funzionali. == Dimostratori tecnologici Sono stati presentati tre dimostratori tecnologici, ciascuno focalizzato sulla comprensione di una specifica funzionalità: + *importazione SVG*: applicazione, basata su _Three.js_, che importa un file SVG standard e lo colloca nell'ambiente 3D; + *interrogazione di un database*: applicazione, basata su _Express.js_, che mostra, sotto forma di testo, il risultato di una query eseguita su un database MySQL locale; + *creazione di elementi nello spazio 3D*: applicazione, basata su _Three.js_, che permette all'utente di posizionare nell'ambiente 3D un numero di cubi parametrizzati e di segnalarne la collisione. I risultati sono incoraggianti e il gruppo è entusiasta delle potenzialità di _Three.js_. Nel corso di un prossimo meeting, gli esploratori tecnologici realizzati saranno sottoposti al Referente aziendale per sostanziare la visione di progetto ed ottenere feedback. Nell'ambito dello sprint 5, il gruppo valuterà la realizzazione di esploratori tecnologici analoghi basati su tecnologie diverse (ad esempio _Unreal Engine_ o _Unity_). == Retrospettiva sprint 4 === Keep doing La valutazione, supportata dalla board di retrospettiva su Miro, ha evidenziato i seguenti aspetti positivi: + buona suddivisione del lavoro; + buona autonomia dei membri del gruppo; + i PoC sviluppati sono incoraggianti. === Improvements <improvements> Le criticità riscontrate sono: + le PR possono rimanere aperte per diversi giorni perché l'autore non risponde e non attua le correzioni in tempi ragionevoli a seguito di review negativa; + la lavorazione di un ticket sembra terminare con l'apertura della PR, non con il merge; + numerosi merge conflict, dovuti alla scrittura concorrente di documenti e log; + lavorazione opaca dei ticket: capita che il backlog non rappresenti il reale stato di avanzamento del ticket; + il lavoro sull'Analisi dei Requisiti è stato profondamente rivisto dopo il cambio di ruoli; + notifiche da GitHub, Jira copiose e spesso ridondanti; + il lavoro sul PoC richiede più risorse del previsto. === Azioni correttive <correzioni> In riferimento ai punti descritti in @improvements, il gruppo attua le seguenti azioni correttive: 1,2) È stato chiarito che la lavorazione dei ticket non termina con l'apertura della relativa PR, bensì con il suo merge nel _branch_ principale. Per questa ragione deve essere cura dell'autore della PR attuare in tempi ragionevoli le correzioni richieste dal verificatore. 3) I _merge conflict_ non sono necessariamente segno di procedure errate. Nel corso dell'ultimo sprint documenti e registri delle modifiche sono stati oggetto di scritture concorrenti. L'amministratore è incaricato di indagare eventuali aggiornamenti delle procedure e delle automazioni per ridurre l'occorrenza di _merge conflict_. 4) L'assegnatario del ticket è tenuto a porre lo stato del ticket su "In corso" all'inizio della sua lavorazione. 5) Nella fattispecie, il documento di Analisi dei Requisiti è stato oggetto di un'azione di _refactoring_ a seguito dell'incontro con il Proponente del 23/11/2023. 6) Le impostazioni di notifica sono state aggiornate in modo da notificare solo i membri interessati e non l'intero gruppo. Si sottolinea l'importanza di leggere le notifiche per evitare la necessità di fare _polling_. 7) Nel corso del prossimo sprint saranno assegnati due programmatori. == Pianificazione sprint 5 - Attuare le azioni correttive descritte in @correzioni\; - Implementare l'automazione della compilazione di documenti composti da più file sorgente Typst; - Proseguire l'adeguamento delle Norme di Progetto allo standard ISO/IEC 12207:2017; - Proseguire l'esplorazione tecnologica tramite la realizzazione di piccoli dimostratori e lo studio di tecnologie alternative a _Three.js_; - Richiedere un colloquio al professor Cardin in merito ai dubbi su alcuni UC individuati; - Aggiornare consuntivo sprint 4 e preventivo sprint 5 in Piano di Progetto.
https://github.com/TechnoElf/mqt-qcec-diff-thesis
https://raw.githubusercontent.com/TechnoElf/mqt-qcec-diff-thesis/main/content/conclusion.typ
typst
= Conclusion In this thesis, a novel approach to @dd\-based quantum circuit equivalence checking was developed. This approach uses the fact that a system matrix multiplied by its inverse produces the identity. Gates from either circuit are sequentially applied to the @dd, which is reduced to the identity if the circuits are equivalent. Using solutions to the @lcs problem, commonly known as diff algorithms, a scheme was developed that seeks to keep the system's @dd as close to the identity as possible by exploiting structural similarities in the circuits. Over the course of the work, Djikstra's algorithm, Myers' algorithm and the patience algorithm were analysed and implemented. The functionality of these algorithms and their applicability to quantum circuits represented as sequences of gates was demonstrated using a visualisation tool. This also highlights the structural relationship between circuits at different stages of compilation. Myers' algorithm and the patience algorithm were subsequently integrated into @mqt @qcec and successfully applied to the equivalence checking problem. Finally, a specialised benchmarking tool was developed for @mqt @qcec to compare application schemes using benchmark instances generated by @mqt Bench. The extensive exploration carried out in this work shows both the possible advantages of using a heuristic based on diff algorithms, as well as the limits of this approach. While significant speed ups are demonstrated, many of the explored approaches tend to cause regressions in the run time of the equivalence checking procedure. Specifically, the proposed application scheme based on a processed edit script produced by the Myers' algorithm can speed up equivalence checking by almost 60% in the right circumstances. In many other cases, however, it fails to provide any meaningful speed-up or even reduces the speed of computation by a factor of up to 400%. While there is no apparent correlation between the easily analysable properties of the circuits and the run time improvement of using a diff-based application scheme, a heuristic based on the gate equivalence rate of the two circuits manages to filter out most bad instances. The culmination of this work is an application scheme that can be applied selectively to accomplish an average speed-up of 7.09% compared to the state-of-the-art application scheme. Additionally, the developed open-source tooling will certainly prove useful to further research on quantum circuit verification. @mqt @qcec Bench is especially significant as it greatly simplifies further large-scale tests of methodologies in @qcec.
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/state_01.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page // Try same key with different initial value. #state("key", 2).display() #state("key").update(x => x + 1) #state("key", 2).display() #state("key", 3).display() #state("key").update(x => x + 1) #state("key", 2).display()
https://github.com/katamyra/Notes
https://raw.githubusercontent.com/katamyra/Notes/main/Compiled%20School%20Notes/CS3001/Modules/Kantianism.typ
typst
#import "../../../template.typ": * = Kantianism / Deontology Unlike utilitarianism, Kantianism is not concerned with outcomes. Instead, the motive for why you did certain actions is more important. == Duties #definition[ *Perfect duties* are duties we are obligated to fulfill in every instance. *Imperfect duties* we are obligated to fulfill in general but not in every instance. ] == Imperatives An *imperative* is a way in which reason commands will. #definition[ A *hypothetical imperative* is a conditional rule of the form "If you want X then do Y" A *categorical imperative* is a unconditional rule: a rule that always applies, regardless of circumstance. For Kant, only a categorical imperative can be a moral imperative. ] Both of the _main two categorical imperatives_ should be held for an act to be considered morally right. + Act only from moral rules that you can at the same time will to be universal laws + Act so that you always treat both yourself and other people as ends in themselves, and never only as a means to an end *The Case For*: - It treats all person as moral equals - It gives all persons moral worth by considering them rational, autonomous beings - Everyone is held to the same standard - Kantianism produces universal moral guidelines *The Case Against*: - Sometimes no single rule can fully characterize an action - Sometimes there is no way to resolve a conflict between rules - Kantianism allows no exceptions to perfect duties
https://github.com/leesum1/brilliant-cv
https://raw.githubusercontent.com/leesum1/brilliant-cv/master/modules_en/professional.typ
typst
// Imports #import "@preview/brilliant-cv:2.0.2": cvSection, cvEntry, hBar #import "@preview/fontawesome:0.4.0": * #let metadata = toml("../metadata.toml") #let cvSection = cvSection.with(metadata: metadata) #let cvEntry = cvEntry.with(metadata: metadata) #cvSection("Professional Experience") #cvEntry( title: [One Student One Chip - Open Source Core Migration #hBar() ] + link("https://github.com/iEDA-Open-Source-Core-Project/iEDA-data-set")[#fa-icon("github") Repository Link], society: [Beijing Open Source Chip Research Institute], logo: image("../src/logos/bosc.png"), date: [March 2023 - October 2023], location: [Remote Internship], description: list( [Served as the leader of the Open Source Core Migration SIG group, responsible for task allocation and coordination.], [Studied open-source processor design and modified the core bus to "AXI4," integrating it into the "One Student One Chip" SOC simulation environment. Ported and tested software like BenchMark, RT-Thread in the simulation environment, and packaged the core for other teams after passing all tests.], [Completed the migration and testing of open-source cores such as DarkRiscv, Ibex, Hummingbird E203, CVA6, and gained extensive knowledge of microarchitecture design and system software migration methods.], ), ) #cvEntry( title: [One Student One Chip - Teaching Assistant], society: [Beijing Open Source Chip Research Institute], logo: image("../src/logos/bosc.png"), date: [November 2023 - now], location: [Remote Internship], description: list( [Serving as a teaching assistant for the "One Student One Chip" project, responsible for daily Q&A, organizing group meetings.], ), )
https://github.com/MDLC01/board-n-pieces
https://raw.githubusercontent.com/MDLC01/board-n-pieces/main/src/lib.typ
typst
MIT License
/// Chess pieces symbols. #import "chess-sym.typ" /// The starting position of a standard chess game. #let starting-position = ( type: "board-n-pieces:position", fen: "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1", board: ( ("R", "N", "B", "Q", "K", "B", "N", "R"), ("P", ) * 8, (none, ) * 8, (none, ) * 8, (none, ) * 8, (none, ) * 8, ("p", ) * 8, ("r", "n", "b", "q", "k", "b", "n", "r"), ), active: "w", castling-availabilities: ( white-king-side: true, white-queen-side: true, black-king-side: true, black-queen-side: true, ), en-passant-target-square: none, halfmove: 0, fullmove: 1, ) /// Creates a position from ranks. /// /// For example, this creates the starting position. /// ```typ /// #let starting-position = position( /// "rnbqkbnr", /// "pppppppp", /// "........", /// "........", /// "........", /// "........", /// "PPPPPPPP", /// "RNBQKBNR", /// ) /// ``` #let position(..ranks) = { let ranks = ranks.pos() if ranks.len() != 0 { let file-count = ranks.at(0).clusters().len() for rank in ranks { assert.eq( rank.clusters().len(), file-count, message: "the ranks of a position should all contain the same amount of files" ) } } ( type: "board-n-pieces:fen", fen: ranks .map(rank => { let fen-rank = "" let empty-count = 0 for square in rank { if square in (" ", ".", "-") { empty-count += 1 } else { if empty-count != 0 { fen-rank += str(empty-count) empty-count = 0 } fen-rank += square } } if empty-count != 0 { fen-rank += str(empty-count) } fen-rank }) .join("/") + " w KQkq - 0 1", ) } /// Creates a position using Forsyth–Edwards Notation. /// /// For example, this creates the starting position. /// ```typ /// #let starting-position = fen("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1") /// ``` #let fen(fen-string) = { if " " not in fen-string { fen-string = fen-string + " w KQkq - 0 1" } ( type: "board-n-pieces:fen", fen: fen-string, ) } /// Creates an array containing the successive positions of the game with the /// given turns. /// /// Turns can be specified as an array of strings using standard algebraic /// notation. Alternatively, you can also specify a single string containing /// whitespace-separated turns. #let game(starting-position: starting-position, turns) = { import "internals.typ": replay-game if type(turns) == str { turns = turns.split() } replay-game(starting-position, turns) } /// Creates an array containing the successive positions of a game described /// using Portable Game Notation. #let pgn(pgn-string) = { import "internals.typ": game-from-pgn game-from-pgn(pgn-string) } /// Displays a position on a chess board. /// /// A position can be created using the `position` function. #let board( /// The position to display. position, /// A list of squares to mark. /// /// Can be specified as a list of strings containing the square names, or as a /// single string containing multiple whitespace-separated squares. For /// example, `("d4", "e4", "d5", "e5")` is equivalent to `"d4 e4 d5 e5"`. marked-squares: (), /// A list of arrows to draw. /// /// Must be a list of strings containg the start and end squares. For example, /// `("e2 e4", "e7 e5")` or, more compactly, `("e2e4", "e7e5")`. arrows: (), /// Whether to reverse the board. reverse: false, /// Whether to display file and rank numbers. display-numbers: false, /// How to number ranks. rank-numbering: numbering.with("1"), /// How to number files. file-numbering: numbering.with("a"), /// The size of each square. square-size: 1cm, /// How to fill white squares. white-square-fill: rgb("#ffce9e"), /// How to fill black squares. black-square-fill: rgb("#d18b47"), /// The color to use for markings on the board. marking-color: rgb("#ff4136a5"), /// Background to add behind white marked squares. marked-white-square-background: auto, /// Background to add behind black marked squares. marked-black-square-background: auto, /// How to stroke arrows. arrow-stroke: 0.2cm, /// How to display each piece. /// /// See README for more information (including licensing) on the default /// images. pieces: auto, /// The stroke displayed around the board. /// /// Use the same structure as `rect.stroke`. stroke: none, ) = { import "internals.typ": resolve-position, stroke-sides, square-coordinates position = resolve-position(position) let height = position.board.len() assert(height > 0, message: "board cannot be empty") let width = position.board.at(0).len() assert(width > 0, message: "board cannot be empty") for rank in position.board { assert.eq( rank.len(), width, message: "all ranks of a board must have the same width", ) } if type(marked-squares) == str { marked-squares = marked-squares.split() } let marked-squares = marked-squares.map(square-coordinates) if type(arrows) == str { arrows = (arrows, ) } arrows = arrows.map(arrow => { if arrow.len() == 4 { ( square-coordinates(arrow.slice(0, 2)), square-coordinates(arrow.slice(2, 4)), ) } else { let (start, end) = arrow.split() ( square-coordinates(start), square-coordinates(end), ) } }) let default-square-mark = { let margin = 0.05cm let thickness = 0.15cm circle( width: 100% - thickness - 2 * margin, stroke: thickness + marking-color, ) } if marked-white-square-background == auto { marked-white-square-background = default-square-mark } if marked-black-square-background == auto { marked-black-square-background = default-square-mark } if type(arrow-stroke) == length { arrow-stroke = arrow-stroke + marking-color } // Doing this lazily to save time when loading the package. if pieces == auto { pieces = ( P: image("assets/pw.svg", width: 100%), N: image("assets/nw.svg", width: 100%), B: image("assets/bw.svg", width: 100%), R: image("assets/rw.svg", width: 100%), Q: image("assets/qw.svg", width: 100%), K: image("assets/kw.svg", width: 100%), p: image("assets/pb.svg", width: 100%), n: image("assets/nb.svg", width: 100%), b: image("assets/bb.svg", width: 100%), r: image("assets/rb.svg", width: 100%), q: image("assets/qb.svg", width: 100%), k: image("assets/kb.svg", width: 100%), ) } let stroke = stroke-sides(stroke) let squares = position.board .enumerate() .map(((j, rank)) => { rank.enumerate().map(((i, square)) => { if (i, j) in marked-squares { show: place set align(center + horizon) block( width: square-size, height: square-size, if calc.odd(i + j) { marked-white-square-background } else { marked-black-square-background } ) } if square != none { pieces.at(square) } }) }) .rev() let grid-elements = squares.flatten() for ((start-file, start-rank), (end-file, end-rank)) in arrows { let hypot(x, y) = { if type(x) == length and type(y) == length { return hypot(x.pt(), y.pt()) * 1pt } calc.sqrt(x * x + y * y) } if reverse { start-file = width - start-file - 1 start-rank = height - start-rank - 1 end-file = width - end-file - 1 end-rank = height - end-rank - 1 } let length = hypot(end-file - start-file, end-rank - start-rank) * square-size let angle = calc.atan2(end-file - start-file, start-rank - end-rank) let triangle-base = 2 * arrow-stroke.thickness let triangle-height = 1.5 * arrow-stroke.thickness let triangle-start = triangle-height + square-size / 6 let arrow = { place( center + horizon, place(line( start: ( (start-file - width + 1) * square-size - calc.cos(angle) * arrow-stroke.thickness / 2, -start-rank * square-size - calc.sin(angle) * arrow-stroke.thickness / 2, ), end: ( (end-file - width + 1) * square-size - calc.cos(angle) * triangle-start, -end-rank * square-size - calc.sin(angle) * triangle-start, ), stroke: arrow-stroke, )) ) let triangle = polygon( fill: arrow-stroke.paint, (0pt, -triangle-base / 2), (0pt, triangle-base / 2), (triangle-height, 0pt), ) place( center + horizon, move( dx: (end-file - width + 1) * square-size - calc.cos(angle) * triangle-start, dy: -end-rank * square-size - calc.sin(angle) * triangle-start, rotate( angle, place(triangle), ), ), ) } if reverse { grid-elements.first() += arrow } else { grid-elements.last() += arrow } } if display-numbers { let number-cell = grid.cell.with( inset: 0.3em, ) let column-numbers = ( none, ..range(1, width + 1) .map(file-numbering) .map(number-cell), none, ) grid-elements = ( ..column-numbers, ..grid-elements .chunks(width) .enumerate() .map(((i, rank)) => { let n = rank-numbering(height - i) ( number-cell(n), ..rank, number-cell(n), ) }) .flatten(), ..column-numbers, ) } if reverse { grid-elements = grid-elements.rev() } { let index-inset = if display-numbers { 1 } else { 0 } let first-rank-index = index-inset let last-rank-index = first-rank-index + height let first-file-index = index-inset let last-file-index = first-file-index + width // Left line. grid-elements.push(grid.vline( x: first-file-index, stroke: stroke.left, start: first-rank-index, end: last-rank-index, )) // Top stroke. grid-elements.push(grid.hline( y: first-rank-index, stroke: stroke.top, start: first-file-index, end: last-file-index, )) // Right line. grid-elements.push(grid.vline( x: last-file-index, stroke: stroke.right, start: first-rank-index, end: last-rank-index, )) // Bottom line. grid-elements.push(grid.hline( y: last-rank-index, stroke: stroke.bottom, start: first-file-index, end: last-file-index, )) } show: block.with(breakable: false) set text(dir: ltr) set grid.cell( inset: 0pt, align: center + horizon, ) grid( fill: (x, y) => { if display-numbers { x -= 1 y -= 1 if x < 0 or x >= width or y < 0 or y >= height { return none } } if calc.even(x + y) { white-square-fill } else { black-square-fill } }, columns: if display-numbers { (auto, ) + (square-size, ) * width + (auto, ) } else { (square-size, ) * width }, rows: if display-numbers { (auto, ) + (square-size, ) * height + (auto, ) } else { (square-size, ) * height }, ..grid-elements, ) }
https://github.com/lucannez64/Notes
https://raw.githubusercontent.com/lucannez64/Notes/master/Algebre_Lineaire_Chapitre_2024.typ
typst
#import "@preview/bubble:0.1.0": * #import "@preview/fletcher:0.4.3" as fletcher: diagram, node, edge #import "@preview/cetz:0.2.2": canvas, draw, tree #import "@preview/cheq:0.1.0": checklist #import "@preview/typpuccino:0.1.0": macchiato #import "@preview/wordometer:0.1.1": * #import "@preview/tablem:0.1.0": tablem #show: bubble.with( title: "Algebre_Lineaire_Chapitre_2024", subtitle: "06/09/2024", author: "<NAME>", affiliation: "EPFL", year: "2024/2025", class: "Génie Mécanique", logo: image("JOJO_magazine_Spring_2022_cover-min-modified.png"), ) #set page(footer: context [ #set text(8pt) #set align(center) #text("page "+ counter(page).display()) ] ) #set heading(numbering: "1.1") #show: checklist.with(fill: luma(95%), stroke: blue, radius: .2em) = Chapitres == Pas commencé - Formule de Cramer et des cofacteurs - Déterminant - Changement de bases et matrices semblables - Matrices de passage - Développement par colonne/ligne - Diagonalisation - Espace préhilbertien - Le procédé de Gram-Schmidt == En cours == Fait == Révisé
https://github.com/Skimmeroni/Appunti
https://raw.githubusercontent.com/Skimmeroni/Appunti/main/Metodi%20Algebrici/Crittografia/RSA.typ
typst
Creative Commons Zero v1.0 Universal
#import "../Metodi_defs.typ": * *RSA* é un esempio di sistema crittografico asimmetrico. Siano Alice e Bob due entitá che hanno intenzione di comunicare scambiandosi messaggi senza che terze parti possano conoscerne il contenuto (ovvero, anche ammesso che possano intercettare il messaggio, non possano decifrarlo). Si assuma che Alice sia il ricevente e Bob il mittente. La cifratura e decifratura di messaggi mediante RSA puó essere descritta sotto forma di algoritmo: + Alice sceglie una coppia di numeri primi distinti, siano questi $p$ e $q$; + Alice calcola il loro prodotto $N = p q$ ed il valore di $phi(N)$, che per le proprietá di tale funzione é semplicemente $(p - 1)(q - 1)$; + Alice sceglie un numero casuale $r$ tale che sia coprimo con $phi(N)$ e piú piccolo di quest'ultimo; + Alice calcola l'identitá di Bézout per $r$ e $phi(N)$, ovvero determina una coppia di numeri interi $s$ e $t$ tali per cui $r s + phi(N) t = 1$; + Alice rende pubblica la chiave di cifratura $(N, r)$, mentre tiene per sé i numeri $p$, $q$ e $phi(N)$, cosí come la chiave di decifratura $(N, s)$; + Sia il messaggio che Bob vuole mandare ad Alice il numero intero $b$ compreso fra $0$ ed $N$. Bob legge la chiave di cifratura di Alice ed invia ad Alice il numero $a = b^(r) mod N$; + Alice riceve $a$ e ricostruisce il messaggio $b$ originale come $b = a^(s) mod N$; #theorem("Correttezza dell'algoritmo RSA")[ L'algoritmo RSA é corretto. Ovvero, il messaggio decifrato da Alice coincide sempre con il messaggio inviato da Bob. ] #proof[ Si consideri il caso in cui $b$ ed $N$ siano coprimi. Dovendo esistere $s$ e $t$ tali per cui $r s + phi(N) t = 1$, si ha: $ b = b^(1) mod N = b^(r s + phi(N) t) mod N = (b^(r s)) (b^(phi(N) t)) mod N = ((b^(r))^(s) mod N) ((b^(phi(N)))^(t) mod N) $ Per il @Euler-theorem, si ha $b^(phi(N)) equiv 1 mod N$, in quanto $b$ e $N$ sono stati assunti coprimi per ipotesi, ed a maggior ragione $(b^(phi(N)))^(t) equiv 1 mod N$. Pertanto: $ ((b^(r))^(s) mod N) ((b^(phi(N)))^(t) mod N) = ((b^(r))^(s) mod N) (1 mod N) = a^(s) mod N $ Si consideri invece il caso in cui $b$ ed $N$ non siano coprimi. Essendo $N$ il prodotto di due numeri primi distinti $p$ e $q$ ed avendo scelto come inferiore ad $N$, $b$ deve essere multiplo o di $p$ o di $q$. Si assuma, senza perdita di generalitá, che $b$ sia multiplo di $p$, ovvero che esista un $q in ZZ$ maggiore di $k$ tale per cui $b = k p$. Essendo $p$ e $q$ primi ed avendo assunto che $b$ sia multiplo di $q$, deve aversi che $q$ e $b$ siano coprimi. Per il @Euler-theorem, deve valere $b^(phi(q)) equiv 1 mod q$, dove $phi(q) = q - 1$ per il @Euler-function-single-prime. Si ha poi: $ b^(phi(N)) = b^(phi(p q)) = b^((q − 1)(p − 1)) = (b^(q − 1))^(p − 1) equiv b^(−t phi(N)) equiv 1 mod q $ La congruenza $b^(-t phi(N)) equiv 1 mod q$ equivale a $b^(-t phi(N)) = 1 + w q$ per un certo $w in ZZ$. Si ha: $ b^(-t phi(N)) = 1 + w q => b^(1 -t phi(N)) = b + b w q => b^(1 -t phi(N)) = b + w k N => b^(r s) = b + w k N equiv b mod N $ Ovvero, anche in questo caso: $ a^(s) mod N = (b^(r))^(s) mod N = b^(r s) mod N = b $ ] #example[ Si supponga che Bob voglia inviare ad Alice un messaggio, occultandolo usando il sistema crittografico RSA. Si assuma innanzitutto che entrambi sappiano che la conversione carattere/numero venga fatta con unitá di grandezza $1$ mediante questo schema: #align( center, table( columns: 22, [A], [B], [C], [D], [E], [F], [G], [H], [I], [L], [M], [N], [O], [P], [Q], [R], [S], [T], [U], [V], [Z], [#math.qed], [2], [3], [4], [5], [6], [7], [8], [9], [29], [31], [12], [13], [14], [37], [16], [17], [18], [19], [43], [21], [22], [23] ) ) Alice sceglie i numeri primi $p = 5$ e $q = 11$. A partire da questi, Alice calcola: $ N = p q = 55 space space space phi(N) = phi(55) = phi(5) dot phi(11) = (5 - 1) dot (11 - 1) = 40 $ Alice sceglie poi il numero $r = 37$ tale che $r < phi(N)$ e $"MCD"(r, phi(N)) = "MCD"(37, 40) = 1$. A partire da questi, Alice calcola due interi $s$ e $t$ per i quali $37 s + 40 t = 1$, mediante l'algoritmo di Euclide: #set math.mat(delim: none) #grid( columns: (0.5fr, 0.5fr), [ $ mat( 40 &= 37 dot 1 + 3; 37 &= 3 dot 12 + 1; 3 &= 3 dot 1 + 0; ) $ ], [ $ mat( 3 &= 40 − 37; 1 &= 37 − 12 dot 3 = 37 − 12(40 − 37) ; &= −12 dot 40 + 13 dot 37; ) $ ] ) Ottenendo $t = −12$ e $s = 13$. A questo punto, Alice ha ricavato la chiave di cifratura $(N, r) = (55, 37)$, e la rende pubblica. Bob legge le informazioni rese pubbliche da Alice e le spedisce il messaggio seguente: #align( center, table( columns: 15, [26], [7], [21], [9], [52], [7], [52], [41], [23], [28], [24], [7], [18], [49], [7] ) ) Alice decodifica ciascuna unitá del messaggio a parire dall'equivalenza $b = a^(s) mod N$: $ mat( 26^(13) mod 55 &= 31, 7^(13) mod 55 &= 2, 21^(13) mod 55 &= 21, 9^(13) mod 55 &= 14, 52^(13) mod 55 &= 17; 7^(13) mod 55 &= 2, 52^(13) mod 55 &= 17, 41^(13) mod 55 &= 6, 23^(13) mod 55 &= 23, 28^(13) mod 55 &= 18; 24^(13) mod 55 &= 19, 7^(13) mod 55 &= 2, 18^(13) mod 55 &= 13, 49^(13) mod 55 &= 4, 7^(13) mod 55 &= 2; ) $ Il messaggio decodificato é quindi: #align( center, table( columns: 15, [31], [2], [21], [14], [17], [2], [17], [6], [23], [18], [19], [2], [13], [4], [2] ) ) Convertendo ordinatamente ciascuna unitá da numero a carattere, si ottiene: #align( center, table( columns: 15, [L], [A], [V], [O], [R], [A], [R], [E], [#math.qed], [S], [T], [A], [N], [C], [A] ) ) ] La funzione di cifratura dell'algoritmo RSA é effettivamente una one-way function perché per conoscere il termine $s$ della chiave di decifratura é necessario risolvere $r s + phi(N) t = 1$, che a sua volta richiede di calcolare $phi(N)$. Il problema é che, per le proprietá della funzione di Eulero, tale valore é facile da calcolare solamente se é nota la fattorizzazione in numeri primi di $N$, e tale informazione é nota solamente ad Alice. Sebbene sarebbe tecnicamente possibile determinare la fattorizzazione in numeri primi di qualsiasi intero, realisticamente questo richiede tempi troppo lunghi, specialmente se l'intero in questione é molto grande #footnote[A dire il vero, non é mai stato dimostrato che non possa esistere un algoritmo in grado di calcolare velocemente la fattorizzazione in numeri primi. Per tale motivo, al momento questa é soltanto una congettura.].
https://github.com/zurgl/typst-resume
https://raw.githubusercontent.com/zurgl/typst-resume/main/templates/resume/skills.typ
typst
#import "../../metadata.typ": * #import "../commun.typ": * #import "@preview/fontawesome:0.1.0": * /* resumse skills */ #let skillTypeStyle(str) = { align(right, text(size: 10pt, weight: "bold", str)) } #let skillInfoStyle(str) = { text(str) } #let cvSkill(type: "Type", info: "Info") = { table( columns: (16%, 1fr), inset: 0pt, column-gutter: 10pt, stroke: none, skillTypeStyle(type), skillInfoStyle(info), ) v(-6pt) }
https://github.com/Mc-Zen/quill
https://raw.githubusercontent.com/Mc-Zen/quill/main/src/gates.typ
typst
MIT License
#import "layout.typ" #import "process-args.typ" #import "draw-functions.typ" /// This is the basic command for creating gates. Use this to create a simple gate, e.g., `gate($X$)`. /// For special gates, many other dedicated gate commands exist. /// /// Note, that most of the parameters listed here are mostly used for derived gate /// functions and do not need to be touched in all but very few cases. /// /// //#example(`quill.quantum-circuit(1, quill.gate($H$), 1)`) /// /// - content (content): What to show in the gate (may be none for special gates like @@ctrl() ). /// - x (auto, int): The column to put the gate in. /// - y (auto, int): The row to put the gate in. /// - fill (none, color): Gate background fill color. /// - radius (length, dictionary): Gate rectangle border radius. /// Allows the same values as the builtin `rect()` function. /// - width (auto, length): The width of the gate can be specified manually with this property. /// - box (boolean): Whether this is a boxed gate (determines whether the outgoing /// wire will be drawn all through the gate (`box: false`) or not). /// - floating (boolean): Whether the content for this gate will be shown floating /// (i.e. no width is reserved). /// - multi (dictionary): Information for multi-qubit and controlled gates (see @@mqgate() ). /// - size-hint (function): Size hint function. This function should return a dictionary /// containing the keys `width` and `height`. The result is used to determine /// the gates position and cell sizes of the grid. /// Signature: `(gate, draw-params) => {}`. /// - draw-function (function): Drawing function that produces the displayed content. /// Signature: `(gate, draw-params) => {}`. /// - label (array, str, content, dictionary): One or more labels to add to the gate. /// Usually, a label consists of a dictionary with entries for the keys /// `content` (the label content), `pos` (2d alignment specifying the /// position of the label) and optionally `dx` and/or `dy` (lengths, ratios /// or relative lengths). If only a single label is to be added, a plain /// content or string value can be passed which is then placed at the default /// position. /// /// - data (any): Optional additional gate data. This can for example be a dictionary /// storing extra information that may be used for instance in a custom /// `draw-function`. #let gate( content, x: auto, y: auto, fill: auto, stroke: auto, radius: 0pt, width: auto, box: true, floating: false, multi: none, size-hint: layout.default-size-hint, draw-function: draw-functions.draw-boxed-gate, gate-type: "", data: none, label: none ) = ( content: content, x: x, y: y, fill: fill, stroke: stroke, radius: radius, width: width, box: box, floating: floating, multi: multi, size-hint: size-hint, draw-function: draw-function, gate-type: gate-type, data: data, labels: process-args.process-label-arg(label, default-pos: top) ) /// Basic command for creating multi-qubit or controlled gates. See also @@ctrl() and @@swap(). /// /// - content (content): /// - n (int): Number of wires the multi-qubit gate spans. /// - x (auto, int): The column to put the gate in. /// - y (auto, int): The row to put the gate in. /// - target (none, int): If specified, a control wire is drawn from the gate up /// or down this many wires counted from the wire this `mqgate()` is placed on. /// - fill (none, color): Gate background fill color. /// - radius (length, dictionary): Gate rectangle border radius. /// Allows the same values as the builtin `rect()` function. /// - width (auto, length): The width of the gate can be specified manually with this property. /// - box (boolean): Whether this is a boxed gate (determines whether the /// outgoing wire will be drawn all through the gate (`box: false`) or not). /// - wire-count (int): Wire count for control wires. /// - inputs (none, array): You can put labels inside the gate to label the input wires with /// this argument. It accepts a list of labels, each of which has to be a dictionary /// with the keys `qubit` (denoting the qubit to label, starting at 0) and `content` /// (containing the label content). Optionally, providing a value for the key `n` allows /// for labelling multiple qubits spanning over `n` wires. These are then grouped by a /// brace. /// - outputs (none, array): Same as `inputs` but for gate outputs. /// - extent (auto, length): How much to extent the gate beyond the first and /// last wire, default is to make it align with an X gate (so [size of x gate] / 2). /// - size-all-wires (none, boolean): A single-qubit gate affects the height of the row /// it is being put on. For multi-qubit gate there are different possible /// behaviours: /// - Affect height on only the first and last wire (`false`) /// - Affect the height of all wires (`true`) /// - Affect the height on no wire (`none`) /// - label (array, str, content, dictionary): One or more labels to add to the gate. /// See @@gate(). /// - wire-label (array, str, content, dictionary): One or more labels to add to the /// control wire. Works analogous to `labels` but with default positioning to the /// right of the wire. /// - data (any): Optional additional gate data. This can for example be a dictionary /// storing extra information that may be used for instance in a custom /// `draw-function`. #let mqgate( content, x: auto, y: auto, n: 1, target: none, fill: auto, stroke: auto, radius: 0pt, width: auto, box: true, wire-count: 1, inputs: none, outputs: none, extent: auto, size-all-wires: false, draw-function: draw-functions.draw-boxed-multigate, label: none, wire-label: none, data: none, ) = gate( content, x: x, y: y, fill: fill, stroke: stroke, box: box, width: width, radius: radius, draw-function: draw-function, multi: ( target: target, num-qubits: n, wire-count: wire-count, label: label, extent: extent, size-all-wires: size-all-wires, inputs: inputs, outputs: outputs, wire-label: process-args.process-label-arg(wire-label, default-pos: right), ), label: label, data: data, ) // SPECIAL GATES /// Draw a meter box representing a measurement. /// - target (none, int): If given, draw a control wire to the given target /// qubit the specified number of wires up or down. /// - wire-count (int): Wire count for the (optional) control wire. /// - n (int): Number of wires to span this meter across. /// - label (array, str, content, dictionary): One or more labels to add to the gate. /// See @@gate(). #let meter( target: none, n: 1, x: auto, y: auto, wire-count: 2, label: none, fill: auto, radius: 0pt ) = { label = if label != none {(content: label, pos: top, dy: -0.5em)} else { () } if target == none and n == 1 { gate(none, x: x, y: y, fill: fill, radius: radius, draw-function: draw-functions.draw-meter, data: (meter-label: label), label: label) } else { mqgate(none, x: x, y: y, n: n, target: target, fill: fill, radius: radius, box: true, wire-count: wire-count, draw-function: draw-functions.draw-meter, data: (meter-label: label), label: label) } } /// Create a visualized permutation gate which maps the qubits $q_k, q_(k+1), ... $ to /// the qubits $q_(p(k)), q_(p(k+1)), ...$ when placed on the qubit $k$. The permutation /// map is given by the `qubits` argument. Note, that qubit indices start with 0. /// /// *Example:* /// /// `permute(1, 0)` when placed on the second wire swaps the second and third wire. /// /// `permute(2, 0, 1)` when placed on wire 0 maps $(0,1,2) arrow.bar (2,0,1)$. /// /// Note also, that the wiring is not very sophisticated and will probably look best for /// relatively simple permutations. Furthermore, it only works with quantum wires. /// /// - ..qubits (array): Qubit permutation specification. /// - width (length): Width of the permutation gate. /// - bend (ratio): How much to bend the wires. With `0%`, the wires are straight. /// - separation (auto, none, length, color, stroke): Overlapping wires are separated by drawing a thicker line below. With this option, this line can be customized in color or thickness. #let permute( ..qubits, width: 30pt, bend: 100%, separation: auto, x: auto, y: auto, ) = { if qubits.named().len() != 0 { assert(false, message: "Unexpected named argument `" + qubits.named().keys().first() + "` in function `permute()`") } mqgate(none, n: qubits.pos().len(), width: width, draw-function: draw-functions.draw-permutation-gate, data: (qubits: qubits.pos(), extent: 2pt, separation: separation, bend: bend)) } /// Create an invisible (phantom) gate for reserving space. If `content` /// is provided, the `height` and `width` parameters are ignored and the gate /// will take the size it would have if `gate(content)` was called. /// /// Instead specifying width and/or height will create a gate with exactly the /// given size (without padding). /// /// - content (content): Content to measure for the phantom gate size. /// - width (length): Width of the phantom gate (ignored if `content` is not `none`). /// - height (length): Height of the phantom gate (ignored if `content` is not `none`). #let phantom(content: none, width: 0pt, height: 0pt) = { let thecontent = if content != none { box(hide(content)) } else { box(width: width, height: height) } gate(thecontent, box: false, fill: none) } /// Target element for controlled-X operations (#sym.plus.circle). /// - fill (none, color, auto): Fill color for the target circle. If set /// to `auto`, the target is filled with the circuits background color. /// - size (length): Size of the target symbol. #let targ( fill: none, size: 4.3pt, label: none, x: auto, y: auto, ) = gate( none, x: x, y: y, box: false, draw-function: draw-functions.draw-targ, fill: if fill == true {auto} else if fill == false {none} else {fill}, data: (size: size), label: label ) /// Target element for controlled-Z operations (#sym.bullet). /// /// - open (boolean): Whether to draw an open dot. /// - fill (none, color): Fill color for the circle or stroke color if /// `open: true`. /// - size (length): Size of the control circle. // #let ctrl(open: false, fill: none, size: 2.3pt) = gate(none, draw-function: draw-ctrl, fill: fill, size: size, box: false, open: open) /// Target element for #smallcaps("swap") operations (#sym.times) without vertical wire). /// - size (length): Size of the target symbol. #let targX(size: 7pt, label: none, x: auto, y: auto) = gate(none, x: x, y: y, box: false, draw-function: draw-functions.draw-swap, data: (size: size), label: label) /// Create a phase gate shown as a point on the wire together with a label. /// /// - label (content): Angle value to display. /// - open (boolean): Whether to draw an open dot. /// - fill (none, color): Fill color for the circle or stroke color if /// `open: true`. /// - size (length): Size of the circle. #let phase( label, open: false, fill: auto, size: 2.3pt, x: auto, y: auto ) = gate( none, x: x, y: y, box: false, draw-function: (gate, draw-params) => box( inset: (x: .6em), draw-functions.draw-ctrl(gate, draw-params) ), fill: fill, data: (open: open, size: size), label: process-args.process-label-arg(label, default-pos: top + right, default-dx: -.5em) ) /// Creates a #smallcaps("swap") operation with another qubit. /// /// - n (int): How many wires up or down the target wire lives. /// - size (length): Size of the target symbol. /// - wire-label (array, str, content, dictionary): One or more labels /// to add to the control wire. See @@mqgate(). #let swap( n, wire-count: 1, size: 7pt, label: none, wire-label: none, x: auto, y: auto ) = mqgate( none, x: x, y: y, target: n, box: false, draw-function: draw-functions.draw-swap, wire-count: wire-count, data: (size: size), label: label, wire-label: wire-label ) /// Creates a control with a vertical wire to another qubit. /// /// - n (int): How many wires up or down the target wire lives. /// - wire-count (int): Wire count for the control wire. /// - open (boolean): Whether to draw an open dot. /// - fill (none, color): Fill color for the circle or stroke color if /// `open: true`. /// - size (length): Size of the control circle. /// - show-dot (boolean): Whether to show the control dot. Set this to /// false to obtain a vertical wire with no dots at all. /// - wire-label (array, str, content, dictionary): One or more labels /// to add to the control wire. See @@mqgate(). #let ctrl( n, wire-count: 1, open: false, fill: auto, size: 2.3pt, show-dot: true, label: none, wire-label: none, x: auto, y: auto ) = mqgate( none, x: x, y: y, target: n, box: false, draw-function: draw-functions.draw-ctrl, wire-count: wire-count, fill: fill, data: (open: open, size: size, show-dot: show-dot), label: label, wire-label: wire-label )
https://github.com/memset0/ZJU-Project-Report-Template
https://raw.githubusercontent.com/memset0/ZJU-Project-Report-Template/master/template.typ
typst
MIT License
#import "@preview/tablex:0.0.8": tablex, colspanx, rowspanx, hlinex, vlinex, cellx #import "@preview/showybox:2.0.1": showybox #let state_course = state("course", none) #let state_author = state("author", none) #let state_school_id = state("school_id", none) #let state_date = state("date", none) #let state_theme = state("theme", none) #let state_block_theme = state("block_theme", none) #let _underlined_cell(content, color: black) = { tablex( align: center + horizon, stroke: 0pt, inset: 0.75em, map-hlines: h => { if (h.y > 0) { (..h, stroke: 0.5pt + color) } else { h } }, columns: (1fr), content, ) } #let fakebold(content) = { set text(stroke: 0.02857em) // https://gist.github.com/csimide/09b3f41e838d5c9fc688cc28d613229f content } #let project( theme: "project", block_theme: "default", course: "<course>", title: "<title>", title_size: 3em, cover_image_padding: 1em, cover_image_size: none, semester: "<semester>", name: none, author: none, school_id: none, date: none, college: none, place: none, teacher: none, major: none, cover_comments: none, cover_comments_size: 1.25em, language: none, table_of_contents: none, font_serif: ( "New Computer Modern", "Georgia", "Nimbus Roman No9 L", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "STSong", "AR PL New Sung", "AR PL SungtiL GB", "NSimSun", "SimSun", "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", "PMingLiU", "MingLiU", ), font_sans_serif: ( "Noto Sans", "Helvetica Neue", "Helvetica", "Nimbus Sans L", "Arial", "Liberation Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", "SimHei", "WenQuanYi Zen Hei Sharp", ), font_mono: ("Consolas", "Monaco"), body, ) = { font_mono = (..font_mono, ..font_sans_serif) if (theme == "lab") { if (cover_image_size == none) { cover_image_size = 48% } } else if (theme == "project") { if (cover_image_size == none) { cover_image_size = 50% } if (language == none) { language = "en" } if (table_of_contents == none) { table_of_contents = true } } // fallback if (language == none) { language = "cn" } if (table_of_contents == none) { table_of_contents = false } set document(author: (author), title: title) set page(numbering: "1", number-align: center) set text(font: font_serif, lang: language, size: 12pt) show raw: set text(font: font_mono) show math.equation: set text(weight: 400) show par: set block(above: 1.2em, below: 1.2em) set par(leading: 0.75em) // Update global state state_course.update(course) state_author.update(author) state_school_id.update(school_id) state_date.update(date) state_theme.update(theme) state_block_theme.update(block_theme) // Cover Page if (theme == "lab") { v(1fr) align(center, image("./images/ZJU-Banner.png", width: cover_image_size)) align(center)[ #set text(size: 26pt) #fakebold[本科实验报告] ] v(2fr) let rows = () if (course != none) { rows.push("课程名称") rows.push(course) } if (name != none) { rows.push("实验名称") rows.push(name) } if (author != none) { rows.push([姓$space.quad space.quad$名]) rows.push(author) } if (school_id != none) { rows.push([学$space.quad space.quad$号]) rows.push(school_id) } if (college != none) { rows.push([学$space.quad space.quad$院]) rows.push(college) } if (major != none) { rows.push([专$space.quad space.quad$业]) rows.push(major) } if (place != none) { rows.push([实验地点]) rows.push(place) } if (teacher != none) { rows.push([指导教师]) rows.push(teacher) } if (date != none) { rows.push([报告日期]) rows.push(date) } align( center, box(width: 75%)[ #set text(size: 1.2em) #tablex( columns: (6.5em + 5pt, 1fr), align: center + horizon, stroke: 0pt, // stroke: 0.5pt + red, // this line is just for testing inset: 1pt, map-cells: cell => { if (cell.x == 0) { _underlined_cell([#cell.content#":"], color: white) } else { _underlined_cell(cell.content, color: black) } }, ..rows, ) ], ) v(2fr) pagebreak() } else if (theme == "project") { v(1fr) box( width: 100%, align(center)[ #text(2em, weight: 900)[ #course ] #text(title_size, weight: 700)[ #title ] #v(cover_image_padding) #image("./images/ZJU-Logo.png", width: cover_image_size) #v(cover_image_padding) #if (cover_comments == none) [ #text(cover_comments_size)[ #v(1em) #if (author != none) [ Author: #author ] Date: #date #semester Semester ] ] else [ // If cover_comments is assigned, it will be used as the cover's original comments #cover_comments ] ], ) v(4fr) pagebreak() } else if (theme == "nocover") { // no cover page } else { set text(fill: red, size: 3em, weight: 900) align(center)[Theme not found!] pagebreak() } if (table_of_contents) { outline(title: text(1.1em, "Table of Contents"), depth: 3, indent: 1.2em) pagebreak() } set par(justify: true) set table(align: center + horizon, stroke: 0.5pt) if (theme == "lab") { set heading(numbering: (..args) => { let nums = args.pos() if nums.len() == 1 { return none } else if nums.len() == 2 { return numbering("一、", ..nums.slice(1)) } else { return numbering("1.1)", ..nums.slice(1)) } }) show heading.where(level: 1): it => block( width: 100%, { set align(center) set text(size: 1.2em) it.body v(0.6em) }, ) body } else { set heading(numbering: (..args) => { let nums = args.pos() if nums.len() == 1 { return none } else { return numbering("1.1)", ..nums) } }) body } } #let codex(code, lang: none, size: 1em, border: true) = { if code.len() > 0 { if code.ends-with("\n") { code = code.slice(0, code.len() - 1) } } else { code = "// no code" } set text(size: size) align(left)[ #if border == true { block(width: 100%, stroke: 0.5pt + luma(150), radius: 4pt, inset: 8pt)[ #raw(lang: lang, block: true, code) ] } else { raw(lang: lang, block: true, code) } ] } #let importCode(file, namespace: none, lang: "cpp") = { let source_code = read(file) let code = "" let note = "" let flag = false let firstlines = true for line in source_code.split("\n") { if namespace != none and line == ("} // namespace " + namespace) { flag = false } if namespace == none or flag { if firstlines and line.starts-with("// ") { note += line.slice(3) + "\n" } else { code += line + "\n" firstlines = false } } if namespace != none and line == ("namespace " + namespace + " {") { flag = true } } if note.len() > 0 { block(note) } codex(code, lang: lang, size: 1.05em) } #let lab_header( course: none, type: "综合", name: "<name>", author: none, school_id: none, place: "<place>", date: none, ) = { pagebreak(weak: true) align(center)[ #set text(size: 1.5em) #fakebold[浙江大学实验报告] ] tablex( columns: (1fr, 0.32fr, 1.68fr, 1fr, 1fr, 1fr), align: center + horizon, stroke: 0pt, inset: 1pt, _underlined_cell("课程名称:", color: white), colspanx( 2, _underlined_cell(if course == none { state_course.display() } else { course }), ), (), _underlined_cell("实验类型:", color: white), colspanx(2, _underlined_cell(type)), (), colspanx(2, _underlined_cell("实验项目名称:", color: white)), (), colspanx(4, _underlined_cell(name)), (), (), (), _underlined_cell("学生姓名:", color: white), colspanx( 2, _underlined_cell(if author == none { state_author.display() } else { author }), ), (), _underlined_cell("学号:", color: white), colspanx( 2, _underlined_cell(if school_id == none { state_school_id.display() } else { school_id }), ), (), _underlined_cell("实验地点:", color: white), colspanx(2, _underlined_cell(place)), (), _underlined_cell("实验日期:", color: white), colspanx( 2, _underlined_cell(if date == none { state_date.display() } else { date }), ), (), ) } #let table3( // 三线表 ..args, inset: 0.5em, stroke: 0.5pt, align: center + horizon, columns: (1fr), ) = { tablex( columns: (1fr), inset: 0pt, stroke: 0pt, map-hlines: h => { if (h.y > 0) { (..h, stroke: (stroke * 2) + black) } else { h } }, tablex( ..args, inset: inset, stroke: stroke, align: align, columns: columns, map-hlines: h => { if (h.y == 0) { (..h, stroke: (stroke * 2) + black) } else if (h.y == 1) { (..h, stroke: stroke + black) } else { (..h, stroke: 0pt) } }, auto-vlines: false, ), ) } #let figurex(img, caption) = { show figure.caption: it => { set text(size: 0.9em, fill: luma(100), weight: 700) it v(0.1em) } set figure.caption(separator: ":") figure( img, caption: [ #set text(weight: 400) #caption ], ) } #let blockx(it, name: "", color: red, theme: none) = { context { let _theme = theme if (_theme == none) { _theme = state_block_theme.get() } if (_theme == "default") { let _inset = 0.8em let _color = color.darken(5%) v(0.2em) block(below: 1em, stroke: 0.5pt + _color, radius: 3pt, width: 100%, inset: _inset)[ #place( top + left, dy: -6pt - _inset, // Account for inset of block dx: 8pt - _inset, block(fill: white, inset: 2pt)[ #set text(font: "Noto Sans", fill: _color) #name ], ) #set text(fill: _color) #set par(first-line-indent: 0em) #it ] } else if (_theme == "boxed") { showybox( title: name, frame: ( border-color: color, title-color: color.lighten(20%), body-color: color.lighten(95%), footer-color: color.lighten(80%), ), it, ) } else if (_theme == "float") { showybox( title-style: ( boxed-style: (anchor: (x: center, y: horizon), radius: (top-left: 10pt, bottom-right: 10pt, rest: 0pt)), ), frame: ( title-color: color.darken(5%), body-color: color.lighten(95%), footer-color: color.lighten(60%), border-color: color.darken(20%), radius: (top-left: 10pt, bottom-right: 10pt, rest: 0pt), ), title: name, [ #it #v(0.25em) ], ) } else if (_theme == "thickness") { showybox( title-style: (color: color.darken(20%), sep-thickness: 0pt, align: center), frame: (title-color: color.lighten(85%), border-color: color.darken(20%), thickness: (left: 1pt), radius: 0pt), title: name, it, ) } else if (_theme == "dashed") { showybox( title: name, frame: ( border-color: color, title-color: color, radius: 0pt, thickness: 1pt, body-inset: 1em, dash: "densely-dash-dotted", ), it, ) } else { block( width: 100%, stroke: 0.5pt + red, inset: 1em, radius: 5pt, align(center)[ #set text(fill: red, size: 1.5em) Unknown block theme! ], ) } } } #let example(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Example") }, color: gray.darken(60%), ) #let proof(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Proof") }, color: rgb(120, 120, 120), ) #let abstract(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Abstract") }, color: rgb(0, 133, 143), ) #let summary(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Summary") }, color: rgb(0, 133, 143), ) #let info(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Info") }, color: rgb(68, 115, 218), ) #let note(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Note") }, color: rgb(68, 115, 218), ) #let tip(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Tip") }, color: rgb(0, 133, 91), ) #let hint(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Hint") }, color: rgb(0, 133, 91), ) #let success(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Success") }, color: rgb(62, 138, 0), ) #let important(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Important") }, color: rgb(62, 138, 0), ) #let help(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Help") }, color: rgb(153, 110, 36), ) #let warning(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Warning") }, color: rgb(184, 95, 0), ) #let attention(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Attention") }, color: rgb(216, 58, 49), ) #let caution(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Caution") }, color: rgb(216, 58, 49), ) #let failure(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Failure") }, color: rgb(216, 58, 49), ) #let danger(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Danger") }, color: rgb(216, 58, 49), ) #let error(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Error") }, color: rgb(216, 58, 49), ) #let bug(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Bug") }, color: rgb(204, 51, 153), ) #let quote(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Quote") }, color: rgb(132, 90, 231), ) #let cite(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Cite") }, color: rgb(132, 90, 231), ) #let experiment(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Experiment") }, color: rgb(132, 90, 231), ) #let question(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Question") }, color: rgb(132, 90, 231), ) #let analysis(it, name: none) = blockx( it, name: if (name != none) { name } else { strong("Analysis") }, color: rgb(0, 133, 91), )
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/raw-line_01.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page #set page(width: 200pt) #show raw: it => stack(dir: ttb, ..it.lines) #show raw.line: it => { box( width: 100%, height: 1.75em, inset: 0.25em, fill: if calc.rem(it.number, 2) == 0 { luma(90%) } else { white }, align(horizon, stack( dir: ltr, box(width: 15pt)[#it.number], it.body, )) ) } ```typ #show raw.line: block.with( fill: luma(60%) ); Hello, world! = A heading for good measure ```
https://github.com/krestenlaust/AAU-Typst-Template
https://raw.githubusercontent.com/krestenlaust/AAU-Typst-Template/main/report-template/main.typ
typst
MIT License
#import "template.typ": * // Take a look at the file `template.typ` in the file panel // to customize this template and discover how it works. #show: project.with( meta: ( title: "A demonstration of the features of Typst", theme: "Marvelous Theme", project_period: "Fall Semester 2023", project_group: "group 1", participants: ( (name: "Kresten", email: "<EMAIL>"), (name: "Laust", email: "<EMAIL>"), (name: "Anders", email: "<EMAIL>"), (name: "Mikkel", email: "<EMAIL>"), (name: "Cathrine", email: "<EMAIL>"), ), supervisor: ( (name: "<NAME>", email: "<EMAIL>"), ), date: datetime.today().display() ), // Insert your abstract after the colon, wrapped in brackets. // Example: `abstract: [This is my abstract...]` abstract: lorem(59), department: "Computer Science", ) // This is the primary file in the project. // Commonly referred to as 'master' in LaTeX, and wokenly called 'main' in Typst. #include "chapters/introduction.typ" #pagebreak(weak: true) #include "chapters/technical_elements.typ" #pagebreak(weak: true) #include "chapters/understanding_typst.typ" #pagebreak(weak: true) #bibliography("sources/sample.bib")
https://github.com/protohaven/printed_materials
https://raw.githubusercontent.com/protohaven/printed_materials/main/common-tools/table_saw.typ
typst
#import "../environment/env-protohaven-class_handouts.typ": * = Table Saw Table saws are... (Overview paragraph(s)) Protohaven has two table saws in the wood shop. == Notes === Safety === Common Hazards === Care === Use === Consumables There are several shop blades available for member use with the table saws. There is a dado stack available for member use as part of the table saw kit, available form the front desk. // TODO: check this The table saws have a 5/8″ arbor, and can accept blades up to 12" in diameter. == Parts of the TOOL === == Basic Operation === Setting Up === Workholding === USE === Cleaning Up
https://github.com/JakMobius/courses
https://raw.githubusercontent.com/JakMobius/courses/main/mipt-os-basic-2024/sem-template/main.typ
typst
#import "@preview/polylux:0.3.1": * #import "@preview/cetz:0.2.2" #import "../theme/theme.typ": * #show: theme #title-slide[ #align(horizon + center)[ = Заголовок АКОС, МФТИ XX сентября, 20XX ] ] #show: enable-handout #slide[ // ... ] #title-slide[ #place(horizon + center)[ = Спасибо за внимание! ] #place( bottom + center, )[ // #qr-code("https://github.com/JakMobius/courses/tree/main/mipt-os-basic-2024", width: 5cm) #box( baseline: 0.2em + 4pt, inset: (x: 15pt, y: 15pt), radius: 5pt, stroke: 3pt + rgb(185, 186, 187), fill: rgb(240, 240, 240), )[ 🔗 #link( "https://github.com/JakMobius/courses/tree/main/mipt-os-basic-2024", )[*github.com/JakMobius/courses/tree/main/mipt-os-basic-2024*] ] ] ]
https://github.com/TJ-CSCCG/tongji-slides-typst
https://raw.githubusercontent.com/TJ-CSCCG/tongji-slides-typst/main/theme/logic.typ
typst
MIT License
#let subslide = counter("subslide") #let pause-counter = counter("pause-counter") #let logical-slide = counter("logical-slide") #let repetitions = counter("repetitions") #let handout-mode = state("handout-mode", false) #let enable-handout-mode(flag) = handout-mode.update(flag) #let _slides-cover(mode, body) = { if mode == "invisible" { hide(body) } else if mode == "transparent" { text(gray.lighten(50%), body) } else { panic("Illegal cover mode: " + mode) } } #let _parse-subslide-indices(s) = { let parts = s.split(",").map(p => p.trim()) let parse-part(part) = { let match-until = part.match(regex("^-([[:digit:]]+)$")) let match-beginning = part.match(regex("^([[:digit:]]+)-$")) let match-range = part.match(regex("^([[:digit:]]+)-([[:digit:]]+)$")) let match-single = part.match(regex("^([[:digit:]]+)$")) if match-until != none { let parsed = int(match-until.captures.first()) // assert(parsed > 0, "parsed idx is non-positive") ( until: parsed ) } else if match-beginning != none { let parsed = int(match-beginning.captures.first()) // assert(parsed > 0, "parsed idx is non-positive") ( beginning: parsed ) } else if match-range != none { let parsed-first = int(match-range.captures.first()) let parsed-last = int(match-range.captures.last()) // assert(parsed-first > 0, "parsed idx is non-positive") // assert(parsed-last > 0, "parsed idx is non-positive") ( beginning: parsed-first, until: parsed-last ) } else if match-single != none { let parsed = int(match-single.captures.first()) // assert(parsed > 0, "parsed idx is non-positive") parsed } else { panic("failed to parse visible slide idx:" + part) } } parts.map(parse-part) } #let _check-visible(idx, visible-subslides) = { if type(visible-subslides) == "integer" { idx == visible-subslides } else if type(visible-subslides) == "array" { visible-subslides.any(s => _check-visible(idx, s)) } else if type(visible-subslides) == "string" { let parts = _parse-subslide-indices(visible-subslides) _check-visible(idx, parts) } else if type(visible-subslides) == "dictionary" { let lower-okay = if "beginning" in visible-subslides { visible-subslides.beginning <= idx } else { true } let upper-okay = if "until" in visible-subslides { visible-subslides.until >= idx } else { true } lower-okay and upper-okay } else { panic("you may only provide a single integer, an array of integers, or a string") } } #let _last-required-subslide(visible-subslides) = { if type(visible-subslides) == "integer" { visible-subslides } else if type(visible-subslides) == "array" { calc.max(..visible-subslides.map(s => _last-required-subslide(s))) } else if type(visible-subslides) == "string" { let parts = _parse-subslide-indices(visible-subslides) _last-required-subslide(parts) } else if type(visible-subslides) == "dictionary" { let last = 0 if "beginning" in visible-subslides { last = calc.max(last, visible-subslides.beginning) } if "until" in visible-subslides { last = calc.max(last, visible-subslides.until) } last } else { panic("you may only provide a single integer, an array of integers, or a string") } } #let _conditional-display(visible-subslides, reserve-space, mode, body) = { locate( loc => { let vs = if reserve-space and handout-mode.at(loc) { (:) } else { visible-subslides } repetitions.update(rep => calc.max(rep, _last-required-subslide(vs))) if _check-visible(subslide.at(loc).first(), vs) { body } else if reserve-space { _slides-cover(mode, body) } }) } #let uncover(visible-subslides, mode: "invisible", body) = { _conditional-display(visible-subslides, true, mode, body) } #let only(visible-subslides, body) = { _conditional-display(visible-subslides, false, "doesn't even matter", body) } #let one-by-one(start: 1, mode: "invisible", ..children) = { for (idx, child) in children.pos().enumerate() { uncover((beginning: start + idx), mode: mode, child) } } #let alternatives-match(subslides-contents, position: bottom + left) = { let subslides-contents = if type(subslides-contents) == "dictionary" { subslides-contents.pairs() } else { subslides-contents } let subslides = subslides-contents.map(it => it.first()) let contents = subslides-contents.map(it => it.last()) style(styles => { let sizes = contents.map(c => measure(c, styles)) let max-width = calc.max(..sizes.map(sz => sz.width)) let max-height = calc.max(..sizes.map(sz => sz.height)) for (subslides, content) in subslides-contents { only(subslides, box( width: max-width, height: max-height, align(position, content) )) } }) } #let alternatives( start: 1, repeat-last: false, ..args ) = { let contents = args.pos() let kwargs = args.named() let subslides = range(start, start + contents.len()) if repeat-last { subslides.last() = (beginning: subslides.last()) } alternatives-match(subslides.zip(contents), ..kwargs) } #let alternatives-fn( start: 1, end: none, count: none, ..kwargs, fn ) = { let end = if end == none { if count == none { panic("You must specify either end or count.") } else { start + count } } else { end } let subslides = range(start, end) let contents = subslides.map(fn) alternatives-match(subslides.zip(contents), ..kwargs.named()) } #let alternatives-cases(cases, fn, ..kwargs) = { let idcs = range(cases.len()) let contents = idcs.map(fn) alternatives-match(cases.zip(contents), ..kwargs.named()) } #let line-by-line(start: 1, mode: "invisible", body) = { let items = if repr(body.func()) == "sequence" { body.children } else { ( body, ) } let idx = start for item in items { if repr(item.func()) != "space" { uncover((beginning: idx), mode: mode, item) idx += 1 } else { item } } } #let _items-one-by-one(fn, start: 1, mode: "invisible", ..args) = { let kwargs = args.named() let items = args.pos() let covered-items = items.enumerate().map( ((idx, item)) => uncover((beginning: idx + start), mode: mode, item) ) fn( ..kwargs, ..covered-items ) } #let list-one-by-one(start: 1, mode: "invisible", ..args) = { _items-one-by-one(list, start: start, mode: mode, ..args) } #let enum-one-by-one(start: 1, mode: "invisible", ..args) = { _items-one-by-one(enum, start: start, mode: mode, ..args) } #let terms-one-by-one(start: 1, mode: "invisible", ..args) = { let kwargs = args.named() let items = args.pos() let covered-items = items.enumerate().map( ((idx, item)) => terms.item( item.term, uncover((beginning: idx + start), mode: mode, item.description) ) ) terms( ..kwargs, ..covered-items ) } #let pause = { // We need two separate `locate`s because `repetitions` needs to be updated // using the new value of `pause-counter`. locate( loc => { if not handout-mode.at(loc) { pause-counter.step() } }) locate( loc => { repetitions.update(rep => calc.max(rep, pause-counter.at(loc).first() + 1)) }) } #let paused-content(body) = locate( loc => { let current-subslide = subslide.at(loc).first() let current-pause-counter = pause-counter.at(loc).first() if current-subslide > current-pause-counter { body } else { hide(body) } }) #let polylux-slide(body) = { locate( loc => { if logical-slide.at(loc).first() > 0 { pagebreak(weak: true) } }) logical-slide.step() subslide.update(1) repetitions.update(1) pause-counter.update(0) show par: paused-content show math.equation: paused-content show box: paused-content show block: paused-content show path: paused-content show rect: paused-content show square: paused-content show circle: paused-content show ellipse: paused-content show line: paused-content show polygon: paused-content show image: paused-content // Having this here is a bit unfortunate concerning separation of concerns // but I'm not comfortable with logic depending on pdfpc... let pdfpc-slide-markers(curr-subslide) = locate( loc => [ #metadata((t: "NewSlide")) <pdfpc> #metadata((t: "Idx", v: counter(page).at(loc).first() - 1)) <pdfpc> #metadata((t: "Overlay", v: curr-subslide - 1)) <pdfpc> #metadata((t: "LogicalSlide", v: logical-slide.at(loc).first())) <pdfpc> ]) pdfpc-slide-markers(1) body subslide.step() set heading(outlined: false) locate( loc => { let reps = repetitions.at(loc).first() for curr-subslide in range(2, reps + 1) { pause-counter.update(0) pagebreak(weak: true) pdfpc-slide-markers(curr-subslide) body subslide.step() } }) }
https://github.com/jgm/typst-hs
https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/ops-prec-02.typ
typst
Other
// Precedence doesn't matter for chained unary operators. // Error: 3-12 cannot apply '-' to boolean #(-not true)
https://github.com/qujihan/typst-beamer
https://raw.githubusercontent.com/qujihan/typst-beamer/main/readme.md
markdown
MIT License
# Beamer in [Typst](https://typst.app/) [中文](https://github.com/qujihan/typst-beamer/blob/main/readme_zh.md) | [English](github.com/qujihan/typst-beamer) [Bilibili](https://www.bilibili.com/video/BV1Nk4y157fu/) ## What does it look like? ![pic_1](./example/example_pic_1.png) ![pic_2](./example/example_pic_2.png) or download [PDF](https://github.com/qujihan/typst-beamer/blob/main/example/example.pdf) ## How to complile example code **Note:** If you use vscode and Typst LSP, it may report an error, that's normal, wait for the plugin to be updated. Linux/Macos ``` typst --root . c ./example/example.typ ``` Windows ``` typst --root . c .\example\example.typ ``` ## Quick Start ``` #import "beamer.typ": beamer #show: beamer.with( title: "Write a Beamer Template in Typst", author: "<EMAIL>", date: "2023-07-17", ) = First == Second ... ``` ` = ` creates a split page, ` == ` creates a new page, and the title at the top of each page is the title of ` = `. ## Thanks [diapo](https://github.com/lvignoli/diapo)
https://github.com/Myriad-Dreamin/typst.ts
https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/meta/cite-form_00.typ
typst
Apache License 2.0
#import "/contrib/templates/std-tests/preset.typ": * #show: test-page #set page(width: 200pt) Nothing: #cite(<arrgh>, form: none) #cite(<netwok>, form: "prose") say stuff. #bibliography("/assets/files/works.bib", style: "apa")
https://github.com/mcanouil/generate-quarto-invoices
https://raw.githubusercontent.com/mcanouil/generate-quarto-invoices/main/_extensions/mcanouil/invoice/template.typ
typst
MIT License
$typst-template.typ()$ $typst-show.typ()$ $body$
https://github.com/jorenchik/db2-cheatsheet
https://raw.githubusercontent.com/jorenchik/db2-cheatsheet/main/main.typ
typst
#import "@preview/tablex:0.0.8": tablex, rowspanx, colspanx #set page(margin: 0.6cm, columns: 3) #set par(justify: true) #set text(6pt) #show heading: it => { if it.level == 1 { text(1em, upper(it)) } else { text(1em, smallcaps(it)) } } #set enum(numbering: "1aiA.") = Indices == Bitmap Each bit in a bitmap corresponds to a possible item or condition, with a bit set to 1 indicating presence or true, and a bit set to 0 indicating absence or `false`. #tablex( stroke: 0.5pt, columns: 4, [record number], `ID`, `gender`, `income_level`, `0`, `76766`, `m`, `L1`, `1`, `22222`, `f`, `L2`, `2`, `12121`, `f`, `L1`, `3`, `15151`, `m`, `L4`, `4`, `58583`, `f`, `L3`, ) #grid( columns: 2, gutter: 2em, tablex( stroke: 0.5pt, columns: 2, colspanx(2)[Bitmaps for `gender`], `m`, `10010`, `f`, `01101`, ), tablex( stroke: 0.5pt, columns: 2, colspanx(2)[Bitmaps for `income_level`], `L1`, `10100`, `L2`, `01000`, `L3`, `00001`, `L4`, `00010`, `L5`, `00000`, ), ) == B+ tree *B+ tree* is a type of self-balancing tree data structure that maintains data sorted and allows searches, sequential access, insertions, and deletions in logarithmic time. It is an extension of the B-tree and is extensively used in databases and filesystems for indexing. B+ tree is *Balanced*; Order (n): Defined such that each node (except root) can have at most $n$ children (pointers) and at least $ceil(n/2)$ children; *Internal nodes hold* between $ceil(n/2)−1$ and $n−1$ keys (values); Leaf nodes hold between $ceil((n−1)/2)$ and $n−1$ keys, but also store all data values corresponding to the keys; *Leaf Nodes Linked*: Leaf nodes are linked together, making range queries and sequential access very efficient. - *Insert (key, data)*: - Insert key in the appropriate leaf node in sorted order; - If the node overflows (more than $n−1$ keys), split it, add the middle key to the parent, and adjust pointers; + Leaf split: $1$ to $ceil(n/2) $ and $ceil(n/2) + 1 $ to $n$ as two leafs. Promote the lowest from the 2nd one. + Node split: $1$ to $ceil((n+1)/2) - 1 $ and $ceil(n/2) + 1$ to $n$. $ceil(n+1/2)$ gets moved up. - If a split propagates to the root and causes the root to overflow, split the root and create a new root. Note: root can contain less than $ceil(n/2) - 1$ keys. - *Delete (key)*: - Remove the key from the leaf node. - If the node underflows (fewer than $ceil(n/2)−1$ keys), keys and pointers are redistributed or nodes are merged to maintain minimum occupancy. Adjustments may propagate up to ensure all properties are maintained. == Hash-index *Hash indices* are a type of database index that uses a hash function to compute the location (hash value) of data items for quick retrieval. They are particularly efficient for equality searches that match exact values. *Hash Function*: A hash function takes a key (a data item's attribute used for indexing) and converts it into a hash value. This hash value determines the position in the hash table where the corresponding record's pointer is stored. *Hash Table*: The hash table stores pointers to the actual data records in the database. Each entry in the hash table corresponds to a potential hash value generated by the hash function. = Algorithms == Nested-loop join *Nested Loop Join*: A nested loop join is a database join operation where each tuple of the outer table is compared against every tuple of the inner table to find all pairs of tuples which satisfy the join condition. This method is simple but can be inefficient for large datasets due to its high computational cost. ```python Simplified version (to get the idea) for each tuple tr in r: (for each tuple ts in s: test pair (tr, ts)) ``` Block transfer cost: $n_r dot b_s + b_r$ block transfers would be required, where $b_r$ -- blocks in relation $r$, same for $s$. Only *2 seeks* are required. == Block-nested join *Block Nested Loop Join*: A block nested loop join is an optimized version of the nested loop join that reads and holds a block of rows from the outer table in memory and then loops through the inner table, reducing the number of disk accesses and improving performance over a standard nested loop join, especially when indices are not available. ```python Simplified version (to get the idea) for each block Br of r: for each block Bs of s: for each tuple tr in r: (for each tuple ts in s: test pair (tr, ts)) ``` // TODO: Add seek information Block transfer cost: $⌈frac(b_r,(M −2))⌉ dot b_s + b_r$, $b_r$ -- blocks in relation $r$, $M$ -- available blocks in memory buffer. Total of $2 dot ⌈frac(b_r,(M −2))⌉$ seeks. == Merge join *Merge Join*: A merge join is a database join operation where both the outer and inner tables are first sorted on the join key, and then merged together by sequentially scanning through both tables to find matching pairs. This method is highly efficient when the tables are *already sorted* or can be *sorted quickly*, minimizes random disk access. Merge-join method is efficient; the number of block transfers is equal to the sum of the number of blocks in both files, $b_r + b_s$. Assuming that $b_b$ buffer blocks are allocated to each relation, the number of disk seeks required would be $ceil(b_r/b_b) + ceil(b_s/b_b)$ disk seeks + Sort Both Tables: If not already sorted, the outer table and the inner table are sorted based on the join keys. + Merge: Once both tables are sorted, the algorithm performs a merging operation similar to that used in merge sort: + Begin with the first record of each table. + Compare the join keys of the current records from both tables. + If the keys match, join the records and move to the next record in both tables. + If the join key of the outer table is smaller, move to the next record in the outer table. + If the join key of the inner table is smaller, move to the next record in the inner table. + Continue this process until all records in either table have been examined. + Output the Joined Rows; == Hash-join *Hash Join*: A hash join is a database join operation that builds an in-memory hash table using the join key from the smaller, often called the build table, and then probes this hash table using the join key from the larger, or probe table, to find matching pairs. This technique is very efficient for *large datasets* where *indexes are not present*, as it reduces the need for nested loops. - $h$ is a hash function mapping JoinAttrs values to ${0, 1, ... , n_h}$, where JoinAttrs denotes the common attributes of $r$ and $s$ used in the natural join. - $r_0, r_1, ..., r_n_h$ denote partitions of $r$ tuples, each initially empty. Each tuple $t_r in r$ is put in partition $r_i$, where $i = h(t_r ["JoinAttrs"])$. - $s_0$, $s_1$, ..., $s_n_h$ denote partitions of s tuples, each initially empty. Each tuple $t_s in s$ is put in partition $s_i$, where $i = h(t_s ["JoinAttrs"])$. Cost of block transfers: $3(b_r + b_s) + 4 n_h$. The hash join thus requires $2(ceil(b_r/b_b) + ceil(b_s/b_b))+ 2n_h$ seeks. $b_b$ blocks are allocated for the input buffer and each output buffer. + Build Phase: + Choose the smaller table (to minimize memory usage) as the "build table." + Create an in-memory hash table. For each record in the build table, compute a hash on the join key and insert the record into the hash table using this hash value as an index. + Probe Phase: + Take each record from the larger table, which is often referred to as the "probe table." + Compute the hash on the join key (same hash function used in the build phase). + Use this hash value to look up in the hash table built from the smaller table. + If the bucket (determined by the hash) contains any entries, check each entry to see if the join key actually matches the join key of the record from the probe table (since hash functions can lead to collisions). + Output the Joined Rows. = Relational-algebra == Equivalence rules + $ sigma_(theta_1 and theta_2)(E) = sigma_theta_1(sigma_theta_2(E)) $ + $ sigma_theta_1(sigma_theta_2(E)) = sigma_theta_2(sigma_theta_1(E)) $ + $ Pi_L_1(Pi_L_2(...(Pi_L_n (E))...)) = Pi_L_1(E) $ -- only the last one matters. + Selections can be combined with Cartesian products and theta joins: $ sigma_theta (E_1 times E_2) = E_1 join_theta E_2 $ $ sigma_theta_1 (E_1 join_theta_2 E_2) = E_1 join_theta_1 and theta_2 E_2 $ + $ E_1 join_theta E_2 = E_2 join_theta E_1 $ + Join associativity: $ (E_1 join E_2) join E_3 = E_1 join (E_2 join E_3) $ $ (E_1 join_theta_1 E_2) join_(theta_2 and theta_3) E_3 = E_1 join_(theta_1 and theta_3) (E_2 join_theta_2 E_3) $ + Selection distribution: $ sigma_theta_1 (E_1 join_theta E_2) = (sigma_theta_0(E_1)) join_theta E_2 $ $ sigma_(theta_1 and theta_2)(E_1 join_theta E_2) = (sigma_theta_1 (E)1)) join_theta (sigma_theta_2 (E_2)) $ + Projection distribution: $ Pi_(L_1 union L_2) (E_1 join_theta E_2) = (Pi_L_1 (E_1) join_theta (Pi_L_2 (E_2))) $ $ Pi_(L_1 union L_2) (E_1 join_theta E_2) = Pi_(L_1 union L_2) ((Pi_(L_1 union L_3) (E_1)) join_theta (Pi_(L_2 union L_4) (E_2))) $ + Union and intersection commmutativity: $ E_1 union E_2 = E_2 union E_1 $ $ E_1 sect E_2 = E_2 sect E_1 $ + Set union and intersection are associative: $ (E_1 union E_2) union E_3 = E_1 union (E_2 union E_3) $ $ (E_1 sect E_2) sect E_3 = E_1 sect (E_2 sect E_3) $ + The selection operation distributes over the union, intersection, and set-difference operations: $ sigma_P (E_1 - E_2) = sigma_P (E_1) - E_2 = sigma_P (E_1) - sigma_P (E_2) $ + The projection operation distributes over the union operation: $ Pi_L (E_1 union E_2) = (Pi_L (E_1)) union (Pi_L (E_2)) $ // FROM Database concepts // == Operations // // - Projection ($pi$). Syntax: $pi_{#[attributes]}(R)$. Purpose: Reduces the // relation to only contain specified attributes. Example: $pi_{#[Name, // Age}]}(#[Employees])$ // // - Selection ($sigma$). Syntax: $sigma_{#[condition]}(R)$. Purpose: Filters rows // that meet the condition. Example: $sigma_{#[Age] > 30}(#[Employees])$ // // - Union ($union$). Syntax: $R union S$. Purpose: Combines tuples from both // relations, removing duplicates. Requirement: Relations must be // union-compatible. // // - Intersection ($sect$). Syntax: $R sect S$. Purpose: Retrieves tuples common // to both relations. Requirement: Relations must be union-compatible. // // - Difference ($-$). Syntax: $R - S$. Purpose: Retrieves tuples in R that are // not in S. Requirement: Relations must be union-compatible. // // - Cartesian Product ($times$). Syntax: $R times S$. Purpose: Combines tuples // from R with every tuple from S. // // - Natural Join ($join$). Syntax: $R join S$. Purpose: Combines tuples from R // and S based on common attribute values. // // - Theta Join ($join_theta$). Syntax: $R join_theta S$. Purpose: Combines tuples // from R and S where the theta condition holds. // // - Full Outer Join: $R join.l.r S$. Left Outer Join: $R join.l S$. // Right Outer Join: $R join.r S$. Purpose: Extends join to include non-matching // tuples from one or both relations, filling with nulls. = Concurrency === Conflict We say that $I$ and $J$ conflict if they are operations by *different transactions* on the *same data item*, and at least one of these instructions is a *write* operation. For example: - $I = #[`read(Q)`]$ , $J = #[`read(Q)`]$ -- Not a conflict; - $I = #[`read(Q)`]$ , $J = #[`write(Q)`]$ -- Conflict; - $I = #[`write(Q)`]$, $J = #[`read(Q)`]$ -- Conflict; - $I = #[`write(Q)`]$, $J = #[`write(Q)`]$ -- Conflict. // + I = read(Q), J = read(Q). The order of I and J *does not matter*, since the same // value of Q is read by $T_i$ and $T _j$, regardless of the order. // // + I = read(Q), J = write(Q). If I comes before J, then Ti does not read the value // of Q that is written by Tj in instruction J. If J comes before I, then Ti reads the // value of Q that is written by Tj. Thus, the order of I and J *matters*. // // + I = write(Q), J = read(Q). The order of I and J *matters* for reasons similar to // those of the previous case. // // + I = write(Q), J = write(Q). Since both instructions are write operations, the // order of these instructions does not affect either Ti or Tj. However, the value // obtained by the next read(Q) instruction of S is affected, since the result of only // the latter of the two write instructions is preserved in the database. If there is no // other write(Q) instruction after I and J in S, then the order of I and J *directly // affects the final value* of Q in the database state that results from schedule S. == Conflict-serializability If a schedule $S$ can be transformed into a schedule $S'$ by a series of swaps of non-conflicting instructions, we say that $S$ and $S'$ are *conflict equivalent*. We can swap only _adjacent_ operations. The concept of conflict equivalence leads to the concept of conflict serializability. We say that a schedule $S$ is *conflict serializable* if it is conflict equivalent to a serial schedule. // TODO: rename to precedence === Precedence graph Simple and efficient method for determining the conflict seriazability of a schedule. Consider a schedule $S$. We construct a directed graph, called a precedence graph, from $S$. The set of vertices consists of all the transactions participating in the schedule. The set of edges consists of all edges $T_i -> T_j$ for which one of three conditions holds: + $T_i$ executes `write(Q)` before $T_j$ executes `read(Q)`. + $T_i$ executes `read(Q)` before $T_j$ executes `write(Q)`. + $T_i$ executes `write(Q)` before $T_j$ executes `write(Q)`. If the precedence graph for $S$ has a cycle, then schedule $S$ is not conflict serializable. If the graph contains no cycles, then the schedule $S$ is conflict serializable. == Standard isolation levels - *Serializable* usually ensures serializable execution. - *Repeatable* read allows only committed data to be read and further requires that, between two reads of a data item by a transaction, no other transaction is allowed to update it. However, the transaction may not be serializable - *Read committed* allows only committed data to be read, but does not require re- peatable reads. - *Read uncommitted* allows uncommitted data to be read. Lowest isolation level allowed by SQL. == Protocols We say that a schedule S is *legal* under a given locking protocol if S is a possible schedule for a set of transactions that follows the rules of the locking protocol. We say that a locking protocol ensures conflict serializability if and only if all legal schedules are *conflict serializable*; in other words, for all legal schedules the associated $->$ relation is acyclic. *Recoverable* schedule is one where, for each pair of transactions $T_i$ and $T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit operation of $T_i$ appears before the commit operation of $T_j$. *Cascadeless* schedule is one where, for each pair of transactions $T_i$ and $T_j$ such that $T_j$ reads a data item previously written by $T_i$, the commit operation of $T_i$ appears before the read operation of $T_j$. Every cascadeless schedule is also recoverable. === Lock-based *Shared Lock* -- If a transaction $T_i$ has obtained a shared-mode lock (denoted by $S$) on item Q, then Ti can read, but cannot write, $Q$. *Exclusive Lock* -- If a transaction $T_i$ has obtained an exclusive-mode lock (denoted by $X$) on item Q, then Ti can both read and write $Q$. ==== 2-phased lock protocol *The Two-Phase Locking (2PL)* Protocol is a concurrency control method used in database systems to ensure serializability of transactions. The protocol involves two distinct phases: *Locking Phase (Growing Phase):* A transaction may acquire locks but cannot release any locks. During this phase, the transaction continues to lock all the resources (data items) it needs to execute. *Unlocking Phase (Shrinking Phase):* The transaction releases locks and cannot acquire any new ones. Once a transaction starts releasing locks, it moves into this phase until all locks are released. ==== Problems of locks *Deadlock* is a condition where two or more tasks are each waiting for the other to release a resource, or more than two tasks are waiting for resources in a circular chain. *Starvation* (also known as indefinite blocking) occurs when a process or thread is perpetually denied necessary resources to process its work. Unlike deadlock, where everything halts, starvation only affects some while others progress. === Timestamp-based *Timestamp Assignment:* Each transaction is given a unique timestamp when it starts. This timestamp determines the transaction's temporal order relative to others. *Read Rule:* A transaction can read an object if the last write occurred by a transaction with an earlier or the same timestamp. *Write Rule:* A transaction can write to an object if the last read and the last write occurred by transactions with earlier or the same timestamps. === Validation-based Assumes that conflicts are rare and checks for them only at the end of a transaction. *Working Phase:* Transactions execute without acquiring locks, recording all data reads and writes. *Validation Phase:* Before committing, each transaction must validate that no other transactions have modified the data it accessed. *Commit Phase:* If the validation is successful, the transaction commits and applies its changes. If not, it rolls back and may be restarted. // === Version isolation = Logs == WAL principle *Write Ahead Logging* -- Any change to data (update, delete, insert) must be recorded in the log before the actual data is written to the disk. This ensures that if the system crashes before the data pages are saved, the changes can still be reconstructed from the log records during recovery. == Recovery algorithm In the *redo phase*, the system replays updates of all transactions by scanning the log forward from the last checkpoint. The specific steps taken while scanning the log are as follows: + The list of transactions to be rolled back, undo-list, is initially set to the list $L$ in the $<#[checkpoint] L>$ log record. + Whenever a normal log record of the form $<T_i, X_j, V_1, V_2>$, or a redo- only log record of the form $<T_i, X_j, V_2>$ is encountered, the operation is redone; that is, the value $V_2$ is written to data item $X_j$. + Whenever a log record of the form $<T_i #[start]>$ is found, $T_i$ is added to undo-list. + Whenever a log record of the form $<T_i #[abort]>$ or $<T_i #[commit]>$ is found, $T_i$ is removed from undo-list. At the end of the redo phase, undo-list contains the list of all transactions that are incomplete, that is, they neither committed nor completed rollback before the crash. In the *undo phase*, the system rolls back all transactions in the undo-list. It performs rollback by scanning the log backward from the end: + Whenever it finds a log record belonging to a transaction in the undo-list, it performs undo actions just as if the log record had been found during the rollback of a failed transaction. + When the system finds a $<T_i #[start]>$ log record for a transaction $T_i$ in undo- list, it writes a $<T_i #[abort]>$ log record to the log and removes $T_i$ from undo- list. + The undo phase terminates once undo-list becomes empty, that is, the system has found $<T_i #[start]>$ log records for all transactions that were initially in undo-list. == Log types - $<T_i, X_j, V_1, V_2>$ -- an update log record, indicating that transaction $T_i$ has performed a write on data item $X_j$. $X_j$ had value $V_1$ before the write and has value $V_2$ after the write; - $<T_i #[start]>$ -- $T_i$ has started; - $<T_i #[commit]>$ -- $T_i$ has committed; - $<T_i #[abort]>$ -- $T_i$ has aborted; - $<#[checkpoint] {T_0, T_1, dots, T_n}>$ -- a checkpoint with a list of active transactions at the moment of checkpoint. == Task Pieņemsim, ka ir divas relācijas $r_1$ un $r_2$ ar atbilstošiem atribūtiem $r_1(A,B)$ un $r_2(B,C,D,E)$. Relācijā $r_1$ ir $51105$ raksti, relācijā $r_2$ ir $320251$ raksti. Pieņemsim, ka vienā blokā ietilpst $27$ relācijas $r_1$ raksti un $25$ relācijas $r_2$ raksti. Relācijas tiek joinotas $(r_1 join r_2)$ izmantojot _block nested-loop join_ algoritmu. Cik bloki ir minimālais atmiņas *apjoms $M$ (skaitlis!)*, lai būtu nepieciešams ne vairāk kā + $130000$ bloku pārraides (transfers) no diska + $25000$ bloku pārraides (transfers) no diska $ T=ceil(b_r/(M-2)) dot b_s+b_r ==> M approx ceil((b_s b_r)/(T-b_r))+2 $ $ b_(r_1)=ceil(51105/27)=1893; b_(r_2)=ceil(320251/25)=12811 $ == Task Pieņemsim, ka ir divas relācijas $r_1$ un $r_2$ ar atbilstošiem atribūtiem $r_1(A,B)$ un $r_2(B,C,D,E)$. Relācijā $r_1$ ir $75435$ raksti, relācijai $r_2$ ir $11456$ raksti. Pieņemsim, ka vienā blokā ietilpst $22$ relācijas $r_1$ raksti un $35$ relācijas $r_2$ raksti. Pieņemsim, ka ir pieejami $5$ atmiņas bloki konkrētā algoritma izpildei. Viena bloka pārraidei no diska nepieciešamas $0.001 "ms"$, bloka meklēšanai -- $0.1 "ms"$. Uzrakstīt aprēķina formulas un savus pieņēmumus, kā arī aprēķināt skaitliski, cik minimāli laika (ms) nepieciešams, lai izrēķinātu $r_1 join r_2$, izmantojot _block join_ un _nested-loop join_. Neņemiet vērā laiku, ko prasa gala rezultāta ierakstīšana diskā un neņemt vērā procesora laiku, kas patērēts šai operācijai. Ņemt vērā tikai bloku meklēšanas un lasīšanas laikus. === $|r_1|=75435; |r_2|=11456$\ $b_r_1=22; b_r_2=35$\ $B=5;T_"disk"=0.001;T_"seek"=0.1$ === Block Join method + Apply formulas for block transfers and seeks. === Nested-Loop Join Method + Apply the formula for block transfers and 2 seeks (only 2).
https://github.com/Cyclone-Robosub/ocean-report-crs
https://raw.githubusercontent.com/Cyclone-Robosub/ocean-report-crs/main/0.1.0/src/format.typ
typst
#let report( title: "", subtitle: "", date: none, org: "Cyclone RoboSub @ UC Davis", logo: "Cyclone Propeller Logo CWRK.svg", body ) = { if date == none {date = datetime.today().display("[month]/[day]/[year]")} set document( author: org, title: title, keywords: if org == "Cyclone RoboSub @ UC Davis" {"robotics, robot submarine, RoboSub, engineering"} else {""}, ) set text( font: "Montserrat", weight: "regular", ) set par( justify: true ) set page( paper: "us-letter", margin: (bottom: 1.15in), background: image("background.svg"), header: { set text(weight: "light", .8em) // datetime.today().display("[month]/[day]/[year]") date h(1fr) counter(page).display("1") }, footer: { set text(white, .8em, ) set par(justify: false) align(right, block(width: 1.20in, align(right, org))) place(bottom + right, dx: .75in, dy: -.25in, image(logo, width: .5in) ) }, footer-descent: 43%, ) show heading: set text(1.2em) show heading: set text(font: "Prompt") show link: it => underline(text(blue, it)) // Code Blocks show raw.where(block: false): box.with( fill: luma(240), inset: (x: 3pt, y: 0pt), outset: (y: 3pt), radius: 2pt, ) show raw.where(block: true): block.with( fill: luma(240), inset: 10pt, radius: 4pt, ) // Title text(font: "Righteous", weight: 700, 2.5em, title) v(-1.75em) text(weight: "extralight", 1.5em, subtitle) body }
https://github.com/DaAlbrecht/lecture-notes
https://raw.githubusercontent.com/DaAlbrecht/lecture-notes/main/computer_networks/routing.typ
typst
MIT License
#import "../template.typ": * #set table( fill: (x, y) => if x == 0 or y == 0 { gray.lighten(40%) }, align: right, ) #show table.cell.where(x: 0): strong #show table.cell.where(y: 0): strong #show raw: set text(font: "Berkeley Mono", size: 9pt, spacing: 100%) = Routing Routing is the process of selecting a path for traffic in a network or between or across multiple networks. Broadly, routing is performed in many types of networks, including circuit-switched networks, such as the public switched telephone network (PSTN), and computer networks, such as the Internet. There are many types of routing algorithms and methods but they can be broadly classified into two categories: - Static routing - Dynamic routing A network administrator can use one or both of these methods to route traffic in a network at the same time. == Static Routing As the name implies, static routing is a routing method that does not change the routing table unless the network administrator manually changes it. Commonly used algorithms for static routing include: - shortest path routing - flooding === Use Cases of Static Routing - Static routing can be used to define an exit point from a router when no other routes are available or necessary. This is called a default route. - Static routing can be used for small networks that require only one or two routes. This is often more efficient since a link is not being wasted by exchanging dynamic routing information. - Static routing is often used as a complement to dynamic routing to provide a failsafe backup if a dynamic route is unavailable. - Static routing is often used to help transfer routing information from one routing protocol to another (routing redistribution). === Advantages of Static Routing - Static routing causes very little load on the CPU of the router, and produces no traffic to other routers. - Static routing leaves the network administrator with full control over the routing behavior of the network. - Static routing is very easy to configure on small networks. === Disadvantages of Static Routing - Human error: In many cases, static routes are manually configured. This increases the potential for input mistakes. - Fault tolerance: Static routing is not fault tolerant. This means that when there is a change in the network or a failure occurs between two statically defined devices, traffic will not be re-routed. - Administrative distance: Static routes typically take precedence over routes configured with a dynamic routing protocol. This means that static routes may prevent routing protocols from working as intended. - Administrative overhead: Static routes must be configured on each router in the network(s). This configuration can take a long time if there are many routers. == Dynamic Routing Dynamic routing, also called adaptive routing, is a process where a router can forward data via a different route for a given destination based on the current conditions of the communication circuits within a system. This is done by using routing protocols to exchange routing information between routers. In dynamic routing three main concepts are used: - Isolated routing: Each router makes its own routing decisions based on its own routing table. - Centralized routing: A central router makes routing decisions for all routers in the network. - Distributed routing: Each router makes routing decisions based on the information it receives from other routers. Commonly used algorithms for dynamic routing include: - Distance-vector routing (e.g. RIP) - Link-state routing (e.g. OSPF) == Shortest Path Routing Shortest path routing is a type of routing algorithm that determines the shortest path from a source node to a destination node in a network. Metrics used to determine the shortest path can include: - Distance - Bandwidth - Average traffic - Average delay The most common shortest path routing algorithm is Dijkstra's algorithm. == Flooding Flooding is a routing algorithm that involves the transmission of data packets to every link in a network. By sending data packets to every link, the destination node is guaranteed to receive the data packet in the shortest amount of time. Downsides of flooding are the heavy load on the network. == Distance-vector Routing Distance-vector routing protocols use the Bellman–Ford algorithm. In these protocols, each router does not possess information about the full network topology.n It advertises its distance value (DV) calculated to other routers and receives similar advertisements from other routers unless changes are done in the local network or by neighbours (routers). Using these routing advertisements each router populates its routing table. In the next advertisement cycle, a router advertises updated information from its routing table. This process continues until the routing tables of each router converge to stable values. === Problems - Count to Infinity Problem - Slow convergence time (Time needed for all routers to have the same routing table) ==== Count to Infinity Problem The Bellman–Ford algorithm does not prevent routing loops from happening and suffers from the count to infinity problem. The core of the count-to-infinity problem is that if A tells B that it has a path somewhere, there is no way for B to know if the path has B as a part of it. To see the problem, imagine a subnet connected like A–B–C–D–E–F, and let the metric between the routers be "number of jumps". Now suppose that A is taken offline. In the vector-update-process B notices that the route to A, which was distance 1, is down – B does not receive the vector update from A. The problem is, B also gets an update from C, and C is still not aware of the fact that A is down – so it tells B that A is only two jumps from C (C to B to A). Since B doesn't know that the path from C to A is through itself (B), it updates its table with the new value "B to A = 2 + 1". Later on, B forwards the update to C and due to the fact that A is reachable through B (From C's point of view), C decides to update its table to "C to A = 3 + 1". This slowly propagates through the network until it becomes infinity (in which case the algorithm corrects itself, due to the relaxation property of Bellman-Ford). == Link-state Routing The basic concept of link-state routing is that every node constructs a map of the connectivity to the network in the form of a graph, showing which nodes are connected to which other nodes. Each node then independently calculates the next best logical path from it to every possible destination in the network. Each collection of best paths will then form each node's routing table. Link-state routing protocols use a form of the Dijkstra algorithm to calculate the shortest path. == Routing Information Protocol (RIP) RIP is a distance-vector routing protocol that uses hop count as a routing metric. RIP is a simple protocol that uses UDP as its transport protocol. RIP has two versions: - RIP version 1 (RIPv1) - Classful routing protocols - RIP version 2 (RIPv2) - Classless routing protocols The same issues that apply to distance-vector routing protocols apply to RIP, such as the count-to-infinity problem and the slow convergence time. === RIPv1 Protocol Data Unit (PDU) *RIPv1 header* #example[ ``` 0 1 2 3 4 +---------------------------------------------------------------------------+ | RIPv1 Protocol Data Unit (PDU) | +------------------+------------------+------------------+------------------+ | Command (1 byte) | Version (1 byte) | Must be Zero (2 bytes) | +------------------+------------------+-------------------------------------+ +---------------------------------------------------------------------------+ | RIPv1 Entries | +---------------------------------------------------------------------------+ ``` ] *RIPv1 entry* #example[ ``` 0 1 2 3 4 +-------------------------------------+-------------------------------------+ | Address Family Identifier (2 bytes) | Must be Zero (2 bytes) | +-------------------------------------+-------------------------------------+ | IP Address (4 bytes) | +---------------------------------------------------------------------------+ | Must be Zero (4 bytes) | +---------------------------------------------------------------------------+ | Must be Zero (4 bytes) | +---------------------------------------------------------------------------+ | Metric (4 bytes) | +---------------------------------------------------------------------------+ ``` ] === RIPv2 Protocol Data Unit (PDU) *RIPv2 header* The RIPv2 header is the same as the RIPv1 header with the only difference being the version field containing the value 2. *RIPv2 entry* #example[ ``` 0 1 2 3 4 +-------------------------------------+-------------------------------------+ | Address Family Identifier (2 bytes) | Route Tag (2 bytes) | +-------------------------------------+-------------------------------------+ | IP Address (4 bytes) | +---------------------------------------------------------------------------+ | Subnet Mask (4 bytes) | +---------------------------------------------------------------------------+ | Next Hop (4 bytes) | +---------------------------------------------------------------------------+ | Metric (4 bytes) | +---------------------------------------------------------------------------+ ``` ] === Reduce Convergence Time To reduce the convergence time, RIP uses the following mechanisms: - Split Horizon: Prevents routing information from being sent back in the direction it came from. - Route Poisoning: When a route is no longer available, the router advertises the route with an infinite metric. - Hold-Down Timer: Prevents the router from accepting routing information for a certain period of time after a route has been removed. == Open Shortest Path First (OSPF) While RIP or static routing is often still used for smaller networks on the Internet today, OSPF is intended for larger networks. OSPF is an open standard (Open SPF) for a link-state protocol. Unlike RIP, this is a state-oriented routing protocol. The 'link state' refers to the condition of a connection between two IP routers. IP routers that support OSPF are also referred to as OSPF routers. The original version of OSPF is specified in RFC 1138. Currently, OSPF is used in version 2 (OSPFv2) and in version 3 (OSPFv3) (RFC 2328 and RFC 5340, respectively). === Concepts Each OSPF router maintains a Link-State database containing all routing information for the network. Routing information exchange occurs between immediate neighbors for smaller networks and between conventional and designated neighbors in larger networks. Each router constructs a Shortest-Path-First (SPF) tree, also known as a spanning tree, using Dijkstra's algorithm. The branches of this tree represent the optimal routes to known subnets and other IP routers. Routing and forwarding tables are generated based on the SPF tree, with each edge representing a subnet transition between routers, assigned costs based on factors like load, throughput, or delay. To ensure all routers are synchronized and aware of the network topology, they communicate changes to their neighbors, forwarding updates in a broadcast manner via IP multicast or point-to-point connections. A router initiates neighbor relationships by sending Hello packets (Hello-PDUs) to discover which adjacent routers become neighbors. Once established, neighbors share routing information through Database Description PDUs. When a new router joins the network, it sends Link-State Advertisements (LSAs) to neighbors, who relay this information throughout the network, flooding it with routing data. Periodic updates of topology changes are scheduled every 30 minutes to synchronize link-state databases. Additionally, routers perform a Liveness Check, sending Hello PDUs to indicate activity; if no Hello PDU is received for 40 seconds, the router is considered down. The detecting router then broadcasts a Link-State Update PDU, which is acknowledged by neighbors. Once a change is detected, OSPF quickly disseminates updates across the network, ensuring high convergence rates. For example, if a connection between routers with IP addresses 10.1.1.2 and 10.1.1.4 fails, the routers propagate Link-State updates until all link-state databases are synchronized, allowing for the recalculation of the shortest paths across the network. === OSPF In Big Networks For large networks, OSPF can be segmented into multiple autonomous areas to streamline optimal route calculations in participating routers. These segments, referred to as Areas, are identified by unique Area IDs (e.g., 0.0.3.1) and serve to hierarchically organize an autonomous system. All areas connect through an OSPF Backbone, designated as Area 0 (ID 0.0.0.0). Within each area, routers employ the same Shortest-Path-First algorithm and share a common Link-State database. Each router is aware only of the routers within its area but must connect to the OSPF Backbone via an Area Border Router (ABR). OSPF defines four types of routers: - *Internal Routers:* Operate solely within their area and do not communicate externally. - *Area Border Routers (ABRs):* Connect two or more areas within an autonomous system. - *Backbone Routers:* Operate within the Backbone to route traffic internally but are not ABRs. - *Autonomous System Border Routers (ASBRs):* Facilitate routing information exchange between multiple autonomous systems. ABRs are aware of the Link-State databases of all connected areas and are included in the Backbone. The Backbone's primary function is to manage traffic between areas, while ASBRs handle external routes to other autonomous systems. Each router has a unique Router ID, and routing information is exchanged directly or via specific multicast addresses, typically among neighboring routers. Dividing a large autonomous system into areas reduces the size of Link-State databases and routing tables. In networks with many OSPF routers, the burden can be significant, requiring $n(n-1)/2$ neighbor relationships to be established. To mitigate this in broadcast networks, a designated router (DR) and a backup designated router (BDR) are elected to manage routing information distribution, significantly reducing network load. Only the DR and BDR handle routing information exchange, minimizing the number of necessary neighbor relationships to $n -1$. #pagebreak() === Protocol Data Units (PDUs) The OSPF packet header #example[ ``` 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version # | Type | Packet length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Router ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Area ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | AuType | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Authentication | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ``` ] OSPFv2-Hello-PDU #example[ ``` 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Network Mask | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HelloInterval | Options | Rtr Pri | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RouterDeadInterval | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Designated Router | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Backup Designated Router | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Neighbor | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ``` ] The Hello-PDU is used during the initialization of an OSPF router to discover all neighboring routers and to regularly check the availability of connections with these neighbors. Additionally, in broadcast networks, the Hello-PDU is employed to elect a designated router (DR) and a backup designated router (BDR). == Forwarding Each router and each host maintain a forwarding table that could look like this: #table( columns: 5, table. header([Network Destination], [Netmask], [Gateway], [Interface], [Metric]), ) == Forwarding Rules Forwarding rules are used to determine how a router forwards packets. Before CIDR (Classless Inter-Domain Routing) was introduced, routers used classful routing to determine how to forward packets. With CIDR the routing protocols need to transmit the netmask along with the IP address. This mechanism is called longest prefix match. === Longest Prefix Match When an IPv4 packet arrives at a router, several actions are executed to forward the packet as quickly as possible through the correct output channel. The destination address is checked against the entries in the forwarding table. The route is determined using the Longest Prefix Matching algorithm, outlined as follows: - The destination address of the incoming packet is compared with all entries in the forwarding table by performing a bitwise AND operation between the destination address and the network mask of each route entry. The result is then compared with the network destination field in the same entry. If they match, the entry represents a potential route. - Among the potential routes, the one with the longest match (i.e., the most matching bits, from left to right) is selected. To optimize, the search starts with longer prefixes. - If multiple routes have the same match length, the route with the best (smallest) metric value is chosen. If still tied, the route is selected randomly. - For packets without a matching route, the default route (with network destination "0.0.0.0" and network mask "0.0.0.0") is used to forward the packet. This route is predefined and configured on the router or host. #pagebreak() #example[ Forwarding Table #table( columns: 5, table.header([Network Destination], [Netmask], [Gateway], [Interface], [Metric]), [192.168.1.0], [255.255.255.0], [192.168.1.1], [eth0], [10], [192.168.0.0], [255.255.254.0], [192.168.0.1], [eth1], [20], [10.0.0.0], [255.0.0.0], [10.0.0.1], [eth2], [5], [0.0.0.0], [0.0.0.0], [10.0.0.254], [eth2], [100], ) Incoming packet with destination address 192.168.1.50 1. Comparison with 192.168.1.0/24 (Netmask: 255.255.255.0): - The AND operation results in 192.168.1.0 -> matches - Potential route. 2. Comparison with 192.168.0.0/23 (Netmask: 255.255.254.0): - The AND operation results in 192.168.0.0 -> no match. - No potential route. 3. Comparison with 10.0.0.0/8 (Netmask: 255.0.0.0): - The AND operation results in 10.0.0.0 -> no match. - No potential route. 4. Default Route (0.0.0.0/0): - The AND operation results in 0.0.0.0, which matches, but it’s used only if no other specific routes match Selected Route: The first entry 192.168.1.0/24 (interface eth0), as it provides the longest prefix match. ] === Forwarding Rules in End Systems End systems, such as hosts, also have forwarding tables just with some extra entries. #table( columns: (1fr,3fr), align: (left, left), table.header([Route Name], [Description]), [Default Route], [Matches any destination address (0.0.0.0/0) and is used when no other specific route matches. Packets are forwarded to the default gateway.], [Loopback Route], [Handles packets addressed to the local system (127.0.0.0/8). These packets are not sent to the network but remain on the local host.], [Host Route], [Routes packets sent to the local host’s own IP address. Packets are handled within the system, typically via the loopback interface.], [Limited Broadcast Route], [Routes packets sent to the broadcast address 255.255.255.255. These packets are confined to the local network segment and not routed further.], [Directed Broadcast Route], [Sends packets to all hosts within a specific subnet (e.g., 192.168.178.255 for a /24 network).], [Multicast Route], [Handles multicast traffic to group addresses (172.16.58.3/4). These packets are sent to multiple hosts that are part of the same multicast group.] )
https://github.com/frectonz/the-pg-book
https://raw.githubusercontent.com/frectonz/the-pg-book/main/book/077.%20stuff.html.typ
typst
stuff.html Stuff July 2007I have too much stuff. Most people in America do. In fact, the poorer people are, the more stuff they seem to have. Hardly anyone is so poor that they can't afford a front yard full of old cars.It wasn't always this way. Stuff used to be rare and valuable. You can still see evidence of that if you look for it. For example, in my house in Cambridge, which was built in 1876, the bedrooms don't have closets. In those days people's stuff fit in a chest of drawers. Even as recently as a few decades ago there was a lot less stuff. When I look back at photos from the 1970s, I'm surprised how empty houses look. As a kid I had what I thought was a huge fleet of toy cars, but they'd be dwarfed by the number of toys my nephews have. All together my Matchboxes and Corgis took up about a third of the surface of my bed. In my nephews' rooms the bed is the only clear space.Stuff has gotten a lot cheaper, but our attitudes toward it haven't changed correspondingly. We overvalue stuff.That was a big problem for me when I had no money. I felt poor, and stuff seemed valuable, so almost instinctively I accumulated it. Friends would leave something behind when they moved, or I'd see something as I was walking down the street on trash night (beware of anything you find yourself describing as "perfectly good"), or I'd find something in almost new condition for a tenth its retail price at a garage sale. And pow, more stuff.In fact these free or nearly free things weren't bargains, because they were worth even less than they cost. Most of the stuff I accumulated was worthless, because I didn't need it.What I didn't understand was that the value of some new acquisition wasn't the difference between its retail price and what I paid for it. It was the value I derived from it. Stuff is an extremely illiquid asset. Unless you have some plan for selling that valuable thing you got so cheaply, what difference does it make what it's "worth?" The only way you're ever going to extract any value from it is to use it. And if you don't have any immediate use for it, you probably never will.Companies that sell stuff have spent huge sums training us to think stuff is still valuable. But it would be closer to the truth to treat stuff as worthless.In fact, worse than worthless, because once you've accumulated a certain amount of stuff, it starts to own you rather than the other way around. I know of one couple who couldn't retire to the town they preferred because they couldn't afford a place there big enough for all their stuff. Their house isn't theirs; it's their stuff's.And unless you're extremely organized, a house full of stuff can be very depressing. A cluttered room saps one's spirits. One reason, obviously, is that there's less room for people in a room full of stuff. But there's more going on than that. I think humans constantly scan their environment to build a mental model of what's around them. And the harder a scene is to parse, the less energy you have left for conscious thoughts. A cluttered room is literally exhausting.(This could explain why clutter doesn't seem to bother kids as much as adults. Kids are less perceptive. They build a coarser model of their surroundings, and this consumes less energy.)I first realized the worthlessness of stuff when I lived in Italy for a year. All I took with me was one large backpack of stuff. The rest of my stuff I left in my landlady's attic back in the US. And you know what? All I missed were some of the books. By the end of the year I couldn't even remember what else I had stored in that attic.And yet when I got back I didn't discard so much as a box of it. Throw away a perfectly good rotary telephone? I might need that one day.The really painful thing to recall is not just that I accumulated all this useless stuff, but that I often spent money I desperately needed on stuff that I didn't.Why would I do that? Because the people whose job is to sell you stuff are really, really good at it. The average 25 year old is no match for companies that have spent years figuring out how to get you to spend money on stuff. They make the experience of buying stuff so pleasant that "shopping" becomes a leisure activity.How do you protect yourself from these people? It can't be easy. I'm a fairly skeptical person, and their tricks worked on me well into my thirties. But one thing that might work is to ask yourself, before buying something, "is this going to make my life noticeably better?"A friend of mine cured herself of a clothes buying habit by asking herself before she bought anything "Am I going to wear this all the time?" If she couldn't convince herself that something she was thinking of buying would become one of those few things she wore all the time, she wouldn't buy it. I think that would work for any kind of purchase. Before you buy anything, ask yourself: will this be something I use constantly? Or is it just something nice? Or worse still, a mere bargain?The worst stuff in this respect may be stuff you don't use much because it's too good. Nothing owns you like fragile stuff. For example, the "good china" so many households have, and whose defining quality is not so much that it's fun to use, but that one must be especially careful not to break it.Another way to resist acquiring stuff is to think of the overall cost of owning it. The purchase price is just the beginning. You're going to have to think about that thing for years—perhaps for the rest of your life. Every thing you own takes energy away from you. Some give more than they take. Those are the only things worth having.I've now stopped accumulating stuff. Except books—but books are different. Books are more like a fluid than individual objects. It's not especially inconvenient to own several thousand books, whereas if you owned several thousand random possessions you'd be a local celebrity. But except for books, I now actively avoid stuff. If I want to spend money on some kind of treat, I'll take services over goods any day.I'm not claiming this is because I've achieved some kind of zenlike detachment from material things. I'm talking about something more mundane. A historical change has taken place, and I've now realized it. Stuff used to be valuable, and now it's not.In industrialized countries the same thing happened with food in the middle of the twentieth century. As food got cheaper (or we got richer; they're indistinguishable), eating too much started to be a bigger danger than eating too little. We've now reached that point with stuff. For most people, rich or poor, stuff has become a burden.The good news is, if you're carrying a burden without knowing it, your life could be better than you realize. Imagine walking around for years with five pound ankle weights, then suddenly having them removed. Spanish TranslationRussian TranslationItalian TranslationPolish TranslationTurkish TranslationFrench TranslationSlovak TranslationRomanian TranslationGerman Translation
https://github.com/rabotaem-incorporated/algebra-conspect-1course
https://raw.githubusercontent.com/rabotaem-incorporated/algebra-conspect-1course/master/packages/commute.typ
typst
Other
#import "@preview/commute:0.1.0": node, arr, commutative-diagram
https://github.com/cadojo/correspondence
https://raw.githubusercontent.com/cadojo/correspondence/main/src/vita/src/presentations.typ
typst
MIT License
#let presentationlist = state("presentationlist", ()) #let presentation( organization, source, date: none, notes ) = { let content = [ #grid( columns: (1fr, 1fr), heading(level: 3, organization), align(right)[ #set text(rgb(90,90,90)) #date ] ) #if source != none { set text(rgb(90,90,90)) if type(source) == "string" { v(-0.5em) text(source) } else { v(-0.5em) text(source.join(", ")) } } #notes ] presentationlist.update(current => current + (content,)) } #let presentations(header: "Conference Presentations") = { locate( loc => { let presentationlist = presentationlist.final(loc) if presentationlist.len() > 0 { heading(level: 2, text(header)) line(length: 100%, stroke: 1pt + black) presentationlist.join() } } ) }
https://github.com/Kasci/LiturgicalBooks
https://raw.githubusercontent.com/Kasci/LiturgicalBooks/master/SK/zalmy/Z033.typ
typst
Pána chcem velebiť v každom čase, \* moje ústa budú ho vždy chváliť. V Pánovi sa bude chváliť moja duša; \* nechže to počujú pokorní a nech sa tešia. Velebte so mnou Pána \* a oslavujme jeho meno spoločne. Hľadal som Pána a on ma vyslyšal, \* a vytrhol ma zo všetkej hrôzy. Na neho hľaďte a budete žiariť, \* a tvár vám nesčervenie hanbou. Úbožiak zavolal a Pán ho vyslyšal, \* a vyslobodil ho zo všetkých tiesní. Ako strážca sa utáborí anjel Pánov okolo bohabojných \* a vyslobodí ich. Skúste a presvedčte sa, aký dobrý je Pán; \* šťastný človek, čo sa utieka k nemu. Vy, jeho svätí, bojte sa Pána, \* veď bohabojní núdzu nemajú. Boháči sa nabiedia a nahladujú, \* ale tým, čo hľadajú Pána, nijaké dobro chýbať nebude. Poďte, deti, čujte ma, \* naučím vás bázni Pánovej. Miluje niekto život \* a chce požívať dobro v šťastných dňoch? Zdržuj svoj jazyk od zlého \* a svoje pery od reči úlisnej. Unikaj pred zlom a dobre rob, \* hľadaj pokoj a usiluj sa oň. Pánove oči hľadia na spravodlivých \* a k ich volaniu sa nakláňa jeho sluch. Tvár Pánova sa odvracia od tých, čo robia zlo, \* a vyhladzuje ich pamiatku zo zeme. Spravodliví volali a Pán ich vyslyšal, \* a vyslobodil ich zo všetkých tiesní. Pán je pri tých, čo majú srdce skrúšené, \* a zachraňuje zlomených na duchu. Spravodliví majú utrpení veľa, \* ale Pán ich vyslobodí zo všetkých. Všetky kosti im ochraňuje \* ani jedna sa im nezlomí. Hriešnika zloba zahubí \* a tých, čo nenávidia spravodlivého, stihne trest. Pán vykúpi duše svojich služobníkov, \* nebudú potrestaní tí, čo v neho dúfajú.
https://github.com/mismorgano/UG-PartialDifferentialEquations-23
https://raw.githubusercontent.com/mismorgano/UG-PartialDifferentialEquations-23/main/tareas/tarea-04/tarea-04.typ
typst
#set text(font: "New Computer Modern", size: 12pt) #let e = counter("exercise") #let exercise(label, body, number: none) = { if number != none { e.update(number) } else { e.step() } box(width: 100%,stroke: 1pt, inset: 5pt, [#text(size: 1.6em)[*Problema #e.display() #label*] \ #body],) } #let infy = $infinity$ #align(center, text(17pt)[ *Ecuaciones Diferenciales Parciales*\ *Tarea 4* ]) #align(center)[<NAME> #link("mailto:<EMAIL>")] #exercise[][ Recuelva el siguiente problema $ u_(t t) -9u_(x x) = e^x -e^(-x) quad -infy < x< infy, t>0, \ u(x, 0) = x quad -infy <x<infy, \ u_t (x, 0) = sin(x) quad -infy < x<infy. $ ] *Solución:* Si tenemos una solución particular $v(x, t)$ del sistema anterior, entonces por el principio de superposición la solución general es de la forma $u = v + w$, donde $w$ es solución del sistema homogeneo. Dado que $e^x-e^(-x)$ no depende de $t$, podemos suponer $v(x, t) = v(x)$, luego $v$ debe satisfacer $ -9 v'' = e^x -e^(-x) => v'' = -(e^x -e^(-x))/9, $ integrando dos veces respecto a $x$ tenemos que $ v' &= -1/9 integral e^x d x - 1/9integral e^(-x) (-d x) = -1/9 e^x -1/9 e^(-x), \ => v &= -1/9 integral e^x + 1/9 integral e^(-x) (- d x) = -1/9 e^x + 1/9 e^(-x) $ Resolvamos ahora el caso homogeneo. Notemos que $ u_(t t) -9u_(x x)$ lo podemos escribir como $ (diff_t - 3 diff_x)(diff_t +3diff_x)u = 0, $ // y consideremos el siguiente cambio de coordenadas // $ xi = x +c t, quad nu = x - c t. $ // Notemos que $ xi + nu = x$, por la regla de la cadena tenemos que $ diff_x = diff_xi + diff_nu$, de manera simialar // $xi -nu = 2c t$ y por tanto sea $v = u_t + 3 u_x$, entonces se debe cumplir que $v_t - 3v_x=0$, asi tenemos las siguientes ecuaciones de primer orden $ v_t -3 v_x = 0, quad u_t + 3u_x = v. $ Nosotros sabemos que la solución a la primera ecuación es $v(x, t) = h(x+3t)$, luego queremos encontrar solución a la ecuacion $u_t + 3u_x = h(x+3t)$, la cual podemos notar que es lineal entonces la solución general esta dada por $u = v+w$, donde $v$ es una solucón al caso particular y $w$ es solución al caso homogeneo. De manera similar sabemos que la solución al caso homogeneo esta dada por $g(x-3t)$, por otro lado una solución del caso particular esta dada por $u(x, t) = f(x+3t)$, con $f'(s) = h(s)/6$, entonces la solucón general esta dada por $ u(x,t) = f(x+3t) + g(x-3t). $ Las condiciones inciales nos dicen que: $ u(x, 0) = f(x) + g(x) = x, quad u_t (x, 0) = 3f'(x) - 3g'(x) = sin(x), $ de donde obtenemos que $f'(x) + g'(x) = 1$, despejamos para obtener $f'$ y $g'$, y vemos que $ f'(s) = sin(s)/6 +1/2, quad g'(s) = -sin(s)/6 + 1/2, $ integrando obtenemos que $ f(s) = s/2 + 1/6 integral_0^s sin(x) + A + quad g(s) = s/2 + -1/6integral_0^s + B, $ como $f+g = x$ tenemos que $A + B = 0, $ luego sustituyendo $s=x+3t$ para $f$ y $s = x-3t$ para $g$, se cumple que // #let s = $x+3t$ $ u (x, t) &= 1/2 [(x+3t) + (x-3t)] + 1/6 integral_(x-3t)^(x+3t) sin(s) d s \ &= x - 1/6 [cos(x+3t) - cos(x-3t)].,$ como solución al caso homogeneo. Por lo dicho al inicio, tenemos que la solución esta dad por $ u (x, t) = x - 1/6 [cos(x+3t) - cos(x-3t)] -1/9 e^x + 1/9 e^(-x), $ además (haciendo las cuentas) se puede comprobar que es solución. #exercise[][ Resuelve el siguiente problema $ u_t - u_(x x) - 9/4 u = 0, quad 0<x<pi, t>0\ u(0, t) = u_x (pi, t) = 0, quad t>=0, \ u(x, 0) = sin(3x/2) + sin(9x/2), quad 0<= z<= pi. $ ] *Solución:* // De manera similar al caso anterior la solución esta dada por $u = v+w$ donde // $v$ es una solución particular y $w$ es solución al caso homogeneo. De manera similar supongamos que $u(x, t) = X(x)T(t)$, sustituyendo en la ecuación obtenemos que $ X T' - X'' T -9/4 X T = 0 => T'/T -9/4 = X''/X = -lambda, $ el cual nos genera los siguientes sistemas $ X'' +lambda X = 0 ,quad T' -9/4T + lambda T = 0 \ X(0) = 0\ X'(pi) = 0. $ De donde podemos notar que $p(x) = 1$, $q(x) = 0$, $sigma(x) =1,$ $alpha_1 = 1$, $beta_2 = 1$, luego por Teorema 4.7 nos asegura que los valores propios son no negativos, entonces $lambda = mu^2$. Si $mu=0$, entonces $X'' =0$ lo cual implica que $X(x) = A x + B$, luego $X(0) = 0= B $ y $X'(pi) = 0 = A$, entonces $X$ es la solución cero, la cual no nos interesa. Si $mu >0$, tenemos que $X'' + mu^2 X =0$ cuya solución general $ X(x) = a cos(mu x) + b sin (mu x), $ por las condiciones iniciales tenemos que $X(0) = a = 0$, lo cual implica que $X(x) = b sin(mu x)$, entonces $X'(x) = -b mu cos(mu x)$ y por tanto $X'(pi) = 0 = -b mu cos(mu pi)$, $b$ no puede ser $0$ pues tendriamos la solución trivial, luego se debe cumplir que $cos(mu pi) = 0$, lo cual nos genera los valores propios $mu_n = (2n-1)/2$, las correspondientes funciones propias son $X_n (x) = sin(mu_n x).$ Ademas sabemos que la solución a $T' -9/4T + lambda T = 0$ correspondiente a $mu_n$ es $T_n (t) = e^(-(mu_n^2-9/4)t)$. Por el principio de superposición tenemos que $ u(x, t) = sum_(n=1)^(infinity) c_n X_n (x) T_n (t) = sum_(n=1)^(infinity) c_n sin(mu_n x)e^(-(mu_n^2-9/4)t), $ de donde podemos notar que $ u(x, 0) = sin(3x/2) + sin(9x/2) =sum_(n=1)^(infinity) c_n sin(mu_n x), $ como la representación en series de Fourier es unica tenemos que $c_n =0$ para todo $n in NN$ exepto $n = 2, 5$. De lo anterior obtenemos que $ u(x, t) &= sin(3/2 x) e^(-(3/2)^2 + 9/4)t + sin(9/2 x) e^(-(9/2)^2 + 9/4)t \ &= sin(3/2 x) + sin(9/2 x) e^( 9/4 - 81/4 )t \ &= sin(3/2 x) + sin(9/2 x) e^( -18 )t. $ #exercise[][ Resuelve la ecuación de Laplace $ u_(x x) + u_(y y) = 0 $ en el rectangulo $ 0 < x< b, quad 0<y<d, $ sujeto a las condiciones $ u(0, y) = f(y), u(b, y) = g(y), u(x, 0) = 0, u(x, d) = 0 $ ] *Solución:* Supongamos que $u(x, y) = X(x) Y(y)$ entonces se debe cumplir que $ -X'' /X = Y''/Y = -lambda, $ donde $lambda$ es constante. Usando las condiciones de frontrera, se debe cumplir que $X(x)Y(0) = 0$ y $X(x)Y(d) = 0$, para tener soluciones no triviales suponemos $Y(0) = Y(d) = 0$ y tenemos el sistema $ Y'' + lambda Y = 0, quad 0<y<d, \ Y(0) = 0 \ Y(d) = 0, $ el cual podemos notar es un problema de Sturm-Liouville, cuyos valores propios son $ lambda_n = mu_n^2 = (n^2pi^2)/d^2, $ y funciones propias $ Y_n (y) = sin((n pi y)/d), $ para $n>=1$. Para estos valores de $lambda_n$, la ecuación para $X$ es: $ X'' -mu_n^2 X = 0, $ cuya solución general es $ X_n (x)= alpha_n cosh(mu_n x) + beta_n sinh(mu_n x). $ Luego, por el principio de superposición tenemos que $ u(x, y) = sum_(n=1)^infinity X_n (x) Y_n (y) = sum_(n=1)^infinity (alpha_n cosh(mu_n x) + beta_n sinh(mu_n x)) sin(mu_n y), $ usando las condiciones inicales se debe cumplir que $ u(0, y) = sum_(n=1)^infinity alpha_n sin(mu_n y) = f(y), $ entonces los $alpha_n$'s deben ser los coeficientes seno de la serie de Fourier de $f$ y por tanto $ alpha_n = 2/d integral_0^d f(y) sin(mu_n y) d y. $ Para $x = b$ tenemos que $ u(b, y) = sum_(n=1)^infinity (alpha_n cosh(mu_n b) + beta_n sinh(mu_n b)) sin(mu_n y) = g(y), $ y de manera similar, los $ (alpha_n cosh(mu_n b) + beta_n sinh(mu_n b))$'s deben ser los coeficientes seno de la serie de Fourier de $g$ y por tanto $ (alpha_n cosh(mu_n b) + beta_n sinh(mu_n b)) = 2/d integral_0^d g(y) sin(mu_n y) d y = gamma_n, $ lo cual implica que $ beta_n = (gamma_n-alpha_n cosh(mu_n b) )/ sinh(mu_n b), $ se sigue que $ X_n (x) &= alpha_n cosh(mu_n x) + (gamma_n-alpha_n cosh(mu_n b) )/ sinh(mu_n b) sinh(mu_n x)\ &= 1/(sinh(mu_n b)) [alpha_n sinh(mu_n(b-y)) + gamma_n sinh_(mu_n y)]. $ De lo anteior tenemos que la solución es: $ u (x, y) = sum_(n=1)^infinity 1/(sinh(mu_n b)) [alpha_n sinh(mu_n(b-y)) + gamma_n sinh_(mu_n y)] sin(mu_n y), $ con $alpha_n, beta_n$ y $gamma_n$ como se describieron anteriormente.
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/054%20-%20Lost%20Caverns%20of%20Ixalan/004_Episode%204.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "Episode 4", set_name: "Lost Caverns of Ixalan", story_date: datetime(day: 20, month: 10, year: 2023), author: "<NAME>", doc ) == Quint The Sun Empire explorers waited for Great Shaper Pashona in a room large enough to accommodate them and the dinosaurs who had survived their journey. Huatli fed Pantlaza strips of dried meat, which the big raptor greedily swallowed, while Inti supervised the cleaning of armor and weapons. Caparocti and Wayta engaged in a training dance with complicated footwork, grunting and striking each other with sticks. Quint examined the poncho that held Abuelo's spirit as he contemplated what he and Wayta had discussed earlier. He'd never worked at an archaeological site so far outside his own experience, and he felt underprepared despite his training. How many history texts at Strixhaven were written by members of the culture they described? Hadn't he himself been annoyed at some loxodon depictions? When he'd found the lost city of Zantafar, a few archaeologists argued he shouldn't be permitted to work at the site because he wasn't sufficiently neutral. Thankfully they'd been overruled, but it was a tense time. Now, faced with one astonishing discovery after another, he wondered if Wayta was right: none of this was his story to tell. Though perhaps if he found more evidence of the Coin Empire— Nicanzil returned to the room and all activity ceased. "The convocation begins," Nicanzil said. "Follow me." Packs were shouldered, weapons sheathed, and soon the Sun Empire contingent climbed endless stairs to the top of the building. They emerged in front of the huge golden door that had been visible from the shore when they first arrived. Quint wanted to examine it, but a sudden tension among his allies stopped him. "Vampires," Wayta spat. The other warriors mirrored her disgust, some reaching for weapons. Vampires? This must be the Legion of Dusk, from Torrezon. Saheeli had mentioned them. A wizened merfolk entered from the opposite side of the room, her green skin mottled with brownish-pink spots, pink fins flaring out behind her like a cape. She wore jade armor like many of the River Heralds but carried no visible weapons—a magic-user, perhaps. "Great Sh<NAME>," Huatli said, bowing deeply. "You honor us." "Warrior-Poet," <NAME> replied, inclining her head. To Quint's surprise, she then stared at him. "Who are you, stranger?" "<NAME>," Quint replied, tapping his forehead politely with his trunk. "Loxodon archaeologist. I'm visiting from Arcavios—that is, a place far from Ixalan." "Why are you here?" the shaper asked. "To help the Sun Empire with some research," Quint replied, "but I'm also on my own quest for knowledge." "What do you intend to do with this knowledge?" Quint wondered if the shaper could read minds. He glanced at Wayta, then said, "I'm not sure yet. Nothing bad." Shaper Pashona turned her attention to Huatli. "And you, Warrior-Poet, and your people? What are your intentions?" Huatli gestured at the huge door. "We came seeking this portal. We believe it leads to"—she cast a suspicious look at the vampires—"a place of historical importance to the Sun Empire." Shaper Pashona followed Huatli's gaze. "Who leads you?" she asked the Legion members. One of the armored vampires carrying a lance stepped forward. "Our business is none of your concern. You will release us at once." Inti, already tall, straightened and threw his shoulders back, looking twice as big. "These invaders should be imprisoned," he said. "Or killed," Caparocti added. Huatli, to Quint's surprise, nodded agreement. He'd never seen her look so bloodthirsty. "You are all invaders," <NAME> said. "We helped you so that we could learn your purpose, but we can throw you back into the sea and let the spirits decide your fates." "You cannot stop our holy mission," the vampire leader insisted. "If you kill us," Inti said, "you declare war on the entire Sun Empire." Another vampire stepped forward, elegantly dressed, with a whip hanging from his belt. "Torrezon as well. Queen Miralda would be most displeased." Nicanzil's fins rippled. "You assume your people would ever find us." Hands reached for weapons, and the sharp scent of magic filled the air. Quint fixed the image of a defensive sigil in his mind. "Enough!" Huatli exclaimed. "Shaper, your people and mine seek to open this door. I propose we work together." <NAME> tilted her head. "What help do you offer?" Huatli smiled. "We can translate the script on the door. If it's like what we found in Orazca, we'll have it open quickly." "Thank you for the reminder of your people's betrayal in taking the golden city," Nicanzil murmured. "If we're reminding each other of things," Inti said, "remember it was a River Herald who first claimed the Immortal Sun." "The one who dies having made no mistakes never lived," Huatli said diplomatically. "We all fought against the Phyrexians to defend our homes. We can fight each other now that our collective enemy has been vanquished, or we can use this chance to build a more lasting peace between our people." To Quint's surprise, the second vampire spoke again. "Queen Miralda might be open to such negotiations, depending on what we find." "Shut your mouth, Bartolomé," the other vampire snapped. "I warned you—" "Very well," <NAME> said, and the vampire fell silent. "Warrior-Poet, you may proceed." Huatli gestured for Quint to accompany her, and together they examined the door. It didn't contain any removable tablets, and the glyphs looked slightly different. Next to the door, a tiered box with compartments in various sizes was embedded in the wall, for what purpose he couldn't fathom. "This dialect isn't the same as the other door," Huatli said, brow furrowed. "This may take longer than I expected." She perused the glyphs, her lips moving slightly, while the members of the various factions shifted uneasily. Pantlaza gave a soft trill and sat down to preen her feathers. Quint was about to search through his scrolls for a spell that might help, when he realized he had something potentially better. Or rather, someone. "I'm going to summon a ghost," Quint said. "Nobody panic, please." Wayta snorted, and Quint grinned at her. He pulled the poncho from his pack and once again cast the spell to summon Abuelo. He briefly feared the spirit had been lost in the fight against the huge walking mushroom, but to his relief the familiar pinkish glow of magic in the fabric resolved into the same teal form as before. Huatli took a step backward. "Who is this?" "Abuelo," Quint replied. "I'm hoping he knows how to open this door." Abuelo peered at the crowd, then up at the portal. "Oh, you made it to Matzalantli!" he exclaimed. "How wonderful. We must get inside and warn the Oltec about the Mycotyrant." "How do we do that?" Quint asked. "It's quite simple," Abuelo said. Then his face scrunched in confusion. "But I can't remember." Huatli gestured at the box next to the door. "Does it involve this?" "Yes, it does!" Abuelo exclaimed, beaming. "How good, you figured it out." Huatli and Quint exchanged a bemused glance. "What do we do with it?" Huatli asked gently. Abuelo frowned. "There's a key. I always forget. Abuela kept it in her khipu, and I always stayed with her …" "Is this the khipu?" Quint asked, producing the object he had found with Abuelo's poncho, a belt-like cord festooned with lengths of knotted string and beads. "Yes, yes, give it to me," Abuelo said. He shifted through the strings with surprisingly corporeal hands, muttering to himself until he found the one he wanted. "Here! The golden door." Quint leaned closer, holding his breath as the Echo's fingers slipped down the knots and beads. "Open the drawer in the side," Abuelo said, gesturing at the box. Huatli did so, finding a collection of polished gemstones in different colors. "Where do they go?" Huatli asked, cupping them in her hand. "Green in the upper right and lower left corners," Abuelo replied. "Yellow in the other corners, and also the three spaces above or below, and over one." Huatli did as she was ordered, Abuelo nodding and smiling. "Last, the cosmium," he said. "The pink ones?" Quint asked. "Yes." Abuelo flickered like a candle's smoke, then moved away. "Pardon me. Sometimes cosmium can affect Echoes like me in strange ways." Quint filed that away for future knowledge. "So where do those go?" Abuelo flickered again, his mouth moving, but no words came out. Inti groaned. "We were so close," he said. "Now what?" Huatli examined the box, tilting her head. "I think I know this pattern." "Do you?" Quint asked. "What is it?" Huatli laughed softly. "It's a key." She placed the rest of the cosmium beads in the center boxes, which formed a shape like a stylized serpent. As soon as the last bead was laid, the box glowed faintly, and the pinkish gleam spread to the door and its glyphs. Light burst through a crack at the seam of the now unsealed portal, which swung open with a rush of surprisingly cold, fresh air. Much as Quint wanted to rush in and savor the thrill of discovery, he let Huatli lead the way, the other warriors flanking her. They stepped into a broad tunnel, bored wide enough to fit a dozen people. The passage sloped sharply downward, and yet as Quint walked, he had the dizzying sense that everything around him was shifting, as it had when he planeswalked. He continued moving down, the way steep but never steep enough to be impassible—until he reached a wide circle of stones like a well, easily the same diameter as the tunnel itself. Huatli stopped at the rim of the well and gasped. Others quickly crowded around her to see. "This is impossible," Huatli said. "Incredible," Inti added. "Unbelievable," Caparocti murmured. Wayta simply blinked her one visible eye. They stood before a circle of sky dotted with clouds. Did the door lead back up to the surface? But no, they were deep under the earth, and the tunnel sloped downward. Shadows appeared at the edge of the opening. People, craning their necks over the lip of the well, looking #emph[down] at Huatli and the others. "Find Anim Pakal," one of them said, their tone more concerned than shocked. "Someone has opened the seal." #figure(image("004_Episode 4/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) == Malcolm With the elevator ropes cut, Malcolm had to fly down in stages from one level to the next. He sometimes carried Breeches, while other times the goblin climbed down the rough walls, and they stopped to rest whenever they tired. The sickly green glow of fungus lit their way along with their shoulder lamps, and they both continued to wear their crude masks for fear of breathing whatever spores had harmed their companions. They eventually found the elevator, damaged but mostly intact, perched atop a shelf of mushrooms stretched halfway across the cenote like a macabre stage. They didn't find any corpses, nor any sign of the fallen beyond the black bile the infected had retched onto the wooden platform. And still, the bottom of the shaft remained out of sight. Malcolm lost track of time, minutes seeping into hours. Somewhere far above, the sun rose and set; down in the dark, only weariness and hunger and thirst marked the absence of usual daily routines. A dim light below them gradually brightened, until finally they reached the end of their seemingly endless descent. A tunnel to the left lit up while the glow around them faded, as if they were being guided. Or herded. Breeches grumbled, "BAD SHROOMS." "You said it, mate," Malcolm agreed. They followed the glow through rough-hewn tunnels, too regular and purposeful to be natural. The farther they walked, the more Malcolm's dread mounted. If this were a trap, how would they escape? The sky was so far above them, the sea so far away … The tunnel opened into a cavern large enough to contain an entire town, the ceiling so high that Malcolm could fly comfortably without hitting it. A fungal forest spread out before them, hauntingly beautiful, littered with crumbling ruins. Bioluminescent spores floated like tiny fireflies between mushrooms as tall as trees, their caps and stems every shade of green, from the palest seafoam to nearly black. Gills fluttered as Malcolm and Breeches passed, as if they were being sniffed. Soft noises suggested they weren't alone. The scuffing of footsteps, bodies brushing against the terrain, occasional murmurs. Perhaps survivors from Downtown? But what if they were all infected? Malcolm's guts clenched in horror. They reached a clearing, the ground covered in connected concentric circles like the markings on his allies' skin. Malcolm stopped, wary of stepping on the lines, which resembled strands of a spider's web. He had no desire to be caught like a fly. A motley collection of people emerged from the forest. He didn't recognize them at first, covered as they were in fungus like the corpse that had started this investigation. Some were flanked by walking mushrooms with arms and legs, like nightmarish children's dolls. One of the humans stepped forward, his movements stilted, eyes replaced by glowing button mushrooms. <NAME>, the mayor of Downtown. Malcolm's hope of finding survivors vanished as soon as the man opened his mouth. "We welcome you to this place," Xavier said tonelessly. "Who is 'we'?" Malcolm asked. "We are the Mycotyrant." Xavier gestured behind him, and a giant figure was suddenly illuminated by dozens of glowing fungi. The Mycotyrant hung in a circular web of rootlike strands stretching from the floor to the ceiling. Its toadlike body was broad and green with purplish spots, gills like a collar around its neck. Large mushrooms sprouted from its back, smaller ones from its head, and while it had no legs, two thick arms ended in vicious claws. Above a lipless, gaping maw filled with thornlike teeth, beady eyes glowed green, staring down at Malcolm and Breeches with malevolent interest. #figure(image("004_Episode 4/02.png", width: 100%), caption: [Art by: Chase Stone], supplement: none, numbering: none) "You are known to us, <NAME>," Xavier said. "As is your quest, thanks to your former companions." "Are they here?" Malcolm asked, dreading the answer. "Yes," Xavier replied. "They have been incorporated into our colony, as have the ones who once resided in the place you call Downtown." Malcolm cringed. "Incorporated, as in …?" "We are one," all the humans said in eerie unison. Malcolm had seen trees felled by fungus, trunks rotted from the inside. Given what had happened to his people, the dinosaurs they had fought, and what he now faced, he could only assume they were suffering a similar fate. He looked past Xavier at the Mycotyrant, wreathed in fungal light. "What is it you want?" Malcolm asked. "Gems? Money? Food?" The Mycotyrant emitted a cloud of spores like a silent laugh. Xavier's mouth stretched in a rictus that mirrored his puppet-master's motion. "Everything." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) == Amalia The golden door whose image had taunted Amalia for weeks lay open before her. She couldn't help feeling thrilled, yet deeply unsettled by her foresight proving true again. With Kellan in tow, she followed the mass of people through a tunnel, emerging into the astonishing place she had also seen in visions. #figure(image("004_Episode 4/03.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) A sprawling panorama spread before, above, and around her as she stepped through the portal. Vibrant grasslands stretched into the distance, strange long-necked furry creatures roamed, and birds soared through the air, alone or in flocks. But instead of the land disappearing at the horizon, it curved upward. Amalia had the disconcerting sensation of being inside an enormous inverse globe. At the center of it all, a strange sun hovered, so close Amalia imagined she could reach it if she possessed the power of flight. It illuminated half the land, while other parts fell into shadow caused by the metal pieces rotating around it. A tail of more metal shards extended away from it, glittering a faint pink. This, too, she had foreseen, and she shivered at the thought of what future places she might be shown next. #figure(image("004_Episode 4/04.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) "This is truly incredible," Kellan said. "Is this what you were trying to find?" Amalia shrugged helplessly. "I don't know. I've never been here before." To their left, a pyramid rose several stories, with a large, spiked disk at the top similar to ones in the Sun Empire. Shorter buildings were scattered around it, and people poured out of them. They wore ponchos and khipu like the spirit the archaeologist had called Abuelo, and wielded pink-bladed weapons and staves with magic that sent rippling pulses through the air. Among their number, smaller creatures waddled about, their jointed bodies formed from various kinds of metal. Each had a single glowing eye in colors ranging from red to green to purple and beyond. Floating spirits joined them, some humanoid with recognizable features, others more like animals or half-formed wisps of teal fog. Amalia squinted at the strange sun, black dots floating around it like birds. Some of these shifted into an arrow-shaped formation and approached. More warriors, riding on the backs of great bats that also wore armor like the Sun Empire's flying dinosaurs. Something about the bats made her shudder, and as if in response, the voice from her visions returned. #emph[Come to me …] It seemed louder now, stronger. Amalia glanced at Vito. His lips stretched into a fanatical smile as he turned his gaze to the sky. Bartolomé touched her arm, and Amalia flinched. "Are you well?" he asked. "Just overwhelmed," she said. She had never lied so much in her life as she had on this journey. Kellan whistled as he noticed the approaching fliers. "I don't suppose you have any idea what's happening here?" Amalia grinned sheepishly. "I'm afraid not," she said. "I do hope we'll find out soon." "As long as they don't fling us into more quicksand," Kellan said, "I suppose we should consider this an improvement." One of the bat riders landed, and Bartolomé shifted closer to the crowd gathering around her. Amalia followed, Kellan beside her, wanting to know what was happening. The woman's dark hair was held in place by a crownlike band, her khipu and belt adorned with the same pink stones used in the weapons. One of the strange mechanical creatures followed her like a child. "I am called <NAME>," she said. "I command the Thousand Moons. Who are you all, and how have you opened the seal at Matzalantli?" #figure(image("004_Episode 4/05.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) The spirit Abuelo drifted forward. "I helped them," he said. "I was granted the key to entry when the door was sealed, in the hopes that we could return when the Mycotyrant was defeated." Anim inclined her head to him. "Honored Echo, we welcome you. Does this mean Topizielo is safe now?" Abuelo shook his head. "It is not, but neither is Oteclan and the rest of the Core. The Mycotyrant has grown in power rather than fading. The plan to isolate and defeat it has failed." "Then why did you open the door?" Anim asked. "You have brought ruin to us." "Ruin would have found you asleep in your beds," Abuelo replied with a curt gesture. "Now you can prepare yourselves." "The Thousand Moons do not sleep," Anim said. "This garrison has guarded the door at Matzalantli since it was closed in the time of my ancestors. It would have remained closed, and we would have been safe, if you had not opened it." The warrior-poet stepped forward now, bowing her head respectfully. "We would have found a way in eventually—if not through this door, then through other means. Our people have been digging mines deeper into the earth, as have others." "She is correct," Bartolomé said, ignoring a glare from Vito. "The Brazen Coalition alone has an entire city below the surface devoted to delving." <NAME> added, "We believed we would find the Source behind the door. We, too, would have done all in our power to unseal it. Ignorance can provide a measure of safety, but it can also make for poor choices." How well Amalia knew that now. If she had realized what this journey would mean for her, she might have stayed at home. But no, that was an unworthy thought. She had learned so much, and her maps would be of great value to her people, if she ever managed to return to Torrezon. Anim eyed the assembly with her chin raised imperiously, then settled on the warrior-poet. "Are you of the Komon?" she asked. "We are of the Sun Empire," the woman said, indicating the rest of her companions and their dinosaurs. "I am called Huatli. Who are the Komon?" "A didact could tell you more than I," Anim said. "The Komon are our ancestors who left the Core to explore Topizielo. Until the doors were sealed, we traded regularly, but we have not seen them since." The loxodon—Quintorius—cleared his throat politely. "Perhaps the Komon made it to the surface? It would explain the similarity in glyphs used by the Sun Empire and, well, you, if you're the ones who made the door." That interruption led to a more thorough round of introductions that included him and all the Sun Empire members, then the River Heralds. Amalia struggled to pay attention as she considered the implications of their discussion. If the Sun Empire was descended from these people, what did that make this place inside the plane? Perhaps her own people had once walked these fields and hills, once soared through the skies on bats. It would explain why the search for their god had led them here. Anim looked up at more incoming bat riders. "We sent word of your arrival to Oteclan. Soon, Akal Pakal will arrive to welcome our long-departed cousins, if indeed that is what you are." The one called Inti bowed and said, "We offer you the strength of our people in exchange for your hospitality. We are eager to trade and improve the bonds between us." Some darkness crossed Huatli's expression, but before she could speak, Anim approached Vito where he stood stiffly next to Clavileño. "We have not been introduced," Anim said. "My apologies for the oversight." Vito inclined his head coldly but said nothing. Bartolomé once again interceded. "We are humble explorers from the Queen's Bay Company," he said with a courteous bow. "They're vampires," a Sun Empire soldier shouted. The change in Anim Pakal was immediate. Magic arced between her fingers and danced up her arms as she formed a glowing shield between her and Vito. The Oltec surrounded the Legion members, weapons drawn and more magic rippling in the air. "Worshippers of the Great Betrayer are not welcome here," Anim said coldly. "Imprison them." "Again?" Kellan groaned. Amalia echoed the sentiment, but if fighting the Malamet had been foolhardy, attacking the Oltec would be suicidal. Vito seemed about to protest, then his eyes glazed over, and he grabbed Clavileño's arm. "All proceeds according to his will," he said. Amalia flinched, expecting the harsh whispers of Aclazotz to echo in her mind once again, but she heard nothing. Perhaps that was a blessing. The shadows of the bat riders fell on the vampires as they were led away, into the depths of the garrison, away from the light of the strange, shell-covered sun. #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) == Wayta The Sun Empire contingent sat in a dining hall within the garrison, partaking of the delightful local food. After days of trail rations, Wayta indulged herself. One never knew when the next meal would come; restraint was for fools. One of the Oltec approached Huatli. "The steward has arrived. The Thousandth Moon sent me to guide you." "We thank you," Huatli replied, tossing the last of her food to Pantlaza and heading for the door. Inti and Caparocti flanked her, while the other warriors followed behind. Wayta waited for Quint to finish stuffing fruit into one of his many pockets before escorting him out. <NAME>, Olte<NAME>eward, awaited them in a vibrantly painted building adorned with a sun emblem on the roof. She wore layers of ceremonial robes, blues and greens and golds with intricate geometric patterns. Large gold disks hung from her neck, and a tall headpiece engraved with glyphs adorned her head. Wayta couldn't imagine carrying that much weight around, but perhaps it was no more onerous than her own helmet and armor had been. #figure(image("004_Episode 4/06.png", width: 100%), caption: [Art by: <NAME>ast], supplement: none, numbering: none) "Be welcome," <NAME> said, her voice warm and husky with age. "I have heard some of your story from my sister Anim, and I am eager to hear more. First, however, we should discuss the presence of blood-drinkers in your midst." "They are not our allies," Huatli said. "We have warred with them, but when Ixalan was invaded by the Phyrexians—people from another plane—that fight took precedence. After so much violence, I hope for a peaceful way forward, and would welcome any aid you can provide as we try to rebuild." "Or," Inti interjected, "you could help us get rid of the vampires now." "Inti, we discussed this," Huatli said, her tone affectionate but exasperated. "And the emperor discussed it with us," Caparocti added. "Torrezon has been weakened by the invasion and by infighting. The living oppose their vampiric overlords more than ever, the Brazen Coalition harries them when it's lucrative, and the orcs off the western coast have never been friendly. Now is the perfect time to strike." "Better that we work together to care for our lands and rebuild what was lost," Huatli said, "rather than dying on foreign shores." "Better that we press our advantage before death comes to us," Inti countered. Wayta had heard enough of the same talk when she fought in Tocatli during the war. Stay in one place and set up blockades, or stay mobile and be harder to target? Retreat and retrench, or push ahead to drive the enemy out? Keep supply lines open and risk quick death, or let them collapse and risk starvation? Some commanders were more careful than others, some more thirsty for glory and power. The latter, she had found, were eager to spend the coin of other warriors' lives from the safety of their well-stocked bunkers. Common soldiers suffered in the aftermath of the war, too, despite their sacrifices. Those who gained power through violence didn't give it up easily, using it to exploit the powerless and increase their own influence. Her frustration had led her to the Brazen Coalition, and now back to the Sun Empire, but she wondered whether there was anywhere in all of Ixalan where the same problems wouldn't find her. Wayta wandered over to Quint, who stood apart with Abuelo, deep in discussion. Abuelo's hands moved as he spoke, while Quint nodded and took notes. "You must be bound to the poncho," Quint said. "It's what I used to summon you." Abuelo looked down at his clothes. "Not the most convenient thing, but I'm happy to appear so clearly. Some Echoes are wisps, others are monsters changed by their binding." Maybe those people were showing their true forms in death, Wayta thought. "Is an Echo bound to this?" Quint asked, producing the khipu that had helped them open the golden door. Abuelo ran the strands through his ghostly fingers. "I hope so," he said. "This was Abuela's." "Your wife?" Wayta asked. "Yes." Abuelo smiled wistfully. "She could make anything grow. Flowers, fruits … Thorns when she had to. She was fierce." The mention of flowers reminded Wayta of a poem she'd composed, after another battle like so many others: #emph[We could not save the blooms Trampled to mud by our boots So we planted blood-fed seeds In the open mouths of our wounds Hoping golden flowers of death Would grow from our shallow graves] Nothing like what the warrior-poet created, Wayta thought. But Huatli had told her once that poems should be honest. Quint used his hands and trunk to spread the khipu out as he examined it. "Perhaps we can bring her back, as I helped you come back." "Assuming she is an Echo," Abuelo said. "She may have simply passed on." Quint flared his ears slightly. "Let's find out, shall we?" Wayta drifted away again like a petal on the wind, staring at the peaceful landscape with grief filling her chest. She carried her own ghosts with her, different kinds of echoes. A glance told her the steward and her people were still deep in discussion. Would they forge an alliance? Would it lead to the war the emperor wanted? If it did, what seeds would Wayta plant? #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) == Malcolm The fungus-infested residents of Downtown surrounded Malcolm, not moving, not even breathing. Those who still had eyes stared at him, and those who didn't pointed empty sockets or pale button mushrooms in his direction. All dead. He had hoped to save them, to bring survivors out of the deep dark, but all he could do now was collect information and try to make it back to the Brazen Coalition alive to deliver it. "You did this to our people?" Malcolm asked the massive form of the Mycotyrant above him. What was left of the mayor replied. "You dug through stone and ore and veins of shining crystal until one of your kind found us. We wanted to know more of you." "And you couldn't simply ask?" "To join is to ask, and to know." Malcolm's feathers ruffled. "To kill, you mean." Xavier's head tilted in an almost human gesture. "We do not kill. We change. We spread. Where there is one of us, there are all of us." An image of the body near Sunray Bay flashed through Malcolm's mind. Either this creature had no concept of death, or it didn't understand that it was killing its hosts when it … what was it doing, precisely? Controlling their minds? Consuming them? Assimilating them into itself? "Where did you come from?" Malcolm asked. "Here," Xavier replied. "We have always been. We have watched and grown. We have seen the Oltec and their gods walk the Core before it was denied to us. We were here when the Komon Winaq built cities and when their bones enriched the soil. We have traded with the Malamet and the Deep goblins, and gathered lore from all the flesh that finds us." Malcolm had no idea what any of that meant, but it sounded impressive. And alarming. The mention of trade, however, was the first promising thing he'd heard so far. "Maybe we can strike a deal," Malcolm said. "Is there something specific my people might be able to offer you?" "GOLD?" Breeches asked. "GEMS?" The glowing green eyes of the suspended creature brightened. "We want … the sun," Xavier said. "The sun," repeated the infected people. "We have been denied the light of Chimil for ages," Xavier continued. "You have another sun above, and we will have it." You can't just have a sun, Malcolm thought, but he kept that to himself as the full potential of what the Mycotyrant said dawned on him. If this creature made it to the surface, depending on how fast it spread, it could soon consume all of Sunray Bay. Maybe even all of Ixalan. Lost gold and gems, as Breeches kept lamenting, were the absolute least of their worries. Malcolm peered around him at the fungal forest, the high ceiling of the cavern and the stalagmites and stalactites with their luminescent mold. He thought back to the tunnels through which he and Breeches had passed to get here, the distance from the bottom of Downtown's cenote mine up to the surface. How could he and Breeches possibly escape this place alive? #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) == Amalia The Oltec didn't have prisons like the ones in Torrezon, which Amalia had heard were vile, dank places filled with death and disease. They had temporary detention rooms, according to the guard who grudgingly answered Bartolomé's questions. People weren't jailed as punishment—the concept seemed to appall the man. Even so, the Legion vampires and their few remaining servants were locked up in empty rooms, weapons confiscated, and left to await their fates. Bartolomé arranged for him, Amalia, and Kellan to be together; he paced, Amalia sat on the floor, and Kellan stared out the small window, occasionally glancing back with a troubled expression. Amalia's map hadn't been taken, so she used her blood magic to explore the immediate area by filling it in on the page. From the room next to them, Vito's voice rose. "The time of our salvation is at hand. The words of Venerable Tarrian have guided me to this, our destination, and soon we will be redeemed." Muffled sounds of approval followed. Bartolomé shook his head in dismay and continued to walk, back and forth, hands clenched behind him. "So," Kellan said quietly. "You're vampires?" Bartolomé paused. "What do you know of vampires?" he asked. Kel shrugged. "They murder innocent people and drink their blood, not necessarily in that order." "That is not what our church preaches," Amalia said, righteous indignation swelling inside her. "We only feed from criminals, evil people, and we use the power of blood to help others." "Who decides who's a criminal?" Kellan asked, gesturing at the room. "Right now, we're criminals." "Justice will be served," Amalia said, but her conviction wavered. She had never considered that the people consigned to prison in Torrezon might be innocent. The church would never allow it. Would they? Vito roared, "Ours is the promise of eternity, baptized in blood and sanctified by Aclazotz, who waits for us here, beyond these doors." Bartolomé sighed. "Some of us are not entirely committed to the morals espoused by the church." Amalia knew he wasn't only referring to Vito. She'd heard the whispers of Vona de Iedo and other heretics. But perhaps they were not who Bartolomé meant? "You said you came here through a magical doorway," Amalia said, eager for a new subject. "Why would you leave your home?" Kellan looked back out the window. "I'm searching for my father," he said. "What happened to him?" Bartolomé asked. "I don't know," Kellan said. "What will you do when you find him?" Amalia asked. "That depends," Kellan mused. "I've never met him, truth be told." "Why do you want to find him, then?" Bartolomé asked, curious. A gold spark flashed in Kellan's brown eyes. "I need to know more about myself. About who I am." Amalia understood that sentiment all too well. "I suspect," Bartolomé said, laying a hand on Kellan's shoulder, "that whether you find your father or not, you'll know yourself quite well by the end of your quest." "You may be right." Kel chuckled. "I already know I'm tired of being rescued and imprisoned." Bartolomé pointed his chin at Amalia. "Her magic could get us out any time, but where would we go? We're surrounded by enemies, and the surface is well above us." He was right. She could use her magic to rewrite the map, as she had before. But then what? "Behold," Vito said. "The power of Aclazotz!" The light slanting through the window softened and faded, replaced by a tendril of mist. Amalia stood and peered outside. A magical fog covered the building, so thick her hand would disappear if she thrust it through the opening. Her people could do this, did so frequently in battle, but why now? In another room, a stifled scream died with a gurgle. Furtive begging met with a sickening thud. When the scent of blood reached her, Amalia feared the worst. The Legion soldiers had not fed enough since the descent began, and their human servants had dwindled between the desert and the Malamet. The usual rules and traditions might not bind those who were already prepared to commit atrocities in the name of god. Vito's voice again filled the silence. "Follow me, children of shadow. Now we reclaim our power." The sound of splintering wood punctuated his words. Where were the guards? Swallowed by the mist? Amalia positioned herself in front of Kel, who protested and moved to her side. Bartolomé stood between both of them and the door. "Amalia," Bartolomé said, "if something happens to me, you must return to Queen Miralda. Tell her everything." He glanced at her over his shoulder. "Promise me." "I swear it," Amalia said, her voice raw. The door was torn from its place and thrown aside. Clavileño glared at Bartolomé, then stepped aside to allow Vito entry. A crimson handprint was smeared down the front of his armor, eyes blazing—with religious fervor or thirst, Amalia didn't know. "Aclazotz demands a sacrifice," Vito said, his mild tone at odds with his expression and the blood staining his mouth. "He has had enough sacrifices," Bartolomé retorted. "The blood of the outsider will suffice," Vito continued, looking past Bartolomé to Kellan. "We will take him to Aclazotz, who will reward us with untold power and bring darkness to this sheltered place once more." Bartolomé's gaze flicked to Kellan, then settled on Amalia. His expression changed, a widening of eyes, a firming of the jaw. #emph[Escape] , he mouthed at her. They were impossibly far from Torrezon, surrounded by Oltec warriors. But perhaps, after this, she and the strangers shared a common enemy. Amalia hovered her quill over the map. With a stroke, she could set them free. Bartolomé leaped at Vito, hands curled into claws, fangs bared. They grappled, blocking the doorway so Clavileño and the other soldiers couldn't intervene. Next to Amalia, Kellan pulled his wooden hilts from his belt. Gold light burst from them and formed into a pair of shimmering swords. Vito locked an arm around Bartolomé's head and twisted, the terrible snap echoing in the small room. He let the body fall and stared down at it with undisguised contempt. #figure(image("004_Episode 4/07.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none) Amalia stifled a sob as she steadied her shaking hand. She lowered the quill and swiped it delicately at the edge of the building on the map, erasing the line. The wall behind her vanished. Mist rolled in, swallowing everyone in the room. Kellan was only visible thanks to his swords. "Run," Amalia said, grabbing Kellan's arm. The light of his weapons vanished as they fled, disappearing into the gloom, fear dogging their heels like a paladin's mastiff.
https://github.com/typst/packages
https://raw.githubusercontent.com/typst/packages/main/packages/preview/numty/0.0.2/test.typ
typst
Apache License 2.0
#import "main.typ" as nt #let u = (1,2,3) #let v = (3,2,1) #let a = 1 #let b = 2 // logic // eq // arr arr #assert(nt.eq(u,v) == (false, true, false)) #assert(nt.eq(u,u) == (true, true, true)) // arr float #assert(nt.eq(u,a) == (true, false, false)) #assert(nt.eq(a,u) == (true, false, false)) // flt flt #assert(nt.eq(a,b) == false) #assert(nt.eq(a,a) == true) // with nan #assert(nt.eq((float.nan,1),(float.nan,1), equal-nan:true) == (true,true)) #assert(nt.eq((float.nan,1),(float.nan,1)) == (false,true)) // all // arr #assert(nt.all((false, true, false)) == false) #assert(nt.all((true, true, true)) == true) #assert(nt.all((1, 1, 1)) == true) #assert(nt.all((0, 0, 0)) == false) // flt #assert(nt.all(true) == true) #assert(nt.all(false) == false) #assert(nt.all(1) == true) // all_eq //arr #assert(nt.all-eq(u,v) == false) #assert(nt.all-eq(u,u) == true) //flt #assert(nt.all-eq(3,3) == true) // any // arr #assert(nt.any((false, true, false)) == true) #assert(nt.any((false, false, false)) == false) #assert(nt.any((0, 0, 1)) == true) //isna() //arr #assert(nt.isna((1,2)) == (false, false)) #assert(nt.isna((1,float.nan)) == (false, true)) //types //arrarr(a,b) #assert(nt.arrarr(u,v) == true) #assert(nt.arrarr(a,b) == false) #assert(nt.arrflt(u,b) == true) #assert(nt.arrflt(b,u) == false) #assert(nt.fltarr(b,u) == true) #assert(nt.fltarr(b,b) == false) #assert(nt.fltflt(b,b) == true) //operators // add // arr arr #assert(nt.add((1,3),(1,3)) == (2,6)) // arr float #assert(nt.add((1,3),1) == (2,4)) #assert(nt.add(1,(1,3)) == (2,4)) // float float #assert(nt.add(1,2) == 3) // sub // arr arr #assert(nt.sub((1,3),(1,3)) == (0,0)) // arr flt #assert(nt.sub((1,3),2) == (-1,1)) #assert(nt.sub(2,(1,3)) == (1,-1)) // flt flt #assert(nt.sub(2,3) == -1) //mult // arr arr #assert(nt.mult((1,3),(1,3)) == (1,9)) // arr flt #assert(nt.mult((1,3),2) == (2,6)) #assert(nt.mult(2,(1,3)) == (2,6)) // flt flt #assert(nt.mult(2,3) == 6) //div // arr arr #assert(nt.div((1,3),(1,3)) == (1,1)) #assert(nt.div((1,3),(1,0)).at(0) ==1) #assert(nt.div((1,3),(1,0)).at(1).is-nan()) // arr flt #assert(nt.div((1,3),2) == (1/2,3/2)) #assert(nt.div(2,(1,3)) == (2,2/3)) // flt flt #assert(nt.div(2,3) == 2/3) //pow // arr arr #assert(nt.pow((1,3),(1,3)) == (1,27)) // arr flt #assert(nt.pow((1,3),2) == (1,9)) #assert(nt.pow(2,(1,3)) == (2,8)) // flt flt #assert(nt.pow(2,3) == 8) // algebra // arr #assert(nt.log((1,10, 100)) == (0,1,2)) //#assert(nt.log((0,10, 100)) == (float.nan,1,2)) // others: #assert(nt.linspace(0,10,3) == (0,5,10)) #assert(nt.geomspace(1,100,3) == (1,10,100)) #assert(nt.logspace(1,3,3) == (10,100,1000))
https://github.com/jneug/schule-typst
https://raw.githubusercontent.com/jneug/schule-typst/main/src/themes/digi.typ
typst
MIT License
/********************************\ * Variables and some functions * * for setting a common theme * \********************************/ #let typst-text = text // General colors #let primary = rgb("#0096ff") #let secondary = rgb("#ff2f93") #let muted = luma(174) // General backgrounds #let bg = ( primary: primary.lighten(80%), secondary: secondary.lighten(90%), muted: muted.lighten(90%), code: muted.lighten(90%), solution: muted.lighten(85%), ) // Text colors #let text = ( default: luma(20%), light: white, header: luma(50%), // primary footer: luma(75%), title: primary, subject: luma(33%), primary: white, secondary: white ) // Font settings #let fonts = ( default: ("Source Sans Pro", "Roboto", "Avenir Next", "Avenir", "Helvetica"), headings: ("Helvetica Neue", "Avenir Next", "Avenir", "Helvetica"), code: ("Fira Code", "Liberation Mono", "Courier New"), serif: (/*"EB Garamond 12",*/ "Garamond", "Charter", "Georgia"), sans: ("Fira Sans", "Liberation Sans", "Avenir Next", "Avenir", "Helvetica Neue", "Helvetica"), ) // Table colors and styles #let table = ( header: rgb("#99b9ff"), even: rgb("#fcfcef"), odd: white, stroke: .6pt + muted, ) #let cards = ( type1: rgb("#36c737"), type2: rgb("#ffcc02"), type3: rgb("#cd362c"), help: rgb("#b955b6"), back: rgb("#ffffb2"), ) #let init(body) = { set typst-text(font: fonts.default, weight: "medium") show figure.caption: it => [ #typst-text(secondary, weight: 400, [#it.supplement #it.numbering])#h(1.28em)#emph(it.body)] body }
https://github.com/kiwiyou/algorithm-lecture
https://raw.githubusercontent.com/kiwiyou/algorithm-lecture/main/basic/07-graph.typ
typst
#import "@preview/cetz:0.1.2" #import "@preview/algorithmic:0.1.0" #import "../slide.typ" #show: slide.style #show link: slide.link #show footnote.entry: slide.footnote #let algorithm(..args) = text(font: ("linux libertine", "Pretendard"), size: 17pt)[#algorithmic.algorithm(..args)] #let func(body) = text(font: ("linux libertine", "Pretendard"))[#smallcaps[#body]] #align(horizon + center)[ = 알고리즘 기초 세미나 07: 그래프 #text(size: 0.8em)[ 연세대학교 전우제#super[kiwiyou] \ 2023.02.01.r1 ] ] #slide.slide[그래프][ - $V$개의 정점과 $E$개의 간선의 집합 - 한 간선은 두 정점을 연결 - 정점에는 번호가 있을 수 있고, 간선에는 방향과 가중치가 있을 수 있음 #pagebreak() - 간선의 존재 여부 - 정점에 연결된 간선 탐색 #pagebreak() - 인접 행렬 - $V times V$ 행렬 $[a_(i j)]$에서, $i -> j$ 간선이 있으면 $a_(i j) = 1$, 아니면 $0$ - $V times V$ 행렬 $[a_(i j)]$에서, $i -> j$ 간선의 가중치가 $w$라면 $a_(i j) = w$ - 간선의 존재 여부 $cal(O)(1)$ 시간 - 정점에 연결된 간선 탐색 $cal(O)(V)$ 시간 - 두 정점 사이에는 최대 한 개의 간선 - 공간복잡도 $cal(O)(V^2)$ #pagebreak() - 인접 리스트 - $V$개의 리스트 $L[u]$를 관리 - $L[u]$는 $u -> v$ 간선이 존재하는 모든 $v$ (와 간선 가중치 $w$)의 리스트 - 간선의 존재 여부 $cal(O)(E)$ 시간 - 정점에 연결된 간선 탐색 $cal(O)(E)$ 시간 - 공간복잡도 $cal(O)(V + E)$ #pagebreak() - 그래프 탐색: 연결된 정점들을 한 번씩 방문 - 깊이 우선 탐색: 연결되어 있고 아직 방문하지 않은 정점을 하나 골라 탐색 - 너비 우선 탐색: 아직 방문하지 않은, 출발지로부터 가까운 정점부터 탐색 #pagebreak() - 깊이 우선 탐색 #algorithm({ import algorithmic: * Function("Depth-First-Search", args: ($u$, $E$, $"visited"$), { Assign[$"visited"[u]$][*true*] For(cond: [*edge* $(u, v)$ *in* $E$], { If(cond: [*not* $"visited"[v]$], { Call("Depth-First-Search", [$v$, $E$, $"visited"$]) }) }) }) }) #pagebreak() - 너비 우선 탐색 #algorithm({ import algorithmic: * Function("Breadth-First-Search", args: ($S$, $E$), { Assign[$Q$][#CallI("Make-Queue", [$S$])] Assign[$"visited"[u]$][*false*] Assign[$"visited"[u in S]$][*true*] While(cond: [$Q$ *is not empty*], { State[*pop* $u$ *from* $Q$] For(cond: [*edge* $(u, v)$ *in* $E$], { If(cond: [*not* $"visited"[v]$], { Assign[$"visited"[v]$][*true*] State[*push* $v$ *to* $Q$] }) }) }) }) }) - 방문 체크 시점에 주의 ]
https://github.com/frederiksemmel/linicrypt_typst
https://raw.githubusercontent.com/frederiksemmel/linicrypt_typst/main/lib/linicrypt.typ
typst
// style #set math.mat(delim: "[", ) #set math.equation(numbering: "(1)") // operations #let exec(x) = $sans("exec")(#x)$ #let sol = $sans("sol")$ #let solH = $sans("sol")_H$ #let solE = $sans("sol")_E$ #let ker(x) = $sans("ker")(#x)$ #let im(x) = $sans("im")(#x)$ #let rows(x) = $sans("rows")(#x)$ #let rowsp = $sans("rowsp")$ #let span(body) = $angle.l #body angle.r$ #let max(x) = $sans("max")(#x)$ // spaces, programs #let F = $bb("F")$ #let FF = $bb("F")$ #let C = $cal("C")$ #let CC = $cal("C")$ #let P = $cal("P")$ #let PP = $cal("P")$ #let Fixing = $cal("F")$ #let Vp = $bb("F")^d$ #let Vd = $(bb("F")^d)^*$ #let Cjoin = $cal("C")_"join"$ // crypto #let Att = $cal("A")$ #let Adv = $sans("adv")$ #let SolAdv = $sans("SolAdv")$ #let Ti = $T$ #let fin = $sans("finish")$ #let Ora = $cal("O")$ #let RO = $H$ #let IC = $E$ #let SolGame = $sans("SolGame")$ // matrix stuff #let vv = $bold(v)$ #let ww = $bold(w)$ #let I = $bold(I)$ #let II = $bold(I)$ #let O = $bold(O)$ #let OO = $bold(O)$ #let B = $bold(B)$ #let BB = $bold(B)$ #let T = $bold(T)$ #let TT = $bold(T)$ #let L = $bold(L)$ #let LL = $bold(L)$ #let LLd = $bold(L)^*$ #let q = $bold(q)$ #let qq = $bold(q)$ #let Q = $bold(Q)$ #let QQ = $bold(Q)$ #let a = $bold(a)$ #let aa = $bold(a)$ #let bb = $bold(b)$ #let i = $bold(i)$ #let ii = $bold(i)$ #let kk = $bold(k)$ #let xx = $bold(x)$ #let yy = $bold(y)$ #let Proj = $bold(P)$ #let MM = $bold(M)$ // maps #let ff = $f$ #let fs = $f^*$ #let incU = $iota_U$ #let incUs = $iota_U^*$ #let incW = $iota_W$ #let incWs = $iota_W^*$ // constraints shortcuts #let cs = $italic("cs")$ #let fix = $italic("fix")$ #let crit = $italic("crit")$ #let Ccs = $#C _#cs$ #let Cfix = $#C _#fix$ #let Ccrit = $#C _#crit$ #let Ics = $#I _#cs$ #let equiv(v, c) = $[#v]_#c$ #let quotient(a, b) = $#move(dy: -0.1em, a) slash.big #move(dy: 0.1em, b)$ // convenience #let PIOC = $#P = (#I, #O, #C)$ #let linicrypt_notation_summary = [ This is a summary of the notation and definitions that I am using. - $d$ is the number of base variables of $#P$, $k$ the number of input variables, $l$ the number of output variables and $n$ the number of constraints. - The state space of the program #P is $#F^d$ - The function going from the inputs of a deterministic #P to the values of the base variables (the state space) is called $b_(#P) : #F^k arrow #F^d$ - Instead of $#vv _(sans("base"))$ I will just write $#vv$ - The set of base variables one can get by executing a Linicrypt program #P on all of its inputs is called $#exec[#P]$ - The set of solutions to a set of constraints #C is called $sol(PP)$ - The input matrix to #P is called #I and the output matrix is called #O so I will write #PIOC for a Linicrypt program and its algebraic representation - The function that a deterministic #P computes is called $f_(#P) = bold(O) circle.tiny b_(#P)$ ]
https://github.com/adamijak/typst-template
https://raw.githubusercontent.com/adamijak/typst-template/main/README.md
markdown
MIT License
# typst-template To use typst open devcontainer in vscode and run `typst -w file.typ`.
https://github.com/francescoo22/masters-thesis
https://raw.githubusercontent.com/francescoo22/masters-thesis/main/appendix/bibliography/bibliography.typ
typst
#pagebreak(to: "odd") #bibliography("bibliography.bib", style: "association-for-computing-machinery")
https://github.com/An-314/Notes-of-DSA
https://raw.githubusercontent.com/An-314/Notes-of-DSA/main/priority_queue.typ
typst
= 优先级队列Priority Queue *循优先级访问:*对存入的数据约定一定的优先级,每次访问是严格按照优先级的。 + 在应用中会出现需要循优先级访问的例子: - 离散事件模拟 - 操作系统:任务调度/中断处理/MRU/... - 输入法:词频调整 + 希望能够: - 快速找到极值元素:须反复地、快速地定位 - 集合组成:可动态变化 - 元素优先级:可动态变化 + 作为底层数据结构所支持的高效操作是很多高效算法的基础 - 内部、外部、在线排序 - 贪心算法: Huffman编码、 Kruskal - 平面扫描算法中的事件队列 ```cpp template <typename T> struct PQ { //priority queue virtual void insert( T ) = 0; virtual T getMax() = 0; virtual T delMax() = 0; }; //作为ADT的PQ有多种实现方式,各自的效率及适用场合也不尽相同 ``` - Stack和Queue,都是PQ的特例——优先级完全取决于元素的插入次序; - Steap和Queap,也是PQ的特例——插入和删除的位置受限。 对于前面的`vector`、`sorted_vector`、`list`、`sorted_list`、`BBST`。若只需查找极值元,则不必维护所有元素之间的全序关系,*偏序*足矣。 因此有理由相信,存在某种更为简单、维护成本更低的实现方式,使得各功能接口的时间复杂度依然为$O(log n)$,而且实际效率更高。 == 完全二叉堆Heap 由于完全二叉树的特性,我们可以把一棵完全二叉树存在一个线性的列表中。并且可以通过秩的代数运算得到父亲和儿子。 ```cpp #define Parent(i) ( ((i) - 1) >> 1 ) #define LChild(i) ( 1 + ((i) << 1) ) #define RChild(i) ( (1 + (i)) << 1 ) ``` #figure( image("fig\堆\1.png",width: 80%), caption: "完全二叉堆的存储结构", ) ```cpp template <typename T> struct PQ_ComplHeap : public PQ<T>, public Vector<T> { PQ_ComplHeap( T* A, Rank n ) { copyFrom( A, 0, n ); heapify( _elem, n ); } void insert( T ); T getMax(); T delMax(); }; // 该结构的实现包括下面的一些函数 template <typename T> Rank percolateDown( T* A, Rank n, Rank i ); //下滤 template <typename T> Rank percolateUp( T* A, Rank i ); //上滤 template <typename T> void heapify( T* A, Rank n); //Floyd建堆算法 ``` 该完全二叉堆满足*堆序性*,即: 只要 $0<i$,必满足 `H[i] <= H[Parent(i)]`,故`H[0]`即是全局最大。 ```cpp template <typename T> T PQ_ComplHeap<T>::getMax() { return _elem[0]; } ``` 现在讨论如何在动态操作后,仍维护*堆序性*。 === 插入:逐层上滤 ```cpp template <typename T> void PQ_ComplHeap<T>::insert( T e ) //插入 { Vector<T>::insert( e ); percolateUp( _elem, _size - 1 ); } //先接入,再上滤 ``` 在插入一个元素时,我们把它放在队列的最后。每次与父亲对比,如果比父亲大,就swap,直到不能替换。 ```cpp template <typename T> Rank percolateUp( T* A, Rank i ) { //0 <= i < _size while ( 0 < i ) { //在抵达堆顶之前,反复地 Rank j = Parent( i ); //考查[i]之父亲[j] if ( lt( A[i], A[j] ) ) break; //一旦父子顺序,上滤旋即完成;否则 swap( A[i], A[j] ); i = j; //父子换位,并继续考查上一层 } //while return i; //返回上滤最终抵达的位置 } ``` 该算法的效率是$O(log n)$。 === 删除:割肉补疮 + 逐层下滤 每次删除的是最顶层的节点,为了保证完全二叉树的结构,我们把最后一个节点放到顶层,然后逐层下滤。 ```cpp template <typename T> T PQ_ComplHeap<T>::delMax() { //取出最大词条 swap( _elem[0], _elem[ --_size ] ); //堆顶、堆尾互换(_size递减不致引发shrink()) percolateDown( _elem, _size, 0 ); //新堆顶下滤 return _elem[_size]; //返回原堆顶 } ``` 相当于去掉最顶层的节点后,变成两颗子树的合并。取来最后一个节点放在顶层,并逐层下滤即可。 ```cpp template <typename T> Rank percolateDown( T* A, Rank n, Rank i ) { //0 <= i < n Rank j; //i及其(至多两个)孩子中,堪为父者 while ( i != ( j = ProperParent( A, n, i ) ) ) //只要i非j,则 swap( A[i], A[j] ), i = j; //换位,并继续考察i return i; //返回下滤抵达的位置(亦i亦j) } ``` === 批量建堆 ==== 自上而下的上滤 相当于每次插入在最后插入元素,然后上滤,直到插入所有元素。 ```cpp PQ_ComplHeap( T* A, Rank n ) { copyFrom( A, 0, n ); heapify( _elem, n ); } ``` 不断调用上滤函数即可。 ```cpp template <typename T> void heapify( T* A, const Rank n ) { //蛮力 for ( Rank i = 1; i < n; i++ ) //按照逐层遍历次序逐一 percolateUp( A, i ); //经上滤插入各节点 } ``` 这种方法是低效的,最坏情况下每个节点都需上滤至根。耗时是$O(n log n)$的。这足以全排序,一定有更好的方法。 ==== 自下而上的下滤 任意给定堆$H_1$和$H_2$,以及节点$p$。为得到堆$H_1 union p union H_2$,只需将$H_1$和$H_2$的根当作$p$的孩子,再对$p$下滤。 ```cpp template <typename T> //<NAME>, 1964 void heapify( T* A, Rank n ) { //自下而上 for ( Rank i = n/2 - 1; -1 != i; i-- ) //依次 percolateDown( A, n, i ); //经下滤合并子堆 } //可理解为子堆的逐层合并, 堆序性最终必然在全局恢复 ``` 类似自下而上的归并排序。 二者的区别在于,前者(自上而下的上滤)每一个节点都要经过其深度次操作,但是后者(自下而上的下滤)每一个节点只要经过其高度次操作。 从而该算法的效率是$O(n)$的。 == 堆排序Heap Sort `selectionSort()`的想法是,从后向前排序,每次把前缀最大者交换到后缀的最前端。这样,每次交换后,前缀都是有序的。复杂度是$O(n^2)$的。 这个过程可以被堆优化。做一定的预处理,将前缀建成堆,然后每次取出堆顶,放到后缀的最前端。这样,每次取出后,前缀都是有序的。复杂度是$O(n log n)$的。 ```cpp template <typename T> void Vector<T>::heapSort( Rank lo, Rank hi ) { //就地堆排序 T* A = _elem + lo; Rank n = hi - lo; heapify( A , n ); //待排序区间建堆, O(n) while ( 0 < --n ) //反复地摘除最大元并归入已排序的后缀,直至堆空 { swap( A[0], A[n] ); percolateDown( A, n, 0 ); } //堆顶与末元素对换后下滤 } ``` 具体实现是就地建堆,对顶就是第一个元素,然后每次取出堆顶,放到后缀的最前端,再对新堆顶下滤。 == 锦标赛树Tournament Tree 锦标赛树是完全二叉堆的等效方法。 === 胜者树 锦标赛树的每一个节点都是一个比赛,每一个节点都有一个胜者。每一个节点的胜者都是其左右孩子的胜者中的较小者。从而树的根部就是最小者,类似于堆顶。 ```cpp Tournamentsort() CREATE a tournament tree for the input list while there are active leaves - REMOVE the root - RETRACE the root down to its leaf - DEACTIVATE the leaf - REPLAY along the path back to the root ``` 每次取出胜者后,沿着胜者的路径,重新比赛,可以算出新的胜者。 #figure( image("fig\堆\2.png",width: 80%), caption: "锦标赛树的更新", ) 锦标赛树的`create()`是$O(n)$的,`replay()`是$O(log n)$的。 从而如果利用锦标赛树排序,是$O(n log n)$的。 在锦标赛树中,进行$k$次迭代选取的话,一共需要$O(k log n)$的时间。在渐进意义上与完全二叉堆是一样的。但是由于占用空间和堆局部性不好的原因,常系数差别较大。堆的每次下滤不一定到最底层,而胜者树一定会遍历所有层。 === 败者树 胜者树重赛过程中,须交替访问沿途节点及其兄弟,这造成了比较大的开销。 而败者树内部的节点记录比赛的败者,增设根的父亲,记录冠军。 #figure( image("fig\堆\3.png",width: 80%), caption: "败者树的储存", ) 在构造时,每个节点都会留下败者,向上抛出胜者:每次比较两个节点(下方节点抛给的胜者),把败者放在父亲上,把胜者向上抛出。 而更新时,就直接沿着胜者的路径,重新比赛,可以算出新的胜者。不需要再访问兄弟节点了。 #figure( image("fig\堆\4.png",width: 80%), caption: "败者树的更新", )
https://github.com/polarkac/MTG-Stories
https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/043%20-%20Innistrad%3A%20Midnight%20Hunt/010_The%20Dusk%20Reborn.typ
typst
#import "@local/mtgstory:0.2.0": conf #show: doc => conf( "The Dusk Reborn", set_name: "Innistrad: Midnight Hunt", story_date: datetime(day: 01, month: 10, year: 2021), author: "<NAME>", doc ) The forests of Innistrad were not a welcoming place: thick, shadowed, the twisted trees' reaching branches and whispering leaves blotting out even the glimmering light of the winter full moon. Like much else on the moors, it was not meant for human life. The haunt of corpses and wraiths. Yet Algli remembered a time when the roots had not seemed to wrench themselves free of the forest floor to trip her as she passed, when the feeling of being watched by hungry eyes had come only as she traveled deeper. Now, so much as a glance at the treeline from the paltry safety of town brought that prickle of fear down her spine. #figure(image("010_The Dusk Reborn/01.jpg", width: 100%), caption: [Graveyard Trespasser | Art by: <NAME>], supplement: none, numbering: none) This change had come in Algli's lifetime. She and her husband had been tanners, living just outside of town due to the stink of their profession. Their tannery was small, but their work was good, and they were proud of it; her husband handled the skins while Algli fashioned the leather into armor, pouches, and wineskins. When the first rumblings of trouble had started, they kept working, kept their heads down. For a while, business was good: everyone wanted protection. Werewolf attacks increased. Flesh-hungry ghouls became a common sight at the outskirts of town. But still, she thought that if they simply boarded their windows, kept strict hours, they would be safe. A foolish hope, dashed by an incursion of ghouls. No mere mindless zombies, these worked in concert, battering the doors, stirred to a ravenous frenzy by the scent of the flesh and oil. Algli survived, but it had never been luck. Her husband and her youngest son threw themselves between her and the ghouls, and she set the tannery aflame. Her eldest died of the burns. Some called her lucky; she had survived. She buried their bodies in the tannery pit, praying in vain to the angels that the charcoal and earth would hide the scent of decay from the undead. It did not. A ghoulcaller turned his cruel attentions to the town. The church's graveyard, the tannery, the bog, mourners in procession: all were playthings to him, and the tatters of her family danced to his words. That was how she met Olutio. His daughter had been murdered and reanimated by that same ghoulcaller. They had worked together, using Olutio's forbidden rites, to slay the ghoulcaller and rebury the dead. Standing over their fresh graves, Olutio first spoke to her of the Buried Lord. "Under the watch of the Buried Lord," Olutio said, "the dead stay dead. The grave is His; the dirt is His, and those interred will rest. Geists, ghouls, necromancers—our lord does not parley with those who disturb His domain." For her family to have rest, to ensure that she would have rest when the Plane finally took her~that was why she stayed, when so many others had abandoned their cause. Slowly, the number of people Olutio's pretty vows could bring out into the woods to raise a long-dead lord had dwindled, laid low by violence or cynicism, yet Algli had persisted. Algli pulled her hood farther down over her head to hide her eyes from anyone, or anything, who might see her and her companions. The three of them had made this journey many times over the years, so many that despite her aching joints and the skinny, stubborn goat she had to coax along the new tangles of roots across the frosted deer trail, the clearing she stood in felt familiar. It still wrenched her heart to think of her family, especially in this clearing, bearing her torch on this dark march to bring a forgotten lord forth to shelter them in quiet oblivion. It hurt to know that was the best she could give them. They had deserved so much more. This night—this ritual—was their last chance to call forth the Buried Lord. Algli knew it; quiet Sruta with her crafts and tools knew it; and gruff Olutio had said as much, swearing and spitting to the side of the path even as he proclaimed that tonight—tonight was the fateful night they would finally summon the Buried Lord to save them all. Tonight was the last time that the stars had aligned, that the tearful moon was in the right position, and their auguries and calculations mirrored the ones of Olutio's tomes, told them that power gathered in their favor this night—and not again for a millennium. The three gathered in the clearing and prepared the ground, and when the swollen moon filled the sky they carried out the rite in solemn silence. A goat, hooves and horns, in the image of a demon. Its blood into the earth a fresh grave; ashes and veils and Olutio's whispered rites in muted darkness. As the last of the beseeching prayer left Algli's lips, the wind itself fell hush, and a dark thrill ran through her. #figure(image("010_The Dusk Reborn/02.jpg", width: 100%), caption: [Ecstatic Awakener | Art by: <NAME>], supplement: none, numbering: none) The three invokers waited, their faces pressed to the ground, their arms outstretched, for the Buried Lord to emerge from the smoldering ribcage of the goat or the bloodstained ground beneath. But no movement came, no stifling bog-scent, no drifting veils. The fires did not go out. The goat's blood slowly congealed to an ordinary rust color, smudging the runes drawn into it into an unreadable mess. They waited through the wind picking up again, through the moon moving to cast the shadows wrong over their sigils drawn in lime. It was Sruta who stood first. "You were always a fool, Olutio," she said. "And you, Algli, for following. The wind itself makes the leaves mock our failure." With that, she turned on her heel, her hand on her belt, and stalked into the night. Algli sat up, and she looked to Olutio hoping for some sign that he had seen which she had missed. Something foretold in his scraps of books. His dark expression told her all she needed to know. They had failed. For the last time, their pleas, their rites, their sacrifices. Olutio's rotting books, Sruta's sharp dagger, and Algli's goat's blood had not protected them. And now, standing in the ashes of their hopes, of everything they'd researched, as Olutio scowled and turned to follow Sruta into the night, Algli realized all of their efforts had been for naught. There was no hope for Innistrad. Algli knelt in the burned ashes and blood runes of the corpse of the starveling goat she'd scraped for months to afford, to bring here and be killed to raise their somber lord. Entrails and ashes and the death of dreams in this shadowed copse; and as the last of her companions departed her, she sobbed, and let the night close around her. Let her die here, with her failure. Let her rejoin her family, free of loneliness and shame. No matter how she willed it through her tears, death did not come. The embers of the sacrificial fire dimmed and left her in darkness, and slowly Algli realized that she was not alone. Behind her, she heard rustling, breathing. A geist or ghoul? No, those did not breathe, and a bandit or corpsemonger would have attacked her while she was defenseless, distracted in her mourning. The memory of hope rose in her, stronger than in the rote motions she'd gone through recently with Olutio and Sruta. Could this be Him? His final test? Algli placed her hand on the hilt of the sacrificial dagger on her belt nonetheless and turned to face her watcher. A dark-haired woman sat perched on a rotting log, just out of reach of the pale moonlight. She was clad in a warrior's padded gambeson, her hand to her side, covering a dark stain. Her other hand rested on a pronged spear in an old style. Older even than the spears Algli had seen displayed in church before she'd stopped attending and turned her faith to the darker corners of the Plane. The spear meant nothing on its own. Many of Avacyn's churches had been ransacked. A would-be robber, then, perhaps wounded by Olutio or Sruta? Algli shifted her weight, wary. She was old, but to be old on a Plane as cruel as this meant one was either clever or deadly. Algli may not look it, but there was still fight in her. #figure(image("010_The Dusk Reborn/03.jpg", width: 100%), caption: [Liesa, Forgotten Archangel | Art by: <NAME>], supplement: none, numbering: none) The strange woman tilted her head, her expression peaceful. "I mean you no harm," the woman said. Despite the wound, her voice was clear. She nodded at the dying sacrificial fire. "Your rites. Do you know what you have called forth?" "A deathless lord to bring silence. To protect us from the vampires, the werewolves, to lay the risen dead to eternal rest," Algli said, unable to hide the quiver in her voice. Something about the quiet grace of this woman unsettled. Even unarmored and at rest, she exuded the ease of an experienced warrior. "Deathless, yes," the woman said and shifted forward. "But the Buried Lord has never been one to protect. He is here, and he is hungry." In the flickering of the torch, Algli saw that the shadows behind the woman were patterned, white and gray—and as she watched, the shadows unfurled into the elegant frame of raptor's wings. An angel sat before her. Algli swayed on her feet, nearly falling to her knees again. The old depictions of Avacyn—light-haloed, savior, guardian—flashed through her mind. "My lady," Algli said. Excuses bubbled up—for sacrifice, for grief, for losing hope—but she voiced none of them. "Are you here to judge me?" "Not to judge but to parley." The angel inclined her head. "I spoke with demons once. I was wind and I was silence. You will forgive me watching your sorrow and saying nothing." "Why here?" "I know as well as you." The angel gestured to the remains of the goat. "I was compelled to answer your call." Hope rose again in Algli, sharp, painful, foolish. "Are #emph[you] the Buried Lord?" she blurted. The angel's smile was soft, not mocking. "No, but I too once sought to parley with him. To calm the undead, to banish geists, to bring peace; all that he has said and written. Be not mistaken: the silence he brings is only to amplify his voice, the shroud he lays only to muffle and bind others. The only joy in his stifled world is the joy he feels." Algli swallowed, her mouth dry, her hand tightening around the hilt of her dagger. "My family is dead. He will ensure their bodies rest." "You, too, deserve rest in your life," the angel said, meeting Algli's challenging gaze with sympathy, with trust, "and to be heard, without bloodshed." Algli felt her old knees wobble again. To hear that she deserved rest—that such a thing could exist in life—a half-remembered dream. "And what am I supposed to do about it?" Algli asked. "Haven't I done enough?" "We must move swiftly. Your so-called lord is summoned and prowls these woods. Not as a savior, but as a demon, and he is ravenous. Your friends, I fear, are already dead." The angel braced herself against her spear, and stood, but as she stood, the dark stain over her gambeson spread, and, like a mortal, the divine being flinched. Algli thought of pepper-bearded Olutio, and scornful Sruta, in the woods, pursued; and of her husband on his deathbed, and she held out her hand to bid the strange angel to pause. "You can't save anyone while you're bleeding out. I may be a fool dabbling in works better left forgotten, but one of those works I've learned is how to staunch a wound. Sit back down before you go running off to certain death." Slowly, the angel sat again, her wings folding behind her. "Your wisdom befits your age," she said, wryly. "A second death, having just returned, would be a waste, I agree. But I have been gone a long time, it seems. This forest is alien to me, the land perhaps more cruel. Pray tell me while you work, Algli: what has befallen Innistrad in my absence?" "Your absence?" Algli asked. She pulled her cloak off from over her shoulders and set about ripping bandages from the hood. "You went mad with the other angels, I take it?" She tsked. "No rest, even for the divine." "I was killed," the angel said. There was a pause to her voice which made Algli wonder what she was hiding. Perhaps she had returned from the twisting corruption that befell the others? "I wandered, was scattered on the winds. You and your fellows were correct in one thing—the Buried Lord does not die. It seems that as a consequence of my dealings with him, neither will I. As for my sisters~you say they are mad?" "No longer mad, but dead. Many were lost, but the Flight of Herons remains. Not enough to protect all of us." Algli bandaged the angel's ribs firmly while she tried to condense her misery into easy sentences. The telling of The Travails was short, the fall of Gavony, the invigorated rise of the lordly vampires, the rampages of lycanthropes, geists, and witches—the ruin poured into a recounting far shorter than the agony of living through them. She spoke of the fall of her sister angels, all but the archangel Sigarda and her flight; of the encroaching undead, the corpse-trade, the rampages of the once-pacified werewolves. Of the deaths of her family, first to violence, then raised from their shallow graves to serve the whims of a ghoulcaller. "And why not call upon a Buried Lord?" Algli asked, her voice raised in defiance. "Olutio and I deciphered the writings. We asked, who else is left to save us?" The angel only gave Algli the barest of a smile, understanding, and the sharing of the burden alone made tears rise to Algli's eyes again. "You need not believe me to walk beside me, Algli," the angel said. "Even if it is merely to guide me to your lord, tonight you must raise your torch and your dagger to save yourself." She refastened her gambeson over the bandage torn from Algli's hem, and stood, extending her hand to the elderly cultist. "I am Liesa, archangel who once lead the Flight of Dusk. Come, Algli. For the future of Innistrad, let us rebury this lord." #v(0.35em) #line(length: 100%, stroke: rgb(90%, 90%, 90%)) #v(0.35em) Algli's torch did little against the forest's thick night, but Liesa was thankful for its meager light anyways. The Plane had changed in many ways, but some things had remained the same. Humans still displayed a stubborn willfulness. A tenacity that Liesa thought was not so different from herself. A mixed blessing. How long had it been since her death at the hands of that vampire's folly, Avacyn? A thousand years, or more? Long enough for a church to rise in Avacyn's name. Though her sisters had condemned her, exiled her, and, slain by Avacyn, she had drifted on the aether for centuries, Liesa could not find it within her to feel anything but a muted sadness, a great weight at the news of her sisters' passing. They had never been able to come to an understanding, never even sought to learn why Liesa would seek out the company and conversation of demons, why she might wish to know how fiends navigated the Plane, what they might teach each other, and now~now they had been robbed of that chance through the flash of the very forces Liesa sought to understand. Balance through meted violence had been the creed her radiant sisters had lived and died by. All but Sigarda—but that reckoning, or, Liesa hoped, conversation—would have to wait. The Buried Lord had drawn her here, and through their bond, she felt his awakened hunger. For was it not natural to seek a feast after waking from prolonged slumber? They found the gutted remains of Olutio first, the man Algli had described as their sect's leader, the man with connections to scraps of grimoires and the researcher. His corpse was chewed and pulled halfway into the ground, his robes still wet with his own blood. #figure(image("010_The Dusk Reborn/04.jpg", width: 100%), caption: [Infernal Grasp | Art by: <NAME>], supplement: none, numbering: none) "One of your order?" Liesa asked. Algli turned the corpse over with her boot and grimaced. "Yes," she said, and no more. Was it sorrow or resignation illuminated on the old woman's tired face by her torch? "We're close." Liesa looked to the canopy, listening for a disturbance in the ground, the Buried Lord's domain. She felt it, a shiver through the firmament itself— And then came the screaming. "Sruta!" Algli shouted. She hesitated. It was Liesa who pressed forward, charging through the brush, frost-coated nettles and pines crunching like bones under her swift gait. She broke into a small clearing not unlike the ritual grove, twisted, half-sunken trees in a cold swamp. The Buried Lord awaited them in a moonlit clearing. Liesa remembered him. She remembered speaking with him for hours—intelligent, calculating. Reasonable. A nobleman among demons, he had claimed, but a demon nonetheless. Framed by the silver moon, the massive demon's horns and the tattered veils of his wings were haloed by the gentle glittering of suspended moon-drops in the black sky. Dust shed from his crackling form like an embalmed saint shedding his shroud, and when he turned to look at them, his eyes were two cold stars in the void of his macilent face. He was stooped over Sruta. The cultist struck again and again at the demon's hand grasping her, each strike bringing an arc of dust up from the demon's skin. Behind Liesa, Algli froze under the malevolent gaze of the demon. But the Buried Lord's attention was not for the old gray-haired woman, or even the younger shrieking fury he held in his hand. No, the one he turned toward was Liesa herself. "Liesa the dusk-winged," the Buried Lord said, his voice a smooth sludge, the invitation of quicksand, of an empty grave. "What a pleasure to see an old friend here, of all places." "Drop her," Liesa ordered, closing the distance between them. She leveled her spear at him. "You've killed a man already. I remember you speaking of parley, of peace, of knowledge. Here is your chance to put your words to action." The Buried Lord's face split into a needle-fanged grin. "Oh, but I find knowledge is of meager use to the hungry!" On the last word his teeth sunk into Sruta, snuffing her screams with a gruesome tear. Liesa's spear struck his shoulder, but too late. The Buried Lord swept her spear aside, swallowing the last bloody traces of his summoner. His neck cracked as he straightened and lunged for Liesa. He stank of death. The wound in Liesa's side twinged, almost causing her to stumble as she dodged aside. She was fortunate—they were both slow from their summoning. The Buried Lord's tail swept her path, and he wrenched himself around. "Ah, that's cleared my head a bit." His voice was an amused growl even as his talons dug into the frost-covered loam, claws flashing by Liesa's head. She darted from the shadows into the moonlight to flank him, to angle herself to pierce him at the neck or belly. "Did you intend understanding on an empty stomach?" The Buried Lord taunted. "Come now; don't let the fragile lives of these few optimists who brought us together again sway your resolve. Their blood has served us." Liesa called on her light, let power crackle down the pronged blade of her spear. This blow struck true, glancing from the demon's back and slicing loose one of his flapping, shriveled wings. This time his sly grimace was one of pain. The ground itself buckled under her. Liesa leaped, and the ground crumbled; ashes, rot where there had once been growth. She spread her wings. "I am forgiving," the Buried Lord called. "But I am hungry. Give me the third, and she will be my last. We will form that alliance you crave. We'll nurture the poor little humans. Dark and light: a prosperous kingdom of dusk!" #figure(image("010_The Dusk Reborn/05.jpg", width: 100%), caption: [Lord of the Forsaken | Art by: <NAME>], supplement: none, numbering: none) Liesa shook out her arms, sore from disuse, spear-tip pointed at the Buried Lord's upturned face. Her wings ached. Her side ached. For a moment, she only wanted to agree. What was one life in the face of many? In the face of a cataclysm? An old woman who had already lost all she had, searching for the same impossibility that Liesa had? It was everything. "Your actions have shown your priorities," Liesa said. "But I will grant you another chance, Lord of the Interred, in another thousand years." Flight felt clumsy, but the crisp air was rejuvenating. She called on the old power within her, half-remembered, all that had traveled with her when she was nothing, and poured it into her blade. Like a falcon she swept down, and though the Buried Lord slashed at her wings, he was yet slow. Liesa drove the spear deep into the demon's spine. His shriek split the earth beneath him, and he disintegrated, folding in on himself—and with a shiver of the last veil of his wings, he was gone. Not dead, but gone—for now. Liesa touched down next to the shallow grave he had left. Algli stared at the angel, backed against a tree at the edge of the clearing, the torch she held trembling. Liesa tilted her head. Something was wrong—the ground moved. The ground breathed, a hungry exhale. Liesa called a warning, but it was too late. The ground erupted around Algli, dirty claws seizing her. The Buried Lord wrenched himself free of the roots of the tree he had displaced in his escape. Sand poured from the wound of his neck, glittering, obsidian. His cruel face was a rictus now, a snarl. Algli shouted, hoarsely, fragments of words from a language so old even Liesa no longer remembered it. Spells she had uncovered in her search for a savior, undoubtedly; and as if answering her call, the shadows gathered around Algli's torn robes. In her panic, Algli called the rites she'd known, the supplications she had uttered in her darkest moments. Appeals to the Buried Lord, odes to his prowess, his strength. As the cultist chanted, the darkness soaked into the demon. His wounds began to close, his severed wing to sprout gauzy tendrils of regrowth. "Algli, fall silent!" "Old fool," the Buried Lord said, with a dismissive laugh. He shook Algli, and in his grip, the cultist went mute and limp. "Oh, come now, fragile thing; suddenly too shy to praise me?" Liesa could feel her despair, a bitter taste in the air. Defeat. Hopelessness. The woman clutched her torch in both hands, teeth gritted against the pain. All her pain, all her effort. All of it for naught. The old woman looked up, but not at her death. She met Liesa's eyes, and in Algli's gaze, the angel saw not hope, but defiance. "Liesa! Even if it's my life you ask," Algli shouted, "then I give it!" With both hands, Algli thrust her torch into the roof of the Buried Lord's gaping maw. Liesa crossed the grave in a bound, pulling that fire, that fight, that #emph[hope] into herself. Hope was fuel like no other, and it shone through her, a light as bright and warm as the dawn: a flame that seared winter's frost from the trees, and with it, Liesa fanned the fire and pushed it through. Through her spear, her blade, her arm itself—into the throat of the Buried Lord. The demon did not have the chance to scream. There was a snap, a gurgle, and his body folded in on itself again, vicious, crackling, shedding grave dust. Final. The Buried Lord collapsed with a heavy thump, pulling Algli to the ground with him. Liesa yanked her spear free with a twist, ripping through the heavy neck to tear the Buried Lord's head from his body entirely. His body did not crumble. Liesa felt a pinch in the base of her neck. They were still tied. She folded her bright wings behind her and stepped forward. Algli rolled free of the demon's claws. She staggered. Liesa offered the old woman a hand, and she took it, pulling herself to her feet with a wince and a limp. "I appreciate your help," Liesa said. She gestured at the carcass of the vanquished demon. "Quick thinking." "Not as quick as I used to be," Algli muttered. "He talked too much for his own good. Olutio #emph[would ] summon a chatterbox. Oh, Olutio~" The woman covered her face with her hands, choking back a sob. "All this, all this and you died for it~fools. We're fools. If only we'd been charlatans, too!" "You did what you felt best," Liesa said, gently. "You did not raise the knife to your friends. You came with me to save them. Their deaths are on the claws of the Buried Lord. Don't blame yourself for being unable to predict the outcome. Were the writings you found about his spite, his hunger?" "No," Algli muttered, through her fingers. "A hidden lord who dealt with light. A clever being who only asked silence, who despised the risen dead foe trodding on his domain." "Yes. I too commiserated with him, once." Liesa said. "If you had not called, I would not have come. Your voices were the first I'd heard in centuries, Algli. Your work wasn't for naught." Algli shook her head, but her cracking sobs quieted. Liesa studied the fallen demon. "His body should have dissolved," Liesa murmured. "Perhaps he is material so long as I am, bound to the Plane. I hesitate to leave his remains here. Who knows what power it still might~" Algli raised her head, and behind the trail of tears on her weathered face, Liesa saw that spark again, that glimmer of hope. "Carry him with you," Algli said. "Forge him into your armor. A body is leather and bone, isn't it? I was a tanner, years ago. We haven't let anything to waste these days. I've got Olutio's books, Sruta's tools. Let me serve you, my lady Liesa. You saved my life." Liesa let the words, the idea, sit with her for a moment. She thought of her sister archangels, how followers had flocked to them while Liesa had stood alone with her small flight and no others. How her sisters had been strengthened by their bonds with humans, and how, only minutes ago, Algli's very hope had surged through her. That loyalty was not what she sought—but here laid bare before her was an oath made from understanding. A connection forged in darkness and strife. Perhaps that hope, that oath, could be brought to others. A new order for a new Plane. "It is not your fealty I seek, but an alliance. A host renewed and reborn." Liesa rested the butt of her spear in the mud. "An alliance to bring not stifling silence, but peaceful balance, to this wounded Plane. A chorus of voices, known and heard. Will you aid me in this cause, Algli?" With a gasp, Algli fell to her knees again. Not in pain, not in grief, but in hope, before her glimmering angel. "You have it," she said. "As I breathe and hope, my lady Liesa. You have me as your ally. As long as I live." Liesa had returned at the darkest hour, a time of struggle, called by the desperate and the lost. More and worse lay before them, this small covenant. In the cold moonlight, Liesa felt that old hope rekindle in these words, in their shared knowledge. An oath of grief. An oath of hope. On a Plane of endings, here, at last, came a new beginning.
https://github.com/TypstApp-team/typst
https://raw.githubusercontent.com/TypstApp-team/typst/master/tests/typ/text/lang.typ
typst
Apache License 2.0
// Test setting the document language. --- // Ensure that setting the language does have effects. #set text(hyphenate: true) #grid( columns: 2 * (20pt,), gutter: 1fr, text(lang: "en")["Eingabeaufforderung"], text(lang: "de")["Eingabeaufforderung"], ) --- // Test that the language passed to the shaper has an effect. #set text(font: "Ubuntu") // Some lowercase letters are different in Serbian Cyrillic compared to other // Cyrillic languages. Since there is only one set of Unicode codepoints for // Cyrillic, these can only be seen when setting the language to Serbian and // selecting one of the few fonts that support these letterforms. Бб #text(lang: "uk")[Бб] #text(lang: "sr")[Бб] --- // Verify that writing script/language combination has an effect #{ set text(size:20pt) set text(script: "latn", lang: "en") [Ş ] set text(script: "latn", lang: "ro") [Ş ] set text(script: "grek", lang: "ro") [Ş ] } --- // Error: 19-23 expected string or auto, found none #set text(script: none) --- // Error: 19-23 expected three or four letter script code (ISO 15924 or 'math') #set text(script: "ab") --- // Error: 17-21 expected string, found none #set text(lang: none) --- // Error: 17-20 expected two or three letter language code (ISO 639-1/2/3) #set text(lang: "ӛ") --- // Error: 17-20 expected two or three letter language code (ISO 639-1/2/3) #set text(lang: "😃") --- // Error: 19-24 expected two letter region code (ISO 3166-1 alpha-2) #set text(region: "hey")
https://github.com/VisualFP/docs
https://raw.githubusercontent.com/VisualFP/docs/main/SA/design_concept/content/poc/options_compiler_custom.typ
typst
#import "../../../acronyms.typ": * = Custom Compiler Platform <custom-compiler-platform> Given that the #ac("PoC") is simple and limited in its features, it might be an option to skip the use of a compiler platform as a library altogether: - It is not necessary for the compiler platform to parse Haskell code. For the #ac("PoC"), being able to type-check simple expressions is sufficient. - Execution of expressions is optional as well. So, instead of aligning with a complex #ac("API") of a full-blown compiler platform, a custom implementation tailored to the specific needs of the #ac("PoC") could be created. Given the requirements, the implementation could even be reduced to just type-checking.
https://github.com/colinstfni/ba1-heig
https://raw.githubusercontent.com/colinstfni/ba1-heig/main/typst/utils.typ
typst
#import "@preview/cetz:0.2.2": canvas, plot, palette, draw #let transpose_list(list) = { let transposed = () if list.len() > 0 { let row_length = list.at(0).len() for i in range(row_length) { let new_row = () for tuple in list { new_row.push(tuple.at(i)) } transposed.push(new_row) } } transposed } #let linear_trend(data) = { let n = data.len() let sum_x = data.map(e => e.first()).sum() let sum_y = data.map(e => e.last()).sum() let mu_x = (1 / n) * sum_x let mu_y = (1 / n) * sum_y let top = 0 let bottom = 0 let m = data.map(e => (e.first() - mu_x) * (e.last() - mu_y)).sum() / data .map(e => calc.pow((e.first() - mu_x), 2)) .sum() let b = mu_y - m * mu_x (m, b) } #let horizontal_table(data, header, font-size: 13pt) = { let temp = data temp.insert(0, header) let data_transposed = transpose_list(temp) table( fill: (x, _) => if x == 0 { gray.lighten(75%) }, columns: data_transposed.at(0).len(), ..for data in data_transposed { data.map(e => text(font-size)[#e]) } ) } #let scatter( data, label: $y(x)$, x-label: $x$, y-label: $y$, size: (10, 8), legend: "legend.inner-east", x-tick-step: auto, y-tick-step: auto, color: blue, ..plots, ) = { canvas({ import draw: * set-style(legend: ( padding: 0.20, fill: rgb(255, 255, 255, 225), item: ( spacing: 0.25, ), )) plot.plot( size: size, axis-style: "school-book", x-label: x-label, y-label: y-label, legend: legend, x-tick-step: x-tick-step, y-tick-step: y-tick-step, { plot.add( style: (stroke: blue), mark: "o", mark-style: (stroke: none, fill: blue), line: "spline", label: label, data, ) plots.pos() }.flatten(), ) }) } #let scatter_with_trend( data, label: $y(x)$, x-label: $x$, y-label: $y$, size: (10, 8), legend: "legend.inner-east", x-tick-step: auto, y-tick-step: auto, ) = { let (m, b) = linear_trend(data) scatter( data, label: label, x-label: x-label, y-label: y-label, size: size, legend: legend, x-tick-step: x-tick-step, y-tick-step: y-tick-step, plot.add( style: (stroke: red), label: $#calc.round(m, digits: 3) x #{ if b > 0 { [$+$] } else { [ $-$ ] } } #calc.abs(calc.round(b, digits: 3))$, domain: (data.first().first(), data.last().first()), x => m * x + b, ), ) }
https://github.com/mrtz-j/typst-thesis-template
https://raw.githubusercontent.com/mrtz-j/typst-thesis-template/main/README.md
markdown
MIT License
# Modern UiT Thesis Template Port of the [uit-thesis](https://github.com/egraff/uit-thesis)-latex template to Typst. `thesis.typ` contains a full usage example, see `thesis.pdf` for a rendered pdf. ## Usage Using the Typst Universe package/template: ```console typst init @preview/modern-uit-thesis:0.1.2 ``` ### Fonts This template uses a number of different fonts: - Open Sans (Noto Sans) - JetBrains Mono (Fira Code) - Charter The above parenthesized fonts are fallback typefaces available by default in [the web app](https://typst.app). If you'd like to use the main fonts instead, simply upload the `.ttf`s to the web app and it will detect and apply them automatically. If you're running typst locally, install the fonts in a directory of your choosing and specify it with `--font-path`. ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
https://github.com/GeorgeHoneywood/alta-typst
https://raw.githubusercontent.com/GeorgeHoneywood/alta-typst/master/README.md
markdown
MIT License
# Alta Typst A simple Typst CV template, inspired by [AltaCV by <NAME>](https://github.com/liantze/AltaCV). [LaurenzV's simplecv](https://github.com/LaurenzV/simplecv) was used as a Typst code reference. See [`example.pdf`](example.pdf) for the rendered PDF output. <img src="screenshot.png" width="500"></img> The layout is two columns, with one wrapping into the next when space runs out. If you'd like to force an early column or page break, you can use the `#colbreak()` command. ## Usage ### On [typst.app](https://typst.app/) Upload both the `.typ` files and the `icons/` folder to your Typst project, then see `example.typ`. Uploading folders to the web app is unsupported, but you can select multiple files at once. ### With [Typst CLI](https://github.com/typst/typst) Fork and clone this repo, then run `typst watch example.typ`. Note that the template is intended for use with the IBM Plex Sans font, which isn't currently bundled with the Typst CLI — so the rendered output on your machine may differ slightly. You can run `typst fonts` to see which fonts can be used instead. ### Icons Add extra icons by uploading more `.svg` files to the `icons/` folder. The existing icons are from [Font Awesome](https://fontawesome.com/search?o=r&m=free). You can then reference their file names as the `name` values in the `links` array passed into the `alta` function. ## Licence [MIT](./LICENSE) Icons are from Font Awesome, subject to [their terms](https://github.com/FortAwesome/Font-Awesome/blob/6.x/LICENSE.txt).
https://github.com/fuchs-fabian/typst-template-aio-studi-and-thesis
https://raw.githubusercontent.com/fuchs-fabian/typst-template-aio-studi-and-thesis/main/docs/example-de-thesis.typ
typst
MIT License
#import "../src/lib.typ": * // md in .typ umwandeln: pandoc README.md -o README.typ #show: project.with( lang: "de", authors: ( ( name: "<NAME>", id: "12 34 567", email: "<EMAIL>" ), ), title: "Beispiel Thesis", subtitle: "Deutsch", date: "29.07.2024", version: none, thesis-compliant: true, // Format side-margins: ( left: 3.5cm, right: 3.5cm, top: 3.5cm, bottom: 3.5cm ), h1-spacing: 0.5em, line-spacing: 0.65em, font: "Roboto", font-size: 11pt, hyphenate: false, // Color settings primary-color: dark-blue, secondary-color: blue, text-color: dark-grey, background-color: light-blue, // Cover sheet custom-cover-sheet: none, cover-sheet: ( university: ( name: "University of Applied Typst Sciences", street: "Musterstraße 1", city: "D-12345 Musterstadt", logo: none ), employer: ( name: "<NAME>", street: "Musterstraße 2", city: "D-12345 Musterstadt", logo: none ), cover-image: none, description: [ Bachelorarbeit zur Erlangung des akademischen Grades Bachelor of Science ], faculty: "Ingenieurwissenschaften", programme: "Typst Sciences", semester: "SoSe2024", course: "Templates with Typst", examiner: "Prof. Dr.-Ing Mustermann", submission-date: "30.07.2024", ), // Declaration custom-declaration: none, declaration-on-the-final-thesis: ( legal-reference: "§42", thesis-name: "Bachelorarbeit", consent-to-publication-in-the-library: true, genitive-of-university: "University of Applied Typst Sciences" ), // Abstract abstract: [ Eine knappe Zusammenfassung (falls erforderlich) in deutscher und/oder englischer Sprache skizziert auf etwa 1/2 bis 1 Seite die Problemstellung, die verwendete(n) Methode(n) und das wichtigste Ergebnis. ], // Outlines depth-toc: 4, outlines-indent: 1em, show-list-of-figures: false, // Wird trotzdem angezeigt, da es i.d.R. Pflicht ist show-list-of-abbreviations: true, // Taucht nur auf, wenn tatsächlich mit gls Abkürzungen im Text aufgerufen werden list-of-abbreviations: ( ( key: "uoats", short: "UOATS", plural: "", long: "University of Applied Typst Sciences", longplural: "", desc: [ Universität, welche eigentlich nicht existiert ], group: "University", ), ( key: "repo-vorlage", short: "aio-studi-and-thesis", long: "Repository der aktuellen Typst-Vorlage", desc: [ #link("https://github.com/fuchs-fabian/typst-template-aio-studi-and-thesis") ] ), ), show-list-of-formulas: true, // `custom-outlines` kann ignoriert werden. Das ist nur wichtig, wenn die zur Verfügung stehenden Verzeichnisse nicht dem entsprechen, was benötigt wird. custom-outlines: ( // none ( title: none, // required custom: none // required ), ), show-list-of-tables: true, show-list-of-todos: true, literature-and-bibliography: [ // Muss selbst implementiert werden, um den gewünschten Anforderungen zu entsprechen Hier ist meine Literatur... ], list-of-attachements: ( (a: [ Irgendeine Anlage ]), (a: [ Noch eine Anlage ]), ) ) = Einleitung Das Ihnen vorliegende Dokument dient als Vorlage für wissenschaftliche Seminar- und Abschlussarbeiten. Diese Vorlage kann vielseitig verwendet werden. Bitte klären Sie jedoch mit Ihrem Betreuer/Ihrer Betreuerin, ob sie den Vorgaben des jeweiligen Studienfachs entspricht, bevor Sie sie verwenden und passen Sie die Vorlage ggf. an. Für die Vorbereitung Ihrer wissenschaftlichen Arbeit empfehlen wir Ihnen außerdem, die Ressourcen der Bibliothek zu nutzen. Dort finden Sie diverse Informationen zu Themen wie Zeitmanagement, Fachliteratur oder richtiges Zitieren. Sichern Sie diese Dokumentvorlage bitte mit "GIT" oder einem ZIP-Export durch die Typst-eigene Backup-Funktion. *Wichtiger Hinweis*: Diese Vorlage ersetzt nicht die konkreten Vorgaben der jeweiligen Fächer. Falls spezifische formale Anforderungen in Ihrem Fach existieren, sind diese zu beachten. = Allgemeiner Aufbau In diesem Abschnitt erhalten Sie grundlegende Vorgaben für den Aufbau Ihrer Arbeit und erfahren, aus welchen Bestandteilen eine wissenschaftliche Arbeit üblicherweise besteht. == Abfolge der Abschnitte Folgende Teile sollten in Ihrer wissenschaftlichen Arbeit enthalten sein: + Deckblatt + Erklärung + Abstract (optional) + Inhaltsverzeichnis + Abbildungsverzeichnis + Abkürzungsverzeichnis + Formelverzeichnis + Tabellenverzeichnis + Einleitung + Hauptteil + Schluss/Zusammenfassung/Fazit + Literatur-/Quellenverzeichnis + Anlagenverzeichnis == Deckblatt Das Deckblatt beinhaltet Angaben zum Titel der Abschlussarbeit, zum Verfasser der Arbeit sowie zum Datum der Abgabe. Ebenso sind hier Informationen zum Studiengang, zu den Prüfenden und zur Fakultät anzugeben. Das Deckblatt wird nicht mit einer Seitenzahl versehen. Bitte beachten Sie: TODOs müssen Sie mit Ihren individuellen Informationen ersetzt werden! == Inhaltsverzeichnis Es wird empfohlen, eine Dezimalgliederung zu verwenden, ähnlich der Struktur in diesem Dokument. Falls innerhalb eines Kapitels Unterüberschriften genutzt werden, sollten mindestens zwei existieren. Dort, wo beispielsweise eine Nummerierung wie 2.1 vorliegt, sollte auch eine 2.2 vorhanden sein. Das Inhaltsverzeichnis gibt stets die Seitenzahlen für die aufgeführten Gliederungspunkte an, ist jedoch selbst nicht in diesem Verzeichnis aufgeführt. Die Seiten, die das Inhaltsverzeichnis einnimmt, können mit römischen Ziffern nummeriert werden. Für eine Abschlussarbeit ist es üblich, im Hauptteil eine Gliederungstiefe von mindestens drei Ebenen zu verwenden. In der Regel werden jedoch nur bis zu vier Ebenen im vorderen Teil des Inhaltsverzeichnisses abgebildet. Bitte beachten Sie an dieser Stelle dringend die spezifischen Vorgaben in Ihrem Fach. In dieser Vorlage wird das Inhaltsverzeichnis automatisch für die Überschriftenebenen 1 bis 4 generiert. Dies setzt jedoch voraus, dass Sie `depth-toc` nicht überschreiben. == Literaturverzeichnis Das Literaturverzeichnis richtet sich nach den Vorgaben der Betreuenden bzw. dem vorgegeben Zitierstil. Es wird häufig nach den Nachnamen der Autoren in alphabetischer Reihenfolge geordnet und beinhaltet ausschließlich die im Text verwendeten Quellen. Werke desselben Autors werden nach Erscheinungsjahr sortiert, wobei Sie selbst für eine eindeutige Unterscheidung bei Schriften aus demselben Jahr sorgen müssen. In der technischen Fachwelt hingegen wird oft im IEEE-Stil zitiert, was auch auf das Literaturverzeichnis entscheidende Auswirkungen hat. Das Literaturverzeichnis listet in diesem Fall die Werke in der Reihenfolge ihrer Erstnennung im Text auf, wobei die zugewiesenen Zahlen als Orientierung dienen. Es ist somit numerisch und nicht alphabetisch sortiert, um eine direkte Korrelation zwischen den Zitaten im Text und den detaillierten Referenzen im Literaturverzeichnis zu ermöglichen. Im Fließtext werden also Zahlen verwendet, um auf Einträge im Literaturverzeichnis zu verweisen, beispielsweise durch [1]. Diese Ziffer repräsentiert ein spezifisches Werk und wird immer wieder verwendet, wann immer das Werk erneut zitiert wird. Für Verweise auf mehrere Werke in einem Zitat können die Zahlen in einer einzigen Klammer kombiniert werden, wie in den Beispielen [2,3,8] oder [7-9] gezeigt. Beachten Sie darüber hinaus zur Verwendung des Zitierstils, des Nachweissystems (Fußnoten, Textnachweise, Index, etc.) und zur Gestaltung des Literaturverzeichnisses die Vorgaben Ihrer Betreuenden. Für die effektive Verwaltung der genutzten Literatur bieten sich geeignete Softwaretools wie Zotero an, die mit verschiedenen Textverarbeitungsprogrammen kompatibel sind. == Weitere Verzeichnisse Abbildungen, Abkürzungen, Formeln und Tabellen werden in den entsprechenden Verzeichnissen aufgeführt. In dieser Vorlage sind sie direkt nach dem Inhaltsverzeichnis platziert, wobei die Seiten römisch nummeriert werden. Die Überschriften der Verzeichnisse (z. B. Abbildungsverzeichnis) werden nicht nummeriert. Bitte informieren Sie sich darüber hinaus, ob in Ihrem Fach Abbildungen und Tabellen bei der Berechnung der vorgegebenen Seitananzahl berücksichtigt werden. Dies macht es erforderlich, dass ein Fork von dem #gls("repo-vorlage", long: true) erstellt werden muss. Dies ist aktuell nicht anpassbar. = Formattierung Dieses Kapitel thematisiert die Formatierung und Gestaltung der Vorlage für wissenschaftliche Arbeiten. == Seitennummerierung Die vorliegende Dokumentvorlage folgt der Gliederung mit römischen und arabischen Ziffern: Alle Abschnitte nach dem Deckblatt und vor dem eigentlichen Text (eventuelle Kurzfassung/Abstract, Inhaltsverzeichnis, gegebenenfalls Abbildungs-/Tabellenverzeichnis, gegebenenfalls Abkürzungsverzeichnis) sind seitenweise mit römischen Ziffern nummeriert, während die Seiten ab dem eigentlichen Textteil mit arabischen Ziffern versehen werden. Die Seitennummerierung ist nicht einheitlich geregelt und abhängig von den individuellen Vorlieben Ihres Betreuenden. Die Seitenzahlen können entweder unten mittig, oben mittig oder unten rechts platziert werden. Das Deckblatt erhält in keinem Fall eine Seitennummerierung. Sofern eine Anpassung erforderlich ist, ist wieder ein Fork von dem #gls("repo-vorlage", long: true) notwendig. == Seitenlayout Diese Vorlage ist sowohl für einen einseitigen als auch für einen zweiseitigen Druck angelegt. Die Seitenränder betragen oben und unten jeweils 3,5 cm. Innerhalb dieser Seitenränder existiert die Kopf- und Fußzeile. Wegen der Bindung und der Korrekturen Ihrer Prüfenden ist sowohl links als auch rechts ein Rand von 3,5 cm eingestellt. Wie auch bereits bei diversen anderen Einstellungen, beachten Sie bitte auch hier die Vorgaben Ihrer Prüfenden bzw. Ihres Fachs. == Kopfzeile Die Vorlage wurde so konfiguriert, dass die aktuelle Hauptüberschrift eines Kapitels (Ebene 1) immer korrekt in den Kopfzeilen der zugehörigen Seiten erscheint. == Quellenangaben Die Art der Quellenangabe kann, abhängig vom Zitierstil, als Fußnote, Indexnummer oder Kurzverweis im Text erfolgen. Die Auswahl des passenden Zitierstils richtet sich immer nach Ihrer Fachrichtung und häufig sogar nach den individuellen Anforderungen der Prüfenden. Wir legen Ihnen nahe, sich sorgfältig über die korrekte Zitierweise in Ihrem Fach zu informieren. == Abbildungen und Tabellen Bitte achten Sie darauf, dass Grafiken und Tabellen gut verständlich, eindeutig und lesbar sind. Bedenken Sie, dass Sie alle Abbildungen und Tabellen beschriften und somit in das entsprechende Verzeichnis aufnehmen müssen. Hierzu gehen Sie bei Abbildungen wie folgt vor: ```Typst #figure(caption: "Beispielbild")[ #image("../manuals/certificate.png", width: 10em) ] ``` #figure(caption: "Beispielbild")[ #image("certificate.png", width: 10em) ] Bei Tabellen ist die Vorgehensweise sehr ähnlich: ```Typst #figure(caption: "Beispieltabelle")[ #table( columns: 2, [hier steht etwas], [hier auch], [und hier], [aber auch hier], ) ] ``` #figure(caption: "Beispieltabelle")[ #table( columns: 2, [hier steht etwas], [hier auch], [und hier], [aber auch hier], ) ] Somit werden die Abbildungen und Tabellen automatisch in dem Inhaltsverzeichnis aufgenommen. #pagebreak() == Abkürzungen Damit Abkürzungen im Abkürzungsverzeichnis auftauchen, müssen lediglich 2 Schritte gemacht werden: 1. Hinzufügen der Abkürzung oben in `show: project.with(...)`: ```Typst list-of-abbreviations: ( ( key: "uoats", short: "UOATS", plural: "", long: "University of Applied Typst Sciences", longplural: "", desc: [ Universität, welche eigentlich nicht existiert ], group: "University", ), ) ``` 2. Aufruf der Abkürzung mit `gls` oder `glspl` (siehe #link("https://typst.app/universe/package/glossarium", "Typst package \"glossarium\"")): ```Typst #gls("uoats") ``` #gls("uoats") == Formeln Um Formeln im Formelverzeichnis aufzunehmen genügt es folgendes zu schreiben: ```Typst $ a^2 + b^2 = c^2 $ ``` $ a^2 + b^2 = c^2 $ == Formatvorlagen Es gibt nur diese eine Vorlage wenn sie #gls("repo-vorlage") nutzen. Verwende sie und Sie werden viel Zeit sparen. Die Zeit, sich Gedanken machen zu müssen, wie etwas formatiert oder eingestellt werden muss, ist vorbei. Falls Sie dennoch Anpassungen vornehmen möchten, ist dies großteils an einer Stelle möglich. Außer Sie greifen natürlich auf Word zurück. Dann gilt: Viel Erfolg und reichlich Nerven. == Schrift Die Schriftart in dieser Vorlage ist "*Roboto*". Diese können Sie bei Bedarf einfach anpassen. Die voreingestellte Schriftgröße ist *11pt*. Der Zeilenabstand in diesem Dokument ist auf *0.65em* eingestellt. Für den Textteil ist die Textausrichtung Blocksatz vorgesehen während in Verzeichnissen linksbündig gearbeitet wird. == Abschnittsumbrüche Sind durch die Verwendung dieser Vorlage nicht notwendig. Es wird automatisch ein Umbruch bei Überschriften der Ebene 1 vorgenommen. Wenn Sie einen Umbruch machen möchten können Sie dies einfach folgendermaßen tun: ```Typst #pagebreak() ``` Es besteht keine Notwendigkeit, Kopf- und Fußzeilen anzupassen. Dies wird automatisch gehandhabt.
https://github.com/lucifer1004/leetcode.typ
https://raw.githubusercontent.com/lucifer1004/leetcode.typ/main/solutions/s0018.typ
typst
#import "../helpers.typ": * #let _4sum-ref(nums, target) = { let nums = nums.sorted() let n = nums.len() let ans = () for i in range(n) { if i > 0 and nums.at(i) == nums.at(i - 1) { continue } for j in range(i + 1, n) { if j > i + 1 and nums.at(j) == nums.at(j - 1) { continue } let l = j + 1 let r = n - 1 while l < r { let sum = nums.at(i) + nums.at(j) + nums.at(l) + nums.at(r) if sum < target { l += 1 } else if sum > target { r -= 1 } else { ans.push((nums.at(i), nums.at(j), nums.at(l), nums.at(r))) while l < r and nums.at(l) == nums.at(l + 1) { l += 1 } while l < r and nums.at(r) == nums.at(r - 1) { r -= 1 } l += 1 r -= 1 } } } } ans }