Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-04-2017, 06:46 AM   #1
samirahmed007
Junior Member
samirahmed007 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: May 2017
Device: kindle
Collapse and expand code in Sigil

Hi Everyone
How to Collapse and expand code in Sigil
samirahmed007 is offline   Reply With Quote
Old 07-04-2017, 11:12 AM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by samirahmed007 View Post
Hi Everyone
How to Collapse and expand code in Sigil
Whats that mean?
I know how to collapse the TOC listing
Are yyou woried about blank lines between tagged text? Don't worry. that is for humans and does not change the output of the render engine
theducks is offline   Reply With Quote
Advert
Old 07-04-2017, 11:19 AM   #3
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
You cannot collapse the code. As this is the book itself, it wouldn't be very useful...
Toxaris is offline   Reply With Quote
Old 07-04-2017, 01:30 PM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
Also, you can run PrettPrint and it will indent the xhtml to make it easier to see the structure. You can also use Preview and its Web Inspector to get a collapsable tree of exactly how the internal Webkit widget DOM tree was built.
KevinH is offline   Reply With Quote
Old 07-04-2017, 04:57 PM   #5
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
I'm guessing the OP means to be able to collapse blocks of code, in code view, to a single line (in the code view display, not the file itself) like you can do in, for example, the bluefish editor.

Just my $0.02

Albert
st_albert is offline   Reply With Quote
Advert
Old 07-04-2017, 05:35 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,547
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
If that's the case, then simply edit your html with an editor capable of collapsing blocks of code using the "Open With" feature of Sigil.

Sigil is not a full-featured html editor. The "Open With" feature allows users to edit their epub's html (or images, or css) with the editor of their choice.
DiapDealer is offline   Reply With Quote
Old 07-04-2017, 07:24 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by DiapDealer View Post
Sigil is not a full-featured html editor. The "Open With" feature allows users to edit their epub's html (or images, or css) with the editor of their choice.
Nevertheless, collapsible code blocks would be a useful feature to have in Sigil.

I would welcome it when trying to determine why paragraph 16 doesn't look the same style-wise as paragraph 6.

If I break out into another editor I lose Preview (I would not expect that to collapse and expand) and the customised Sigil specific features - like clips. Those things matter far less when using an external to to edit images, audio etc.

BR
BetterRed is online now   Reply With Quote
Old 07-04-2017, 08:34 PM   #8
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
That is what The inspector widget it for in Preview. Give it a try, it tells you what css is active, can collapse and uncollapse the tree, etc. It has many useful features but most people don't play around enough with it to see all that can be done with it.

Quote:
Originally Posted by BetterRed View Post
Nevertheless, collapsible code blocks would be a useful feature to have in Sigil.

I would welcome it when trying to determine why paragraph 16 doesn't look the same style-wise as paragraph 6.

If I break out into another editor I lose Preview (I would not expect that to collapse and expand) and the customised Sigil specific features - like clips. Those things matter far less when using an external to to edit images, audio etc.

BR
KevinH is offline   Reply With Quote
Old 07-05-2017, 08:17 PM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by KevinH View Post
That is what The inspector widget it for in Preview. Give it a try, it tells you what css is active, can collapse and uncollapse the tree, etc. It has many useful features but most people don't play around enough with it to see all that can be done with it.
AFAIK I can't edit in the Inspector window. And whilst it's possible, finding code, copying it and then pasting it into the CV window feels 'awkward' to me.

On the odd occasions I need it I prefer break out into an editor I know, such as Notepad++, Bowpad, or TabEdit Pro, do what I need to do there and return to Sigil ASAP.

BR
BetterRed is online now   Reply With Quote
Old 07-06-2017, 09:44 AM   #10
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,643
Karma: 5433388
Join Date: Nov 2009
Device: many
No you can not edit inside the Inspector, but I thought your "use case" for it was to be able to more easily track down which css was active for which element. The Inspector can easily do that and you can edit in the CodeView window at the same time.

I simply can not see a strong case for a tree like collapsable structure for editing xhtml any more than I can see it used for writing structured programming languages. Indentation and whitespace does more to help in that regard than any editor feature. That is why we enabled the PrettyPrint option to indent code to allow the structure to be more easily seen.

I will think about it as a long term option but I think the combination of "PrettyPrint", the "Inspector", and "Open With" makes this a very very low priority need.


Quote:
Originally Posted by BetterRed View Post
AFAIK I can't edit in the Inspector window. And whilst it's possible, finding code, copying it and then pasting it into the CV window feels 'awkward' to me.

On the odd occasions I need it I prefer break out into an editor I know, such as Notepad++, Bowpad, or TabEdit Pro, do what I need to do there and return to Sigil ASAP.

BR

Last edited by KevinH; 07-06-2017 at 11:24 AM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil metadata code questions authorava Sigil 2 01-24-2017 03:21 PM
Can I use the code Sigil uses for Covers for other images? rosshalde Sigil 4 12-23-2014 11:00 AM
Sigil code hints kakkalla Sigil 12 05-13-2013 03:31 PM
Calibre /author: collapse and expand Trees? Raimund Parker Calibre 4 12-12-2012 06:53 PM
Are the SGC_# a sigil code? JaneFancher Sigil 14 09-06-2010 04:08 AM


All times are GMT -4. The time now is 02:29 AM.


MobileRead.com is a privately owned, operated and funded community.