Skip to content
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

Closed
wants to merge 30 commits into from
Closed

Conversation

vhf
Copy link
Contributor

@vhf vhf commented Jul 2, 2017

Q R
Type de modification évolution
Ticket(s) (issue(s)) concerné(s) #4388

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.

@vhf vhf added C-Back Concerne le back-end Django C-Front Concerne l'interface du site S-Évolution labels Jul 2, 2017
@vhf vhf force-pushed the zmarkdown-notes branch 4 times, most recently from b61d6db to 7d04685 Compare July 8, 2017 13:46
},
}

const rebberConfig = {
Copy link
Member

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.

Copy link
Contributor Author

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.

@vhf vhf force-pushed the zmarkdown-notes branch 6 times, most recently from 4c3302c to f60f826 Compare July 16, 2017 15:04
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'
Copy link
Contributor

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.

Copy link
Contributor Author

@vhf vhf Jul 26, 2017

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.

Copy link
Member

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.

@vhf vhf force-pushed the zmarkdown-notes branch 12 times, most recently from 8afacc6 to 99a2536 Compare August 1, 2017 17:24
.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
Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

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 :)

Copy link
Contributor Author

@vhf vhf Aug 1, 2017

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Réussi !

@vhf vhf force-pushed the zmarkdown-notes branch 2 times, most recently from eec0905 to c201ed4 Compare August 1, 2017 22:24
@vhf
Copy link
Contributor Author

vhf commented Sep 10, 2017

Suite ici comme ça tout le monde peut contribuer : #4617

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Back Concerne le back-end Django C-Front Concerne l'interface du site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants