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

Add ampersand replacement option #50

Open
aDotInTheVoid opened this issue Jun 1, 2020 · 6 comments
Open

Add ampersand replacement option #50

aDotInTheVoid opened this issue Jun 1, 2020 · 6 comments

Comments

@aDotInTheVoid
Copy link

aDotInTheVoid commented Jun 1, 2020

In the beamer class, one needs [ampersand replacement=\&] to make it work. source

It would be nice if there was an option to do this, or if it was the default. I'm not sure if there is a situation in which this behaviour isn't desirable

I'd be willing to implement this if you could point out the relevant parts of the code.

@yishn
Copy link
Owner

yishn commented Jun 1, 2020

If we use \& as separator as default, how would one specify a literal & in one of the cells?

@aDotInTheVoid
Copy link
Author

aDotInTheVoid commented Jun 4, 2020 via email

@yishn
Copy link
Owner

yishn commented Jun 4, 2020

One of the StackExchange solutions proposes to specify [fragile] on the frame environment. That looks like the cleanest solution. Are there any drawbacks to that?

@aDotInTheVoid
Copy link
Author

Not that I know of, so I guess I'll just use that.

@ComFreek
Copy link

Sorry for digging this out again.

One of the StackExchange solutions proposes to specify [fragile] on the frame environment. That looks like the cleanest solution. Are there any drawbacks to that?

See https://tex.stackexchange.com/questions/136240/drawbacks-of-using-fragile-frames-in-beamer:

With fragile every contents is written into an external file and read back. Not a big deal but makes compiling slow.

Apparently the fragile option is incompatible with the allowframebreaks option, without some awkward finagling.

Especially the first point about slow compilation is a valid concern that I share, hence, I am always using ampersand replacement. It would be cool if tikzcd-editor supported this as an output and input (for parsing) format.

@yishn yishn reopened this Sep 26, 2020
@yishn
Copy link
Owner

yishn commented Sep 26, 2020

Hm... in that case we should allow the user to specify their own ampersand replacement inside the code box. Here are some steps that need to be done:

  • Add an ampersand replacement option to the render function in jsx-tikzcd
  • Publish new jsx-tikzcd version and update jsx-tikzcd version in tikzcd-editor
  • Add UI controls for user to specify their ampersand replacement in CodeBox.js
  • Hook up ampersand replacement input with actual code generation in App.js and diagram.js

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