View Single Post
Old 08-22-2023, 12:02 PM   #11
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by KevinH View Post
Just use Sigil's Clips feature. That is exactly what it was meant to do. Make a clip for each snippet you commonly use.
Yep! Exactly!

Using the Clips Editor

You can add/edit all your clips by pressing:
  • Tools > Clips Editor (Ctrl+Alt+C)

Then you can create multiple Clips to help mark up languages like:

- - -

Name: English
Text: <span class="english" lang="en" xml:lang="en">\1</span>

Name: French
Text: <span class="french" lang="fr" xml:lang="fr">\1</span>

Name: German
Text: <span class="german" lang="de" xml:lang="de">\1</span>

- - -

Side Note: See the \1? In Clips, that means Sigil will insert "whatever you have highlighted" in that spot!

Side Note #2: If you constantly find yourself copying/pasting/inserting large "templates" of code, Clips are great for that too!

- - -

Setting Up the Clips Window/Toolbar

Now, if you press:
  • View > Clips

you can show an easy-to-click window of all your Clips. For example, I set mine up in Sigil's lower-left corner:

Click image for larger version

Name:	Sigil.2.0.-.Clips.Window.png
Views:	330
Size:	22.3 KB
ID:	203269

Or, if you prefer toolbars, you can:
  • View > Toolbars > Clips Bar
  • View > Toolbars > Clips Bar2

to enable extra toolbars up top:

Click image for larger version

Name:	Sigil.2.0.-.Clips.Toolbar.png
Views:	315
Size:	22.3 KB
ID:	203270

Actually Using The Clips!

Now, if you had text like:

Code:
<p>This is an example of English.</p>
<p>This is an example of François.</p>
<p>This is an example of Deutsch.</p>
you can:
  • Highlight your word/sentence/text/code.
  • Click on a Clip.

and Sigil will insert that Clip code (around your highlighted text):

Code:
<p>This is an example of <span class="english" lang="en" xml:lang="en">English</span>.</p>
<p>This is an example of <span class="french" lang="fr" xml:lang="fr">François</span>.</p>
<p>This is an example of <span class="german" lang="de" xml:lang="de">Deutsch</span>.</p>
Click image for larger version

Name:	Sigil.2.0.-.Clips.Language.Marked.png
Views:	320
Size:	23.7 KB
ID:	203271

- - -

Quote:
Originally Posted by StephV View Post
It's just that I usually do more than just code review in one go, because we convert a lot of files from PDF, and that introduces typos... So Sigil has the big perk of allowing me to review and enrich code + at a glance find a few typos (and more using the spellcheck tool later in my process).
You'll probably want to read a ton of all my tips/tricks.

I've written 2200 posts since 2012 all about this PDF->ebook + ebook conversion + ebook cleaning stuff.

For example, you can probably type this into your favorite search engine:

Code:
Sigil clips Tex2002ans site:mobileread.com
language markup Tex2002ans site:mobileread.com
and come across many of my explanations/tutorials, like:

On PDF->EPUB itself... you may be interested in my recent posts in:

Quote:
Originally Posted by StephV View Post
I also have co-workers that I will need to teach whatever alternative I decide on se we're all on the same page. But that part is a me-problem!
Oh? What's the project? Do you work for a publisher?

Last edited by Tex2002ans; 08-22-2023 at 12:12 PM.
Tex2002ans is offline   Reply With Quote