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 #12

Open
poortho opened this issue May 11, 2016 · 15 comments
Open

Make --semanticLaTeX switch #12

poortho opened this issue May 11, 2016 · 15 comments

Comments

@poortho
Copy link

poortho commented May 11, 2016

From @physikerwelt on October 7, 2015 7:47

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/mediawiki-services-texvcjs#7 which is somehow stalled because I don't know how to implement a --MathJax switch

Copied from original issue: DRMF/texvcjs#26

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 7, 2015 10:39

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

@poortho
Copy link
Author

poortho commented May 11, 2016

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?

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 10, 2015 1:27

Good question about the \pochhammer.

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

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 10, 2015 7:36

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

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

@poortho
Copy link
Author

poortho commented May 11, 2016

From @physikerwelt on October 18, 2015 9:9

👍 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/mediawiki-services-texvcjs@11bc16d
to see how such a switch can be implemented

@poortho
Copy link
Author

poortho commented May 11, 2016

@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?

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 20, 2015 20:1

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.

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 20, 2015 20:2

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

@poortho
Copy link
Author

poortho commented May 11, 2016

From @physikerwelt on October 20, 2015 20:4

@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://github.com/DRMF/texvcjs/blob/master/bin/texvcjs#L3

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on October 20, 2015 20:6

@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.

@poortho
Copy link
Author

poortho commented May 11, 2016

From @physikerwelt on October 21, 2015 19:14

@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
Author

poortho commented May 11, 2016

@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.

@poortho
Copy link
Author

poortho commented May 11, 2016

From @physikerwelt on October 30, 2015 23:53

@ClaudeZou did you have a look at wikimedia@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.

@poortho
Copy link
Author

poortho commented May 11, 2016

Finished with pull request #41

@poortho
Copy link
Author

poortho commented May 11, 2016

From @HowardCohl on May 6, 2016 20:33

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

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

No branches or pull requests

1 participant