Mirror of Lyx repo
Go to file
Christian Ridderström e30f3d76d2 Bulk cleanup/fix incorrect annotation at the end of namespaces.
This commit does a bulk fix of incorrect annotations (comments) at the
end of namespaces.

The commit was generated by initially running clang-format, and then
from the diff of the result extracting the hunks corresponding to
fixes of namespace comments. The changes being applied and all the
results have been manually reviewed. The source code successfully
builds on macOS.

Further details on the steps below, in case they're of interest to
someone else in the future.

1. Checkout a fresh and up to date version of src/

    git pull && git checkout -- src && git status src

2. Ensure there's a suitable .clang-format in place, i.e. with options
   to fix the comment at the end of namespaces, including:

    FixNamespaceComments:                           true
    SpacesBeforeTrailingComments:                   1

and that clang-format is >= 5.0.0, by doing e.g.:

    clang-format -dump-config | grep Comments:
    clang-format --version

3. Apply clang-format to the source:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")

4. Create and filter out hunks related to fixing the namespace

    git diff -U0 src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace.patch

5. Filter out hunks corresponding to simple fixes into to a separate patch:

    pcregrep -M -e '^diff[^\n]+\nindex[^\n]+\n--- [^\n]+\n\+\+\+ [^\n]+\n'  \
        -e '^@@ -[0-9]+ \+[0-9]+ @@[^\n]*\n-\}[^\n]*\n\+\}[^\n]*\n'         \
        fix_namespace.patch > fix_namespace_simple.patch

6. Manually review the simple patch and then apply it, after first
   restoring the source.

    git checkout -- src
    patch -p1 < fix_namespace_simple.path

7. Manually review the (simple) changes and then stage the changes

    git diff src
    git add src

8. Again apply clang-format and filter out hunks related to any
   remaining fixes to the namespace, this time filter with more
   context. There will be fewer hunks as all the simple cases have
   already been handled:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")
    git diff src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace2.patch

9. Manually review/edit the resulting patch file to remove hunks for files
   which need to be dealt with manually, noting the file names and
   line numbers. Then restore files to as before applying clang-format
   and apply the patch:

    git checkout src
    patch -p1 < fix_namespace2.patch

10. Manually fix the files noted in the previous step. Stage files,
    review changes and commit.
2017-07-23 13:11:54 +02:00
3rdparty Some minor polishment and comments. 2017-07-19 10:22:13 +02:00
autotests ctests: move issue with nomenclature insets to a dedicated test case. 2017-05-04 18:05:18 +02:00
config Remove unused autoconf macro 2017-04-25 12:16:23 +02:00
development Cmake build: Use the same destination for lyx-tex-files as in automake 2017-07-14 11:24:20 +02:00
lib Select Latin Modern fonts for beamer lyx-files 2017-07-22 00:22:00 +02:00
m4 Update imported gettext code from gettext 0.19.7 2016-06-01 21:45:38 +02:00
po pt_BR.po: updates for 2.3 from Georger 2017-07-21 02:28:33 +02:00
sourcedoc
src Bulk cleanup/fix incorrect annotation at the end of namespaces. 2017-07-23 13:11:54 +02:00
.gitattributes
.gitignore tex2lyx: Remove "textglobfall" hack. 2016-09-13 22:23:53 +02:00
ANNOUNCE ANNOUNCE: give warnings about using a pre-release 2017-06-03 14:56:42 -04:00
autogen.sh Require automake 1.14 and autoconf 2.65 2017-04-06 14:56:30 +02:00
CMakeLists.txt Cmake build: Try to figure out at configure time which qt version to use 2017-05-02 14:12:41 +02:00
configure.ac Back to development 2017-04-24 00:05:15 -04:00
COPYING
INSTALL Require automake 1.14 and autoconf 2.65 2017-04-06 14:56:30 +02:00
INSTALL.autoconf
INSTALL.cmake Cmake windows build: Discard use of configCompiler.h.msvc 2016-06-15 11:29:09 +02:00
INSTALL.MacOSX
INSTALL.Win32 INSTALL.Win32: a typo 2016-07-18 01:45:24 +02:00
lyx.1in Update man page 2017-01-11 10:51:30 +01:00
Makefile.am
NEWS NEWS: add what's new in LyX 2.3 2017-04-23 23:23:03 -04:00
README * README: document recent gcc discussion. 2016-06-15 11:10:31 -07:00
README.Cygwin
README.localization doc - last updates are from 2015. 2017-06-09 12:50:28 +02:00
README.Win32
RELEASE-NOTES
UPGRADING Copy caveats from RELEASE-NOTES to UPGRADING 2017-04-23 23:23:03 -04:00

What is LyX?

    LyX is a document processor that encourages an approach to
    writing based on the structure of your documents, not their
    appearance. It is released under a Free Software / Open Source
    license.

    LyX is for people that write and want their writing to look great,
    right out of the box. No more endless tinkering with formatting
    details, 'finger painting' font attributes or futzing around with
    page boundaries. You just write. In the background, Prof. Knuth's
    legendary TeX typesetting engine makes you look good.

    On screen, LyX looks like any word processor; its printed output
    -- or richly cross-referenced PDF, just as readily produced --
    looks like nothing else. Gone are the days of industrially bland
    .docs, all looking similarly not-quite-right, yet coming out
    unpredictably different on different printer drivers. Gone are the
    crashes 'eating' your dissertation the evening before going to
    press.

    LyX is stable and fully featured. It is a multi-platform, fully
    internationalized application running natively on Unix/Linux and
    the Macintosh and modern Windows platforms.

