Giter Site home page Giter Site logo

Comments (14)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
[deleted comment]

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Due to public demand I took the time to implement this feature (see attached 
patch).
Included are a customizable line length, a rewrap mode and a "selection only" 
option.
In addition it ends each hardwrapped line with a (customizable) marker. This is
necessary to enable rewrapping. The tab size is computed from the current 
editor font
and the tab size set in the preferences but can be overridden.

It seems to work for me, but I've only tested it shallowly on Ubuntu.

Side note: I originally intended to hide the more advanced controls (e.g. 
everything
except for line length) and only show them after a click on a "More..." button, 
but
unfortunately I didn't manage to get that to work consistently.

(EDIT: Updated the patch to let the whole operation appear as a single edit for
undo/redo)

Original comment by st.loeffler on 20 Apr 2009 at 12:51

Attachments:

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
The new patch

Original comment by st.loeffler on 20 Apr 2009 at 6:00

Attachments:

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I've just committed rev. 294, which includes a basic Hard Wrap feature inspired 
by Stefan's patch (thanks for that, 
it was a helpful starting point!)

This version is deliberately simplified, with a bare minimum of options; I have 
a couple of ideas for ways to make 
it smarter, but would appreciate feedback on how well this "minimalist" version 
works for people.

Note that if there is a selection, Hard Wrap will apply only to the selected 
lines; if not, it will apply to the entire 
file. (If you do this by accident, don't panic: Undo should work!)


Original comment by [email protected] on 5 May 2009 at 5:06

  • Changed state: Started
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I have just compiled TeXWorks from source on Hardy, because I desperately need 
an
usable IDE with:

1) Hard wraps (to use it effectively with SVN)
2) Inline spellcheking
3) SyncTeX support

So far I have quickly tested it with some of my files and it seems to work OK, 
but I
don't like the fact that I have to reformat the document manually every time. 
Is it
possible to add an option so that TeXWorks will rewrap the paragraph that is
currently being edited as I type?

Thank you for your work!

Original comment by yury.v.zaytsev on 22 May 2009 at 11:15

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
My comments on the current hard wrap are as follows:
1) a keyboard shortcut would be immensely helpful.
2) I wish it would leave comments alone (or as in xemacs, where it reformats 
the 
lines, but keeping % at the beginning of each line.
3) Another xemacs behavior I miss: lines that contain % don't get mashed 
together: 
e.g., 

\theoremstyle{definition} % 
\newtheorem*{definition}{Definition} %

doesn't become 
\theoremstyle{definition} % \newtheorem*{definition}{Definition} %

4) \begin{} and \end{} don't get mashed up with what's in between.  i.e., 

\begin{} 
a
b
c 
\end{} 

becomes 

\begin{} 
a b c 
\end{} 

rather than 

\begin{} a b c \end{} 

5) I second the request for hard-wrap-as-you-type.

These sorts of suggestions are, I am sure, beyond the scope of the feedback 
that was 
requested.  As it is currently implemented, it is fine for what it is, but I 
don't 
think I will find it terribly useful until it has some of the smarter behavior. 
I 
made the mistake of applying it without being careful in selecting text, and it 
screwed a bunch of stuff up.

Thanks for all the work that has gone into this. I love the editor / pdf 
integration, and will probably make this my exclusive TeX environment once 
enough of 
these little editor tweaks allow me to feel more at home in it.

Original comment by [email protected] on 25 May 2009 at 5:58

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I have been working quite a bit with Kile recently and after having extensively 
used
the CTRL+J shortcut to, I have to agree, that even the current implementation is
already quite useful if you add the shortcut to reflow the current paragraph.

Original comment by yury.v.zaytsev on 29 Sep 2009 at 3:40

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Any progress on this issue? It's been around one year and a half already. Still
waiting for KDE4.4/Kile with spell checker.

Original comment by yury.v.zaytsev on 2 Feb 2010 at 10:19

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Well, the basic request has been addressed (hard wrapping is implemented, in
principle). It's still open because there may be some additional features added 
in
the future - though AFAIK nothing definite is planned/on the way right now.

Regarding the feedback so far:
 * A shortcut can be assigned easily.
 * Hard-wrap-as-you-type is unlikely to get implemented anytime soon unless someone
comes up with an ingenious way how to do it in the current framework. I can't 
really
think of any...
 * LaTeX-specific features (like handling comments) would certainly be useful for
LaTeX authors, but possibly horrible for others (TeX, ConTeXt, etc.). Hence, so 
far,
the policy has been to implement a simple and generic method, without too many
specifics. Besides, to a certain degree, these are a matter of taste. But it 
should
be possible to run the source through an external pretty print/hard wrap tool 
using
scripting.

Original comment by st.loeffler on 2 Feb 2010 at 10:53

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
smartwrap.js available at 

  http://code.google.com/p/texworks/issues/detail?id=261#c64

has features 1-4 requested in comment 6.  It also supports removal of hard 
wrapping, and the freezing/unfreezing of lines by adding/removing " %" from the 
end of lines.
It avoids touching equations and certain environments like align, tabular, 
verbatim.

Original comment by [email protected] on 24 May 2011 at 3:51

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
comment #9 says a shortcut can be easily assigned - have this been done in the 
current release? if so, I can't seem to locate it anywhere.  My collaboration 
environment requires us to keep the latex document tidy as many others are 
using VIM. Without a manual format shortcut, the only way for me is to go to 
the menu and ask for "reformat paragraph", which will touch everywhere, and 
that is bad from version control perspective.

Original comment by [email protected] on 31 May 2011 at 8:10

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
After playing with "hard wrap" options for a while, I realize (correct me if I 
am wrong) - everytime it is a wholesale reformatting. In other words, there is 
no way for me to reformat a single paragraph. Given that there is no plan to 
implement "format as you type", I would think a shortcut command for "reform a 
paragraph" is the second best thing I can ask for. Does this make sense?

Original comment by [email protected] on 31 May 2011 at 8:20

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
In reply to Comment 12:  smartwrap.js (see Comment 10) let's you wrap the 
current paragraph by pressing Ctrl+J then Return.

Original comment by [email protected] on 2 Jun 2011 at 11:59

from texworks.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
@13 - thanks for the tip. I will give it a shot once 0.4 for Mac OS package is 
released, the current Texwork 0.23 doesn't seem to have scripting support 
AFAIK. 

Original comment by [email protected] on 2 Jun 2011 at 1:52

from texworks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.