-
Notifications
You must be signed in to change notification settings - Fork 161
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
[WIP] prépare la migration vers zmd #4389
Conversation
b61d6db
to
7d04685
Compare
zmarkdown/config.js
Outdated
}, | ||
} | ||
|
||
const rebberConfig = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember we need to override image
and figure.image
to use the custome \\image
command in rebber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oui ça viendra :)
Là c'est juste pour que ça fonctionne temporairement. Quand tout est bien câblé on verra où et comment on configure le serveur de rendu markdown/latex.
4c3302c
to
f60f826
Compare
zds/utils/templatetags/emarkdown.py
Outdated
inline = kwargs.get('inline', False) is True | ||
is_latex = kwargs.pop('is_latex', False) is True | ||
markdown_compiler = markdown_client.toHTML if not is_latex else markdown_client.toLatex | ||
endpoint = '/html' if not is_latex else '/latex' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le Comité Contre les Double Négations préfèrerait – si c'est possible – un truc du genre :
endpoint = '/latex' if is_latex else 'html'
À voir selon les habitudes du langage aussi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouais peut-être, à voir.
Je me serais pas permis un x = y if not not_foo else foo
, ça ce serait une double négation et ce serait pénible à lire. J'ai fait ça comme ça ici parce que clairement 99% des requêtes iront sur l'endpoint /html
et que je préfère noter que sauf exception c'est là qu'on va.
Je crois que je préférerais
endoint = '/html'
if is_latex:
endpoint = '/latex'
à ta solution, pour continuer à véhiculer cette impression de valeur par défaut.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lorsque j'avais fait la condition initiale j'avais pensé justement au fait que plus de 90% des requêtes seraient vers html. Après mettez la forme que vous voulez, les deux sont correctes et lisibles.
8afacc6
to
99a2536
Compare
.travis.yml
Outdated
@@ -86,6 +87,9 @@ install: | |||
- ./scripts/install_resources.sh | |||
- export PATH=$HOME/.texlive/bin/x86_64-linux:$PATH | |||
- export PATH=$PATH:$HOME/bin | |||
- mkdir -p $HOME/.texlive/texmf-local/tex/latex/zestedesavoir | |||
- cp -f $HOME/.cache/yarn/npm-zmarkdown*/zmdocument.cls $HOME/.texlive/texmf-local/tex/latex/zestedesavoir | |||
- $HOME/.texlive/bin/x86_64-linux/mktexlsr $HOME/.texlive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pierre-24 @Karnaj une idée de comment faire pour que LaTeX trouve la classe ?
Je la mets là : $HOME/.texlive/texmf-local/tex/latex/zestedesavoir/zmdocument.cls
mais si vous regardez les logs de travis, latex ne trouve pas la classe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'imagine que t'as déjà essayé, mais chez moi, je met simplement le .cls dans $HOME/texmf/tex/latex/
, puis je fais un texhash
et ça fonctionne sans autre forme de procès.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... Voilà, ici, j'ai réussi. Ton "erreur", c'est le "zestedesavoir", du reste t'étais quasi dans le bon :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastique, merci pour ton aide !
Maintenant il doit nous manquer des trucs :
FailureDuringPublication: ! LaTeX Error: File xpatch.sty not found.
Je remets un message ici si je trouve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Réussi !
eec0905
to
c201ed4
Compare
Nécessaire pour que les tests passent. Il reste beaucoup de références à enlever mais rien d'indispensable pour les tests.
so that rebber returns a good latex string sorry I could not prevent this joke.
3a56f43
to
12d9808
Compare
Suite ici comme ça tout le monde peut contribuer : #4617 |
Cette PR prépare le terrain pour la migration vers zmarkdown. Le but est de voir comment les choses fonctionnent actuellement, de documenter le travail qui sera nécessaire à la migration, et ce faisant de passer un coup de balais.