What do I need to run LyX?

    Either:
    * a Unix-like system (including Windows with cygwin)
    * Windows 2000 or newer
    * Mac OS 10.4 or newer

    A decent LaTeX2e installation (e.g. TeX Live for Linux, MikTeX for
    Windows).

    Python 2.7 to convert old LyX files and for helper scripts.
    Note: Python 3 (3.3 or later) support is work in progress.

How does the LyX version scheme work?

    LyX uses a contiguous numbering scheme for versions, where a
    number "1.x.y" indicates a stable release '1.x', maintenance
    release 'y'.  In other words, LyX 1.5.0 was the first stable
    release in the 1.5-series of LyX. At the time of writing, the
    latest maintenance release in the 1.5-series was LyX 1.5.2

    Please note that maintenance releases are designed primarily to
    fix bugs, and that the file format will _never_ change due to a
    maintenance release.

    In addition to the stable releases and maintenance releases, some
    users may want to give a ''release candidate'' a try. This is a
    release that should be stable enough for daily work, but yet may
    be potentially unstable. If no major bugs are found, the release
    candiate is soon released as the first stable release in a a new
    series. To summarize, there are three possible types of file names
    that are of interest to normal users:

       lyx-1.5.0.tar.gz     -- stable release, first in the 1.5-series
       lyx-1.5.5.tar.gz     -- fifth maintenance release of LyX 1.5
       lyx-1.5.0rc1.tar.gz  -- potentially unstable release candidate

    Note that the goal is not parallel development as for the linux
    kernel --the team is too small to afford that-- but rather to
    include all the simple and safe bug fixes. This is so that the
    maintenance burden on us is not too high, and so that system
    administrators can install new releases without fear. Experience
    shows that these releases will contain a few new features, and
    that the bulk of the patches will be documentation updates.

    If you get the source from Git, the version string will look like
    one of:

       2.0.6dev     -- this is the stable branch on which maintenance
               release 2.0.6 will eventually be tagged.
       2.1.0dev     -- this is the main branch on which stable
               release 2.1.0 will eventually be tagged.

What's new?

    Read NEWS.

How do I upgrade from an earlier LyX version?

    Read the file UPGRADING for info on this subject.

What do I need to compile LyX from the source distribution?

    * A good C++ compiler.  Development is being done mainly with
      gcc/g++, but some others work also. As of LyX 2.3.0, you need
      at least gcc 4.6.x.

    * The Qt4 library, at least version 4.8.0. For all features
      newer versions (e.g. Qt 5.6) are recommended.

    Read the file "INSTALL" for more information on compiling.

Okay, I've installed LyX. What now?

    Once you've installed it, and everything looks fine, go read
    the "Introduction" item under the Help menu.  You should follow
    the instructions there, which tell you to read (or at least skim)
    the Tutorial. After that, you should also read "Help>LaTeX
    configuration" which provides info on your LaTeX configuration
    as LyX sees it.  You might be missing a package or two that you'd
    like to have.

    User-level configuration is possible via the Tools>Preferences menu.

Does LyX have support for non-English speakers/writers/readers?

    Yes. LyX supports writing in many languages, including
    right-to-left languages like Arabic or Hebrew.

    Menus and error messages have been translated to many languages.
    For the status of the different translations, see
    http://www.lyx.org/I18n

    Keymaps can ease typing in many languages.

Internet resources of relevance to LyX

    The LyX homepage contains valuable information about LyX and the
    various LyX mailing lists, as well as links to mirrors and other
    LyX homepages around the world:
	http://www.lyx.org/

    The LyX Wiki is the place where users can share information on
    setting up and using LyX.
	http://wiki.lyx.org/

    The main LyX archive site:
	ftp://ftp.lyx.org/pub/lyx/

    The LyX Development page has information about the development
    effort. LyX is under Git version control, so you can get the very
    latest sources from there at any time.
	http://www.lyx.org/Development

How do I submit a bug report?

    If possible, read the Introduction found under the Help menu in LyX.
    You'll find detailed info on submitting bug reports there.

    If you can't do that, send details to the LyX Developers' mailing
    list, or use the LyX bug tracker at
    http://www.lyx.org/trac/wiki/BugTrackerHome.
    Don't forget to mention which version you are having problems with!

How can I participate in the development of LyX?

    Any help with the development of LyX is greatly appreciated ---
    after all, LyX wouldn't be what it is today without the help
    of volunteers. We need your help!

    If you want to work on LyX, you should contact the developer's
    mailing list for discussion on how to do your stuff.  LyX is being
    cleaned up, and therefore it's important to follow some rules.
    Read about those rules in development/Code_rules/.

    If you don't know C++, there are many other ways to
    contribute. Write documentation. Help to internationalize LyX
    by translating documentation or menus/error messages, or by
    writing a new keymap. Write a new textclass. Find bugs (but
    please read the list of known bugs first). Contribute money.
    Or just offer feature suggestions (but please read the online
    TODO list first).

Thank you for trying LyX. We appreciate your feedback in the mailing
lists.

The LyX Team.