|
1 | 1 | import { describe, expect, test } from 'vitest'; |
2 | 2 | import { correctHeadings } from 'src/lib/data-conversion/helpers/correct-headings'; |
| 3 | +import { ginkgo_academic_paper } from 'src/lib/data-conversion/test-data/ginkgo_acedemic_paper'; |
3 | 4 |
|
4 | 5 | // some tests are inspired from https://github.com/platers/obsidian-linter/blob/952bba9d7b6a4f084d68ffdd469bd89e785206b2/__tests__/header-increment.test.ts#L1 |
5 | 6 | describe('correctHeadings', () => { |
@@ -235,4 +236,191 @@ This is another paragraph. |
235 | 236 | `; |
236 | 237 | expect(correctHeadings(markdown)).toBe(expected); |
237 | 238 | }); |
| 239 | + |
| 240 | + test('case: gingko academic paper', () => { |
| 241 | + const output = `# Title: **Statement** of your core result or finding. |
| 242 | +Try to make your title an assertive statement, such as: |
| 243 | +- "Changes in cytoplasmic volume are sufficient to drive spindle scaling." |
| 244 | +
|
| 245 | +and not |
| 246 | +- "High-performance silicon photoanodes passivated with ultrathin nickel films for water oxidation" |
| 247 | +
|
| 248 | +Rule of thumb: if your title would look weird with a period at the end, it is probably a poor title. |
| 249 | +
|
| 250 | +Don't do [this](http://www.phdcomics.com/comics/archive/phd053106s.gif). |
| 251 | +
|
| 252 | +# Abstract |
| 253 | +Try to tell a *story* here, no matter what your field. You are writing for human beings, not computers. What's the area, what's the problem you are trying to understand. How? What have you found? |
| 254 | +
|
| 255 | +(You are *summarizing* your core results, not *cramming* them into this tiny space). |
| 256 | +
|
| 257 | +--- |
| 258 | +## target: 84-151 words |
| 259 | +## current: 43  |
| 260 | +
|
| 261 | +<!-- URL for checkmark: https://dl.dropboxusercontent.com/s/elo7ckzspvxvx0t/checkmark.gif --> |
| 262 | +
|
| 263 | +## (This is a word count footer. We don't have automatic word counts yet, so I use is [this Chrome extension](https://chrome.google.com/webstore/detail/word-count/pnngehidikgomgfjbpffonkeimgbpjlh)) |
| 264 | +
|
| 265 | +## Introduction - "The Setup" |
| 266 | +### [In field X, we still don't understand Y & Z.] |
| 267 | +
|
| 268 | +Write a summary of *the question(s) you are trying to answer*. |
| 269 | +What is the state of the world before your research came along? |
| 270 | +Also, answer the harsh but important question: *Who cares*? |
| 271 | +
|
| 272 | +In writing this, you can start general, but make sure clearly define the "before" state of the world's knowledge for the *specific area* this paper is addressing. |
| 273 | +
|
| 274 | +### Intro - Assertive Statement 1 |
| 275 | +
|
| 276 | +Here you can expand on your introduction. To guide your writing, title this card with assertive statements: |
| 277 | +Instead of "Problem Description", be direct: "The problem is that X doesn't do Y." |
| 278 | +
|
| 279 | +# Introduction |
| 280 | +
|
| 281 | +[You can write your actual paper here in this column. Then choosing "Export column 5" to Word or Markdown will help you move it to your final platform.] |
| 282 | +
|
| 283 | +You can keep notes & comments here. |
| 284 | +
|
| 285 | +... |
| 286 | +
|
| 287 | +... |
| 288 | +
|
| 289 | +## Intro - Assertive Statement 2 |
| 290 | +
|
| 291 | +... |
| 292 | +
|
| 293 | +... |
| 294 | +
|
| 295 | +## Intro - Assertive Statement 3 |
| 296 | +
|
| 297 | +... |
| 298 | +
|
| 299 | +... |
| 300 | +
|
| 301 | +## Materials & Methods - "The Characters" |
| 302 | +### [We have here method A, B, and our new method C.] |
| 303 | +You have established the core question(s) of your research. Now introduce the tools you are going to use to understand it. |
| 304 | +
|
| 305 | +## Method A |
| 306 | +More details on the method, experiment design, etc. |
| 307 | +
|
| 308 | +Remember that these are cards, so you can drag and drop them to rearrange if necessary. |
| 309 | +
|
| 310 | +# Methods |
| 311 | +
|
| 312 | +## Method A |
| 313 | +
|
| 314 | +Some other note. For example: |
| 315 | +
|
| 316 | +#Xusheng , make sure you include the voltage you used." |
| 317 | +
|
| 318 | +(the # syntax makes it easier to search for & filter comments directed at a specific person). |
| 319 | +
|
| 320 | +... |
| 321 | +
|
| 322 | +... |
| 323 | +
|
| 324 | +## Method B |
| 325 | +More details on the method, experiment design, etc. |
| 326 | +
|
| 327 | +### Method B... |
| 328 | +
|
| 329 | +... |
| 330 | +
|
| 331 | +... |
| 332 | +
|
| 333 | +## Method C |
| 334 | +More details on the method, experiment design, etc. |
| 335 | +
|
| 336 | +If you need a checklist to make sure you address all points, go ahead: |
| 337 | +[ ] e.g. "Mention pH of the setup" |
| 338 | +[ ] What temperature? |
| 339 | +[ ] For how long? |
| 340 | +
|
| 341 | +### Method C |
| 342 | +
|
| 343 | +... |
| 344 | +
|
| 345 | +... |
| 346 | +
|
| 347 | +## Results |
| 348 | +What happened (objectively)? |
| 349 | +
|
| 350 | +Do not interpret, simply state the facts. |
| 351 | +
|
| 352 | +Let's be honest: the first thing most of us do when skimming a paper is look at the figures. If your key results can be presented in figures, then start with that, and structure your paper around that. |
| 353 | +
|
| 354 | +## Key Result |
| 355 | +You can add figures if you'd like: |
| 356 | +
|
| 357 | + |
| 358 | +
|
| 359 | +# Results |
| 360 | +
|
| 361 | +Final text for results goes here |
| 362 | +
|
| 363 | +... |
| 364 | +
|
| 365 | +... |
| 366 | +
|
| 367 | +Remember these are **cards** so you can rearrange your results at will. |
| 368 | +Any subcards will follow. |
| 369 | +
|
| 370 | +Other results |
| 371 | +
|
| 372 | +## Discussion |
| 373 | +Results are objective, but science isn't about listing data, it's about extracting meaning from what we observe. |
| 374 | +
|
| 375 | +What do your results tell you about the core problem you were investigating? |
| 376 | +
|
| 377 | +## Conclusion |
| 378 | +Bring it back to the big picture. How do your results fit into the current body of knowledge? |
| 379 | +
|
| 380 | +Most importantly, how can these results help you [ask better questions](http://www.youtube.com/watch?v=nq0_zGzSc8g#t=493)? |
| 381 | +
|
| 382 | +## Conclusion (further detail) |
| 383 | +
|
| 384 | +Expand on your conclusion summary, and add more details to it. |
| 385 | +
|
| 386 | +# Conclusion |
| 387 | +
|
| 388 | +Final text for conclusion goes here |
| 389 | +
|
| 390 | +in as many |
| 391 | +
|
| 392 | +cards as you like. |
| 393 | +
|
| 394 | +## References |
| 395 | +We don't have bibliography support yet, but we do have "named links" so you can refer to specific links by name rather than retyping it each time. |
| 396 | +
|
| 397 | +"Black holes are cool." [[1]][prl2010], and DNA is cool too [[2]][dnaRef]. But black holes are still cool, though not "absolute zero" cool [[1]][prl2010]. |
| 398 | +
|
| 399 | +[prl2010]: http://arxiv.org/abs/1311.3007 |
| 400 | +[dnaRef]: http://biorxiv.org/content/early/2013/11/07/000026 |
| 401 | +
|
| 402 | +## List |
| 403 | +Or you can simply list your references here: |
| 404 | +
|
| 405 | +1. some ref |
| 406 | +1. some other ref. Numbering fixes itself automatically. |
| 407 | +2. A third ref. |
| 408 | +
|
| 409 | +# References |
| 410 | +
|
| 411 | +Some reference by J. Doe |
| 412 | +
|
| 413 | +Notes on this reference. |
| 414 | +
|
| 415 | +Some other reference |
| 416 | +
|
| 417 | +## How to use this template |
| 418 | +The idea here is to start at the far left, and clarify what the core of what you want to say is *first*, and then expand on it by moving to the right, one column at a time. |
| 419 | +
|
| 420 | +After a couple of "passes" of expanding, you will end up with your complete, and well structured paper on column 5, which you can export separately. |
| 421 | +
|
| 422 | +Here's a (somewhat dated) video which might help. |
| 423 | +<iframe width="256" height="144" src="//www.youtube.com/embed/J4prcx0jZ9M?rel=0" frameborder="0" allowfullscreen></iframe>`; |
| 424 | + expect(correctHeadings(ginkgo_academic_paper.md)).toBe(output); |
| 425 | + }); |
238 | 426 | }); |
0 commit comments