-
Notifications
You must be signed in to change notification settings - Fork 205
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
Feature/tikz preamble #49
Conversation
OK, I see the problem now. In the hard copy side, the standalone image file is not used to make the book's pdf. Instead, the Why not have the I'll make the adjustments to |
This looks good. How about the following plan?
Consider as much of this as you have an appetite for. At least: locally allowing packages with an attribute, and getting those options into the latex output. I can do the rest using your work as a model. Are there other libraries I should just include as "standard"? Rob |
Another one might be I have a few more thoughts about this:
I'll keep working on this and say something on the pull request thread if On Sat, Feb 7, 2015 at 7:26 PM, Rob Beezer notifications@github.com wrote:
Alex Jordan |
… better names); deprecated tikz tag
OK, I'm ready for a review. There are some things that are not right for sure, and some other things that you may disagree with (and if so, I'm happy to change).
Issues
|
Looking great. Comments, in order of appearance:
Looking over commits:
Not much energy left tonite to actually test this out. Enough guidance for you to continue working on this? Will your merge of my edits behave when I try to pull this onto my repo? |
OK, I've done some more things.
|
Perhaps this is related to your comment. As things are now, the latex code is getting initial characters shaved off at each line if there are tab characters at the beginning of lines. This must be the effect of
What do you recommend to do about this? |
Yep, for Sage and Python code the indentation is critical. So I suggest never My editor will "Save with Spaces" and I can tab-away easily while diting, but Left margin is set by the first non-whitespace character and then it gets On 02/15/2015 07:38 PM, Alex Jordan wrote:
|
Dear Alex, I pulled your branch and looked all through the code. It looks good. About done for the day, so I'll do some actual testing very soon, likely on Wednesday. Some really minor stuff that I am trying to be picky about:
Rob |
I removed two end of line characters from two files that were showing up in the git diff, and removed two tabs from one blank line in the sample article. Do you see more white space issues? If you do, would it be possible to comment on them directly in GitHub where they are? For the second and third bullets, I can try to learn, but I'm not as adept with git as you might guess. I wasn't aware that you can combine commits in the way you suggest. And I'm not really sure what rebasing is. When you pulled the description tag in, I had already been working here. I fetched origin, then pulled origin/dev into this branch. There was a conflict of some sort that I had to correct for, as the commit logs show. I'm guessing that rebasing is some smarter way to merge this with the mathbook-sagenb.xsl edits? I'm happy to learn how to do these things. It may take me a few more days though. |
Dear Alex, Put this through its paces and it looks good to me. Some whitespace in a Are there any more touch-ups you plan/want to do? I'm thinking we might be able to put latex code for commutative diagrams into Rob On 02/16/2015 11:09 PM, Alex Jordan wrote:
|
Dear Alex, Whitespace at the end of following lines. Sorry - I didn't bother to figure out sample-article.xml
extract-latex-image.xsl (highly probable these are my fault)
mathbook-latex.xsl
Rob On 02/16/2015 11:09 PM, Alex Jordan wrote:
|
I addressed those white spaces. Also the corresponding ones in I don't have any ideas on more for this feature, except I do wonder if the
I'll look into combining commits. On Tue, Feb 17, 2015 at 8:55 PM, Rob Beezer notifications@github.com
Alex Jordan |
…nstead of around latex-image; removed errant deprecation comment
…g tikz toward latex-image-code in mathbook-html; changed names in mbx script and extract-latex-image to be consistent; latex-image is the parameter to pass to mbx; enhanced tikz deprecation warnings to tell people to put tikz package and any needed libraries into tikz-image-preamble; cleanup
1f610c1
to
22e56a0
Compare
I squashed commits from 18 down to 9. It looks to me like further squashing could be done, but it would involve re-ordering the commits, and I'm worried that would cause conflicts I'd need to resolve. I found this helpful: http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html |
Dear Alex, Thanks for the whitespace cleanup and for cleaning up my (propogated) messes. I learned something. When I pulled your squashed branch, I got a big mess on my end. ;-) Not at all your fault, it was an experiment and that was a high-probability outcome. I trashed the mess and pulled as if it was the first time. All good. But I need to learn/think about some things relative to collaboration. Right - you do not really want to reorder unless you are 100% sure about the lack of dependencies. But I've done it. ;-) Did you consider doing a massive "fixup" into one commit and then editing it back into smaller pieces? While there is semi-rapid development and little documentation, I want the log/history to be especially useful to newcomers. I would really like to have this contribution be commits like (at most)
and I might even consolidate the three middle ones if it was me. It looks like you "squash"'ed rather than "fixup"'ed, maybe? The commit messages look like a consolidation. I could do the roll-up and I think preserve/name you as author so the record is straight. Just let me know. Rob |
On 02/17/2015 11:42 PM, Alex Jordan wrote:
I'd really, really like to banish tabs from the source. An author sees them as One of my (many) goals is really clean (human-readable?) source. Especially
David Farmer has some of these from his own experiments. I can maybe get some |
For commutative diagrams, among existing papers the most popular Mathjax dos not know about xypic. It supposedly knows a simpler On Thu, 19 Feb 2015, Rob Beezer wrote:
|
Thanks, David. I'll ping you after we get Alex's changes in. This should become a relative no-brainer for an author (modulo xypic), given Rob On 02/19/2015 09:46 AM, davidfarmer wrote:
|
Slightly off topic, but perhaps not?.... Rob, if you like clean source code, have you seen latexindent? ( Sorry to interrupt your conversation--must get back to putting things side On Thu, Feb 19, 2015 at 6:31 PM, Rob Beezer notifications@github.com
|
Very nice! I did not know about that. (I knew you had some chops.) I made an issue to add this step to the mbx script, so it does not get lost. Thanks! On 02/19/2015 02:16 PM, cmhughes wrote:
|
I created a new branch for all this, and used git diff to bring in the new elements in a controlled manner. I'm sure there was a proper git solution, but this only took me 30 minutes. If #55 checks out, then this pull request can be closed. |
Closing this. #55 has been merged. |
This allows us to put extra packages and other preamble content into the code that goes into a
<tikz>
tag. Without this, everything you would put into a<tikz>
tag goes into the body of astandalone
tex document, and the preamble of that tex document is only what is hard coded intoextract-tikz.xsl
.There is an example in
sample-article.xml
using theforest
package.I think this is good, but a side effect of the changes that I made is that no tags within a
<tikz>
tag are recognized (except the new<tikz-extra-preamble>
). My understanding is that formerly, only text (tex code) content would have been inside a<tikz>
tag, so this should be backward compatible.