Skip to content

Rendering bibliography in Markdown #3787

Answered by balacij
BilalM04 asked this question in Q&A
Discussion options

You must be logged in to vote

I forgot about this. Another solution is to do something like the following:

  1. Create a data type that carries all the functions needed for rendering general in-paragraph text:
data Typewriter = Typewriter {
  s :: Doc -> Doc, -- this one for plain strings (i.e., this one needs to be responsible for escaping special characters)
  ital :: Doc -> Doc,
  bold :: Doc -> Doc,
  italBold :: Doc -> Doc,
  underscore :: Doc -> Doc
}
  1. Create an instance of the Typewriter for both flavours
mdTypewriter :: Typewriter
mdTypewriter = Typewriter { ... }

htmlTypewriter :: Typewriter
htmlTypewriter = Typewriter { ... }
  1. Add Typewriter as an argument to the existing bookMLA and pSpec and use the feature…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
2 replies
@balacij
Comment options

@balacij
Comment options

Comment options

You must be logged in to vote
6 replies
@BilalM04
Comment options

BilalM04 Jun 18, 2024
Collaborator Author

@balacij
Comment options

@JacquesCarette
Comment options

@balacij
Comment options

@JacquesCarette
Comment options

Answer selected by BilalM04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants