-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offerte text with styling #31
Comments
Color is not a must. |
Use the potential parser from #50 to do the parsing between HTML and LaTeX |
Also don't forget to put the HTML string in the XML file. Layout needs to be preserved after saving and reloading! |
becomes
|
I tried a conversion from Markdown to LaTeX using <dependency>
<groupId>es.nitaur.markdown</groupId>
<artifactId>txtmark</artifactId>
<version>0.16</version>
</dependency> (which is a slightly improved version of I was able to write a custom However, a problem arises when we try to write markdown like: ## Subheader
* item #1
* item #2
* item #3 This gets converted into the following LaTeX: \subsection*{Subheader}
\begin{itemize}
\item{item #1}
\item{item #2}
\item{item #3}
\end{itemize} Notice that the A solution for this would be to override the @Override
public void emit(StringBuilder out, Block root) {
Line line = root.lines;
while (line != null) {
if (!line.isEmpty)
line.value = line.value.replace("#", "\\#"); // just one replace example
line = line.next;
}
super.emit(out, root);
} Something that might work is to replace |
The code of the (failed) experiments so far can be found on the formatted-offer-text branch. |
Instead of plain text, the offerte text area needs to include styling. For this we can use the JavaFx
HTMLEditor
or maybe something similar to this with less styling options.The
HTMLEditor
has an HTMLString
as its output. Since the Offerte PDFs are generated using LaTeX either a parser needs to be written to generate LaTeX code from the HTML or the new implementation of the editor returns a LaTeXString
instead.Styling the might be supported:
Styling that will no be supported:
The text was updated successfully, but these errors were encountered: