Comments (5)
What are our options? Remove the braces (pretend like they don't exist) versus use the braces as treat-this-as-one-word markers versus ...?
Between those two choices, I think the former is better as it's likely to improve the readability of the log file. (And my primary goal, at least, is to improve the readability of the messages in my log file.)
from hardwrap.
My vague thinking is that
-
Probably need a "keep on one line" command, but braces aren't the best way to do that
-
I think that if you're inserting braces into messages, you probably want them to be printed, so we could add
\HardWrapBraceOpen \HardWrapBraceClose
which are inserted when braces are found and then if you want them to disappear you can just redefine these in
\HardWrapSetup
.
What do you think?
from hardwrap.
It'd be nice if the tie (~
) worked as a nonbreakable space to keep words together. For keeping longer strings of text on one line we could offer something akin to \nobreak{blah blah blah}
.
It may be difficult to determine the user's intent when it comes to inserting braces in the message. What should the output of the following lines of text be?
Hello {a b} world!
Hello \textit{a b} world!
Hello \abc world! [where \def\abc{123 {45} 67 {{8}} 9}]
I think the more general problem is: where on the spectrum of fully-expanded vs. verbatim do we want to sit?
from hardwrap.
I need to document how this all works a little better (I kinda got started the other day). The steps involved in the processing are:
- Fully expand everything with
\edef
. This replaces things like\\
and so on with their "protected" equivalents and is where the replacements for\emph
and so on happen - Scan char-by-char and replace/interpret "protected" characters appropriately
- Fully expand everything again to insert the proper definitions for "newline" etc
What we're currently saying is that any commands that are "protected" will be printed in a verbatim-like way, but otherwise commands are fully expanded. Braces are a bit of an edge case, and I think it's sensible to process them as if they should be printed — if they're used to delimit arguments of a command then they'll be absorbed in step 1.
Not sure if this makes sense but when I implement this we can discuss if it's behaving in a sensible/expected manner :)
from hardwrap.
print lone braces
(you can still use them as arguments for commands)
let me know if you think this needs more work...
closed by 20de5eb
from hardwrap.
Related Issues (18)
- Spaces are collapsed HOT 1
- Should the generate macro be renamed? HOT 2
- Add 'make test' target to run tests HOT 3
- hardwrap is incompatible with xelatex HOT 6
- Error messages fall into infinite loop HOT 1
- \GenerateLogMacros{expl3}
- Message cannot end with newline HOT 1
- \ifwindows
- Nitpicking
- Indentation
- Filtering out "bad" commands HOT 3
- Should manual newlines be disallowed? HOT 1
- Replace `\PackageError`, etc., entirely HOT 4
- Infinite loop if <text> arg of \hardwrap ends in a space HOT 1
- Passing \noexpand\macroname to \pkg@warning fails HOT 3
- \pkg@error{x}{x} prints '\MessageBreak x' HOT 6
- `\pkg@warning{\protect\LaTeX}` emits `\protect\LaTeX` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hardwrap.