Wrong reStructuredText tree structure
-
- Posts: 51
- Joined: 17.08.2022 13:42
Wrong reStructuredText tree structure
Excellent software, thank you!
I am a new user and I use CudaText (version 1.168.6.1) to write restructuredtext documents. It works very well in various ways. But I have difficulty to make the (code) tree structure to work correctly. Even I install the cuda_tree_rest plugin, it does not help.
cuda_tree_rest: https://github.com/medvosa/cuda_tree_rest
The following is the Headers on the right and tree on the left. You can see I use FIVE level headings, but only the first three of them render correctly, the last two are wrong. Can you help? Thank you very much!
I am a new user and I use CudaText (version 1.168.6.1) to write restructuredtext documents. It works very well in various ways. But I have difficulty to make the (code) tree structure to work correctly. Even I install the cuda_tree_rest plugin, it does not help.
cuda_tree_rest: https://github.com/medvosa/cuda_tree_rest
The following is the Headers on the right and tree on the left. You can see I use FIVE level headings, but only the first three of them render correctly, the last two are wrong. Can you help? Thank you very much!
-
- Posts: 2265
- Joined: 25.08.2021 18:15
the detection of header's level is wrong in Cud.
do you know the algorithm to detect the headder level from header's char? or do we need to calc it dinamically from each document?
Code: Select all
class function TTreeHelperRest.GetLevel(ch: WideChar): integer;
begin
case ch of
'=': Result:= 1;
'-': Result:= 2;
'~': Result:= 3;
'"': Result:= 4;
else Result:= 1;
end;
end;
-
- Posts: 51
- Joined: 17.08.2022 13:42
Thank you for your reply. I will use the first four head level markers as you suggested before your updates coming.
I think you should calc it dynamically from each document according to the online docs:
https://www.sphinx-doc.org/en/master/us ... l#sections
Thank you again.
I think you should calc it dynamically from each document according to the online docs:
https://www.sphinx-doc.org/en/master/us ... l#sections
https://docutils.sourceforge.io/docs/re ... l#sectionsNormally, there are no heading levels assigned to certain characters as the structure is determined from the succession of headings.
By the way, Cudatext is so an excellent editor to write (restructuredtext) docs that I will recommend it to others.Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered. The first style encountered will be an outermost title (like HTML H1), the second style will be a subtitle, the third will be a subsubtitle, and so on.
Thank you again.
-
- Posts: 2265
- Joined: 25.08.2021 18:15
great, we need to advertise it.>that I will recommend it to others.
or some youtube videos.
I now reworked the detection of levels ((it was not easy to invent the algorithm, so the 2-3 days delay).
beta for win64, please test, on your sample it works:
http://uvviewsoft.com/c/
-
- Posts: 51
- Joined: 17.08.2022 13:42
You will see. I will do so after I can translate the UI and some Cudatext's basic wiki help documents to Chinese. My introduction is for Chinese uses. I think millions of them need Cudatext-like editors. This work will take some time but you will not wait too long.great, we need to advertise it.
or some youtube videos.
Last edited by lookoutside on 22.08.2022 02:37, edited 1 time in total.
-
- Posts: 51
- Joined: 17.08.2022 13:42
Yes, it works correctly. thank you!I now reworked the detection of levels ((it was not easy to invent the algorithm, so the 2-3 days delay).
beta for win64, please test, on your sample it works:
http://uvviewsoft.com/c/
-
- Posts: 2265
- Joined: 25.08.2021 18:15
about Chs translations - we already have them. in Addons Manager:
https://sourceforge.net/projects/cudate ... nslations/
files there: zh_CN (updated), zh_CN_2 (updated), zh_TW (5 years old, bad).
history of translations:
https://github.com/Alexey-T/CudaText/bl ... istory.txt
https://sourceforge.net/projects/cudate ... nslations/
files there: zh_CN (updated), zh_CN_2 (updated), zh_TW (5 years old, bad).
history of translations:
https://github.com/Alexey-T/CudaText/bl ... istory.txt
-
- Posts: 51
- Joined: 17.08.2022 13:42
-
- Posts: 51
- Joined: 17.08.2022 13:42
The first translation: https://zhuanlan.zhihu.com/p/556816043
-
- Posts: 2265
- Joined: 25.08.2021 18:15