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

Make --semanticLaTeX switch #26

Closed
physikerwelt opened this issue Oct 7, 2015 · 16 comments
Closed

Make --semanticLaTeX switch #26

physikerwelt opened this issue Oct 7, 2015 · 16 comments
Assignees

Comments

@physikerwelt
Copy link
Member

Add a CLI option to control if @ -symbols are used in the output
Constraint: One should not need to recompile to switch the behaiviour.
PS:
This would be also helpful to solve wikimedia#7 which is somehow stalled because I don't know how to implement a --MathJax switch

@HowardCohl
Copy link
Member

CLI -- Command Line Interface
https://en.wikipedia.org/wiki/Command-line_interface

@poortho
Copy link

poortho commented Oct 9, 2015

For parser.pegjs and parser.js, wouldn't it be easier to just make a copy of them so that one has the @ symbols while one doesn't? Or is that not allowed?

Also, would the additions such as (a)_n -> \pochhammer{a}{n} and \qPochhammer{x}{y}{z} still be in the parser without the @ signs?

@HowardCohl
Copy link
Member

Good question about the \pochhammer.

I don't know anything about the first question @physikerwelt.

@HowardCohl
Copy link
Member

I think the --useAt switch is not a good descriptor. Perhaps, --semanticLaTeX ?

In this case, the \pochhammer and \qPochhammer replacements fall in this category.

@physikerwelt
Copy link
Member Author

👍 for @HowardCohl 's suggestions w.r.t to --semanticLaTeX
I'm not sure if I understand the pochhammer question. texvcjs provides a list with required packages you need to list all packages that are required to render the output in a standard latex document.
Look at
wikimedia@11bc16d
to see how such a switch can be implemented

@poortho
Copy link

poortho commented Oct 20, 2015

@physikerwelt, what I meant was that since the issue only explicitly states to use it for commands that use the @ symbol, should the program without using --semanticLaTeX still perform replacements that I added previously and do not use the @ symbol?

@HowardCohl HowardCohl changed the title Make --useAt switch Make --useSemanticLaTeX switch Oct 20, 2015
@HowardCohl
Copy link
Member

I think the answer to the question is that, if the switch is set, then perform the replacements, if it isn't then don't. All the replacements that we have identified for you are specifically for Semantic LaTeX only.

@HowardCohl
Copy link
Member

@physikerwelt do you then think --SemanticLaTeX is preferred to --useSemanticLaTeX ?

@physikerwelt
Copy link
Member Author

@ClaudeZou I think that are two mixed things. The replacement $\sin x$ -> $\sin@x$ should be performed only if the --useSemanticLaTeX switch is ON. Macros that require the DRMF sty files should indacte that by activating the required package here https:/DRMF/texvcjs/blob/master/bin/texvcjs#L3

@HowardCohl
Copy link
Member

@physikerwelt tell me if you agree. The "required list" should be obtained from a csv file. Which should be demarked using .gitignore so that it does not show up on the repository.

@HowardCohl HowardCohl changed the title Make --useSemanticLaTeX switch Make --semanticLaTeX switch Oct 21, 2015
@physikerwelt
Copy link
Member Author

@HowardCohl use the name for the switch that you think is best.
The required list ist the list of required packages. I currently do not see how that would come from a csv unless the information is stored in that file.

@poortho
Copy link

poortho commented Oct 30, 2015

@physikerwelt am I allowed to make two copies of parser.js and parser.pegjs, one with the replacements and one without them? It isn't explicitly prohibited in the constraints given but I want to ask just to be safe.

@physikerwelt
Copy link
Member Author

@ClaudeZou did you have a look at wikimedia/mediawiki-services-texvcjs@11bc16d I think this shows why it`s not required to make copies.
The goal of this project is to make things work. If something is allowed or not is not is probably not the best question to ask. If you make a copy of a file this has advanatages and disadvantages. So if you think it's a good idea to make a copy please explain why this is the way to go.

physikerwelt added a commit that referenced this issue May 3, 2016
Add csv file support and solve issues #26, #21, #20, #19, and #24
@poortho
Copy link

poortho commented May 5, 2016

Finished with pull request #41

@poortho poortho closed this as completed May 5, 2016
@HowardCohl
Copy link
Member

@physikerwelt @ClaudeZou I'm glad this works, but it should be also added as a issue on the texer repo.

@poortho
Copy link

poortho commented May 11, 2016

This issue was moved to DRMF/texer#12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants