]> git.lyx.org Git - features.git/log
features.git
3 years agoUpdate color table in branch list
Juergen Spitzmueller [Tue, 19 Jan 2021 08:22:07 +0000 (09:22 +0100)]
Update color table in branch list

3 years agoAdd method to check whether LyX runs in dark mode
Juergen Spitzmueller [Tue, 19 Jan 2021 08:21:36 +0000 (09:21 +0100)]
Add method to check whether LyX runs in dark mode

3 years agoUse isDarkMode() method
Juergen Spitzmueller [Tue, 19 Jan 2021 07:37:05 +0000 (08:37 +0100)]
Use isDarkMode() method

3 years agoFindAdv: Remove dead code
Kornel Benko [Mon, 18 Jan 2021 16:06:05 +0000 (17:06 +0100)]
FindAdv: Remove dead code

+ correct detection of backspaced '{' and '}' in regex with format search enabled

3 years agoFindAdv: Amend2 dacd2c45: Handle search for '{' and '}'
Kornel Benko [Mon, 18 Jan 2021 15:06:40 +0000 (16:06 +0100)]
FindAdv: Amend2 dacd2c45: Handle search for '{' and '}'

Allow for using 'a{2,7}' to find 2 to 7 consecutive chars 'a'

3 years agoUpdate sk.po
Kornel Benko [Mon, 18 Jan 2021 11:26:29 +0000 (12:26 +0100)]
Update sk.po

3 years agoFindAdv: Amend ec387b6d: Handle search for '{' and '}'
Kornel Benko [Mon, 18 Jan 2021 11:17:57 +0000 (12:17 +0100)]
FindAdv: Amend ec387b6d: Handle search for '{' and '}'

1) Take care of different input if changed the search-mode (with/without format)
This amends ec387b6d
2) Make the braces used in text to be treated as single characters
e.g. transform '\braceleft' to some unicode value
3) Try to use '$' as 'end of sequence' in regex
We have to remove '}' and '\n' chars from the examined string

3 years agoUpdate tex2lyx tests
Juergen Spitzmueller [Mon, 18 Jan 2021 09:49:19 +0000 (10:49 +0100)]
Update tex2lyx tests

3 years agoAdd option to revert graphics colors in dark mode (#12076)
Juergen Spitzmueller [Mon, 18 Jan 2021 09:46:16 +0000 (10:46 +0100)]
Add option to revert graphics colors in dark mode (#12076)

This amends [5d47a7ee57506/lyxgit]

3 years agoUpdate tex2lyx tests
Juergen Spitzmueller [Mon, 18 Jan 2021 09:01:09 +0000 (10:01 +0100)]
Update tex2lyx tests

3 years agoAllow semantic colors in branches and use semantic background color by default
Juergen Spitzmueller [Mon, 18 Jan 2021 08:56:53 +0000 (09:56 +0100)]
Allow semantic colors in branches and use semantic background color by default

Addresses most crucial part of #12075

File format change

3 years agoFindAdv: Handle search for '{' and '}'
Kornel Benko [Mon, 18 Jan 2021 00:10:07 +0000 (01:10 +0100)]
FindAdv: Handle search for '{' and '}'

In format-search the chars '{' and '}' are understood as latex parentheses, which normally are not
part of text and are discarded.
Instead we fake them as if they were a char like \backslash or \guilemotright or such.

3 years agoAdd some more hints to empty margin widgets (#11424)
Juergen Spitzmueller [Sun, 17 Jan 2021 16:49:45 +0000 (17:49 +0100)]
Add some more hints to empty margin widgets (#11424)

3 years agoCmake tests: findadv-01 - findadv-21 working
Kornel Benko [Sun, 17 Jan 2021 13:30:34 +0000 (14:30 +0100)]
Cmake tests: findadv-01 - findadv-21 working

Tests 07 and 09 corrected because of not working
shortcuts in cua env using sk/menus.bind.

3 years agoFindAdv: Optimizing forward search
Kornel Benko [Sun, 17 Jan 2021 12:30:43 +0000 (13:30 +0100)]
FindAdv: Optimizing forward search

Still not as fast as quick search

Also started to remove some unused code.

3 years agoTry to automatically handle transparent pictures in darkmode (#12076)
Juergen Spitzmueller [Sun, 17 Jan 2021 10:03:21 +0000 (11:03 +0100)]
Try to automatically handle transparent pictures in darkmode (#12076)

We'll see how this plays in practice.

3 years agoExtend non-default margins tooltip (#11424)
Juergen Spitzmueller [Sun, 17 Jan 2021 09:18:45 +0000 (10:18 +0100)]
Extend non-default margins tooltip (#11424)

3 years ago\96Stop using \vdag in AASTeX 6.2 example
Thibaut Cuvelier [Sat, 16 Jan 2021 19:42:14 +0000 (20:42 +0100)]
\96Stop using \vdag in AASTeX 6.2 example

3 years agoMake some findadv-tests working again, more to follow
Kornel Benko [Fri, 15 Jan 2021 16:13:07 +0000 (17:13 +0100)]
Make some findadv-tests working again, more to follow

Some shortcuts in cua do not work anymore
so replacing them with virtual shortcus for tests only
seems a good way.

3 years agoFindAdv: Search for innermost depth needed if matched string not inside some other...
Kornel Benko [Fri, 15 Jan 2021 16:09:18 +0000 (17:09 +0100)]
FindAdv: Search for innermost depth needed if matched string not inside some other inset.

3 years agoKeep dialog connected to cross-ref inset after Apply.
Richard Kimberly Heck [Fri, 15 Jan 2021 16:11:40 +0000 (11:11 -0500)]
Keep dialog connected to cross-ref inset after Apply.

This does not actually have any effect yet, due to the fact that
disconnectAfterApply returns true (and this is a GuiDialog).

3 years agoKeep dialog connected to External inset after Apply
Richard Kimberly Heck [Fri, 15 Jan 2021 16:11:25 +0000 (11:11 -0500)]
Keep dialog connected to External inset after Apply

3 years agoKeep dialog connected to BibTeX inset after Apply
Richard Kimberly Heck [Fri, 15 Jan 2021 16:11:14 +0000 (11:11 -0500)]
Keep dialog connected to BibTeX inset after Apply

3 years agoRevert unintended commit from before
Richard Kimberly Heck [Fri, 15 Jan 2021 16:10:44 +0000 (11:10 -0500)]
Revert unintended commit from before

3 years agoUpdate of signatures homekeeping.
Pavel Sanda [Fri, 15 Jan 2021 13:50:18 +0000 (14:50 +0100)]
Update of signatures homekeeping.

3 years agoReplace calls from make_unique to lyx::make_unique
Kornel Benko [Fri, 15 Jan 2021 10:36:14 +0000 (11:36 +0100)]
Replace calls from make_unique to lyx::make_unique

After advice from Yuriy Skalko to satisfy compilation with clang8

3 years agofixup 7c57001ad783
Juergen Spitzmueller [Fri, 15 Jan 2021 08:30:15 +0000 (09:30 +0100)]
fixup 7c57001ad783

3 years agoFindAdv: Discard the optional arguments of \part, \chapter, ...
Kornel Benko [Thu, 14 Jan 2021 22:25:58 +0000 (23:25 +0100)]
FindAdv: Discard the optional arguments of \part, \chapter, ...

Not easy selectable anyway, and hard to use while searching.

3 years agoTry to catch some other cases of inappropriate TOC updating in internal bufers.
Richard Kimberly Heck [Thu, 14 Jan 2021 19:20:55 +0000 (14:20 -0500)]
Try to catch some other cases of inappropriate TOC updating in internal bufers.

3 years agoFix crash reported by Kornel.
Richard Kimberly Heck [Thu, 14 Jan 2021 19:17:51 +0000 (14:17 -0500)]
Fix crash reported by Kornel.

See https://marc.info/?l=lyx-devel&m=161058233016780&w=2.

Internal Buffers do not have TOCs associated with them, so we should
not try to update them. This fixes Kornel's crash, but there may be
other instances of the problem.

3 years agoAdd theorem counter files to distribution
Richard Kimberly Heck [Thu, 14 Jan 2021 19:07:26 +0000 (14:07 -0500)]
Add theorem counter files to distribution

3 years agoFix crash (missing Buffer update)
Juergen Spitzmueller [Thu, 14 Jan 2021 16:17:58 +0000 (17:17 +0100)]
Fix crash (missing Buffer update)

3 years agoFindAdv: Add handling of regex char '^' at start also for search with disabled format
Kornel Benko [Thu, 14 Jan 2021 13:44:21 +0000 (14:44 +0100)]
FindAdv: Add handling of regex char '^' at start also for search with disabled format

lyxfind.cpp:
handle \mathcircumflex inside regex
output_latex.cpp:
don't mark extra end of parameters if no options involved

3 years agoFix #12069: Broken search
Kornel Benko [Thu, 14 Jan 2021 13:33:55 +0000 (14:33 +0100)]
Fix #12069: Broken search

Do not count ignored characters as matching

3 years agoForgot FORMAT
Richard Kimberly Heck [Thu, 14 Jan 2021 09:31:48 +0000 (04:31 -0500)]
Forgot FORMAT

3 years agoUpdate documentation of nomencl escape
Juergen Spitzmueller [Thu, 14 Jan 2021 08:12:23 +0000 (09:12 +0100)]
Update documentation of nomencl escape

Alas, the escape char has silently changed in recent nomencl versions

3 years agoRevert "Add move constructor and move assignment operator for FileName class"
Richard Kimberly Heck [Thu, 14 Jan 2021 08:07:33 +0000 (03:07 -0500)]
Revert "Add move constructor and move assignment operator for FileName class"

For now, since it's causing problems on OSX particularly.

This reverts commit 854c9de8faf9eb357adc353fc9116996445d5e38.

3 years agoFix comment
Juergen Spitzmueller [Thu, 14 Jan 2021 07:57:15 +0000 (08:57 +0100)]
Fix comment

3 years agoStrip % characters from nomenclWidest()
Juergen Spitzmueller [Thu, 14 Jan 2021 07:55:15 +0000 (08:55 +0100)]
Strip % characters from nomenclWidest()

This character now (oddly) serves as escape char in newer nomencl versions
but it still comments out in all other contexts.

See #10634

3 years agoWhitespace
Richard Kimberly Heck [Thu, 14 Jan 2021 06:28:42 +0000 (01:28 -0500)]
Whitespace

3 years agoFix bug #12068
Richard Kimberly Heck [Thu, 14 Jan 2021 06:15:19 +0000 (01:15 -0500)]
Fix bug #12068

3 years agoSimplify and polish
Richard Kimberly Heck [Wed, 13 Jan 2021 19:42:26 +0000 (14:42 -0500)]
Simplify and polish

3 years agoFix bug #10635
Richard Kimberly Heck [Wed, 13 Jan 2021 19:38:48 +0000 (14:38 -0500)]
Fix bug #10635

3 years agoRecord undo properly when inserting math script
Jean-Marc Lasgouttes [Wed, 13 Jan 2021 10:41:29 +0000 (11:41 +0100)]
Record undo properly when inserting math script

The current code did not always record undo at the right level.

Fixes bug #10843.

3 years agoSimple Search: find isChar() insets (#11462)
Juergen Spitzmueller [Wed, 13 Jan 2021 07:19:54 +0000 (08:19 +0100)]
Simple Search: find isChar() insets (#11462)

3 years agoFindAdv: Refactoring some routines which was hard to understand
Kornel Benko [Tue, 12 Jan 2021 18:33:29 +0000 (19:33 +0100)]
FindAdv: Refactoring some routines  which was hard to understand

Most of the previous code is only commented out, will remove them completely later.
(Debugging this code was extremely exhausting)

3 years agoWininstaller: remove (old) installer, installer2 becomes (new) installer
Eugene Chornyi [Tue, 12 Jan 2021 16:33:44 +0000 (17:33 +0100)]
Wininstaller: remove (old) installer, installer2 becomes (new) installer

3 years agoConsider inset strings in simple find/replaceAll (#12049)
Juergen Spitzmueller [Tue, 12 Jan 2021 15:45:32 +0000 (16:45 +0100)]
Consider inset strings in simple find/replaceAll (#12049)

3 years agoIgnore tracked deletions in simple replace (#11194)
Juergen Spitzmueller [Tue, 12 Jan 2021 15:13:47 +0000 (16:13 +0100)]
Ignore tracked deletions in simple replace (#11194)

3 years agoIgnore tracked deletions in simple find (#11051)
Juergen Spitzmueller [Tue, 12 Jan 2021 15:11:58 +0000 (16:11 +0100)]
Ignore tracked deletions in simple find (#11051)

3 years agoFindAdv: Allow regex searches at start of paragraph
Kornel Benko [Mon, 11 Jan 2021 13:50:03 +0000 (14:50 +0100)]
FindAdv: Allow regex searches at start of paragraph

For example regex '^\w+' finds now only the first word in any paragraph
even if searching without 'ignore format' is set.

3 years agoUpdate sk.po
Kornel Benko [Sun, 10 Jan 2021 22:31:08 +0000 (23:31 +0100)]
Update sk.po

3 years agoFindAdv: Search for 'whole words' with help of modified regex.
Kornel Benko [Sun, 10 Jan 2021 21:58:58 +0000 (22:58 +0100)]
FindAdv: Search for 'whole words' with help of modified regex.

3 years agodrop unintented static declaration from local temporary variable (formerly a global...
Stephan Witt [Sun, 10 Jan 2021 21:02:53 +0000 (22:02 +0100)]
drop unintented static declaration from local temporary variable (formerly a global static constant)

3 years agoFindAdv: Converting patterns without regex to use regex instead
Kornel Benko [Sun, 10 Jan 2021 16:17:37 +0000 (17:17 +0100)]
FindAdv: Converting patterns without regex to use regex instead

Makes the code with less exceptions
  (no need to differentiate beteen use_regex and !use_regex)

Move the creation of regexes to own subroutine (Handles '#if QTSEARCH ... #endif')
Use cursor position differences instead of length of matched string. This is important for putSelectionAt()

3 years agoAvoid \@ifundefined after user preamble
Juergen Spitzmueller [Sun, 10 Jan 2021 08:55:45 +0000 (09:55 +0100)]
Avoid \@ifundefined after user preamble

Users might have used \makeatother (#11163).

\ifdefined (of e-tex) can be considered available nowadays.

3 years agoFix bug #6128.
Richard Kimberly Heck [Sun, 10 Jan 2021 07:40:12 +0000 (02:40 -0500)]
Fix bug #6128.

3 years agoFix problem with display of include insets with non-existent files.
Richard Kimberly Heck [Sun, 10 Jan 2021 07:08:18 +0000 (02:08 -0500)]
Fix problem with display of include insets with non-existent files.

3 years agoCount words in hyperlink
Richard Kimberly Heck [Sun, 10 Jan 2021 06:50:01 +0000 (01:50 -0500)]
Count words in hyperlink

3 years agoFix bug #5972: Count words in citations (approximately).
Richard Kimberly Heck [Sun, 10 Jan 2021 06:43:34 +0000 (01:43 -0500)]
Fix bug #5972: Count words in citations (approximately).

3 years agoFix bug #3205.
Richard Kimberly Heck [Sun, 10 Jan 2021 05:43:01 +0000 (00:43 -0500)]
Fix bug #3205.

Allows external edit of non-existent files.

3 years agoFix bug #4241: Addition to Intro
Richard Kimberly Heck [Sun, 10 Jan 2021 03:17:52 +0000 (22:17 -0500)]
Fix bug #4241: Addition to Intro

3 years agoFix bug #11030.
Richard Kimberly Heck [Sun, 10 Jan 2021 01:33:23 +0000 (20:33 -0500)]
Fix bug #11030.

Factor out the code that connects to a newly created dialog and then
use that also in GuiGraphics.

There must be many other dialogs that need this same treatment....

3 years agoFix bug #11010.
Richard Kimberly Heck [Sun, 10 Jan 2021 00:17:47 +0000 (19:17 -0500)]
Fix bug #11010.

Handle LFUN_PHANTOM_INSERT in math.

3 years agonullptr
Richard Kimberly Heck [Sun, 10 Jan 2021 00:02:19 +0000 (19:02 -0500)]
nullptr

3 years agoShow plural and caps status for formatted references. Rest of #11073.
Richard Kimberly Heck [Sat, 9 Jan 2021 23:06:50 +0000 (18:06 -0500)]
Show plural and caps status for formatted references. Rest of #11073.

Patch from Daniel, more or less.

3 years agoUpdate buffer after changing reference options. Part of #11073.
Richard Kimberly Heck [Sat, 9 Jan 2021 22:59:07 +0000 (17:59 -0500)]
Update buffer after changing reference options. Part of #11073.

3 years agoFix bug #11097
Richard Kimberly Heck [Sat, 9 Jan 2021 22:41:42 +0000 (17:41 -0500)]
Fix bug #11097

3 years agoctests: invert old lyx2lyx tests for ar Beamer
Scott Kostyshak [Sat, 9 Jan 2021 18:01:26 +0000 (13:01 -0500)]
ctests: invert old lyx2lyx tests for ar Beamer

This is consistent with the lyx2lyx tests for Beamer in other
languages.

3 years agoFindAdv: Amend 474cb42e, implement sub-match replace.
Kornel Benko [Sat, 9 Jan 2021 16:01:50 +0000 (17:01 +0100)]
FindAdv: Amend 474cb42e, implement sub-match replace.

3 years agoUpdate ru.po
Yuriy Skalko [Sat, 9 Jan 2021 10:35:27 +0000 (12:35 +0200)]
Update ru.po

3 years agoAdd move constructor and move assignment operator for FileName class
Yuriy Skalko [Thu, 7 Jan 2021 00:27:31 +0000 (02:27 +0200)]
Add move constructor and move assignment operator for FileName class

3 years agoDisambiguate homographic inflections
Juergen Spitzmueller [Sat, 9 Jan 2021 08:44:38 +0000 (09:44 +0100)]
Disambiguate homographic inflections

These are not homographic in other languages
(e.g. German "Öffnen" vs. "Geöffnet")

3 years agode.po
Juergen Spitzmueller [Sat, 9 Jan 2021 08:43:10 +0000 (09:43 +0100)]
de.po

3 years agoAmend aaaae562dbac1
Juergen Spitzmueller [Sat, 9 Jan 2021 08:17:41 +0000 (09:17 +0100)]
Amend aaaae562dbac1

3 years agoArabic Beamer: set XeTeX as Default Output Format
Juergen Spitzmueller [Sat, 9 Jan 2021 08:07:25 +0000 (09:07 +0100)]
Arabic Beamer: set XeTeX as Default Output Format

LuaTeX (luabidi, for that matter) does not work well.

Also set some command texts in ERT, for readability.

3 years agoMove handling of LFUN_COPY to BufferView
Jean-Marc Lasgouttes [Fri, 8 Jan 2021 18:27:19 +0000 (19:27 +0100)]
Move handling of LFUN_COPY to BufferView

It turns out that the code is the same in texted ans mathed and that
whatever is done in InsetTabular is not useful.

This means that we do not need to deal Text::dispatch idiosyncrasies
(in particular forcing the cursor to be visible).

Fix bug #11225.

3 years agoUpdate sk.po
Kornel Benko [Fri, 8 Jan 2021 11:23:49 +0000 (12:23 +0100)]
Update sk.po

3 years agoFindAdv: Save sub-matches in MatchStringAdv class
Kornel Benko [Fri, 8 Jan 2021 11:05:51 +0000 (12:05 +0100)]
FindAdv: Save sub-matches in MatchStringAdv class

Prepare for use while replacing:
(backslashed numbers in the replace buffer should be replaced with the relevant
sub-matched strings.)

3 years agoUse nomath font also if other font package is selected (#11733)
Juergen Spitzmueller [Fri, 8 Jan 2021 10:17:31 +0000 (11:17 +0100)]
Use nomath font also if other font package is selected (#11733)

3 years agoFixup 2a80b0ac01bed2: fix the StartupWMClass in desktop file
Jean-Marc Lasgouttes [Fri, 8 Jan 2021 09:11:23 +0000 (10:11 +0100)]
Fixup 2a80b0ac01bed2: fix the StartupWMClass in desktop file

3 years agoMake Arabic Beamer compile
Juergen Spitzmueller [Fri, 8 Jan 2021 08:46:59 +0000 (09:46 +0100)]
Make Arabic Beamer compile

3 years agoAmend [6887bc5c/lyxgit]
Juergen Spitzmueller [Fri, 8 Jan 2021 08:22:55 +0000 (09:22 +0100)]
Amend [6887bc5c/lyxgit]

Use a more specific storage command

3 years agoctests: invert ru Shortcuts failures from varioref
Scott Kostyshak [Thu, 7 Jan 2021 22:36:44 +0000 (17:36 -0500)]
ctests: invert ru Shortcuts failures from varioref

Consistent with ru Math and Additional.

3 years agoAmend cf07d4825
Richard Kimberly Heck [Thu, 7 Jan 2021 20:56:55 +0000 (15:56 -0500)]
Amend cf07d4825

3 years agoFix bug #8921
Richard Kimberly Heck [Thu, 7 Jan 2021 16:19:12 +0000 (11:19 -0500)]
Fix bug #8921

3 years agoFindAdv: Save found matches (e.g. \0, \1, \2, ...)
Kornel Benko [Thu, 7 Jan 2021 16:04:27 +0000 (17:04 +0100)]
FindAdv: Save found matches (e.g. \0, \1, \2, ...)

Only while debugging for now. Later we may use the saved values in replace string

3 years agoRemove wrong dots from hu.po (#11573)
Juergen Spitzmueller [Thu, 7 Jan 2021 15:37:12 +0000 (16:37 +0100)]
Remove wrong dots from hu.po (#11573)

3 years agoProperly disable Apply/OK in InsetParamsDialog (#11440)
Juergen Spitzmueller [Thu, 7 Jan 2021 12:28:10 +0000 (13:28 +0100)]
Properly disable Apply/OK in InsetParamsDialog (#11440)

3 years agoGuiParagraph: apply pending changes when setting "immediate apply" (#11592)
Juergen Spitzmueller [Thu, 7 Jan 2021 12:05:37 +0000 (13:05 +0100)]
GuiParagraph: apply pending changes when setting "immediate apply" (#11592)

3 years agotypo
Jean-Marc Lasgouttes [Thu, 7 Jan 2021 11:36:36 +0000 (12:36 +0100)]
typo

3 years agoHint to deleted included file in ct output (#11809)
Juergen Spitzmueller [Thu, 7 Jan 2021 11:08:59 +0000 (12:08 +0100)]
Hint to deleted included file in ct output (#11809)

3 years agoFix nesting issue in environment-split (#11971)
Juergen Spitzmueller [Thu, 7 Jan 2021 10:53:35 +0000 (11:53 +0100)]
Fix nesting issue in environment-split (#11971)

3 years agoctests: invert ar Beamer template
Scott Kostyshak [Thu, 7 Jan 2021 03:53:44 +0000 (22:53 -0500)]
ctests: invert ar Beamer template

DocBook export is not expected to work with Beamer templates.

3 years agoCorrectly terminate a user math macro in certain circumstances
Enrico Forestieri [Wed, 6 Jan 2021 23:57:36 +0000 (00:57 +0100)]
Correctly terminate a user math macro in certain circumstances

If a macro has only optionals and none is specified and a [ immediately
follows, we have to terminate the macro with {}, otherwise what follows
is taken to be an optional argument.

Fixes #11665.

3 years agoDisplay bookmarks in the workarea.
Jean-Marc Lasgouttes [Wed, 6 Jan 2021 18:21:26 +0000 (19:21 +0100)]
Display bookmarks in the workarea.

The bookmarks are added as virtual elements in display Rows. Bookmarks
are shown with circled numbers. A new color "bookmarks" has been
added. Currently bookmark 0 (the return position) is not displayed
because it is very disturbing in practice.

To make this work, a new method BookmarksSection::bookmarksInPar
retuns the list of bookmarks in a paragraph along with their position.

Force redraw when using bookmark-save and bookmark-clear.

Fixes bug #2496.

3 years agoFix use of BookmarkSection::size()
Jean-Marc Lasgouttes [Wed, 6 Jan 2021 18:18:25 +0000 (19:18 +0100)]
Fix use of BookmarkSection::size()

The value was 9 instead of 10, which forced its users to use unusual code.

3 years agofix Row::findElement when there is a Virtual element
Jean-Marc Lasgouttes [Wed, 6 Jan 2021 17:49:41 +0000 (18:49 +0100)]
fix Row::findElement when there is a Virtual element

3 years agoRemove some useless Row:: prefixes
Jean-Marc Lasgouttes [Wed, 6 Jan 2021 17:14:49 +0000 (18:14 +0100)]
Remove some useless Row:: prefixes

3 years agoStyle cleanup to bookmark code
Jean-Marc Lasgouttes [Wed, 6 Jan 2021 13:18:25 +0000 (14:18 +0100)]
Style cleanup to bookmark code